mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
20
applications/solvers/multiphase/cavitatingFoam/alphavPsi.H
Normal file
20
applications/solvers/multiphase/cavitatingFoam/alphavPsi.H
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
alphav =
|
||||||
|
max
|
||||||
|
(
|
||||||
|
min
|
||||||
|
(
|
||||||
|
(rho - rholSat)/(rhovSat - rholSat),
|
||||||
|
scalar(1)
|
||||||
|
),
|
||||||
|
scalar(0)
|
||||||
|
);
|
||||||
|
alphal = 1.0 - alphav;
|
||||||
|
|
||||||
|
Info<< "max-min alphav: " << max(alphav).value()
|
||||||
|
<< " " << min(alphav).value() << endl;
|
||||||
|
|
||||||
|
psiModel->correct();
|
||||||
|
|
||||||
|
//Info<< "min a: " << 1.0/sqrt(max(psi)).value() << endl;
|
||||||
|
}
|
||||||
@ -101,7 +101,7 @@ int main(int argc, char *argv[])
|
|||||||
while (pimple.loop())
|
while (pimple.loop())
|
||||||
{
|
{
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
#include "gammaPsi.H"
|
#include "alphavPsi.H"
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
// --- Pressure corrector loop
|
// --- Pressure corrector loop
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
p =
|
p =
|
||||||
(
|
(
|
||||||
rho
|
rho
|
||||||
- gamma2*rhol0
|
- alphal*rhol0
|
||||||
- ((gamma*psiv + gamma2*psil) - psi)*pSat
|
- ((alphav*psiv + alphal*psil) - psi)*pSat
|
||||||
)/psi;
|
)/psi;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,13 +52,13 @@
|
|||||||
|
|
||||||
rho == max(rho0 + psi*p, rhoMin);
|
rho == max(rho0 + psi*p, rhoMin);
|
||||||
|
|
||||||
#include "gammaPsi.H"
|
#include "alphavPsi.H"
|
||||||
|
|
||||||
p =
|
p =
|
||||||
(
|
(
|
||||||
rho
|
rho
|
||||||
- gamma2*rhol0
|
- alphal*rhol0
|
||||||
- ((gamma*psiv + gamma2*psil) - psi)*pSat
|
- ((alphav*psiv + alphal*psil) - psi)*pSat
|
||||||
)/psi;
|
)/psi;
|
||||||
|
|
||||||
p.correctBoundaryConditions();
|
p.correctBoundaryConditions();
|
||||||
|
|||||||
@ -72,7 +72,7 @@ int main(int argc, char *argv[])
|
|||||||
while (pimple.loop())
|
while (pimple.loop())
|
||||||
{
|
{
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
#include "gammaPsi.H"
|
#include "alphavPsi.H"
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
// --- Pressure corrector loop
|
// --- Pressure corrector loop
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
volScalarField thermoRho = psi*p + gamma2*rhol0;
|
volScalarField thermoRho = psi*p + alphal*rhol0;
|
||||||
|
|
||||||
dimensionedScalar totalMass = fvc::domainIntegrate(rho);
|
dimensionedScalar totalMass = fvc::domainIntegrate(rho);
|
||||||
|
|
||||||
|
|||||||
@ -44,19 +44,19 @@
|
|||||||
|
|
||||||
Info<< "Reading transportProperties\n" << endl;
|
Info<< "Reading transportProperties\n" << endl;
|
||||||
|
|
||||||
incompressibleTwoPhaseMixture twoPhaseProperties(U, phiv, "gamma");
|
incompressibleTwoPhaseMixture twoPhaseProperties(U, phiv);
|
||||||
|
|
||||||
volScalarField& gamma(twoPhaseProperties.alpha1());
|
volScalarField& alphav(twoPhaseProperties.alpha1());
|
||||||
gamma.oldTime();
|
alphav.oldTime();
|
||||||
|
|
||||||
volScalarField& gamma2(twoPhaseProperties.alpha2());
|
volScalarField& alphal(twoPhaseProperties.alpha2());
|
||||||
|
|
||||||
Info<< "Creating compressibilityModel\n" << endl;
|
Info<< "Creating compressibilityModel\n" << endl;
|
||||||
autoPtr<barotropicCompressibilityModel> psiModel =
|
autoPtr<barotropicCompressibilityModel> psiModel =
|
||||||
barotropicCompressibilityModel::New
|
barotropicCompressibilityModel::New
|
||||||
(
|
(
|
||||||
thermodynamicProperties,
|
thermodynamicProperties,
|
||||||
gamma
|
alphav
|
||||||
);
|
);
|
||||||
|
|
||||||
const volScalarField& psi = psiModel->psi();
|
const volScalarField& psi = psiModel->psi();
|
||||||
@ -64,8 +64,8 @@
|
|||||||
rho == max
|
rho == max
|
||||||
(
|
(
|
||||||
psi*p
|
psi*p
|
||||||
+ gamma2*rhol0
|
+ alphal*rhol0
|
||||||
+ ((gamma*psiv + gamma2*psil) - psi)*pSat,
|
+ ((alphav*psiv + alphal*psil) - psi)*pSat,
|
||||||
rhoMin
|
rhoMin
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
gamma = max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));
|
|
||||||
gamma2 = 1.0 - gamma;
|
|
||||||
|
|
||||||
Info<< "max-min gamma: " << max(gamma).value()
|
|
||||||
<< " " << min(gamma).value() << endl;
|
|
||||||
|
|
||||||
psiModel->correct();
|
|
||||||
|
|
||||||
//Info<< "min a: " << 1.0/sqrt(max(psi)).value() << endl;
|
|
||||||
}
|
|
||||||
@ -4,8 +4,8 @@
|
|||||||
p =
|
p =
|
||||||
(
|
(
|
||||||
rho
|
rho
|
||||||
- gamma2*rhol0
|
- alphal*rhol0
|
||||||
- ((gamma*psiv + gamma2*psil) - psi)*pSat
|
- ((alphav*psiv + alphal*psil) - psi)*pSat
|
||||||
)/psi;
|
)/psi;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +29,7 @@
|
|||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(psi, p)
|
fvm::ddt(psi, p)
|
||||||
- (rhol0 + (psil - psiv)*pSat)*fvc::ddt(gamma) - pSat*fvc::ddt(psi)
|
- (rhol0 + (psil - psiv)*pSat)*fvc::ddt(alphav) - pSat*fvc::ddt(psi)
|
||||||
+ fvc::div(phiv, rho)
|
+ fvc::div(phiv, rho)
|
||||||
+ fvc::div(phiGradp)
|
+ fvc::div(phiGradp)
|
||||||
- fvm::laplacian(rAUf, p)
|
- fvm::laplacian(rAUf, p)
|
||||||
@ -49,18 +49,18 @@
|
|||||||
rho == max
|
rho == max
|
||||||
(
|
(
|
||||||
psi*p
|
psi*p
|
||||||
+ gamma2*rhol0
|
+ alphal*rhol0
|
||||||
+ ((gamma*psiv + gamma2*psil) - psi)*pSat,
|
+ ((alphav*psiv + alphal*psil) - psi)*pSat,
|
||||||
rhoMin
|
rhoMin
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "gammaPsi.H"
|
#include "alphavPsi.H"
|
||||||
|
|
||||||
p =
|
p =
|
||||||
(
|
(
|
||||||
rho
|
rho
|
||||||
- gamma2*rhol0
|
- alphal*rhol0
|
||||||
- ((gamma*psiv + gamma2*psil) - psi)*pSat
|
- ((alphav*psiv + alphal*psil) - psi)*pSat
|
||||||
)/psi;
|
)/psi;
|
||||||
|
|
||||||
p.correctBoundaryConditions();
|
p.correctBoundaryConditions();
|
||||||
|
|||||||
@ -49,12 +49,12 @@ Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo
|
|||||||
thermo2_(NULL)
|
thermo2_(NULL)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
volScalarField T1("T" + phase1Name(), T_);
|
volScalarField T1(IOobject::groupName("T", phase1Name()), T_);
|
||||||
T1.write();
|
T1.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
volScalarField T2("T" + phase2Name(), T_);
|
volScalarField T2(IOobject::groupName("T", phase2Name()), T_);
|
||||||
T2.write();
|
T2.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
|
||||||
set -x
|
|
||||||
|
|
||||||
wclean libso twoPhaseSystem
|
|
||||||
wclean libso interfacialModels
|
|
||||||
wclean libso phaseIncompressibleTurbulenceModels
|
|
||||||
wclean
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
|
||||||
set -x
|
|
||||||
|
|
||||||
wmakeLnInclude interfacialModels
|
|
||||||
wmake libso twoPhaseSystem
|
|
||||||
wmake libso interfacialModels
|
|
||||||
wmake libso phaseIncompressibleTurbulenceModels
|
|
||||||
wmake
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
# include "CourantNo.H"
|
|
||||||
|
|
||||||
{
|
|
||||||
scalar UrCoNum = 0.5*gMax
|
|
||||||
(
|
|
||||||
fvc::surfaceSum(mag(phi1 - phi2))().internalField()/mesh.V().field()
|
|
||||||
)*runTime.deltaTValue();
|
|
||||||
|
|
||||||
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
|
|
||||||
|
|
||||||
CoNum = max(CoNum, UrCoNum);
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
DDtU1 =
|
|
||||||
fvc::ddt(U1)
|
|
||||||
+ fvc::div(phi1, U1)
|
|
||||||
- fvc::div(phi1)*U1;
|
|
||||||
mrfZones.addCoriolis(U1, DDtU1);
|
|
||||||
|
|
||||||
DDtU2 =
|
|
||||||
fvc::ddt(U2)
|
|
||||||
+ fvc::div(phi2, U2)
|
|
||||||
- fvc::div(phi2)*U2;
|
|
||||||
mrfZones.addCoriolis(U2, DDtU2);
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
compressibleTwoPhaseEulerFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/compressibleTwoPhaseEulerFoam
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
EXE_INC = \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
|
||||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
|
||||||
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
|
|
||||||
-IphaseIncompressibleTurbulenceModels/lnInclude \
|
|
||||||
-IinterfacialModels/lnInclude \
|
|
||||||
-ItwoPhaseSystem/lnInclude \
|
|
||||||
-Iaveraging
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
|
||||||
-lfluidThermophysicalModels \
|
|
||||||
-lspecie \
|
|
||||||
-lturbulenceModels \
|
|
||||||
-lincompressibleTurbulenceModels \
|
|
||||||
-lphaseIncompressibleTurbulenceModels \
|
|
||||||
-lincompressibleTransportModels \
|
|
||||||
-lcompressibleTwoPhaseSystem \
|
|
||||||
-lcompressibleEulerianInterfacialModels \
|
|
||||||
-lfiniteVolume \
|
|
||||||
-lmeshTools
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
mrfZones.correctBoundaryVelocity(U1);
|
|
||||||
mrfZones.correctBoundaryVelocity(U2);
|
|
||||||
mrfZones.correctBoundaryVelocity(U);
|
|
||||||
|
|
||||||
fvVectorMatrix U1Eqn(U1, U1.dimensions()*dimVol/dimTime);
|
|
||||||
fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
|
|
||||||
|
|
||||||
volScalarField dragCoeff(fluid.dragCoeff());
|
|
||||||
|
|
||||||
{
|
|
||||||
volVectorField liftForce(fluid.liftForce(U));
|
|
||||||
|
|
||||||
{
|
|
||||||
U1Eqn =
|
|
||||||
(
|
|
||||||
fvm::ddt(alpha1, U1)
|
|
||||||
+ fvm::div(alphaPhi1, U1)
|
|
||||||
|
|
||||||
// Compressibity correction
|
|
||||||
- fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), U1)
|
|
||||||
|
|
||||||
+ fluid.Cvm()*rho2*alpha1*alpha2/rho1*
|
|
||||||
(
|
|
||||||
fvm::ddt(U1)
|
|
||||||
+ fvm::div(phi1, U1)
|
|
||||||
- fvm::Sp(fvc::div(phi1), U1)
|
|
||||||
)
|
|
||||||
|
|
||||||
+ turbulence1->divDevReff(U1)
|
|
||||||
==
|
|
||||||
- fvm::Sp(dragCoeff/rho1, U1)
|
|
||||||
- alpha1*alpha2/rho1*(liftForce - fluid.Cvm()*rho2*DDtU2)
|
|
||||||
);
|
|
||||||
mrfZones.addCoriolis(alpha1*(1 + fluid.Cvm()*rho2*alpha2/rho1), U1Eqn);
|
|
||||||
U1Eqn.relax();
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
U2Eqn =
|
|
||||||
(
|
|
||||||
fvm::ddt(alpha2, U2)
|
|
||||||
+ fvm::div(alphaPhi2, U2)
|
|
||||||
|
|
||||||
// Compressibity correction
|
|
||||||
- fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), U2)
|
|
||||||
|
|
||||||
+ fluid.Cvm()*rho2*alpha1*alpha2/rho2*
|
|
||||||
(
|
|
||||||
fvm::ddt(U2)
|
|
||||||
+ fvm::div(phi2, U2)
|
|
||||||
- fvm::Sp(fvc::div(phi2), U2)
|
|
||||||
)
|
|
||||||
+ turbulence2->divDevReff(U2)
|
|
||||||
==
|
|
||||||
- fvm::Sp(dragCoeff/rho2, U2)
|
|
||||||
+ alpha1*alpha2/rho2*(liftForce + fluid.Cvm()*rho2*DDtU1)
|
|
||||||
);
|
|
||||||
mrfZones.addCoriolis(alpha2*(1 + fluid.Cvm()*rho2*alpha1/rho2), U2Eqn);
|
|
||||||
U2Eqn.relax();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,142 +0,0 @@
|
|||||||
{
|
|
||||||
word alphaScheme("div(phi," + alpha1.name() + ')');
|
|
||||||
word alpharScheme("div(phir," + alpha1.name() + ')');
|
|
||||||
|
|
||||||
surfaceScalarField phic("phic", phi);
|
|
||||||
surfaceScalarField phir("phir", phi1 - phi2);
|
|
||||||
|
|
||||||
surfaceScalarField alpha1f(fvc::interpolate(max(alpha1, scalar(0))));
|
|
||||||
|
|
||||||
tmp<surfaceScalarField> pPrimeByA;
|
|
||||||
|
|
||||||
if (implicitPhasePressure)
|
|
||||||
{
|
|
||||||
pPrimeByA =
|
|
||||||
fvc::interpolate((1.0/rho1)*rAU1*turbulence1().pPrime())
|
|
||||||
+ fvc::interpolate((1.0/rho2)*rAU2*turbulence2().pPrime());
|
|
||||||
|
|
||||||
surfaceScalarField phiP
|
|
||||||
(
|
|
||||||
pPrimeByA()*fvc::snGrad(alpha1, "bounded")*mesh.magSf()
|
|
||||||
);
|
|
||||||
|
|
||||||
phic += alpha1f*phiP;
|
|
||||||
phir += phiP;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int acorr=0; acorr<nAlphaCorr; acorr++)
|
|
||||||
{
|
|
||||||
volScalarField::DimensionedInternalField Sp
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"Sp",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar("Sp", dgdt.dimensions(), 0.0)
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField::DimensionedInternalField Su
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"Su",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh
|
|
||||||
),
|
|
||||||
// Divergence term is handled explicitly to be
|
|
||||||
// consistent with the explicit transport solution
|
|
||||||
fvc::div(phi)*min(alpha1, scalar(1))
|
|
||||||
);
|
|
||||||
|
|
||||||
forAll(dgdt, celli)
|
|
||||||
{
|
|
||||||
if (dgdt[celli] > 0.0 && alpha1[celli] > 0.0)
|
|
||||||
{
|
|
||||||
Sp[celli] -= dgdt[celli]*alpha1[celli];
|
|
||||||
Su[celli] += dgdt[celli]*alpha1[celli];
|
|
||||||
}
|
|
||||||
else if (dgdt[celli] < 0.0 && alpha1[celli] < 1.0)
|
|
||||||
{
|
|
||||||
Sp[celli] += dgdt[celli]*(1.0 - alpha1[celli]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dimensionedScalar totalDeltaT = runTime.deltaT();
|
|
||||||
if (nAlphaSubCycles > 1)
|
|
||||||
{
|
|
||||||
alphaPhi1 = dimensionedScalar("0", alphaPhi1.dimensions(), 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
for
|
|
||||||
(
|
|
||||||
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
|
|
||||||
!(++alphaSubCycle).end();
|
|
||||||
)
|
|
||||||
{
|
|
||||||
surfaceScalarField alphaPhic1
|
|
||||||
(
|
|
||||||
fvc::flux
|
|
||||||
(
|
|
||||||
phic,
|
|
||||||
alpha1,
|
|
||||||
alphaScheme
|
|
||||||
)
|
|
||||||
+ fvc::flux
|
|
||||||
(
|
|
||||||
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
|
|
||||||
alpha1,
|
|
||||||
alpharScheme
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
MULES::explicitSolve
|
|
||||||
(
|
|
||||||
geometricOneField(),
|
|
||||||
alpha1,
|
|
||||||
phi,
|
|
||||||
alphaPhic1,
|
|
||||||
Sp,
|
|
||||||
Su,
|
|
||||||
1,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
|
|
||||||
if (nAlphaSubCycles > 1)
|
|
||||||
{
|
|
||||||
alphaPhi1 += (runTime.deltaT()/totalDeltaT)*alphaPhic1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
alphaPhi1 = alphaPhic1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (implicitPhasePressure)
|
|
||||||
{
|
|
||||||
fvScalarMatrix alpha1Eqn
|
|
||||||
(
|
|
||||||
fvm::ddt(alpha1) - fvc::ddt(alpha1)
|
|
||||||
- fvm::laplacian(alpha1f*pPrimeByA, alpha1, "bounded")
|
|
||||||
);
|
|
||||||
|
|
||||||
alpha1Eqn.relax();
|
|
||||||
alpha1Eqn.solve();
|
|
||||||
|
|
||||||
alphaPhi1 += alpha1Eqn.flux();
|
|
||||||
}
|
|
||||||
|
|
||||||
alphaPhi2 = phi - alphaPhi1;
|
|
||||||
alpha2 = scalar(1) - alpha1;
|
|
||||||
|
|
||||||
Info<< "Dispersed phase volume fraction = "
|
|
||||||
<< alpha1.weightedAverage(mesh.V()).value()
|
|
||||||
<< " Min(alpha1) = " << min(alpha1).value()
|
|
||||||
<< " Max(alpha1) = " << max(alpha1).value()
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rho = fluid.rho();
|
|
||||||
@ -1,110 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Application
|
|
||||||
compressibleTwoPhaseEulerFoam
|
|
||||||
|
|
||||||
Description
|
|
||||||
Solver for a system of 2 compressible fluid phases with one phase
|
|
||||||
dispersed, e.g. gas bubbles in a liquid including heat-transfer.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "fvCFD.H"
|
|
||||||
#include "MULES.H"
|
|
||||||
#include "subCycle.H"
|
|
||||||
#include "rhoThermo.H"
|
|
||||||
#include "twoPhaseSystem.H"
|
|
||||||
#include "dragModel.H"
|
|
||||||
#include "heatTransferModel.H"
|
|
||||||
#include "PhaseIncompressibleTurbulenceModel.H"
|
|
||||||
#include "pimpleControl.H"
|
|
||||||
#include "IOMRFZoneList.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
#include "setRootCase.H"
|
|
||||||
|
|
||||||
#include "createTime.H"
|
|
||||||
#include "createMesh.H"
|
|
||||||
#include "readGravitationalAcceleration.H"
|
|
||||||
#include "createFields.H"
|
|
||||||
#include "createMRFZones.H"
|
|
||||||
#include "initContinuityErrs.H"
|
|
||||||
#include "readTimeControls.H"
|
|
||||||
#include "CourantNos.H"
|
|
||||||
#include "setInitialDeltaT.H"
|
|
||||||
|
|
||||||
pimpleControl pimple(mesh);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
|
||||||
|
|
||||||
while (runTime.run())
|
|
||||||
{
|
|
||||||
#include "readTwoPhaseEulerFoamControls.H"
|
|
||||||
#include "CourantNos.H"
|
|
||||||
#include "setDeltaT.H"
|
|
||||||
|
|
||||||
runTime++;
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
// --- Pressure-velocity PIMPLE corrector loop
|
|
||||||
while (pimple.loop())
|
|
||||||
{
|
|
||||||
#include "alphaEqn.H"
|
|
||||||
#include "EEqns.H"
|
|
||||||
#include "UEqns.H"
|
|
||||||
|
|
||||||
// --- Pressure corrector loop
|
|
||||||
while (pimple.correct())
|
|
||||||
{
|
|
||||||
#include "pEqn.H"
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "DDtU.H"
|
|
||||||
|
|
||||||
if (pimple.turbCorr())
|
|
||||||
{
|
|
||||||
turbulence1->correct();
|
|
||||||
turbulence2->correct();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "write.H"
|
|
||||||
|
|
||||||
Info<< "ExecutionTime = "
|
|
||||||
<< runTime.elapsedCpuTime()
|
|
||||||
<< " s\n\n" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,185 +0,0 @@
|
|||||||
Info<< "Creating twoPhaseSystem\n" << endl;
|
|
||||||
|
|
||||||
twoPhaseSystem fluid(mesh);
|
|
||||||
|
|
||||||
phaseModel& phase1 = fluid.phase1();
|
|
||||||
phaseModel& phase2 = fluid.phase2();
|
|
||||||
|
|
||||||
volScalarField& alpha1 = phase1;
|
|
||||||
volScalarField& alpha2 = phase2;
|
|
||||||
|
|
||||||
volVectorField& U1 = phase1.U();
|
|
||||||
surfaceScalarField& phi1 = phase1.phi();
|
|
||||||
surfaceScalarField alphaPhi1
|
|
||||||
(
|
|
||||||
IOobject::groupName("alphaPhi", phase1.name()),
|
|
||||||
fvc::interpolate(alpha1)*phi1
|
|
||||||
);
|
|
||||||
|
|
||||||
volVectorField& U2 = phase2.U();
|
|
||||||
surfaceScalarField& phi2 = phase2.phi();
|
|
||||||
surfaceScalarField alphaPhi2
|
|
||||||
(
|
|
||||||
IOobject::groupName("alphaPhi", phase2.name()),
|
|
||||||
fvc::interpolate(alpha2)*phi2
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar pMin
|
|
||||||
(
|
|
||||||
"pMin",
|
|
||||||
dimPressure,
|
|
||||||
fluid.lookup("pMin")
|
|
||||||
);
|
|
||||||
|
|
||||||
rhoThermo& thermo1 = phase1.thermo();
|
|
||||||
rhoThermo& thermo2 = phase2.thermo();
|
|
||||||
|
|
||||||
volScalarField& p = thermo1.p();
|
|
||||||
|
|
||||||
volScalarField& rho1 = thermo1.rho();
|
|
||||||
const volScalarField& psi1 = thermo1.psi();
|
|
||||||
|
|
||||||
volScalarField& rho2 = thermo2.rho();
|
|
||||||
const volScalarField& psi2 = thermo2.psi();
|
|
||||||
|
|
||||||
volVectorField U
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"U",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
fluid.U()
|
|
||||||
);
|
|
||||||
|
|
||||||
surfaceScalarField phi
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"phi",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
fluid.phi()
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField rho
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"rho",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
fluid.rho()
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Calculating field DDtU1 and DDtU2\n" << endl;
|
|
||||||
|
|
||||||
volVectorField DDtU1
|
|
||||||
(
|
|
||||||
fvc::ddt(U1)
|
|
||||||
+ fvc::div(phi1, U1)
|
|
||||||
- fvc::div(phi1)*U1
|
|
||||||
);
|
|
||||||
|
|
||||||
volVectorField DDtU2
|
|
||||||
(
|
|
||||||
fvc::ddt(U2)
|
|
||||||
+ fvc::div(phi2, U2)
|
|
||||||
- fvc::div(phi2)*U2
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Calculating field g.h\n" << endl;
|
|
||||||
volScalarField gh("gh", g & mesh.C());
|
|
||||||
|
|
||||||
volScalarField rAU1
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
IOobject::groupName("rAU", phase1.name()),
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0)
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField rAU2
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
IOobject::groupName("rAU", phase2.name()),
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0)
|
|
||||||
);
|
|
||||||
|
|
||||||
label pRefCell = 0;
|
|
||||||
scalar pRefValue = 0.0;
|
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
|
|
||||||
|
|
||||||
|
|
||||||
volScalarField dgdt
|
|
||||||
(
|
|
||||||
pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001))
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Creating field dpdt\n" << endl;
|
|
||||||
volScalarField dpdt
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"dpdt",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Creating field kinetic energy K\n" << endl;
|
|
||||||
volScalarField K1(IOobject::groupName("K", phase1.name()), 0.5*magSqr(U1));
|
|
||||||
volScalarField K2(IOobject::groupName("K", phase2.name()), 0.5*magSqr(U2));
|
|
||||||
|
|
||||||
autoPtr<PhaseIncompressibleTurbulenceModel<phaseModel> >
|
|
||||||
turbulence1
|
|
||||||
(
|
|
||||||
PhaseIncompressibleTurbulenceModel<phaseModel>::New
|
|
||||||
(
|
|
||||||
alpha1,
|
|
||||||
U1,
|
|
||||||
alphaPhi1,
|
|
||||||
phi1,
|
|
||||||
phase1
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<PhaseIncompressibleTurbulenceModel<phaseModel> >
|
|
||||||
turbulence2
|
|
||||||
(
|
|
||||||
PhaseIncompressibleTurbulenceModel<phaseModel>::New
|
|
||||||
(
|
|
||||||
alpha2,
|
|
||||||
U2,
|
|
||||||
alphaPhi2,
|
|
||||||
phi2,
|
|
||||||
phase2
|
|
||||||
)
|
|
||||||
);
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
IOMRFZoneList mrfZones(mesh);
|
|
||||||
mrfZones.correctBoundaryVelocity(U1);
|
|
||||||
mrfZones.correctBoundaryVelocity(U2);
|
|
||||||
mrfZones.correctBoundaryVelocity(U);
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
dragModels/dragModel/dragModel.C
|
|
||||||
dragModels/dragModel/newDragModel.C
|
|
||||||
dragModels/Ergun/Ergun.C
|
|
||||||
dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C
|
|
||||||
dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C
|
|
||||||
dragModels/SchillerNaumann/SchillerNaumann.C
|
|
||||||
dragModels/Gibilaro/Gibilaro.C
|
|
||||||
dragModels/WenYu/WenYu.C
|
|
||||||
dragModels/SyamlalOBrien/SyamlalOBrien.C
|
|
||||||
|
|
||||||
heatTransferModels/heatTransferModel/heatTransferModel.C
|
|
||||||
heatTransferModels/heatTransferModel/newHeatTransferModel.C
|
|
||||||
heatTransferModels/RanzMarshall/RanzMarshall.C
|
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libcompressibleEulerianInterfacialModels
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
EXE_INC = \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/transportModel \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
|
||||||
-I../twoPhaseSystem/lnInclude
|
|
||||||
|
|
||||||
LIB_LIBS = \
|
|
||||||
-lcompressibleTwoPhaseSystem \
|
|
||||||
-lfluidThermophysicalModels \
|
|
||||||
-lspecie
|
|
||||||
@ -1,83 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "Ergun.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(Ergun, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
dragModel,
|
|
||||||
Ergun,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::Ergun::Ergun
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
)
|
|
||||||
:
|
|
||||||
dragModel(interfaceDict, alpha1, phase1, phase2)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::Ergun::~Ergun()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::Ergun::K
|
|
||||||
(
|
|
||||||
const volScalarField& Ur
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
|
|
||||||
|
|
||||||
return
|
|
||||||
150.0*alpha1_*phase2_.nu()*phase2_.rho()
|
|
||||||
/sqr(alpha2*phase1_.d())
|
|
||||||
+ 1.75*phase2_.rho()*Ur/(alpha2*phase1_.d());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,96 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::dragModels::Ergun
|
|
||||||
|
|
||||||
Description
|
|
||||||
H, Enwald, E. Peirano, A-E Almstedt
|
|
||||||
'Eulerian Two-Phase Flow Theory Applied to Fluidization'
|
|
||||||
Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996)
|
|
||||||
Eq. 104, p. 42
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
Ergun.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef Ergun_H
|
|
||||||
#define Ergun_H
|
|
||||||
|
|
||||||
#include "dragModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class Ergun Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class Ergun
|
|
||||||
:
|
|
||||||
public dragModel
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("Ergun");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
Ergun
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~Ergun();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace dragModels
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,82 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "Gibilaro.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(Gibilaro, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
dragModel,
|
|
||||||
Gibilaro,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::Gibilaro::Gibilaro
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
)
|
|
||||||
:
|
|
||||||
dragModel(interfaceDict, alpha1, phase1, phase2)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::Gibilaro::~Gibilaro()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::Gibilaro::K
|
|
||||||
(
|
|
||||||
const volScalarField& Ur
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
|
|
||||||
volScalarField bp(pow(alpha2, -2.8));
|
|
||||||
volScalarField Re(max(alpha2*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
|
||||||
|
|
||||||
return (17.3/Re + scalar(0.336))*phase2_.rho()*Ur*bp/phase1_.d();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,96 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::dragModels::Gibilaro
|
|
||||||
|
|
||||||
Description
|
|
||||||
H, Enwald, E. Peirano, A-E Almstedt
|
|
||||||
'Eulerian Two-Phase Flow Theory Applied to Fluidization'
|
|
||||||
Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996)
|
|
||||||
Eq. 106, p. 43
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
Gibilaro.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef Gibilaro_H
|
|
||||||
#define Gibilaro_H
|
|
||||||
|
|
||||||
#include "dragModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class Gibilaro Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class Gibilaro
|
|
||||||
:
|
|
||||||
public dragModel
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("Gibilaro");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
Gibilaro
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~Gibilaro();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace dragModels
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,99 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "GidaspowErgunWenYu.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(GidaspowErgunWenYu, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
dragModel,
|
|
||||||
GidaspowErgunWenYu,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::GidaspowErgunWenYu::GidaspowErgunWenYu
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
)
|
|
||||||
:
|
|
||||||
dragModel(interfaceDict, alpha1, phase1, phase2)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::GidaspowErgunWenYu::~GidaspowErgunWenYu()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowErgunWenYu::K
|
|
||||||
(
|
|
||||||
const volScalarField& Ur
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
|
|
||||||
volScalarField d(phase1_.d());
|
|
||||||
volScalarField bp(pow(alpha2, -2.65));
|
|
||||||
volScalarField Re(max(Ur*d/phase2_.nu(), scalar(1.0e-3)));
|
|
||||||
|
|
||||||
volScalarField Cds
|
|
||||||
(
|
|
||||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
|
||||||
+ pos(Re - 1000)*0.44
|
|
||||||
);
|
|
||||||
|
|
||||||
// Wen and Yu (1966)
|
|
||||||
return
|
|
||||||
(
|
|
||||||
pos(alpha2 - 0.8)
|
|
||||||
*(0.75*Cds*phase2_.rho()*Ur*bp/d)
|
|
||||||
+ neg(alpha2 - 0.8)
|
|
||||||
*(
|
|
||||||
150.0*alpha1_*phase2_.nu()*phase2_.rho()/(sqr(alpha2*d))
|
|
||||||
+ 1.75*phase2_.rho()*Ur/(alpha2*d)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,94 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::dragModels::GidaspowErgunWenYu
|
|
||||||
|
|
||||||
Description
|
|
||||||
D. Gidaspow, Multiphase flow and fluidization,
|
|
||||||
Academic Press, New York, 1994.
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
GidaspowErgunWenYu.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef GidaspowErgunWenYu_H
|
|
||||||
#define GidaspowErgunWenYu_H
|
|
||||||
|
|
||||||
#include "dragModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class GidaspowErgunWenYu Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class GidaspowErgunWenYu
|
|
||||||
:
|
|
||||||
public dragModel
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("GidaspowErgunWenYu");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
GidaspowErgunWenYu
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~GidaspowErgunWenYu();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace dragModels
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,88 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "GidaspowSchillerNaumann.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(GidaspowSchillerNaumann, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
dragModel,
|
|
||||||
GidaspowSchillerNaumann,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::GidaspowSchillerNaumann::GidaspowSchillerNaumann
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
)
|
|
||||||
:
|
|
||||||
dragModel(interfaceDict, alpha1, phase1, phase2)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::GidaspowSchillerNaumann::~GidaspowSchillerNaumann()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowSchillerNaumann::K
|
|
||||||
(
|
|
||||||
const volScalarField& Ur
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1e-6)));
|
|
||||||
volScalarField bp(pow(alpha2, -2.65));
|
|
||||||
|
|
||||||
volScalarField Re(max(alpha2*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
|
||||||
volScalarField Cds
|
|
||||||
(
|
|
||||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
|
||||||
+ pos(Re - 1000)*0.44
|
|
||||||
);
|
|
||||||
|
|
||||||
return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,103 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::dragModels::GidaspowSchillerNaumann
|
|
||||||
|
|
||||||
Description
|
|
||||||
H, Enwald, E. Peirano, A-E Almstedt
|
|
||||||
'Eulerian Two-Phase Flow Theory Applied to Fluidization'
|
|
||||||
Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996)
|
|
||||||
Eq. 86-87, p. 40
|
|
||||||
|
|
||||||
This is identical to the Wen and Yu, Rowe model Table 3.6 p.56 in
|
|
||||||
the Ph.D. thesis of Berend van Wachem
|
|
||||||
'Derivation, Implementation and Validation
|
|
||||||
of
|
|
||||||
Computer Simulation Models
|
|
||||||
for Gas-Solid Fluidized Beds'
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
GidaspowSchillerNaumann.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef GidaspowSchillerNaumann_H
|
|
||||||
#define GidaspowSchillerNaumann_H
|
|
||||||
|
|
||||||
#include "dragModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class GidaspowSchillerNaumann Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class GidaspowSchillerNaumann
|
|
||||||
:
|
|
||||||
public dragModel
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("GidaspowSchillerNaumann");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
GidaspowSchillerNaumann
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~GidaspowSchillerNaumann();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace dragModels
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,85 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "SchillerNaumann.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(SchillerNaumann, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
dragModel,
|
|
||||||
SchillerNaumann,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::SchillerNaumann::SchillerNaumann
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
)
|
|
||||||
:
|
|
||||||
dragModel(interfaceDict, alpha1, phase1, phase2)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::SchillerNaumann::~SchillerNaumann()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::SchillerNaumann::K
|
|
||||||
(
|
|
||||||
const volScalarField& Ur
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
|
||||||
volScalarField Cds
|
|
||||||
(
|
|
||||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
|
||||||
+ pos(Re - 1000)*0.44
|
|
||||||
);
|
|
||||||
|
|
||||||
return 0.75*Cds*phase2_.rho()*Ur/phase1_.d();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,98 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "SyamlalOBrien.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(SyamlalOBrien, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
dragModel,
|
|
||||||
SyamlalOBrien,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::SyamlalOBrien::SyamlalOBrien
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
)
|
|
||||||
:
|
|
||||||
dragModel(interfaceDict, alpha1, phase1, phase2)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::SyamlalOBrien::~SyamlalOBrien()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::K
|
|
||||||
(
|
|
||||||
const volScalarField& Ur
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
|
|
||||||
volScalarField A(pow(alpha2, 4.14));
|
|
||||||
volScalarField B
|
|
||||||
(
|
|
||||||
neg(alpha2 - 0.85)*(0.8*pow(alpha2, 1.28))
|
|
||||||
+ pos(alpha2 - 0.85)*(pow(alpha2, 2.65))
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
|
||||||
|
|
||||||
volScalarField Vr
|
|
||||||
(
|
|
||||||
0.5*
|
|
||||||
(
|
|
||||||
A - 0.06*Re + sqrt(sqr(0.06*Re) + 0.12*Re*(2.0*B - A) + sqr(A))
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField Cds(sqr(0.63 + 4.8*sqrt(Vr/Re)));
|
|
||||||
|
|
||||||
return 0.75*Cds*phase2_.rho()*Ur/(phase1_.d()*sqr(Vr));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,95 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::dragModels::SyamlalOBrien
|
|
||||||
|
|
||||||
Description
|
|
||||||
Syamlal, M., Rogers, W. and O'Brien, T. J. (1993) MFIX documentation,
|
|
||||||
Theory Guide. Technical Note DOE/METC-94/1004. Morgantown, West Virginia,
|
|
||||||
USA.
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
SyamlalOBrien.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef SyamlalOBrien_H
|
|
||||||
#define SyamlalOBrien_H
|
|
||||||
|
|
||||||
#include "dragModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class SyamlalOBrien Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class SyamlalOBrien
|
|
||||||
:
|
|
||||||
public dragModel
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("SyamlalOBrien");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
SyamlalOBrien
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~SyamlalOBrien();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace dragModels
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,88 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "WenYu.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(WenYu, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
dragModel,
|
|
||||||
WenYu,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::WenYu::WenYu
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
)
|
|
||||||
:
|
|
||||||
dragModel(interfaceDict, alpha1, phase1, phase2)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModels::WenYu::~WenYu()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::K
|
|
||||||
(
|
|
||||||
const volScalarField& Ur
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
|
|
||||||
volScalarField bp(pow(alpha2, -2.65));
|
|
||||||
|
|
||||||
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
|
||||||
volScalarField Cds
|
|
||||||
(
|
|
||||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
|
||||||
+ pos(Re - 1000)*0.44
|
|
||||||
);
|
|
||||||
|
|
||||||
return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,106 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::dragModels::WenYu
|
|
||||||
|
|
||||||
Description
|
|
||||||
H, Enwald, E. Peirano, A-E Almstedt
|
|
||||||
'Eulerian Two-Phase Flow Theory Applied to Fluidization'
|
|
||||||
Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996)
|
|
||||||
Eq. 86-87, p. 40
|
|
||||||
|
|
||||||
This is identical to the Wen and Yu, Rowe model Table 3.6 p.56 in
|
|
||||||
the Ph.D. thesis of Berend van Wachem
|
|
||||||
'Derivation, Implementation and Validation
|
|
||||||
of
|
|
||||||
Computer Simulation Models
|
|
||||||
for Gas-Solid Fluidized Beds'
|
|
||||||
|
|
||||||
NB: The difference between the Gidaspow-version is the void-fraction
|
|
||||||
in the Re-number
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
WenYu.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef WenYu_H
|
|
||||||
#define WenYu_H
|
|
||||||
|
|
||||||
#include "dragModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace dragModels
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class WenYu Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class WenYu
|
|
||||||
:
|
|
||||||
public dragModel
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("WenYu");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
WenYu
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~WenYu();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace dragModels
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,60 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "dragModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(dragModel, 0);
|
|
||||||
defineRunTimeSelectionTable(dragModel, dictionary);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModel::dragModel
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
)
|
|
||||||
:
|
|
||||||
interfaceDict_(interfaceDict),
|
|
||||||
alpha1_(alpha1),
|
|
||||||
phase1_(phase1),
|
|
||||||
phase2_(phase2)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dragModel::~dragModel()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,135 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::dragModel
|
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
dragModel.C
|
|
||||||
newDragModel.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef dragModel_H
|
|
||||||
#define dragModel_H
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#include "dictionary.H"
|
|
||||||
#include "phaseModel.H"
|
|
||||||
#include "runTimeSelectionTables.H"
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class dragModel Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class dragModel
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Protected data
|
|
||||||
|
|
||||||
const dictionary& interfaceDict_;
|
|
||||||
const volScalarField& alpha1_;
|
|
||||||
const phaseModel& phase1_;
|
|
||||||
const phaseModel& phase2_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("dragModel");
|
|
||||||
|
|
||||||
|
|
||||||
// Declare runtime construction
|
|
||||||
|
|
||||||
declareRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
autoPtr,
|
|
||||||
dragModel,
|
|
||||||
dictionary,
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
),
|
|
||||||
(interfaceDict, alpha1, phase1, phase2)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
dragModel
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~dragModel();
|
|
||||||
|
|
||||||
|
|
||||||
// Selectors
|
|
||||||
|
|
||||||
static autoPtr<dragModel> New
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- the dragfunction K used in the momentum eq.
|
|
||||||
// ddt(alpha1*rho1*U1) + ... = ... alpha1*alpha2*K*(U1-U2)
|
|
||||||
// ddt(alpha2*rho2*U2) + ... = ... alpha1*alpha2*K*(U2-U1)
|
|
||||||
// ********************************** NB! *****************************
|
|
||||||
// for numerical reasons alpha1 and alpha2 has been
|
|
||||||
// extracted from the dragFunction K,
|
|
||||||
// so you MUST divide K by alpha1*alpha2 when implemnting the drag
|
|
||||||
// function
|
|
||||||
// ********************************** NB! *****************************
|
|
||||||
virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "dragModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
|
||||||
(
|
|
||||||
const dictionary& interfaceDict,
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const phaseModel& phase1,
|
|
||||||
const phaseModel& phase2
|
|
||||||
)
|
|
||||||
{
|
|
||||||
word dragModelType
|
|
||||||
(
|
|
||||||
interfaceDict.lookup(phase1.name())
|
|
||||||
);
|
|
||||||
|
|
||||||
Info << "Selecting dragModel for phase "
|
|
||||||
<< phase1.name()
|
|
||||||
<< ": "
|
|
||||||
<< dragModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
|
||||||
dictionaryConstructorTablePtr_->find(dragModelType);
|
|
||||||
|
|
||||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
|
||||||
{
|
|
||||||
FatalErrorIn("dragModel::New")
|
|
||||||
<< "Unknown dragModelType type "
|
|
||||||
<< dragModelType << endl << endl
|
|
||||||
<< "Valid dragModel types are : " << endl
|
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
return cstrIter()(interfaceDict, alpha1, phase1, phase2);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,227 +0,0 @@
|
|||||||
{
|
|
||||||
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
|
|
||||||
surfaceScalarField alpha2f(scalar(1) - alpha1f);
|
|
||||||
|
|
||||||
rAU1 = 1.0/U1Eqn.A();
|
|
||||||
rAU2 = 1.0/U2Eqn.A();
|
|
||||||
|
|
||||||
surfaceScalarField rAlphaAU1f(fvc::interpolate(alpha1*rAU1));
|
|
||||||
surfaceScalarField rAlphaAU2f(fvc::interpolate(alpha2*rAU2));
|
|
||||||
|
|
||||||
volVectorField HbyA1
|
|
||||||
(
|
|
||||||
IOobject::groupName("HbyA", phase1.name()),
|
|
||||||
U1
|
|
||||||
);
|
|
||||||
HbyA1 = rAU1*U1Eqn.H();
|
|
||||||
|
|
||||||
volVectorField HbyA2
|
|
||||||
(
|
|
||||||
IOobject::groupName("HbyA", phase2.name()),
|
|
||||||
U2
|
|
||||||
);
|
|
||||||
HbyA2 = rAU2*U2Eqn.H();
|
|
||||||
|
|
||||||
mrfZones.absoluteFlux(phi1.oldTime());
|
|
||||||
mrfZones.absoluteFlux(phi1);
|
|
||||||
mrfZones.absoluteFlux(phi2.oldTime());
|
|
||||||
mrfZones.absoluteFlux(phi2);
|
|
||||||
|
|
||||||
// Phase-1 pressure flux (e.g. due to particle-particle pressure)
|
|
||||||
surfaceScalarField phiP1
|
|
||||||
(
|
|
||||||
"phiP1",
|
|
||||||
fvc::interpolate((1.0/rho1)*rAU1*turbulence1().pPrime())
|
|
||||||
*fvc::snGrad(alpha1)*mesh.magSf()
|
|
||||||
);
|
|
||||||
|
|
||||||
// Phase-2 pressure flux (e.g. due to particle-particle pressure)
|
|
||||||
surfaceScalarField phiP2
|
|
||||||
(
|
|
||||||
"phiP2",
|
|
||||||
fvc::interpolate((1.0/rho2)*rAU2*turbulence2().pPrime())
|
|
||||||
*fvc::snGrad(alpha2)*mesh.magSf()
|
|
||||||
);
|
|
||||||
|
|
||||||
surfaceScalarField phiHbyA1
|
|
||||||
(
|
|
||||||
IOobject::groupName("phiHbyA", phase1.name()),
|
|
||||||
(fvc::interpolate(HbyA1) & mesh.Sf())
|
|
||||||
+ fvc::ddtPhiCorr(rAU1, alpha1, U1, phi1)
|
|
||||||
);
|
|
||||||
|
|
||||||
surfaceScalarField phiHbyA2
|
|
||||||
(
|
|
||||||
IOobject::groupName("phiHbyA", phase2.name()),
|
|
||||||
(fvc::interpolate(HbyA2) & mesh.Sf())
|
|
||||||
+ fvc::ddtPhiCorr(rAU2, alpha2, U2, phi2)
|
|
||||||
);
|
|
||||||
|
|
||||||
phi = alpha1f*phiHbyA1 + alpha2f*phiHbyA2;
|
|
||||||
mrfZones.relativeFlux(phi);
|
|
||||||
|
|
||||||
phiHbyA1 +=
|
|
||||||
(
|
|
||||||
fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2
|
|
||||||
- phiP1
|
|
||||||
+ rAlphaAU1f*(g & mesh.Sf())
|
|
||||||
);
|
|
||||||
mrfZones.relativeFlux(phiHbyA1);
|
|
||||||
|
|
||||||
phiHbyA2 +=
|
|
||||||
(
|
|
||||||
fvc::interpolate((1.0/rho2)*rAU2*dragCoeff)*phi1
|
|
||||||
- phiP2
|
|
||||||
+ rAlphaAU2f*(g & mesh.Sf())
|
|
||||||
);
|
|
||||||
mrfZones.relativeFlux(phiHbyA2);
|
|
||||||
|
|
||||||
mrfZones.relativeFlux(phi1.oldTime());
|
|
||||||
mrfZones.relativeFlux(phi1);
|
|
||||||
mrfZones.relativeFlux(phi2.oldTime());
|
|
||||||
mrfZones.relativeFlux(phi2);
|
|
||||||
|
|
||||||
surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2);
|
|
||||||
|
|
||||||
HbyA1 += (1.0/rho1)*rAU1*dragCoeff*U2;
|
|
||||||
HbyA2 += (1.0/rho2)*rAU2*dragCoeff*U1;
|
|
||||||
|
|
||||||
surfaceScalarField Dp
|
|
||||||
(
|
|
||||||
"Dp",
|
|
||||||
mag
|
|
||||||
(
|
|
||||||
alpha1f*rAlphaAU1f/fvc::interpolate(rho1)
|
|
||||||
+ alpha2f*rAlphaAU2f/fvc::interpolate(rho2)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
tmp<fvScalarMatrix> pEqnComp1;
|
|
||||||
tmp<fvScalarMatrix> pEqnComp2;
|
|
||||||
|
|
||||||
if (pimple.transonic())
|
|
||||||
{
|
|
||||||
surfaceScalarField phid1
|
|
||||||
(
|
|
||||||
IOobject::groupName("phid", phase1.name()),
|
|
||||||
fvc::interpolate(psi1)*phi1
|
|
||||||
);
|
|
||||||
surfaceScalarField phid2
|
|
||||||
(
|
|
||||||
IOobject::groupName("phid", phase2.name()),
|
|
||||||
fvc::interpolate(psi2)*phi2
|
|
||||||
);
|
|
||||||
|
|
||||||
pEqnComp1 =
|
|
||||||
fvc::ddt(rho1)
|
|
||||||
+ fvc::div(phi1, rho1) - fvc::Sp(fvc::div(phi1), rho1)
|
|
||||||
+ correction
|
|
||||||
(
|
|
||||||
psi1*fvm::ddt(p)
|
|
||||||
+ fvm::div(phid1, p) - fvm::Sp(fvc::div(phid1), p)
|
|
||||||
);
|
|
||||||
deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr());
|
|
||||||
pEqnComp1().relax();
|
|
||||||
|
|
||||||
pEqnComp2 =
|
|
||||||
fvc::ddt(rho2)
|
|
||||||
+ fvc::div(phi2, rho2) - fvc::Sp(fvc::div(phi2), rho2)
|
|
||||||
+ correction
|
|
||||||
(
|
|
||||||
psi2*fvm::ddt(p)
|
|
||||||
+ fvm::div(phid2, p) - fvm::Sp(fvc::div(phid2), p)
|
|
||||||
);
|
|
||||||
deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr());
|
|
||||||
pEqnComp2().relax();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pEqnComp1 =
|
|
||||||
fvc::ddt(rho1) + psi1*correction(fvm::ddt(p))
|
|
||||||
+ fvc::div(phi1, rho1) - fvc::Sp(fvc::div(phi1), rho1);
|
|
||||||
|
|
||||||
pEqnComp2 =
|
|
||||||
fvc::ddt(rho2) + psi2*correction(fvm::ddt(p))
|
|
||||||
+ fvc::div(phi2, rho2) - fvc::Sp(fvc::div(phi2), rho2);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cache p prior to solve for density update
|
|
||||||
volScalarField p_0(p);
|
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
|
||||||
{
|
|
||||||
fvScalarMatrix pEqnIncomp
|
|
||||||
(
|
|
||||||
fvc::div(phiHbyA)
|
|
||||||
- fvm::laplacian(Dp, p)
|
|
||||||
);
|
|
||||||
|
|
||||||
solve
|
|
||||||
(
|
|
||||||
(
|
|
||||||
(alpha1/rho1)*pEqnComp1()
|
|
||||||
+ (alpha2/rho2)*pEqnComp2()
|
|
||||||
)
|
|
||||||
+ pEqnIncomp,
|
|
||||||
mesh.solver(p.select(pimple.finalInnerIter()))
|
|
||||||
);
|
|
||||||
|
|
||||||
if (pimple.finalNonOrthogonalIter())
|
|
||||||
{
|
|
||||||
surfaceScalarField mSfGradp(pEqnIncomp.flux()/Dp);
|
|
||||||
|
|
||||||
phi1 = phiHbyA1 + rAlphaAU1f*mSfGradp/fvc::interpolate(rho1);
|
|
||||||
phi2 = phiHbyA2 + rAlphaAU2f*mSfGradp/fvc::interpolate(rho2);
|
|
||||||
phi = alpha1f*phi1 + alpha2f*phi2;
|
|
||||||
|
|
||||||
dgdt =
|
|
||||||
(
|
|
||||||
pos(alpha2)*(pEqnComp2 & p)/rho2
|
|
||||||
- pos(alpha1)*(pEqnComp1 & p)/rho1
|
|
||||||
);
|
|
||||||
|
|
||||||
p.relax();
|
|
||||||
mSfGradp = pEqnIncomp.flux()/Dp;
|
|
||||||
|
|
||||||
U1 = HbyA1
|
|
||||||
+ fvc::reconstruct
|
|
||||||
(
|
|
||||||
rAlphaAU1f
|
|
||||||
*(
|
|
||||||
(g & mesh.Sf())
|
|
||||||
+ mSfGradp/fvc::interpolate(rho1)
|
|
||||||
)
|
|
||||||
- phiP1
|
|
||||||
);
|
|
||||||
U1.correctBoundaryConditions();
|
|
||||||
|
|
||||||
U2 = HbyA2
|
|
||||||
+ fvc::reconstruct
|
|
||||||
(
|
|
||||||
rAlphaAU2f
|
|
||||||
*(
|
|
||||||
(g & mesh.Sf())
|
|
||||||
+ mSfGradp/fvc::interpolate(rho2)
|
|
||||||
)
|
|
||||||
- phiP2
|
|
||||||
);
|
|
||||||
U2.correctBoundaryConditions();
|
|
||||||
|
|
||||||
U = fluid.U();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
p = max(p, pMin);
|
|
||||||
|
|
||||||
// Update densities from change in p
|
|
||||||
rho1 += psi1*(p - p_0);
|
|
||||||
rho2 += psi2*(p - p_0);
|
|
||||||
|
|
||||||
K1 = 0.5*magSqr(U1);
|
|
||||||
K2 = 0.5*magSqr(U2);
|
|
||||||
|
|
||||||
if (thermo1.dpdt() || thermo2.dpdt())
|
|
||||||
{
|
|
||||||
dpdt = fvc::ddt(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,60 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "radialModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::autoPtr<Foam::kineticTheoryModels::radialModel>
|
|
||||||
Foam::kineticTheoryModels::radialModel::New
|
|
||||||
(
|
|
||||||
const dictionary& dict
|
|
||||||
)
|
|
||||||
{
|
|
||||||
word radialModelType(dict.lookup("radialModel"));
|
|
||||||
|
|
||||||
Info<< "Selecting radialModel "
|
|
||||||
<< radialModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
|
||||||
dictionaryConstructorTablePtr_->find(radialModelType);
|
|
||||||
|
|
||||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
|
||||||
{
|
|
||||||
FatalError
|
|
||||||
<< "radialModel::New(const dictionary&) : " << endl
|
|
||||||
<< " unknown radialModelType type "
|
|
||||||
<< radialModelType
|
|
||||||
<< ", constructor not in hash table" << endl << endl
|
|
||||||
<< " Valid radialModelType types are :" << endl;
|
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
return autoPtr<radialModel>(cstrIter()(dict));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
IOdictionary ppProperties
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"ppProperties",
|
|
||||||
runTime.constant(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
scalar preAlphaExp
|
|
||||||
(
|
|
||||||
readScalar(ppProperties.lookup("preAlphaExp"))
|
|
||||||
);
|
|
||||||
|
|
||||||
scalar alphaMax
|
|
||||||
(
|
|
||||||
readScalar(ppProperties.lookup("alphaMax"))
|
|
||||||
);
|
|
||||||
|
|
||||||
scalar expMax
|
|
||||||
(
|
|
||||||
readScalar(ppProperties.lookup("expMax"))
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar g0
|
|
||||||
(
|
|
||||||
ppProperties.lookup("g0")
|
|
||||||
);
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
#include "readTimeControls.H"
|
|
||||||
#include "alphaControls.H"
|
|
||||||
|
|
||||||
Switch implicitPhasePressure
|
|
||||||
(
|
|
||||||
alphaControls.lookupOrDefault<Switch>("implicitPhasePressure", false)
|
|
||||||
);
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
if (runTime.outputTime())
|
|
||||||
{
|
|
||||||
volVectorField Ur
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"Ur",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
U1 - U2
|
|
||||||
);
|
|
||||||
|
|
||||||
runTime.write();
|
|
||||||
}
|
|
||||||
@ -12,53 +12,6 @@
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Reading field alpha1\n" << endl;
|
|
||||||
volScalarField alpha1
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"alpha1",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field alpha2\n" << endl;
|
|
||||||
volScalarField alpha2
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"alpha2",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field alpha3\n" << endl;
|
|
||||||
volScalarField alpha3
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"alpha3",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
alpha3 == 1.0 - alpha1 - alpha2;
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
volVectorField U
|
volVectorField U
|
||||||
(
|
(
|
||||||
@ -77,6 +30,10 @@
|
|||||||
|
|
||||||
threePhaseMixture threePhaseProperties(U, phi);
|
threePhaseMixture threePhaseProperties(U, phi);
|
||||||
|
|
||||||
|
volScalarField& alpha1(threePhaseProperties.alpha1());
|
||||||
|
volScalarField& alpha2(threePhaseProperties.alpha2());
|
||||||
|
volScalarField& alpha3(threePhaseProperties.alpha3());
|
||||||
|
|
||||||
const dimensionedScalar& rho1 = threePhaseProperties.rho1();
|
const dimensionedScalar& rho1 = threePhaseProperties.rho1();
|
||||||
const dimensionedScalar& rho2 = threePhaseProperties.rho2();
|
const dimensionedScalar& rho2 = threePhaseProperties.rho2();
|
||||||
const dimensionedScalar& rho3 = threePhaseProperties.rho3();
|
const dimensionedScalar& rho3 = threePhaseProperties.rho3();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -62,9 +62,64 @@ Foam::threePhaseMixture::threePhaseMixture
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
phase1Name_("phase1"),
|
phase1Name_(wordList(lookup("phases"))[0]),
|
||||||
phase2Name_("phase2"),
|
phase2Name_(wordList(lookup("phases"))[1]),
|
||||||
phase3Name_("phase3"),
|
phase3Name_(wordList(lookup("phases"))[2]),
|
||||||
|
|
||||||
|
alpha1_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
IOobject::groupName("alpha", phase1Name_),
|
||||||
|
U.time().timeName(),
|
||||||
|
U.mesh(),
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
U.mesh()
|
||||||
|
),
|
||||||
|
|
||||||
|
alpha2_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
IOobject::groupName("alpha", phase2Name_),
|
||||||
|
U.time().timeName(),
|
||||||
|
U.mesh(),
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
U.mesh()
|
||||||
|
),
|
||||||
|
|
||||||
|
alpha3_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
IOobject::groupName("alpha", phase3Name_),
|
||||||
|
U.time().timeName(),
|
||||||
|
U.mesh(),
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
U.mesh()
|
||||||
|
),
|
||||||
|
|
||||||
|
U_(U),
|
||||||
|
phi_(phi),
|
||||||
|
|
||||||
|
nu_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"nu",
|
||||||
|
U.time().timeName(),
|
||||||
|
U.db()
|
||||||
|
),
|
||||||
|
U.mesh(),
|
||||||
|
dimensionedScalar("nu", dimensionSet(0, 2, -1, 0, 0), 0),
|
||||||
|
calculatedFvPatchScalarField::typeName
|
||||||
|
),
|
||||||
|
|
||||||
nuModel1_
|
nuModel1_
|
||||||
(
|
(
|
||||||
@ -99,28 +154,9 @@ Foam::threePhaseMixture::threePhaseMixture
|
|||||||
|
|
||||||
rho1_(nuModel1_->viscosityProperties().lookup("rho")),
|
rho1_(nuModel1_->viscosityProperties().lookup("rho")),
|
||||||
rho2_(nuModel2_->viscosityProperties().lookup("rho")),
|
rho2_(nuModel2_->viscosityProperties().lookup("rho")),
|
||||||
rho3_(nuModel3_->viscosityProperties().lookup("rho")),
|
rho3_(nuModel3_->viscosityProperties().lookup("rho"))
|
||||||
|
|
||||||
U_(U),
|
|
||||||
phi_(phi),
|
|
||||||
|
|
||||||
alpha1_(U_.db().lookupObject<const volScalarField> ("alpha1")),
|
|
||||||
alpha2_(U_.db().lookupObject<const volScalarField> ("alpha2")),
|
|
||||||
alpha3_(U_.db().lookupObject<const volScalarField> ("alpha3")),
|
|
||||||
|
|
||||||
nu_
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"nu",
|
|
||||||
U_.time().timeName(),
|
|
||||||
U_.db()
|
|
||||||
),
|
|
||||||
U_.mesh(),
|
|
||||||
dimensionedScalar("nu", dimensionSet(0, 2, -1, 0, 0), 0),
|
|
||||||
calculatedFvPatchScalarField::typeName
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
|
alpha3_ == 1.0 - alpha1_ - alpha2_;
|
||||||
calcNu();
|
calcNu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -60,6 +60,15 @@ class threePhaseMixture
|
|||||||
word phase2Name_;
|
word phase2Name_;
|
||||||
word phase3Name_;
|
word phase3Name_;
|
||||||
|
|
||||||
|
volScalarField alpha1_;
|
||||||
|
volScalarField alpha2_;
|
||||||
|
volScalarField alpha3_;
|
||||||
|
|
||||||
|
const volVectorField& U_;
|
||||||
|
const surfaceScalarField& phi_;
|
||||||
|
|
||||||
|
volScalarField nu_;
|
||||||
|
|
||||||
autoPtr<viscosityModel> nuModel1_;
|
autoPtr<viscosityModel> nuModel1_;
|
||||||
autoPtr<viscosityModel> nuModel2_;
|
autoPtr<viscosityModel> nuModel2_;
|
||||||
autoPtr<viscosityModel> nuModel3_;
|
autoPtr<viscosityModel> nuModel3_;
|
||||||
@ -68,15 +77,6 @@ class threePhaseMixture
|
|||||||
dimensionedScalar rho2_;
|
dimensionedScalar rho2_;
|
||||||
dimensionedScalar rho3_;
|
dimensionedScalar rho3_;
|
||||||
|
|
||||||
const volVectorField& U_;
|
|
||||||
const surfaceScalarField& phi_;
|
|
||||||
|
|
||||||
const volScalarField& alpha1_;
|
|
||||||
const volScalarField& alpha2_;
|
|
||||||
const volScalarField& alpha3_;
|
|
||||||
|
|
||||||
volScalarField nu_;
|
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
@ -103,22 +103,49 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return const-access to phase1 viscosityModel
|
const word phase1Name() const
|
||||||
const viscosityModel& nuModel1() const
|
|
||||||
{
|
{
|
||||||
return nuModel1_();
|
return phase1Name_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return const-access to phase2 viscosityModel
|
const word phase2Name() const
|
||||||
const viscosityModel& nuModel2() const
|
|
||||||
{
|
{
|
||||||
return nuModel2_();
|
return phase2Name_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return const-access to phase3 viscosityModel
|
const word phase3Name() const
|
||||||
const viscosityModel& nuModel3() const
|
|
||||||
{
|
{
|
||||||
return nuModel3_();
|
return phase3Name_;
|
||||||
|
}
|
||||||
|
|
||||||
|
const volScalarField& alpha1() const
|
||||||
|
{
|
||||||
|
return alpha1_;
|
||||||
|
}
|
||||||
|
|
||||||
|
volScalarField& alpha1()
|
||||||
|
{
|
||||||
|
return alpha1_;
|
||||||
|
}
|
||||||
|
|
||||||
|
const volScalarField& alpha2() const
|
||||||
|
{
|
||||||
|
return alpha2_;
|
||||||
|
}
|
||||||
|
|
||||||
|
volScalarField& alpha2()
|
||||||
|
{
|
||||||
|
return alpha2_;
|
||||||
|
}
|
||||||
|
|
||||||
|
const volScalarField& alpha3() const
|
||||||
|
{
|
||||||
|
return alpha3_;
|
||||||
|
}
|
||||||
|
|
||||||
|
volScalarField& alpha3()
|
||||||
|
{
|
||||||
|
return alpha3_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return const-access to phase1 density
|
//- Return const-access to phase1 density
|
||||||
@ -139,21 +166,6 @@ public:
|
|||||||
return rho3_;
|
return rho3_;
|
||||||
};
|
};
|
||||||
|
|
||||||
const volScalarField& alpha1() const
|
|
||||||
{
|
|
||||||
return alpha1_;
|
|
||||||
}
|
|
||||||
|
|
||||||
const volScalarField& alpha2() const
|
|
||||||
{
|
|
||||||
return alpha2_;
|
|
||||||
}
|
|
||||||
|
|
||||||
const volScalarField& alpha3() const
|
|
||||||
{
|
|
||||||
return alpha3_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the velocity
|
//- Return the velocity
|
||||||
const volVectorField& U() const
|
const volVectorField& U() const
|
||||||
{
|
{
|
||||||
@ -166,6 +178,24 @@ public:
|
|||||||
return phi_;
|
return phi_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Return const-access to phase1 viscosityModel
|
||||||
|
const viscosityModel& nuModel1() const
|
||||||
|
{
|
||||||
|
return nuModel1_();
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return const-access to phase2 viscosityModel
|
||||||
|
const viscosityModel& nuModel2() const
|
||||||
|
{
|
||||||
|
return nuModel2_();
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return const-access to phase3 viscosityModel
|
||||||
|
const viscosityModel& nuModel3() const
|
||||||
|
{
|
||||||
|
return nuModel3_();
|
||||||
|
}
|
||||||
|
|
||||||
//- Return the dynamic laminar viscosity
|
//- Return the dynamic laminar viscosity
|
||||||
tmp<volScalarField> mu() const;
|
tmp<volScalarField> mu() const;
|
||||||
|
|
||||||
|
|||||||
@ -42,11 +42,10 @@ namespace phaseChangeTwoPhaseMixtures
|
|||||||
Foam::phaseChangeTwoPhaseMixtures::Kunz::Kunz
|
Foam::phaseChangeTwoPhaseMixtures::Kunz::Kunz
|
||||||
(
|
(
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi,
|
const surfaceScalarField& phi
|
||||||
const word& alpha1Name
|
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
phaseChangeTwoPhaseMixture(typeName, U, phi, alpha1Name),
|
phaseChangeTwoPhaseMixture(typeName, U, phi),
|
||||||
|
|
||||||
UInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf")),
|
UInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf")),
|
||||||
tInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf")),
|
tInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf")),
|
||||||
|
|||||||
@ -91,8 +91,7 @@ public:
|
|||||||
Kunz
|
Kunz
|
||||||
(
|
(
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi,
|
const surfaceScalarField& phi
|
||||||
const word& alpha1Name = "alpha1"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -42,11 +42,10 @@ namespace phaseChangeTwoPhaseMixtures
|
|||||||
Foam::phaseChangeTwoPhaseMixtures::Merkle::Merkle
|
Foam::phaseChangeTwoPhaseMixtures::Merkle::Merkle
|
||||||
(
|
(
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi,
|
const surfaceScalarField& phi
|
||||||
const word& alpha1Name
|
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
phaseChangeTwoPhaseMixture(typeName, U, phi, alpha1Name),
|
phaseChangeTwoPhaseMixture(typeName, U, phi),
|
||||||
|
|
||||||
UInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf")),
|
UInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf")),
|
||||||
tInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf")),
|
tInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf")),
|
||||||
|
|||||||
@ -85,8 +85,7 @@ public:
|
|||||||
Merkle
|
Merkle
|
||||||
(
|
(
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi,
|
const surfaceScalarField& phi
|
||||||
const word& alpha1Name = "alpha1"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,11 +49,10 @@ namespace phaseChangeTwoPhaseMixtures
|
|||||||
Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::SchnerrSauer
|
Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::SchnerrSauer
|
||||||
(
|
(
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi,
|
const surfaceScalarField& phi
|
||||||
const word& alpha1Name
|
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
phaseChangeTwoPhaseMixture(typeName, U, phi, alpha1Name),
|
phaseChangeTwoPhaseMixture(typeName, U, phi),
|
||||||
|
|
||||||
n_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("n")),
|
n_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("n")),
|
||||||
dNuc_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("dNuc")),
|
dNuc_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("dNuc")),
|
||||||
|
|||||||
@ -98,8 +98,7 @@ public:
|
|||||||
SchnerrSauer
|
SchnerrSauer
|
||||||
(
|
(
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi,
|
const surfaceScalarField& phi
|
||||||
const word& alpha1Name = "alpha1"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -32,8 +32,7 @@ Foam::autoPtr<Foam::phaseChangeTwoPhaseMixture>
|
|||||||
Foam::phaseChangeTwoPhaseMixture::New
|
Foam::phaseChangeTwoPhaseMixture::New
|
||||||
(
|
(
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi,
|
const surfaceScalarField& phi
|
||||||
const word& alpha1Name
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
IOdictionary transportPropertiesDict
|
IOdictionary transportPropertiesDict
|
||||||
@ -73,7 +72,7 @@ Foam::phaseChangeTwoPhaseMixture::New
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<phaseChangeTwoPhaseMixture>(cstrIter()(U, phi, alpha1Name));
|
return autoPtr<phaseChangeTwoPhaseMixture>(cstrIter()(U, phi));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,11 +39,10 @@ Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixture
|
|||||||
(
|
(
|
||||||
const word& type,
|
const word& type,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi,
|
const surfaceScalarField& phi
|
||||||
const word& alpha1Name
|
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
incompressibleTwoPhaseMixture(U, phi, alpha1Name),
|
incompressibleTwoPhaseMixture(U, phi),
|
||||||
phaseChangeTwoPhaseMixtureCoeffs_(subDict(type + "Coeffs")),
|
phaseChangeTwoPhaseMixtureCoeffs_(subDict(type + "Coeffs")),
|
||||||
pSat_(lookup("pSat"))
|
pSat_(lookup("pSat"))
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -91,10 +91,9 @@ public:
|
|||||||
components,
|
components,
|
||||||
(
|
(
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi,
|
const surfaceScalarField& phi
|
||||||
const word& alpha1Name
|
|
||||||
),
|
),
|
||||||
(U, phi, alpha1Name)
|
(U, phi)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -104,8 +103,7 @@ public:
|
|||||||
static autoPtr<phaseChangeTwoPhaseMixture> New
|
static autoPtr<phaseChangeTwoPhaseMixture> New
|
||||||
(
|
(
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi,
|
const surfaceScalarField& phi
|
||||||
const word& alpha1Name = "alpha1"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -116,8 +114,7 @@ public:
|
|||||||
(
|
(
|
||||||
const word& type,
|
const word& type,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi,
|
const surfaceScalarField& phi
|
||||||
const word& alpha1Name = "alpha1"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
word alphaScheme("div(phi,alpha1)");
|
word alphaScheme("div(phi,alpha)");
|
||||||
|
|
||||||
surfaceScalarField phiAlpha
|
surfaceScalarField phiAlpha
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wclean libso phaseModel
|
wclean libso twoPhaseSystem
|
||||||
wclean libso interfacialModels
|
wclean libso interfacialModels
|
||||||
wclean libso kineticTheoryModels
|
wclean libso phaseIncompressibleTurbulenceModels
|
||||||
wclean
|
wclean
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,9 +2,10 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso phaseModel
|
wmakeLnInclude interfacialModels
|
||||||
|
wmake libso twoPhaseSystem
|
||||||
wmake libso interfacialModels
|
wmake libso interfacialModels
|
||||||
wmake libso kineticTheoryModels
|
wmake libso phaseIncompressibleTurbulenceModels
|
||||||
wmake
|
wmake
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1,16 +1,23 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||||
-IturbulenceModel \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-IkineticTheoryModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||||
|
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
|
||||||
|
-IphaseIncompressibleTurbulenceModels/lnInclude \
|
||||||
-IinterfacialModels/lnInclude \
|
-IinterfacialModels/lnInclude \
|
||||||
-IphaseModel/lnInclude \
|
-ItwoPhaseSystem/lnInclude \
|
||||||
-Iaveraging
|
-Iaveraging
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lEulerianInterfacialModels \
|
-lfluidThermophysicalModels \
|
||||||
-lfiniteVolume \
|
-lspecie \
|
||||||
-lmeshTools \
|
-lturbulenceModels \
|
||||||
|
-lincompressibleTurbulenceModels \
|
||||||
|
-lphaseIncompressibleTurbulenceModels \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lphaseModel \
|
-lcompressibleTwoPhaseSystem \
|
||||||
-lkineticTheoryModel
|
-lcompressibleEulerianInterfacialModels \
|
||||||
|
-lfiniteVolume \
|
||||||
|
-lmeshTools
|
||||||
|
|||||||
@ -1,99 +1,61 @@
|
|||||||
|
mrfZones.correctBoundaryVelocity(U1);
|
||||||
|
mrfZones.correctBoundaryVelocity(U2);
|
||||||
|
mrfZones.correctBoundaryVelocity(U);
|
||||||
|
|
||||||
fvVectorMatrix U1Eqn(U1, U1.dimensions()*dimVol/dimTime);
|
fvVectorMatrix U1Eqn(U1, U1.dimensions()*dimVol/dimTime);
|
||||||
fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
|
fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
|
||||||
|
|
||||||
{
|
volScalarField dragCoeff(fluid.dragCoeff());
|
||||||
{
|
|
||||||
volTensorField gradU1T(T(fvc::grad(U1)));
|
|
||||||
|
|
||||||
if (kineticTheory.on())
|
|
||||||
{
|
{
|
||||||
kineticTheory.solve(gradU1T);
|
volVectorField liftForce(fluid.liftForce(U));
|
||||||
nuEff1 = kineticTheory.mu1()/rho1;
|
|
||||||
}
|
|
||||||
else // If not using kinetic theory is using Ct model
|
|
||||||
{
|
{
|
||||||
nuEff1 = sqr(Ct)*nut2 + nu1;
|
|
||||||
}
|
|
||||||
|
|
||||||
volTensorField Rc1
|
|
||||||
(
|
|
||||||
"Rc1",
|
|
||||||
(((2.0/3.0)*I)*nuEff1)*tr(gradU1T) - nuEff1*gradU1T
|
|
||||||
);
|
|
||||||
|
|
||||||
if (kineticTheory.on())
|
|
||||||
{
|
|
||||||
Rc1 -= ((kineticTheory.lambda()/rho1)*tr(gradU1T))*tensor(I);
|
|
||||||
}
|
|
||||||
|
|
||||||
surfaceScalarField phiR1
|
|
||||||
(
|
|
||||||
-fvc::interpolate(nuEff1)*mesh.magSf()*fvc::snGrad(alpha1)
|
|
||||||
/fvc::interpolate(alpha1 + scalar(0.001))
|
|
||||||
);
|
|
||||||
|
|
||||||
U1Eqn =
|
U1Eqn =
|
||||||
(
|
(
|
||||||
(scalar(1) + Cvm*rho2*alpha2/rho1)*
|
fvm::ddt(alpha1, U1)
|
||||||
|
+ fvm::div(alphaPhi1, U1)
|
||||||
|
|
||||||
|
// Compressibity correction
|
||||||
|
- fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), U1)
|
||||||
|
|
||||||
|
+ fluid.Cvm()*rho2*alpha1*alpha2/rho1*
|
||||||
(
|
(
|
||||||
fvm::ddt(U1)
|
fvm::ddt(U1)
|
||||||
+ fvm::div(phi1, U1, "div(phi1,U1)")
|
+ fvm::div(phi1, U1)
|
||||||
- fvm::Sp(fvc::div(phi1), U1)
|
- fvm::Sp(fvc::div(phi1), U1)
|
||||||
)
|
)
|
||||||
|
|
||||||
- fvm::laplacian(nuEff1, U1)
|
+ turbulence1->divDevReff(U1)
|
||||||
+ fvc::div(Rc1)
|
|
||||||
|
|
||||||
+ fvm::div(phiR1, U1, "div(phi1,U1)")
|
|
||||||
- fvm::Sp(fvc::div(phiR1), U1)
|
|
||||||
+ (fvc::grad(alpha1)/(fvc::average(alpha1) + scalar(0.001)) & Rc1)
|
|
||||||
==
|
==
|
||||||
// g // Buoyancy term transfered to p-equation
|
- fvm::Sp(dragCoeff/rho1, U1)
|
||||||
- fvm::Sp(alpha2/rho1*K, U1)
|
- alpha1*alpha2/rho1*(liftForce - fluid.Cvm()*rho2*DDtU2)
|
||||||
//+ alpha2/rho1*K*U2 // Explicit drag transfered to p-equation
|
|
||||||
- alpha2/rho1*(liftCoeff - Cvm*rho2*DDtU2)
|
|
||||||
);
|
);
|
||||||
mrfZones.addCoriolis(scalar(1) + Cvm*rho2*alpha2/rho1, U1Eqn);
|
mrfZones.addCoriolis(alpha1*(1 + fluid.Cvm()*rho2*alpha2/rho1), U1Eqn);
|
||||||
U1Eqn.relax();
|
U1Eqn.relax();
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
volTensorField gradU2T(T(fvc::grad(U2)));
|
|
||||||
volTensorField Rc2
|
|
||||||
(
|
|
||||||
"Rc2",
|
|
||||||
(((2.0/3.0)*I)*nuEff2)*tr(gradU2T) - nuEff2*gradU2T
|
|
||||||
);
|
|
||||||
|
|
||||||
surfaceScalarField phiR2
|
|
||||||
(
|
|
||||||
-fvc::interpolate(nuEff2)*mesh.magSf()*fvc::snGrad(alpha2)
|
|
||||||
/fvc::interpolate(alpha2 + scalar(0.001))
|
|
||||||
);
|
|
||||||
|
|
||||||
U2Eqn =
|
U2Eqn =
|
||||||
(
|
(
|
||||||
(scalar(1) + Cvm*rho2*alpha1/rho2)*
|
fvm::ddt(alpha2, U2)
|
||||||
|
+ fvm::div(alphaPhi2, U2)
|
||||||
|
|
||||||
|
// Compressibity correction
|
||||||
|
- fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), U2)
|
||||||
|
|
||||||
|
+ fluid.Cvm()*rho2*alpha1*alpha2/rho2*
|
||||||
(
|
(
|
||||||
fvm::ddt(U2)
|
fvm::ddt(U2)
|
||||||
+ fvm::div(phi2, U2, "div(phi2,U2)")
|
+ fvm::div(phi2, U2)
|
||||||
- fvm::Sp(fvc::div(phi2), U2)
|
- fvm::Sp(fvc::div(phi2), U2)
|
||||||
)
|
)
|
||||||
|
+ turbulence2->divDevReff(U2)
|
||||||
- fvm::laplacian(nuEff2, U2)
|
|
||||||
+ fvc::div(Rc2)
|
|
||||||
|
|
||||||
+ fvm::div(phiR2, U2, "div(phi2,U2)")
|
|
||||||
- fvm::Sp(fvc::div(phiR2), U2)
|
|
||||||
|
|
||||||
+ (fvc::grad(alpha2)/(fvc::average(alpha2) + scalar(0.001)) & Rc2)
|
|
||||||
==
|
==
|
||||||
// g // Buoyancy term transfered to p-equation
|
- fvm::Sp(dragCoeff/rho2, U2)
|
||||||
- fvm::Sp(alpha1/rho2*K, U2)
|
+ alpha1*alpha2/rho2*(liftForce + fluid.Cvm()*rho2*DDtU1)
|
||||||
//+ alpha1/rho2*K*U1 // Explicit drag transfered to p-equation
|
|
||||||
+ alpha1/rho2*(liftCoeff + Cvm*rho2*DDtU1)
|
|
||||||
);
|
);
|
||||||
mrfZones.addCoriolis(scalar(1) + Cvm*rho2*alpha1/rho2, U2Eqn);
|
mrfZones.addCoriolis(alpha2*(1 + fluid.Cvm()*rho2*alpha1/rho2), U2Eqn);
|
||||||
U2Eqn.relax();
|
U2Eqn.relax();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,20 +1,75 @@
|
|||||||
{
|
{
|
||||||
word alphaScheme("div(phi,alpha1)");
|
word alphaScheme("div(phi," + alpha1.name() + ')');
|
||||||
word alpharScheme("div(phir,alpha1)");
|
word alpharScheme("div(phir," + alpha1.name() + ')');
|
||||||
|
|
||||||
surfaceScalarField phic("phic", phi);
|
surfaceScalarField phic("phic", phi);
|
||||||
surfaceScalarField phir("phir", phi1 - phi2);
|
surfaceScalarField phir("phir", phi1 - phi2);
|
||||||
|
|
||||||
if (g0.value() > 0.0)
|
surfaceScalarField alpha1f(fvc::interpolate(max(alpha1, scalar(0))));
|
||||||
|
|
||||||
|
tmp<surfaceScalarField> pPrimeByA;
|
||||||
|
|
||||||
|
if (implicitPhasePressure)
|
||||||
{
|
{
|
||||||
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
|
pPrimeByA =
|
||||||
surfaceScalarField phipp(ppMagf*fvc::snGrad(alpha1)*mesh.magSf());
|
fvc::interpolate((1.0/rho1)*rAU1*turbulence1().pPrime())
|
||||||
phir += phipp;
|
+ fvc::interpolate((1.0/rho2)*rAU2*turbulence2().pPrime());
|
||||||
phic += alpha1f*phipp;
|
|
||||||
|
surfaceScalarField phiP
|
||||||
|
(
|
||||||
|
pPrimeByA()*fvc::snGrad(alpha1, "bounded")*mesh.magSf()
|
||||||
|
);
|
||||||
|
|
||||||
|
phic += alpha1f*phiP;
|
||||||
|
phir += phiP;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int acorr=0; acorr<nAlphaCorr; acorr++)
|
for (int acorr=0; acorr<nAlphaCorr; acorr++)
|
||||||
{
|
{
|
||||||
|
volScalarField::DimensionedInternalField Sp
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Sp",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("Sp", dgdt.dimensions(), 0.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField::DimensionedInternalField Su
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Su",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh
|
||||||
|
),
|
||||||
|
// Divergence term is handled explicitly to be
|
||||||
|
// consistent with the explicit transport solution
|
||||||
|
fvc::div(phi)*min(alpha1, scalar(1))
|
||||||
|
);
|
||||||
|
|
||||||
|
forAll(dgdt, celli)
|
||||||
|
{
|
||||||
|
if (dgdt[celli] > 0.0 && alpha1[celli] > 0.0)
|
||||||
|
{
|
||||||
|
Sp[celli] -= dgdt[celli]*alpha1[celli];
|
||||||
|
Su[celli] += dgdt[celli]*alpha1[celli];
|
||||||
|
}
|
||||||
|
else if (dgdt[celli] < 0.0 && alpha1[celli] < 1.0)
|
||||||
|
{
|
||||||
|
Sp[celli] += dgdt[celli]*(1.0 - alpha1[celli]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dimensionedScalar totalDeltaT = runTime.deltaT();
|
||||||
|
if (nAlphaSubCycles > 1)
|
||||||
|
{
|
||||||
|
alphaPhi1 = dimensionedScalar("0", alphaPhi1.dimensions(), 0);
|
||||||
|
}
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
|
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
|
||||||
@ -31,47 +86,56 @@
|
|||||||
)
|
)
|
||||||
+ fvc::flux
|
+ fvc::flux
|
||||||
(
|
(
|
||||||
-fvc::flux(-phir, alpha2, alpharScheme),
|
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
|
||||||
alpha1,
|
alpha1,
|
||||||
alpharScheme
|
alpharScheme
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Ensure that the flux at inflow BCs is preserved
|
||||||
|
alphaPhic1.boundaryField() = min
|
||||||
|
(
|
||||||
|
phi1.boundaryField()*alpha1.boundaryField(),
|
||||||
|
alphaPhic1.boundaryField()
|
||||||
|
);
|
||||||
|
|
||||||
MULES::explicitSolve
|
MULES::explicitSolve
|
||||||
(
|
(
|
||||||
|
geometricOneField(),
|
||||||
alpha1,
|
alpha1,
|
||||||
phi,
|
phi,
|
||||||
alphaPhic1,
|
alphaPhic1,
|
||||||
(g0.value() > 0 ? alphaMax : 1),
|
Sp,
|
||||||
|
Su,
|
||||||
|
1,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (nAlphaSubCycles > 1)
|
||||||
|
{
|
||||||
|
alphaPhi1 += (runTime.deltaT()/totalDeltaT)*alphaPhic1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alphaPhi1 = alphaPhic1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g0.value() > 0)
|
if (implicitPhasePressure)
|
||||||
{
|
{
|
||||||
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
|
|
||||||
|
|
||||||
ppMagf =
|
|
||||||
rAU1f/(alpha1f + scalar(0.0001))
|
|
||||||
*(g0/rho1)*min(exp(preAlphaExp*(alpha1f - alphaMax)), expMax);
|
|
||||||
|
|
||||||
fvScalarMatrix alpha1Eqn
|
fvScalarMatrix alpha1Eqn
|
||||||
(
|
(
|
||||||
fvm::ddt(alpha1) - fvc::ddt(alpha1)
|
fvm::ddt(alpha1) - fvc::ddt(alpha1)
|
||||||
- fvm::laplacian
|
- fvm::laplacian(alpha1f*pPrimeByA, alpha1, "bounded")
|
||||||
(
|
|
||||||
alpha1f*ppMagf,
|
|
||||||
alpha1,
|
|
||||||
"laplacian(alpha1PpMag,alpha1)"
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
alpha1Eqn.relax();
|
alpha1Eqn.relax();
|
||||||
alpha1Eqn.solve();
|
alpha1Eqn.solve();
|
||||||
|
|
||||||
#include "packingLimiter.H"
|
alphaPhi1 += alpha1Eqn.flux();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alphaPhi2 = phi - alphaPhi1;
|
||||||
alpha2 = scalar(1) - alpha1;
|
alpha2 = scalar(1) - alpha1;
|
||||||
|
|
||||||
Info<< "Dispersed phase volume fraction = "
|
Info<< "Dispersed phase volume fraction = "
|
||||||
@ -82,4 +146,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rho = alpha1*rho1 + alpha2*rho2;
|
rho = fluid.rho();
|
||||||
|
|||||||
@ -1,82 +1,46 @@
|
|||||||
Info<< "Reading transportProperties\n" << endl;
|
Info<< "Creating twoPhaseSystem\n" << endl;
|
||||||
|
|
||||||
IOdictionary transportProperties
|
twoPhaseSystem fluid(mesh);
|
||||||
|
|
||||||
|
phaseModel& phase1 = fluid.phase1();
|
||||||
|
phaseModel& phase2 = fluid.phase2();
|
||||||
|
|
||||||
|
volScalarField& alpha1 = phase1;
|
||||||
|
volScalarField& alpha2 = phase2;
|
||||||
|
|
||||||
|
volVectorField& U1 = phase1.U();
|
||||||
|
surfaceScalarField& phi1 = phase1.phi();
|
||||||
|
surfaceScalarField alphaPhi1
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject::groupName("alphaPhi", phase1.name()),
|
||||||
(
|
fvc::interpolate(alpha1)*phi1
|
||||||
"transportProperties",
|
|
||||||
runTime.constant(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
autoPtr<phaseModel> phase1 = phaseModel::New
|
volVectorField& U2 = phase2.U();
|
||||||
|
surfaceScalarField& phi2 = phase2.phi();
|
||||||
|
surfaceScalarField alphaPhi2
|
||||||
(
|
(
|
||||||
mesh,
|
IOobject::groupName("alphaPhi", phase2.name()),
|
||||||
transportProperties,
|
fvc::interpolate(alpha2)*phi2
|
||||||
"1"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
autoPtr<phaseModel> phase2 = phaseModel::New
|
dimensionedScalar pMin
|
||||||
(
|
(
|
||||||
mesh,
|
"pMin",
|
||||||
transportProperties,
|
dimPressure,
|
||||||
"2"
|
fluid.lookup("pMin")
|
||||||
);
|
);
|
||||||
|
|
||||||
volVectorField& U1 = phase1->U();
|
rhoThermo& thermo1 = phase1.thermo();
|
||||||
surfaceScalarField& phi1 = phase1->phi();
|
rhoThermo& thermo2 = phase2.thermo();
|
||||||
const dimensionedScalar& rho1 = phase1->rho();
|
|
||||||
const dimensionedScalar& nu1 = phase1->nu();
|
|
||||||
|
|
||||||
volVectorField& U2 = phase2->U();
|
volScalarField& p = thermo1.p();
|
||||||
surfaceScalarField& phi2 = phase2->phi();
|
|
||||||
const dimensionedScalar& rho2 = phase2->rho();
|
|
||||||
const dimensionedScalar& nu2 = phase2->nu();
|
|
||||||
|
|
||||||
Info<< "Reading field alpha1\n" << endl;
|
volScalarField& rho1 = thermo1.rho();
|
||||||
volScalarField alpha1
|
const volScalarField& psi1 = thermo1.psi();
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"alpha1",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField alpha2
|
volScalarField& rho2 = thermo2.rho();
|
||||||
(
|
const volScalarField& psi2 = thermo2.psi();
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"alpha2",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
scalar(1) - alpha1
|
|
||||||
//,alpha1.boundaryField().types()
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Reading field p\n" << endl;
|
|
||||||
volScalarField p
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"p",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
volVectorField U
|
volVectorField U
|
||||||
(
|
(
|
||||||
@ -88,28 +52,7 @@
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
alpha1*U1 + alpha2*U2
|
fluid.U()
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar Cvm
|
|
||||||
(
|
|
||||||
"Cvm",
|
|
||||||
dimless,
|
|
||||||
transportProperties.lookup("Cvm")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar Cl
|
|
||||||
(
|
|
||||||
"Cl",
|
|
||||||
dimless,
|
|
||||||
transportProperties.lookup("Cl")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar Ct
|
|
||||||
(
|
|
||||||
"Ct",
|
|
||||||
dimless,
|
|
||||||
transportProperties.lookup("Ct")
|
|
||||||
);
|
);
|
||||||
|
|
||||||
surfaceScalarField phi
|
surfaceScalarField phi
|
||||||
@ -122,7 +65,7 @@
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
fvc::interpolate(alpha1)*phi1 + fvc::interpolate(alpha2)*phi2
|
fluid.phi()
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
@ -131,13 +74,13 @@
|
|||||||
(
|
(
|
||||||
"rho",
|
"rho",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
alpha1*rho1 + alpha2*rho2
|
fluid.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "createRASTurbulence.H"
|
|
||||||
|
|
||||||
Info<< "Calculating field DDtU1 and DDtU2\n" << endl;
|
Info<< "Calculating field DDtU1 and DDtU2\n" << endl;
|
||||||
|
|
||||||
volVectorField DDtU1
|
volVectorField DDtU1
|
||||||
@ -158,75 +101,11 @@
|
|||||||
Info<< "Calculating field g.h\n" << endl;
|
Info<< "Calculating field g.h\n" << endl;
|
||||||
volScalarField gh("gh", g & mesh.C());
|
volScalarField gh("gh", g & mesh.C());
|
||||||
|
|
||||||
IOdictionary interfacialProperties
|
volScalarField rAU1
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"interfacialProperties",
|
IOobject::groupName("rAU", phase1.name()),
|
||||||
runTime.constant(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<dragModel> drag1 = dragModel::New
|
|
||||||
(
|
|
||||||
interfacialProperties,
|
|
||||||
alpha1,
|
|
||||||
phase1,
|
|
||||||
phase2
|
|
||||||
);
|
|
||||||
|
|
||||||
autoPtr<dragModel> drag2 = dragModel::New
|
|
||||||
(
|
|
||||||
interfacialProperties,
|
|
||||||
alpha2,
|
|
||||||
phase2,
|
|
||||||
phase1
|
|
||||||
);
|
|
||||||
|
|
||||||
word dragPhase("blended");
|
|
||||||
if (interfacialProperties.found("dragPhase"))
|
|
||||||
{
|
|
||||||
dragPhase = word(interfacialProperties.lookup("dragPhase"));
|
|
||||||
|
|
||||||
bool validDrag =
|
|
||||||
dragPhase == "1" || dragPhase == "2" || dragPhase == "blended";
|
|
||||||
|
|
||||||
if (!validDrag)
|
|
||||||
{
|
|
||||||
FatalErrorIn(args.executable())
|
|
||||||
<< "invalid dragPhase " << dragPhase
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dimensionedScalar residualSlip
|
|
||||||
(
|
|
||||||
dimensionedScalar::lookupOrDefault
|
|
||||||
(
|
|
||||||
"residualSlip",
|
|
||||||
interfacialProperties,
|
|
||||||
0,
|
|
||||||
dimVelocity
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
Info << "dragPhase is " << dragPhase << endl;
|
|
||||||
kineticTheoryModel kineticTheory
|
|
||||||
(
|
|
||||||
phase1,
|
|
||||||
U2,
|
|
||||||
alpha1,
|
|
||||||
drag1
|
|
||||||
);
|
|
||||||
|
|
||||||
surfaceScalarField rAU1f
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"rAU1f",
|
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
@ -236,21 +115,71 @@
|
|||||||
dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0)
|
dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
surfaceScalarField ppMagf
|
volScalarField rAU2
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"ppMagf",
|
IOobject::groupName("rAU", phase2.name()),
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("zero", dimensionSet(0, 2, -1, 0, 0), 0.0)
|
dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
|
||||||
|
|
||||||
|
|
||||||
|
volScalarField dgdt
|
||||||
|
(
|
||||||
|
pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001))
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "Creating field dpdt\n" << endl;
|
||||||
|
volScalarField dpdt
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"dpdt",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "Creating field kinetic energy K\n" << endl;
|
||||||
|
volScalarField K1(IOobject::groupName("K", phase1.name()), 0.5*magSqr(U1));
|
||||||
|
volScalarField K2(IOobject::groupName("K", phase2.name()), 0.5*magSqr(U2));
|
||||||
|
|
||||||
|
autoPtr<PhaseIncompressibleTurbulenceModel<phaseModel> >
|
||||||
|
turbulence1
|
||||||
|
(
|
||||||
|
PhaseIncompressibleTurbulenceModel<phaseModel>::New
|
||||||
|
(
|
||||||
|
alpha1,
|
||||||
|
U1,
|
||||||
|
alphaPhi1,
|
||||||
|
phi1,
|
||||||
|
phase1
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<PhaseIncompressibleTurbulenceModel<phaseModel> >
|
||||||
|
turbulence2
|
||||||
|
(
|
||||||
|
PhaseIncompressibleTurbulenceModel<phaseModel>::New
|
||||||
|
(
|
||||||
|
alpha2,
|
||||||
|
U2,
|
||||||
|
alphaPhi2,
|
||||||
|
phi2,
|
||||||
|
phase2
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|||||||
@ -1,178 +0,0 @@
|
|||||||
IOdictionary RASProperties
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"RASProperties",
|
|
||||||
runTime.constant(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Switch turbulence
|
|
||||||
(
|
|
||||||
RASProperties.lookup("turbulence")
|
|
||||||
);
|
|
||||||
|
|
||||||
dictionary kEpsilonDict
|
|
||||||
(
|
|
||||||
RASProperties.subDictPtr("kEpsilonCoeffs")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar Cmu
|
|
||||||
(
|
|
||||||
dimensionedScalar::lookupOrAddToDict
|
|
||||||
(
|
|
||||||
"Cmu",
|
|
||||||
kEpsilonDict,
|
|
||||||
0.09
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar C1
|
|
||||||
(
|
|
||||||
dimensionedScalar::lookupOrAddToDict
|
|
||||||
(
|
|
||||||
"C1",
|
|
||||||
kEpsilonDict,
|
|
||||||
1.44
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar C2
|
|
||||||
(
|
|
||||||
dimensionedScalar::lookupOrAddToDict
|
|
||||||
(
|
|
||||||
"C2",
|
|
||||||
kEpsilonDict,
|
|
||||||
1.92
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar alpha1k
|
|
||||||
(
|
|
||||||
dimensionedScalar::lookupOrAddToDict
|
|
||||||
(
|
|
||||||
"alpha1k",
|
|
||||||
kEpsilonDict,
|
|
||||||
1.0
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar alpha1Eps
|
|
||||||
(
|
|
||||||
dimensionedScalar::lookupOrAddToDict
|
|
||||||
(
|
|
||||||
"alpha1Eps",
|
|
||||||
kEpsilonDict,
|
|
||||||
0.76923
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dictionary wallFunctionDict
|
|
||||||
(
|
|
||||||
RASProperties.subDictPtr("wallFunctionCoeffs")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar kappa
|
|
||||||
(
|
|
||||||
dimensionedScalar::lookupOrAddToDict
|
|
||||||
(
|
|
||||||
"kappa",
|
|
||||||
wallFunctionDict,
|
|
||||||
0.41
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar E
|
|
||||||
(
|
|
||||||
dimensionedScalar::lookupOrAddToDict
|
|
||||||
(
|
|
||||||
"E",
|
|
||||||
wallFunctionDict,
|
|
||||||
9.8
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (RASProperties.lookupOrDefault("printCoeffs", false))
|
|
||||||
{
|
|
||||||
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
|
|
||||||
<< "wallFunctionCoeffs" << wallFunctionDict << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
nearWallDist y(mesh);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field k\n" << endl;
|
|
||||||
volScalarField k
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"k",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Reading field epsilon\n" << endl;
|
|
||||||
volScalarField epsilon
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"epsilon",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Calculating field nut2\n" << endl;
|
|
||||||
volScalarField nut2
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"nut2",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
Cmu*sqr(k)/epsilon
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Calculating field nuEff1\n" << endl;
|
|
||||||
volScalarField nuEff1
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"nuEff1",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
sqr(Ct)*nut2 + nu1
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Calculating field nuEff2\n" << endl;
|
|
||||||
volScalarField nuEff2
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"nuEff2",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
nut2 + nu2
|
|
||||||
);
|
|
||||||
@ -8,4 +8,8 @@ dragModels/Gibilaro/Gibilaro.C
|
|||||||
dragModels/WenYu/WenYu.C
|
dragModels/WenYu/WenYu.C
|
||||||
dragModels/SyamlalOBrien/SyamlalOBrien.C
|
dragModels/SyamlalOBrien/SyamlalOBrien.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libEulerianInterfacialModels
|
heatTransferModels/heatTransferModel/heatTransferModel.C
|
||||||
|
heatTransferModels/heatTransferModel/newHeatTransferModel.C
|
||||||
|
heatTransferModels/RanzMarshall/RanzMarshall.C
|
||||||
|
|
||||||
|
LIB = $(FOAM_LIBBIN)/libcompressibleEulerianInterfacialModels
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/transportModels/incompressible/transportModel \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I../phaseModel/lnInclude
|
-I../twoPhaseSystem/lnInclude
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
-lphaseModel
|
-lcompressibleTwoPhaseSystem \
|
||||||
|
-lfluidThermophysicalModels \
|
||||||
|
-lspecie
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,6 +29,8 @@ License
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace dragModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(Ergun, 0);
|
defineTypeNameAndDebug(Ergun, 0);
|
||||||
|
|
||||||
@ -39,11 +41,12 @@ namespace Foam
|
|||||||
dictionary
|
dictionary
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Ergun::Ergun
|
Foam::dragModels::Ergun::Ergun
|
||||||
(
|
(
|
||||||
const dictionary& interfaceDict,
|
const dictionary& interfaceDict,
|
||||||
const volScalarField& alpha1,
|
const volScalarField& alpha1,
|
||||||
@ -57,13 +60,13 @@ Foam::Ergun::Ergun
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Ergun::~Ergun()
|
Foam::dragModels::Ergun::~Ergun()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::Ergun::K
|
Foam::tmp<Foam::volScalarField> Foam::dragModels::Ergun::K
|
||||||
(
|
(
|
||||||
const volScalarField& Ur
|
const volScalarField& Ur
|
||||||
) const
|
) const
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::Ergun
|
Foam::dragModels::Ergun
|
||||||
|
|
||||||
Description
|
Description
|
||||||
H, Enwald, E. Peirano, A-E Almstedt
|
H, Enwald, E. Peirano, A-E Almstedt
|
||||||
@ -44,6 +44,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace dragModels
|
||||||
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class Ergun Declaration
|
Class Ergun Declaration
|
||||||
@ -84,6 +86,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace dragModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,6 +29,8 @@ License
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace dragModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(Gibilaro, 0);
|
defineTypeNameAndDebug(Gibilaro, 0);
|
||||||
|
|
||||||
@ -39,11 +41,12 @@ namespace Foam
|
|||||||
dictionary
|
dictionary
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Gibilaro::Gibilaro
|
Foam::dragModels::Gibilaro::Gibilaro
|
||||||
(
|
(
|
||||||
const dictionary& interfaceDict,
|
const dictionary& interfaceDict,
|
||||||
const volScalarField& alpha1,
|
const volScalarField& alpha1,
|
||||||
@ -57,13 +60,13 @@ Foam::Gibilaro::Gibilaro
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Gibilaro::~Gibilaro()
|
Foam::dragModels::Gibilaro::~Gibilaro()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::Gibilaro::K
|
Foam::tmp<Foam::volScalarField> Foam::dragModels::Gibilaro::K
|
||||||
(
|
(
|
||||||
const volScalarField& Ur
|
const volScalarField& Ur
|
||||||
) const
|
) const
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::Gibilaro
|
Foam::dragModels::Gibilaro
|
||||||
|
|
||||||
Description
|
Description
|
||||||
H, Enwald, E. Peirano, A-E Almstedt
|
H, Enwald, E. Peirano, A-E Almstedt
|
||||||
@ -44,6 +44,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace dragModels
|
||||||
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class Gibilaro Declaration
|
Class Gibilaro Declaration
|
||||||
@ -84,6 +86,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace dragModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,6 +29,8 @@ License
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace dragModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(GidaspowErgunWenYu, 0);
|
defineTypeNameAndDebug(GidaspowErgunWenYu, 0);
|
||||||
|
|
||||||
@ -39,11 +41,12 @@ namespace Foam
|
|||||||
dictionary
|
dictionary
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::GidaspowErgunWenYu::GidaspowErgunWenYu
|
Foam::dragModels::GidaspowErgunWenYu::GidaspowErgunWenYu
|
||||||
(
|
(
|
||||||
const dictionary& interfaceDict,
|
const dictionary& interfaceDict,
|
||||||
const volScalarField& alpha1,
|
const volScalarField& alpha1,
|
||||||
@ -57,21 +60,21 @@ Foam::GidaspowErgunWenYu::GidaspowErgunWenYu
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::GidaspowErgunWenYu::~GidaspowErgunWenYu()
|
Foam::dragModels::GidaspowErgunWenYu::~GidaspowErgunWenYu()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::GidaspowErgunWenYu::K
|
Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowErgunWenYu::K
|
||||||
(
|
(
|
||||||
const volScalarField& Ur
|
const volScalarField& Ur
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
|
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
|
||||||
|
volScalarField d(phase1_.d());
|
||||||
volScalarField bp(pow(alpha2, -2.65));
|
volScalarField bp(pow(alpha2, -2.65));
|
||||||
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
volScalarField Re(max(Ur*d/phase2_.nu(), scalar(1.0e-3)));
|
||||||
|
|
||||||
volScalarField Cds
|
volScalarField Cds
|
||||||
(
|
(
|
||||||
@ -83,11 +86,11 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowErgunWenYu::K
|
|||||||
return
|
return
|
||||||
(
|
(
|
||||||
pos(alpha2 - 0.8)
|
pos(alpha2 - 0.8)
|
||||||
*(0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d())
|
*(0.75*Cds*phase2_.rho()*Ur*bp/d)
|
||||||
+ neg(alpha2 - 0.8)
|
+ neg(alpha2 - 0.8)
|
||||||
*(
|
*(
|
||||||
150.0*alpha1_*phase2_.nu()*phase2_.rho()/(sqr(alpha2*phase1_.d()))
|
150.0*alpha1_*phase2_.nu()*phase2_.rho()/(sqr(alpha2*d))
|
||||||
+ 1.75*phase2_.rho()*Ur/(alpha2*phase1_.d())
|
+ 1.75*phase2_.rho()*Ur/(alpha2*d)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::GidaspowErgunWenYu
|
Foam::dragModels::GidaspowErgunWenYu
|
||||||
|
|
||||||
Description
|
Description
|
||||||
D. Gidaspow, Multiphase flow and fluidization,
|
D. Gidaspow, Multiphase flow and fluidization,
|
||||||
@ -42,6 +42,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace dragModels
|
||||||
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class GidaspowErgunWenYu Declaration
|
Class GidaspowErgunWenYu Declaration
|
||||||
@ -82,6 +84,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace dragModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,6 +29,8 @@ License
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace dragModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(GidaspowSchillerNaumann, 0);
|
defineTypeNameAndDebug(GidaspowSchillerNaumann, 0);
|
||||||
|
|
||||||
@ -39,11 +41,12 @@ namespace Foam
|
|||||||
dictionary
|
dictionary
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::GidaspowSchillerNaumann::GidaspowSchillerNaumann
|
Foam::dragModels::GidaspowSchillerNaumann::GidaspowSchillerNaumann
|
||||||
(
|
(
|
||||||
const dictionary& interfaceDict,
|
const dictionary& interfaceDict,
|
||||||
const volScalarField& alpha1,
|
const volScalarField& alpha1,
|
||||||
@ -57,13 +60,13 @@ Foam::GidaspowSchillerNaumann::GidaspowSchillerNaumann
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::GidaspowSchillerNaumann::~GidaspowSchillerNaumann()
|
Foam::dragModels::GidaspowSchillerNaumann::~GidaspowSchillerNaumann()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::GidaspowSchillerNaumann::K
|
Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowSchillerNaumann::K
|
||||||
(
|
(
|
||||||
const volScalarField& Ur
|
const volScalarField& Ur
|
||||||
) const
|
) const
|
||||||
@ -72,7 +75,6 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowSchillerNaumann::K
|
|||||||
volScalarField bp(pow(alpha2, -2.65));
|
volScalarField bp(pow(alpha2, -2.65));
|
||||||
|
|
||||||
volScalarField Re(max(alpha2*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
volScalarField Re(max(alpha2*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||||
|
|
||||||
volScalarField Cds
|
volScalarField Cds
|
||||||
(
|
(
|
||||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::GidaspowSchillerNaumann
|
Foam::dragModels::GidaspowSchillerNaumann
|
||||||
|
|
||||||
Description
|
Description
|
||||||
H, Enwald, E. Peirano, A-E Almstedt
|
H, Enwald, E. Peirano, A-E Almstedt
|
||||||
@ -51,6 +51,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace dragModels
|
||||||
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class GidaspowSchillerNaumann Declaration
|
Class GidaspowSchillerNaumann Declaration
|
||||||
@ -91,6 +93,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace dragModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,6 +29,8 @@ License
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace dragModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(SchillerNaumann, 0);
|
defineTypeNameAndDebug(SchillerNaumann, 0);
|
||||||
|
|
||||||
@ -39,11 +41,12 @@ namespace Foam
|
|||||||
dictionary
|
dictionary
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::SchillerNaumann::SchillerNaumann
|
Foam::dragModels::SchillerNaumann::SchillerNaumann
|
||||||
(
|
(
|
||||||
const dictionary& interfaceDict,
|
const dictionary& interfaceDict,
|
||||||
const volScalarField& alpha1,
|
const volScalarField& alpha1,
|
||||||
@ -57,19 +60,18 @@ Foam::SchillerNaumann::SchillerNaumann
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::SchillerNaumann::~SchillerNaumann()
|
Foam::dragModels::SchillerNaumann::~SchillerNaumann()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::SchillerNaumann::K
|
Foam::tmp<Foam::volScalarField> Foam::dragModels::SchillerNaumann::K
|
||||||
(
|
(
|
||||||
const volScalarField& Ur
|
const volScalarField& Ur
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||||
|
|
||||||
volScalarField Cds
|
volScalarField Cds
|
||||||
(
|
(
|
||||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::SchillerNaumann
|
Foam::dragModels::SchillerNaumann
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -40,6 +40,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace dragModels
|
||||||
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class SchillerNaumann Declaration
|
Class SchillerNaumann Declaration
|
||||||
@ -80,6 +82,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace dragModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,6 +29,8 @@ License
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace dragModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(SyamlalOBrien, 0);
|
defineTypeNameAndDebug(SyamlalOBrien, 0);
|
||||||
|
|
||||||
@ -39,11 +41,12 @@ namespace Foam
|
|||||||
dictionary
|
dictionary
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::SyamlalOBrien::SyamlalOBrien
|
Foam::dragModels::SyamlalOBrien::SyamlalOBrien
|
||||||
(
|
(
|
||||||
const dictionary& interfaceDict,
|
const dictionary& interfaceDict,
|
||||||
const volScalarField& alpha1,
|
const volScalarField& alpha1,
|
||||||
@ -57,13 +60,13 @@ Foam::SyamlalOBrien::SyamlalOBrien
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::SyamlalOBrien::~SyamlalOBrien()
|
Foam::dragModels::SyamlalOBrien::~SyamlalOBrien()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::SyamlalOBrien::K
|
Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::K
|
||||||
(
|
(
|
||||||
const volScalarField& Ur
|
const volScalarField& Ur
|
||||||
) const
|
) const
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::SyamlalOBrien
|
Foam::dragModels::SyamlalOBrien
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Syamlal, M., Rogers, W. and O'Brien, T. J. (1993) MFIX documentation,
|
Syamlal, M., Rogers, W. and O'Brien, T. J. (1993) MFIX documentation,
|
||||||
@ -43,6 +43,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace dragModels
|
||||||
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class SyamlalOBrien Declaration
|
Class SyamlalOBrien Declaration
|
||||||
@ -83,6 +85,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace dragModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,6 +29,8 @@ License
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace dragModels
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(WenYu, 0);
|
defineTypeNameAndDebug(WenYu, 0);
|
||||||
|
|
||||||
@ -39,11 +41,12 @@ namespace Foam
|
|||||||
dictionary
|
dictionary
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::WenYu::WenYu
|
Foam::dragModels::WenYu::WenYu
|
||||||
(
|
(
|
||||||
const dictionary& interfaceDict,
|
const dictionary& interfaceDict,
|
||||||
const volScalarField& alpha1,
|
const volScalarField& alpha1,
|
||||||
@ -57,18 +60,19 @@ Foam::WenYu::WenYu
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::WenYu::~WenYu()
|
Foam::dragModels::WenYu::~WenYu()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::WenYu::K
|
Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::K
|
||||||
(
|
(
|
||||||
const volScalarField& Ur
|
const volScalarField& Ur
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
|
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
|
||||||
|
volScalarField bp(pow(alpha2, -2.65));
|
||||||
|
|
||||||
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||||
volScalarField Cds
|
volScalarField Cds
|
||||||
@ -77,7 +81,7 @@ Foam::tmp<Foam::volScalarField> Foam::WenYu::K
|
|||||||
+ pos(Re - 1000)*0.44
|
+ pos(Re - 1000)*0.44
|
||||||
);
|
);
|
||||||
|
|
||||||
return 0.75*Cds*phase2_.rho()*Ur*pow(alpha2, -2.65)/phase1_.d();
|
return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::WenYu
|
Foam::dragModels::WenYu
|
||||||
|
|
||||||
Description
|
Description
|
||||||
H, Enwald, E. Peirano, A-E Almstedt
|
H, Enwald, E. Peirano, A-E Almstedt
|
||||||
@ -54,6 +54,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace dragModels
|
||||||
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class WenYu Declaration
|
Class WenYu Declaration
|
||||||
@ -94,6 +96,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace dragModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,7 +37,7 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
|||||||
{
|
{
|
||||||
word dragModelType
|
word dragModelType
|
||||||
(
|
(
|
||||||
interfaceDict.lookup("dragModel" + phase1.name())
|
interfaceDict.lookup(phase1.name())
|
||||||
);
|
);
|
||||||
|
|
||||||
Info << "Selecting dragModel for phase "
|
Info << "Selecting dragModel for phase "
|
||||||
@ -50,14 +50,12 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
|||||||
|
|
||||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||||
{
|
{
|
||||||
FatalError
|
FatalErrorIn("dragModel::New")
|
||||||
<< "dragModel::New : " << endl
|
<< "Unknown dragModelType type "
|
||||||
<< " unknown dragModelType type "
|
<< dragModelType << endl << endl
|
||||||
<< dragModelType
|
<< "Valid dragModel types are : " << endl
|
||||||
<< ", constructor not in hash table" << endl << endl
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< " Valid dragModel types are : " << endl;
|
<< exit(FatalError);
|
||||||
Info << dictionaryConstructorTablePtr_->sortedToc()
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return cstrIter()(interfaceDict, alpha1, phase1, phase2);
|
return cstrIter()(interfaceDict, alpha1, phase1, phase2);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1,64 +0,0 @@
|
|||||||
if (turbulence)
|
|
||||||
{
|
|
||||||
if (mesh.changing())
|
|
||||||
{
|
|
||||||
y.correct();
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp<volTensorField> tgradU2 = fvc::grad(U2);
|
|
||||||
volScalarField G(2*nut2*(tgradU2() && dev(symm(tgradU2()))));
|
|
||||||
tgradU2.clear();
|
|
||||||
|
|
||||||
#include "wallFunctions.H"
|
|
||||||
|
|
||||||
// Dissipation equation
|
|
||||||
fvScalarMatrix epsEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(epsilon)
|
|
||||||
+ fvm::div(phi2, epsilon)
|
|
||||||
- fvm::Sp(fvc::div(phi2), epsilon)
|
|
||||||
- fvm::laplacian
|
|
||||||
(
|
|
||||||
alpha1Eps*nuEff2, epsilon,
|
|
||||||
"laplacian(DepsilonEff,epsilon)"
|
|
||||||
)
|
|
||||||
==
|
|
||||||
C1*G*epsilon/k
|
|
||||||
- fvm::Sp(C2*epsilon/k, epsilon)
|
|
||||||
);
|
|
||||||
|
|
||||||
#include "wallDissipation.H"
|
|
||||||
|
|
||||||
epsEqn.relax();
|
|
||||||
epsEqn.solve();
|
|
||||||
|
|
||||||
epsilon.max(dimensionedScalar("zero", epsilon.dimensions(), 1.0e-15));
|
|
||||||
|
|
||||||
|
|
||||||
// Turbulent kinetic energy equation
|
|
||||||
fvScalarMatrix kEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(k)
|
|
||||||
+ fvm::div(phi2, k)
|
|
||||||
- fvm::Sp(fvc::div(phi2), k)
|
|
||||||
- fvm::laplacian
|
|
||||||
(
|
|
||||||
alpha1k*nuEff2, k,
|
|
||||||
"laplacian(DkEff,k)"
|
|
||||||
)
|
|
||||||
==
|
|
||||||
G
|
|
||||||
- fvm::Sp(epsilon/k, k)
|
|
||||||
);
|
|
||||||
kEqn.relax();
|
|
||||||
kEqn.solve();
|
|
||||||
|
|
||||||
k.max(dimensionedScalar("zero", k.dimensions(), 1.0e-8));
|
|
||||||
|
|
||||||
//- Re-calculate turbulence viscosity
|
|
||||||
nut2 = Cmu*sqr(k)/epsilon;
|
|
||||||
|
|
||||||
#include "wallViscosity.H"
|
|
||||||
}
|
|
||||||
|
|
||||||
nuEff2 = nut2 + nu2;
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
kineticTheoryModel/kineticTheoryModel.C
|
|
||||||
|
|
||||||
viscosityModel/viscosityModel/viscosityModel.C
|
|
||||||
viscosityModel/viscosityModel/newViscosityModel.C
|
|
||||||
viscosityModel/Gidaspow/GidaspowViscosity.C
|
|
||||||
viscosityModel/Syamlal/SyamlalViscosity.C
|
|
||||||
viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C
|
|
||||||
viscosityModel/none/noneViscosity.C
|
|
||||||
|
|
||||||
conductivityModel/conductivityModel/conductivityModel.C
|
|
||||||
conductivityModel/conductivityModel/newConductivityModel.C
|
|
||||||
conductivityModel/Gidaspow/GidaspowConductivity.C
|
|
||||||
conductivityModel/Syamlal/SyamlalConductivity.C
|
|
||||||
conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C
|
|
||||||
|
|
||||||
radialModel/radialModel/radialModel.C
|
|
||||||
radialModel/radialModel/newRadialModel.C
|
|
||||||
radialModel/CarnahanStarling/CarnahanStarlingRadial.C
|
|
||||||
radialModel/LunSavage/LunSavageRadial.C
|
|
||||||
radialModel/SinclairJackson/SinclairJacksonRadial.C
|
|
||||||
|
|
||||||
granularPressureModel/granularPressureModel/granularPressureModel.C
|
|
||||||
granularPressureModel/granularPressureModel/newGranularPressureModel.C
|
|
||||||
granularPressureModel/Lun/LunPressure.C
|
|
||||||
granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C
|
|
||||||
|
|
||||||
frictionalStressModel/frictionalStressModel/frictionalStressModel.C
|
|
||||||
frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C
|
|
||||||
frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C
|
|
||||||
frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C
|
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libkineticTheoryModel
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
EXE_INC = \
|
|
||||||
-I$(LIB_SRC)/foam/lnInclude \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
|
||||||
-I../phaseModel/lnInclude \
|
|
||||||
-I../interfacialModels/lnInclude
|
|
||||||
@ -1,83 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "GidaspowConductivity.H"
|
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(GidaspowConductivity, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
conductivityModel,
|
|
||||||
GidaspowConductivity,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::GidaspowConductivity::GidaspowConductivity(const dictionary& dict)
|
|
||||||
:
|
|
||||||
conductivityModel(dict)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::GidaspowConductivity::~GidaspowConductivity()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::GidaspowConductivity::kappa
|
|
||||||
(
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const volScalarField& Theta,
|
|
||||||
const volScalarField& g0,
|
|
||||||
const dimensionedScalar& rho1,
|
|
||||||
const dimensionedScalar& da,
|
|
||||||
const dimensionedScalar& e
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
const scalar sqrtPi = sqrt(constant::mathematical::pi);
|
|
||||||
|
|
||||||
return rho1*da*sqrt(Theta)*
|
|
||||||
(
|
|
||||||
2.0*sqr(alpha1)*g0*(1.0 + e)/sqrtPi
|
|
||||||
+ (9.0/8.0)*sqrtPi*g0*0.5*(1.0 + e)*sqr(alpha1)
|
|
||||||
+ (15.0/16.0)*sqrtPi*alpha1
|
|
||||||
+ (25.0/64.0)*sqrtPi/((1.0 + e)*g0)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,91 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::GidaspowConductivity
|
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
GidaspowConductivity.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef GidaspowConductivity_H
|
|
||||||
#define GidaspowConductivity_H
|
|
||||||
|
|
||||||
#include "conductivityModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class GidaspowConductivity Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class GidaspowConductivity
|
|
||||||
:
|
|
||||||
public conductivityModel
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("Gidaspow");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
GidaspowConductivity(const dictionary& dict);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~GidaspowConductivity();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
tmp<volScalarField> kappa
|
|
||||||
(
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const volScalarField& Theta,
|
|
||||||
const volScalarField& g0,
|
|
||||||
const dimensionedScalar& rho1,
|
|
||||||
const dimensionedScalar& da,
|
|
||||||
const dimensionedScalar& e
|
|
||||||
) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,96 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "HrenyaSinclairConductivity.H"
|
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(HrenyaSinclairConductivity, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
conductivityModel,
|
|
||||||
HrenyaSinclairConductivity,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::HrenyaSinclairConductivity::HrenyaSinclairConductivity
|
|
||||||
(
|
|
||||||
const dictionary& dict
|
|
||||||
)
|
|
||||||
:
|
|
||||||
conductivityModel(dict),
|
|
||||||
coeffsDict_(dict.subDict(typeName + "Coeffs")),
|
|
||||||
L_(coeffsDict_.lookup("L"))
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::HrenyaSinclairConductivity::~HrenyaSinclairConductivity()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::HrenyaSinclairConductivity::kappa
|
|
||||||
(
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const volScalarField& Theta,
|
|
||||||
const volScalarField& g0,
|
|
||||||
const dimensionedScalar& rho1,
|
|
||||||
const dimensionedScalar& da,
|
|
||||||
const dimensionedScalar& e
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
const scalar sqrtPi = sqrt(constant::mathematical::pi);
|
|
||||||
|
|
||||||
volScalarField lamda
|
|
||||||
(
|
|
||||||
scalar(1) + da/(6.0*sqrt(2.0)*(alpha1 + scalar(1.0e-5)))/L_
|
|
||||||
);
|
|
||||||
|
|
||||||
return rho1*da*sqrt(Theta)*
|
|
||||||
(
|
|
||||||
2.0*sqr(alpha1)*g0*(1.0 + e)/sqrtPi
|
|
||||||
+ (9.0/8.0)*sqrtPi*0.25*sqr(1.0 + e)*(2.0*e - 1.0)*sqr(alpha1)
|
|
||||||
/(49.0/16.0 - 33.0*e/16.0)
|
|
||||||
+ (15.0/16.0)*sqrtPi*alpha1*(0.5*sqr(e) + 0.25*e - 0.75 + lamda)
|
|
||||||
/((49.0/16.0 - 33.0*e/16.0)*lamda)
|
|
||||||
+ (25.0/64.0)*sqrtPi
|
|
||||||
/((1.0 + e)*(49.0/16.0 - 33.0*e/16.0)*lamda*g0)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,96 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::HrenyaSinclairConductivity
|
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
HrenyaSinclairConductivity.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef HrenyaSinclairConductivity_H
|
|
||||||
#define HrenyaSinclairConductivity_H
|
|
||||||
|
|
||||||
#include "conductivityModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class HrenyaSinclairConductivity Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class HrenyaSinclairConductivity
|
|
||||||
:
|
|
||||||
public conductivityModel
|
|
||||||
{
|
|
||||||
|
|
||||||
dictionary coeffsDict_;
|
|
||||||
|
|
||||||
//- characteristic length of geometry
|
|
||||||
dimensionedScalar L_;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("HrenyaSinclair");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
HrenyaSinclairConductivity(const dictionary& dict);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~HrenyaSinclairConductivity();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
tmp<volScalarField> kappa
|
|
||||||
(
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const volScalarField& Theta,
|
|
||||||
const volScalarField& g0,
|
|
||||||
const dimensionedScalar& rho1,
|
|
||||||
const dimensionedScalar& da,
|
|
||||||
const dimensionedScalar& e
|
|
||||||
) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,83 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "SyamlalConductivity.H"
|
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(SyamlalConductivity, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
conductivityModel,
|
|
||||||
SyamlalConductivity,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::SyamlalConductivity::SyamlalConductivity(const dictionary& dict)
|
|
||||||
:
|
|
||||||
conductivityModel(dict)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::SyamlalConductivity::~SyamlalConductivity()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::SyamlalConductivity::kappa
|
|
||||||
(
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const volScalarField& Theta,
|
|
||||||
const volScalarField& g0,
|
|
||||||
const dimensionedScalar& rho1,
|
|
||||||
const dimensionedScalar& da,
|
|
||||||
const dimensionedScalar& e
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
const scalar sqrtPi = sqrt(constant::mathematical::pi);
|
|
||||||
|
|
||||||
return rho1*da*sqrt(Theta)*
|
|
||||||
(
|
|
||||||
2.0*sqr(alpha1)*g0*(1.0 + e)/sqrtPi
|
|
||||||
+ (9.0/8.0)*sqrtPi*g0*0.25*sqr(1.0 + e)*(2.0*e - 1.0)*sqr(alpha1)
|
|
||||||
/(49.0/16.0 - 33.0*e/16.0)
|
|
||||||
+ (15.0/32.0)*sqrtPi*alpha1/(49.0/16.0 - 33.0*e/16.0)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "conductivityModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(conductivityModel, 0);
|
|
||||||
|
|
||||||
defineRunTimeSelectionTable(conductivityModel, dictionary);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::conductivityModel::conductivityModel
|
|
||||||
(
|
|
||||||
const dictionary& dict
|
|
||||||
)
|
|
||||||
:
|
|
||||||
dict_(dict)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::conductivityModel::~conductivityModel()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,125 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::conductivityModel
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
conductivityModel.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef conductivityModel_H
|
|
||||||
#define conductivityModel_H
|
|
||||||
|
|
||||||
#include "dictionary.H"
|
|
||||||
#include "volFields.H"
|
|
||||||
#include "dimensionedTypes.H"
|
|
||||||
#include "runTimeSelectionTables.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class conductivityModel Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class conductivityModel
|
|
||||||
{
|
|
||||||
// Private member functions
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
|
||||||
conductivityModel(const conductivityModel&);
|
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
|
||||||
void operator=(const conductivityModel&);
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Protected data
|
|
||||||
|
|
||||||
const dictionary& dict_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("conductivityModel");
|
|
||||||
|
|
||||||
// Declare runtime constructor selection table
|
|
||||||
declareRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
autoPtr,
|
|
||||||
conductivityModel,
|
|
||||||
dictionary,
|
|
||||||
(
|
|
||||||
const dictionary& dict
|
|
||||||
),
|
|
||||||
(dict)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
conductivityModel(const dictionary& dict);
|
|
||||||
|
|
||||||
|
|
||||||
// Selectors
|
|
||||||
|
|
||||||
static autoPtr<conductivityModel> New
|
|
||||||
(
|
|
||||||
const dictionary& dict
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~conductivityModel();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
virtual tmp<volScalarField> kappa
|
|
||||||
(
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const volScalarField& Theta,
|
|
||||||
const volScalarField& g0,
|
|
||||||
const dimensionedScalar& rho1,
|
|
||||||
const dimensionedScalar& da,
|
|
||||||
const dimensionedScalar& e
|
|
||||||
) const = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "conductivityModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::autoPtr<Foam::conductivityModel> Foam::conductivityModel::New
|
|
||||||
(
|
|
||||||
const dictionary& dict
|
|
||||||
)
|
|
||||||
{
|
|
||||||
word conductivityModelType(dict.lookup("conductivityModel"));
|
|
||||||
|
|
||||||
Info<< "Selecting conductivityModel "
|
|
||||||
<< conductivityModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
|
||||||
dictionaryConstructorTablePtr_->find(conductivityModelType);
|
|
||||||
|
|
||||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
|
||||||
{
|
|
||||||
FatalError
|
|
||||||
<< "conductivityModel::New(const dictionary&) : " << endl
|
|
||||||
<< " unknown conductivityModelType type "
|
|
||||||
<< conductivityModelType
|
|
||||||
<< ", constructor not in hash table" << endl << endl
|
|
||||||
<< " Valid conductivityModelType types are :" << endl;
|
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
return autoPtr<conductivityModel>(cstrIter()(dict));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,114 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "JohnsonJacksonFrictionalStress.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(JohnsonJacksonFrictionalStress, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
frictionalStressModel,
|
|
||||||
JohnsonJacksonFrictionalStress,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::JohnsonJacksonFrictionalStress::JohnsonJacksonFrictionalStress
|
|
||||||
(
|
|
||||||
const dictionary& dict
|
|
||||||
)
|
|
||||||
:
|
|
||||||
frictionalStressModel(dict)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::JohnsonJacksonFrictionalStress::~JohnsonJacksonFrictionalStress()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::JohnsonJacksonFrictionalStress::
|
|
||||||
frictionalPressure
|
|
||||||
(
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const dimensionedScalar& alphaMinFriction,
|
|
||||||
const dimensionedScalar& alphaMax,
|
|
||||||
const dimensionedScalar& Fr,
|
|
||||||
const dimensionedScalar& eta,
|
|
||||||
const dimensionedScalar& p
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
|
|
||||||
return
|
|
||||||
Fr*pow(max(alpha1 - alphaMinFriction, scalar(0)), eta)
|
|
||||||
/pow(max(alphaMax - alpha1, scalar(5.0e-2)), p);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::JohnsonJacksonFrictionalStress::
|
|
||||||
frictionalPressurePrime
|
|
||||||
(
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const dimensionedScalar& alphaMinFriction,
|
|
||||||
const dimensionedScalar& alphaMax,
|
|
||||||
const dimensionedScalar& Fr,
|
|
||||||
const dimensionedScalar& eta,
|
|
||||||
const dimensionedScalar& p
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
return Fr*
|
|
||||||
(
|
|
||||||
eta*pow(max(alpha1 - alphaMinFriction, scalar(0)), eta - 1.0)
|
|
||||||
*(alphaMax-alpha1)
|
|
||||||
+ p*pow(max(alpha1 - alphaMinFriction, scalar(0)), eta)
|
|
||||||
)/pow(max(alphaMax - alpha1, scalar(5.0e-2)), p + 1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::JohnsonJacksonFrictionalStress::muf
|
|
||||||
(
|
|
||||||
const volScalarField& alpha1,
|
|
||||||
const dimensionedScalar& alphaMax,
|
|
||||||
const volScalarField& pf,
|
|
||||||
const volSymmTensorField& D,
|
|
||||||
const dimensionedScalar& phi
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
return dimensionedScalar("0.5", dimTime, 0.5)*pf*sin(phi);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user