mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
multiphaseEulerFoam: new solver
including two simple tutorial cases
This commit is contained in:
11
applications/solvers/multiphase/multiphaseEulerFoam/Allwclean
Executable file
11
applications/solvers/multiphase/multiphaseEulerFoam/Allwclean
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wclean libso phaseModel
|
||||
wclean libso multiphaseSystem
|
||||
wclean libso interfacialModels
|
||||
wclean libso kineticTheoryModels
|
||||
wclean
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
11
applications/solvers/multiphase/multiphaseEulerFoam/Allwmake
Executable file
11
applications/solvers/multiphase/multiphaseEulerFoam/Allwmake
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wmake libso phaseModel
|
||||
wmake libso multiphaseSystem
|
||||
wmake libso interfacialModels
|
||||
wmake libso kineticTheoryModels
|
||||
wmake
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -0,0 +1,51 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Global
|
||||
CourantNo
|
||||
|
||||
Description
|
||||
Calculates and outputs the mean and maximum Courant Numbers.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
scalar CoNum = 0.0;
|
||||
scalar meanCoNum = 0.0;
|
||||
|
||||
if (mesh.nInternalFaces())
|
||||
{
|
||||
scalarField sumPhi
|
||||
(
|
||||
fvc::surfaceSum(mag(phi))().internalField()
|
||||
);
|
||||
|
||||
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||
|
||||
meanCoNum =
|
||||
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||
}
|
||||
|
||||
Info<< "Courant Number mean: " << meanCoNum
|
||||
<< " max: " << CoNum << endl;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,12 @@
|
||||
# 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);
|
||||
// }
|
||||
@ -0,0 +1,9 @@
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
|
||||
phase.DDtU() =
|
||||
fvc::ddt(phase.U())
|
||||
+ fvc::div(phase.phi(), phase.U())
|
||||
- fvc::div(phase.phi())*phase.U();
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
multiphaseEulerFoam.C
|
||||
multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/multiphaseEulerFoam
|
||||
@ -0,0 +1,24 @@
|
||||
EXE_INC = -ggdb3 \
|
||||
-IphaseModel/lnInclude \
|
||||
-ImultiphaseSystem/lnInclude \
|
||||
/*-IkineticTheoryModels/lnInclude*/ \
|
||||
-IinterfacialModels/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \
|
||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmultiphaseSystem \
|
||||
-lcompressibleMultiPhaseModel \
|
||||
-linterfaceProperties \
|
||||
-lincompressibleTransportModels \
|
||||
-lcompressibleMultiphaseEulerianInterfacialModels \
|
||||
/*-lcompressibleKineticTheoryModel*/ \
|
||||
-lincompressibleLESModels \
|
||||
-lfiniteVolume
|
||||
38
applications/solvers/multiphase/multiphaseEulerFoam/TEqns.H
Normal file
38
applications/solvers/multiphase/multiphaseEulerFoam/TEqns.H
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
volScalarField kByCp1("kByCp1", alpha1*(k1/Cp1/rho1 + sqr(Ct)*nut2/Prt));
|
||||
volScalarField kByCp2("kByCp2", alpha2*(k2/Cp2/rho2 + nut2/Prt));
|
||||
|
||||
fvScalarMatrix T1Eqn
|
||||
(
|
||||
fvm::ddt(alpha1, T1)
|
||||
+ fvm::div(alphaPhi1, T1)
|
||||
- fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), T1)
|
||||
- fvm::laplacian(kByCp1, T1)
|
||||
==
|
||||
heatTransferCoeff*T2/Cp1/rho1
|
||||
- fvm::Sp(heatTransferCoeff/Cp1/rho1, T1)
|
||||
+ alpha1*Dp1Dt/Cp1/rho1
|
||||
);
|
||||
|
||||
fvScalarMatrix T2Eqn
|
||||
(
|
||||
fvm::ddt(alpha2, T2)
|
||||
+ fvm::div(alphaPhi2, T2)
|
||||
- fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), T2)
|
||||
- fvm::laplacian(kByCp2, T2)
|
||||
==
|
||||
heatTransferCoeff*T1/Cp2/rho2
|
||||
- fvm::Sp(heatTransferCoeff/Cp2/rho2, T2)
|
||||
+ alpha2*Dp2Dt/Cp2/rho2
|
||||
);
|
||||
|
||||
T1Eqn.relax();
|
||||
T1Eqn.solve();
|
||||
|
||||
T2Eqn.relax();
|
||||
T2Eqn.solve();
|
||||
|
||||
// Update compressibilities
|
||||
psi1 = 1.0/(R1*T1);
|
||||
psi2 = 1.0/(R2*T2);
|
||||
}
|
||||
40
applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H
Normal file
40
applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H
Normal file
@ -0,0 +1,40 @@
|
||||
PtrList<fvVectorMatrix> UEqns(fluid.phases().size());
|
||||
autoPtr<multiphaseSystem::dragCoeffFields> dragCoeffs(fluid.dragCoeffs());
|
||||
|
||||
int phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
const volScalarField& alpha = phase;
|
||||
volVectorField& U = phase.U();
|
||||
|
||||
volScalarField nuEff(sgsModel->nut() + iter().nu());
|
||||
|
||||
UEqns.set
|
||||
(
|
||||
phasei,
|
||||
new fvVectorMatrix
|
||||
(
|
||||
(scalar(1) + fluid.Cvm(phase)/phase.rho())*
|
||||
(
|
||||
fvm::ddt(alpha, U)
|
||||
+ fvm::div(phase.phiAlpha(), U)
|
||||
- fvm::Sp(fvc::ddt(alpha) + fvc::div(phase.phiAlpha()), U)
|
||||
)
|
||||
- fvm::laplacian(alpha*nuEff, U)
|
||||
- fvc::div
|
||||
(
|
||||
alpha*(nuEff*dev(T(fvc::grad(U))) /*- ((2.0/3.0)*I)*k*/),
|
||||
"div(Rc)"
|
||||
)
|
||||
==
|
||||
- fvm::Sp(fluid.dragCoeff(phase, dragCoeffs())/phase.rho(), U)
|
||||
//- (alpha*phase.rho())*fluid.lift(phase)
|
||||
+ (alpha/phase.rho())*fluid.Svm(phase)
|
||||
)
|
||||
);
|
||||
mrfZones.addCoriolis(UEqns[phasei]);
|
||||
UEqns[phasei].relax();
|
||||
|
||||
phasei++;
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
surfaceScalarField alphaPhi1("alphaPhi1", phi1);
|
||||
surfaceScalarField alphaPhi2("alphaPhi2", phi2);
|
||||
|
||||
{
|
||||
word scheme("div(phi,alpha1)");
|
||||
word schemer("div(phir,alpha1)");
|
||||
|
||||
surfaceScalarField phic("phic", phi);
|
||||
surfaceScalarField phir("phir", phi1 - phi2);
|
||||
|
||||
if (g0.value() > 0.0)
|
||||
{
|
||||
surfaceScalarField alpha1f = fvc::interpolate(alpha1);
|
||||
surfaceScalarField phipp = ppMagf*fvc::snGrad(alpha1)*mesh.magSf();
|
||||
phir += phipp;
|
||||
phic += fvc::interpolate(alpha1)*phipp;
|
||||
}
|
||||
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fvScalarMatrix alpha1Eqn
|
||||
(
|
||||
fvm::ddt(alpha1)
|
||||
+ fvm::div(phic, alpha1, scheme)
|
||||
+ fvm::div(-fvc::flux(-phir, alpha2, schemer), alpha1, schemer)
|
||||
==
|
||||
fvm::Sp(Sp, alpha1) + Su
|
||||
);
|
||||
|
||||
if (g0.value() > 0.0)
|
||||
{
|
||||
ppMagf = rU1Af*fvc::interpolate
|
||||
(
|
||||
(1.0/(rho1*(alpha1 + scalar(0.0001))))
|
||||
*g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax)
|
||||
);
|
||||
|
||||
alpha1Eqn -= fvm::laplacian
|
||||
(
|
||||
(fvc::interpolate(alpha1) + scalar(0.0001))*ppMagf,
|
||||
alpha1,
|
||||
"laplacian(alphaPpMag,alpha1)"
|
||||
);
|
||||
}
|
||||
|
||||
alpha1Eqn.relax();
|
||||
alpha1Eqn.solve();
|
||||
|
||||
//***HGW temporary boundedness-fix pending the introduction of MULES
|
||||
alpha1 = max(min(alpha1, 1.0), 0.0);
|
||||
|
||||
#include "packingLimiter.H"
|
||||
|
||||
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 = alpha1*rho1 + alpha2*rho2;
|
||||
@ -0,0 +1,54 @@
|
||||
{
|
||||
#include "continuityErrs.H"
|
||||
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
forAll (p.boundaryField(), i)
|
||||
{
|
||||
if (p.boundaryField()[i].fixesValue())
|
||||
{
|
||||
pcorrTypes[i] = fixedValueFvPatchScalarField::typeName;
|
||||
}
|
||||
}
|
||||
|
||||
volScalarField pcorr
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pcorr",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("pcorr", p.dimensions(), 0.0),
|
||||
pcorrTypes
|
||||
);
|
||||
|
||||
dimensionedScalar rAUf("(1|A(U))", dimTime/rho.dimensions(), 1.0);
|
||||
|
||||
adjustPhi(phi, U, pcorr);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
fvm::laplacian(rAUf, pcorr) == fvc::div(phi)
|
||||
);
|
||||
|
||||
pcorrEqn.setReference(pRefCell, pRefValue);
|
||||
pcorrEqn.solve();
|
||||
|
||||
if (nonOrth == pimple.nNonOrthCorr())
|
||||
{
|
||||
phi -= pcorrEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
#include "readGravitationalAcceleration.H"
|
||||
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedVector("U", dimVelocity, vector::zero)
|
||||
);
|
||||
|
||||
surfaceScalarField phi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"phi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("phi", dimArea*dimVelocity, 0)
|
||||
);
|
||||
|
||||
multiphaseSystem fluid(mesh, phi);
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
const volScalarField& alpha = phase;
|
||||
|
||||
U += alpha*phase.U();
|
||||
phi += fvc::interpolate(alpha)*phase.phi();
|
||||
}
|
||||
|
||||
// dimensionedScalar pMin
|
||||
// (
|
||||
// "pMin",
|
||||
// dimPressure,
|
||||
// fluid.lookup("pMin")
|
||||
// );
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fluid.rho()
|
||||
);
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::LESModel> sgsModel
|
||||
(
|
||||
incompressible::LESModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
@ -0,0 +1,2 @@
|
||||
MRFZones mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
@ -0,0 +1,80 @@
|
||||
volScalarField dragCoeff
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dragCoeff",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dragCoeff", dimensionSet(1, -3, -1, 0, 0), 0)
|
||||
);
|
||||
|
||||
volVectorField liftForce
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"liftForce",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedVector("liftForce", dimensionSet(1, -2, -2, 0, 0), vector::zero)
|
||||
);
|
||||
|
||||
volScalarField heatTransferCoeff
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"heatTransferCoeff",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("heatTransferCoeff", dimensionSet(1, -1, -3, -1, 0), 0)
|
||||
);
|
||||
|
||||
{
|
||||
volVectorField Ur = U1 - U2;
|
||||
volScalarField magUr = mag(Ur);
|
||||
|
||||
if (dispersedPhase == "1")
|
||||
{
|
||||
dragCoeff = drag1->K(magUr);
|
||||
heatTransferCoeff = heatTransfer1->K(magUr);
|
||||
}
|
||||
else if (dispersedPhase == "2")
|
||||
{
|
||||
dragCoeff = drag2->K(magUr);
|
||||
heatTransferCoeff = heatTransfer2->K(magUr);
|
||||
}
|
||||
else if (dispersedPhase == "both")
|
||||
{
|
||||
dragCoeff =
|
||||
(
|
||||
alpha2*drag1->K(magUr)
|
||||
+ alpha1*drag2->K(magUr)
|
||||
);
|
||||
|
||||
heatTransferCoeff =
|
||||
(
|
||||
alpha2*heatTransfer1->K(magUr)
|
||||
+ alpha1*heatTransfer2->K(magUr)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
<< "dispersedPhase: " << dispersedPhase << " is incorrect"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
volScalarField alphaCoeff
|
||||
(
|
||||
(alpha1 + minInterfaceAlpha)*(alpha2 + minInterfaceAlpha)
|
||||
);
|
||||
dragCoeff *= alphaCoeff;
|
||||
heatTransferCoeff *= alphaCoeff;
|
||||
|
||||
liftForce = Cl*(alpha1*rho1 + alpha2*rho2)*(Ur ^ fvc::curl(U));
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
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
|
||||
dragModels/blended/blended.C
|
||||
|
||||
heatTransferModels/heatTransferModel/heatTransferModel.C
|
||||
heatTransferModels/heatTransferModel/newHeatTransferModel.C
|
||||
heatTransferModels/RanzMarshall/RanzMarshall.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libcompressibleMultiphaseEulerianInterfacialModels
|
||||
@ -0,0 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I../phaseModel/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lphaseModel
|
||||
@ -0,0 +1,82 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::Ergun::~Ergun()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::Ergun::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField beta(max(phase2_, scalar(1.0e-6)));
|
||||
|
||||
return
|
||||
150.0*phase1_*phase2_.nu()*phase2_.rho()
|
||||
/sqr(beta*phase1_.d())
|
||||
+ 1.75*phase2_.rho()*Ur/(beta*phase1_.d());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,95 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Ergun();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,81 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::Gibilaro::~Gibilaro()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::Gibilaro::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField beta(max(phase2_, scalar(1.0e-6)));
|
||||
volScalarField bp(pow(beta, -2.8));
|
||||
volScalarField Re(max(beta*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||
|
||||
return (17.3/Re + scalar(0.336))*phase2_.rho()*Ur*bp/phase1_.d();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,95 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Gibilaro();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,109 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::GidaspowErgunWenYu::~GidaspowErgunWenYu()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowErgunWenYu::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField beta(max(phase2_, scalar(1.0e-6)));
|
||||
volScalarField d = phase1_.d();
|
||||
volScalarField bp(pow(beta, -2.65));
|
||||
volScalarField Re(max(Ur*d/phase2_.nu(), scalar(1.0e-3)));
|
||||
|
||||
volScalarField Cds(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re);
|
||||
|
||||
forAll(Re, celli)
|
||||
{
|
||||
if (Re[celli] > 1000.0)
|
||||
{
|
||||
Cds[celli] = 0.44;
|
||||
}
|
||||
}
|
||||
|
||||
// Wen and Yu (1966)
|
||||
tmp<volScalarField> tKWenYu = 0.75*Cds*phase2_.rho()*Ur*bp/d;
|
||||
volScalarField& KWenYu = tKWenYu();
|
||||
|
||||
// Ergun
|
||||
forAll (beta, cellj)
|
||||
{
|
||||
if (beta[cellj] <= 0.8)
|
||||
{
|
||||
KWenYu[cellj] =
|
||||
150.0*phase1_[cellj]*phase2_.nu().value()*phase2_.rho().value()
|
||||
/sqr(beta[cellj]*d[cellj])
|
||||
+ 1.75*phase2_.rho().value()*Ur[cellj]
|
||||
/(beta[cellj]*d[cellj]);
|
||||
}
|
||||
}
|
||||
|
||||
return tKWenYu;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,93 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~GidaspowErgunWenYu();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,91 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::GidaspowSchillerNaumann::~GidaspowSchillerNaumann()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowSchillerNaumann::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField beta(max(phase2_, scalar(1e-6)));
|
||||
volScalarField bp(pow(beta, -2.65));
|
||||
|
||||
volScalarField Re(max(beta*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||
volScalarField Cds(24.0*(scalar(1) + 0.15*pow(Re, 0.687))/Re);
|
||||
|
||||
forAll(Re, celli)
|
||||
{
|
||||
if (Re[celli] > 1000.0)
|
||||
{
|
||||
Cds[celli] = 0.44;
|
||||
}
|
||||
}
|
||||
|
||||
return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,102 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~GidaspowSchillerNaumann();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,88 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, 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(24.0*(scalar(1) + 0.15*pow(Re, 0.687))/Re);
|
||||
|
||||
forAll(Re, celli)
|
||||
{
|
||||
if (Re[celli] > 1000.0)
|
||||
{
|
||||
Cds[celli] = 0.44;
|
||||
}
|
||||
}
|
||||
|
||||
return 0.75*Cds*phase2_.rho()*Ur/phase1_.d();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,91 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::dragModels::SchillerNaumann
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
SchillerNaumann.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef SchillerNaumann_H
|
||||
#define SchillerNaumann_H
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class SchillerNaumann Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class SchillerNaumann
|
||||
:
|
||||
public dragModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("SchillerNaumann");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
SchillerNaumann
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~SchillerNaumann();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,101 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::SyamlalOBrien::~SyamlalOBrien()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField beta(max(phase2_, scalar(1.0e-6)));
|
||||
volScalarField A(pow(beta, 4.14));
|
||||
volScalarField B(0.8*pow(beta, 1.28));
|
||||
|
||||
forAll (beta, celli)
|
||||
{
|
||||
if (beta[celli] > 0.85)
|
||||
{
|
||||
B[celli] = pow(beta[celli], 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));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,94 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~SyamlalOBrien();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,91 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::WenYu::~WenYu()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField beta(max(phase2_, scalar(1.0e-6)));
|
||||
volScalarField bp(pow(beta, -2.65));
|
||||
|
||||
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||
volScalarField Cds(24.0*(scalar(1) + 0.15*pow(Re, 0.687))/Re);
|
||||
|
||||
forAll(Re, celli)
|
||||
{
|
||||
if (Re[celli] > 1000.0)
|
||||
{
|
||||
Cds[celli] = 0.44;
|
||||
}
|
||||
}
|
||||
|
||||
return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,105 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
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 phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~WenYu();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,79 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "blended.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
defineTypeNameAndDebug(blended, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
dragModel,
|
||||
blended,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::blended::blended
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
dragModel(interfaceDict, phase1, phase2),
|
||||
dragModel1_(New(interfaceDict.subDict(phase1.name()), phase1, phase2)),
|
||||
dragModel2_(New(interfaceDict.subDict(phase2.name()), phase2, phase1))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModels::blended::~blended()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::blended::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
return phase2()*dragModel1_->K(Ur) + phase1()*dragModel2_->K(Ur);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,99 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::dragModels::blended
|
||||
|
||||
Description
|
||||
Blends two drag models based on the phase fractions to handle
|
||||
phase-inversion.
|
||||
|
||||
SourceFiles
|
||||
blended.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef blended_H
|
||||
#define blended_H
|
||||
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace dragModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class blended Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class blended
|
||||
:
|
||||
public dragModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
// The two drag models to be blended
|
||||
autoPtr<dragModel> dragModel1_;
|
||||
autoPtr<dragModel> dragModel2_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("blended");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
blended
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~blended();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace dragModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,64 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(dragModel, 0);
|
||||
defineRunTimeSelectionTable(dragModel, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModel::dragModel
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
interfaceDict_(interfaceDict),
|
||||
phase1_(phase1),
|
||||
phase2_(phase2),
|
||||
residualDrag_
|
||||
(
|
||||
"residualDrag",
|
||||
dimensionSet(1, -3, -1, 0, 0),
|
||||
interfaceDict.lookup("residualDrag")
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dragModel::~dragModel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,145 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
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 phaseModel& phase1_;
|
||||
const phaseModel& phase2_;
|
||||
dimensionedScalar residualDrag_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("dragModel");
|
||||
|
||||
|
||||
// Declare runtime construction
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
dragModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
),
|
||||
(interfaceDict, phase1, phase2)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
dragModel
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~dragModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
static autoPtr<dragModel> New
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
const phaseModel& phase1() const
|
||||
{
|
||||
return phase1_;
|
||||
}
|
||||
|
||||
const phaseModel& phase2() const
|
||||
{
|
||||
return phase2_;
|
||||
}
|
||||
|
||||
const dimensionedScalar& residualDrag() const
|
||||
{
|
||||
return residualDrag_;
|
||||
}
|
||||
|
||||
//- the dragfunction K used in the momentum eq.
|
||||
// ddt(alpha*rhoa*Ua) + ... = ... alpha*beta*K*(Ua-Ub)
|
||||
// ddt(beta*rhob*Ub) + ... = ... alpha*beta*K*(Ub-Ua)
|
||||
// **********************************<2A>NB ! *****************************
|
||||
// for numerical reasons alpha and beta has been
|
||||
// extracted from the dragFunction K,
|
||||
// so you MUST divide K by alpha*beta when implemnting the drag function
|
||||
// **********************************<2A>NB ! *****************************
|
||||
virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,61 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
{
|
||||
word dragModelType(interfaceDict.lookup("type"));
|
||||
|
||||
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, phase1, phase2);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,83 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "RanzMarshall.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace heatTransferModels
|
||||
{
|
||||
defineTypeNameAndDebug(RanzMarshall, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
heatTransferModel,
|
||||
RanzMarshall,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::heatTransferModels::RanzMarshall::RanzMarshall
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
heatTransferModel(interfaceDict, alpha, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::heatTransferModels::RanzMarshall::~RanzMarshall()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::heatTransferModels::RanzMarshall::K
|
||||
(
|
||||
const volScalarField& Ur
|
||||
) const
|
||||
{
|
||||
volScalarField Re = max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3));
|
||||
dimensionedScalar Prb =
|
||||
phase2_.rho()*phase2_.nu()*phase2_.Cp()/phase2_.kappa();
|
||||
volScalarField Nu = scalar(2) + 0.6*sqrt(Re)*cbrt(Prb);
|
||||
|
||||
return 6.0*phase2_.kappa()*Nu/sqr(phase1_.d());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,92 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::heatTransferModels::RanzMarshall
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
RanzMarshall.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef RanzMarshall_H
|
||||
#define RanzMarshall_H
|
||||
|
||||
#include "heatTransferModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace heatTransferModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class RanzMarshall Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class RanzMarshall
|
||||
:
|
||||
public heatTransferModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("RanzMarshall");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
RanzMarshall
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~RanzMarshall();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> K(const volScalarField& Ur) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace heatTransferModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "heatTransferModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(heatTransferModel, 0);
|
||||
defineRunTimeSelectionTable(heatTransferModel, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::heatTransferModel::heatTransferModel
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
interfaceDict_(interfaceDict),
|
||||
alpha_(alpha),
|
||||
phase1_(phase1),
|
||||
phase2_(phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::heatTransferModel::~heatTransferModel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,135 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::heatTransferModel
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
heatTransferModel.C
|
||||
newHeatTransferModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef heatTransferModel_H
|
||||
#define heatTransferModel_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "phaseModel.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class heatTransferModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class heatTransferModel
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
const dictionary& interfaceDict_;
|
||||
const volScalarField& alpha_;
|
||||
const phaseModel& phase1_;
|
||||
const phaseModel& phase2_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("heatTransferModel");
|
||||
|
||||
|
||||
// Declare runtime construction
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
heatTransferModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
),
|
||||
(interfaceDict, alpha, phase1, phase2)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
heatTransferModel
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~heatTransferModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
static autoPtr<heatTransferModel> New
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- the heat-transfer function K used in the enthalpy eq.
|
||||
// ddt(alpha*rhoa*ha) + ... = ... alpha*beta*K*(Ta - Tb)
|
||||
// ddt(beta*rhob*hb) + ... = ... alpha*beta*K*(Tb - Ta)
|
||||
// **********************************<2A>NB ! *****************************
|
||||
// for numerical reasons alpha and beta has been
|
||||
// extracted from the heat-transfer function K,
|
||||
// so you MUST divide K by alpha*beta when implementing the
|
||||
// heat-transfer function
|
||||
// **********************************<2A>NB ! *****************************
|
||||
virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,65 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "heatTransferModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
|
||||
(
|
||||
const dictionary& interfaceDict,
|
||||
const volScalarField& alpha,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
{
|
||||
word heatTransferModelType
|
||||
(
|
||||
interfaceDict.lookup("heatTransferModel" + phase1.name())
|
||||
);
|
||||
|
||||
Info<< "Selecting heatTransferModel for phase "
|
||||
<< phase1.name()
|
||||
<< ": "
|
||||
<< heatTransferModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(heatTransferModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn("heatTransferModel::New")
|
||||
<< "Unknown heatTransferModelType type "
|
||||
<< heatTransferModelType << endl << endl
|
||||
<< "Valid heatTransferModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(interfaceDict, alpha, phase1, phase2);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
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/Gidaspow/GidaspowRadial.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)/libcompressibleMultiphaseKineticTheoryModel
|
||||
@ -0,0 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/foam/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I../phaseModel/lnInclude \
|
||||
-I../interfacialModels/lnInclude
|
||||
@ -0,0 +1,93 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "GidaspowConductivity.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace conductivityModels
|
||||
{
|
||||
defineTypeNameAndDebug(Gidaspow, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
conductivityModel,
|
||||
Gidaspow,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::conductivityModels::Gidaspow::Gidaspow
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
conductivityModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::conductivityModels::Gidaspow::~Gidaspow()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::conductivityModels::Gidaspow::kappa
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const
|
||||
{
|
||||
const scalar sqrtPi = sqrt(constant::mathematical::pi);
|
||||
|
||||
return rhoa*da*sqrt(Theta)*
|
||||
(
|
||||
2.0*sqr(alpha)*g0*(1.0 + e)/sqrtPi
|
||||
+ (9.0/8.0)*sqrtPi*g0*0.5*(1.0 + e)*sqr(alpha)
|
||||
+ (15.0/16.0)*sqrtPi*alpha
|
||||
+ (25.0/64.0)*sqrtPi/((1.0 + e)*g0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,97 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::conductivityModels::Gidaspow
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
Gidaspow.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Gidaspow_H
|
||||
#define Gidaspow_H
|
||||
|
||||
#include "conductivityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace conductivityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Gidaspow Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Gidaspow
|
||||
:
|
||||
public conductivityModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Gidaspow");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
Gidaspow(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Gidaspow();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> kappa
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace conductivityModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,104 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "HrenyaSinclairConductivity.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace conductivityModels
|
||||
{
|
||||
defineTypeNameAndDebug(HrenyaSinclair, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
conductivityModel,
|
||||
HrenyaSinclair,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
conductivityModel(dict),
|
||||
coeffsDict_(dict.subDict(typeName + "Coeffs")),
|
||||
L_(coeffsDict_.lookup("L"))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::
|
||||
~HrenyaSinclair()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::kappa
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const
|
||||
{
|
||||
const scalar sqrtPi = sqrt(constant::mathematical::pi);
|
||||
|
||||
volScalarField lamda
|
||||
(
|
||||
scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_
|
||||
);
|
||||
|
||||
return rhoa*da*sqrt(Theta)*
|
||||
(
|
||||
2.0*sqr(alpha)*g0*(1.0 + e)/sqrtPi
|
||||
+ (9.0/8.0)*sqrtPi*0.25*sqr(1.0 + e)*(2.0*e - 1.0)*sqr(alpha)
|
||||
/(49.0/16.0 - 33.0*e/16.0)
|
||||
+ (15.0/16.0)*sqrtPi*alpha*(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)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,102 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
HrenyaSinclair.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef HrenyaSinclair_H
|
||||
#define HrenyaSinclair_H
|
||||
|
||||
#include "conductivityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace conductivityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class HrenyaSinclair Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class HrenyaSinclair
|
||||
:
|
||||
public conductivityModel
|
||||
{
|
||||
|
||||
dictionary coeffsDict_;
|
||||
|
||||
//- characteristic length of geometry
|
||||
dimensionedScalar L_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("HrenyaSinclair");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
HrenyaSinclair(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~HrenyaSinclair();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> kappa
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace conductivityModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,93 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "SyamlalConductivity.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace conductivityModels
|
||||
{
|
||||
defineTypeNameAndDebug(Syamlal, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
conductivityModel,
|
||||
Syamlal,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::conductivityModels::Syamlal::Syamlal
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
conductivityModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::conductivityModels::Syamlal::~Syamlal()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::conductivityModels::Syamlal::kappa
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const
|
||||
{
|
||||
const scalar sqrtPi = sqrt(constant::mathematical::pi);
|
||||
|
||||
return rhoa*da*sqrt(Theta)*
|
||||
(
|
||||
2.0*sqr(alpha)*g0*(1.0 + e)/sqrtPi
|
||||
+ (9.0/8.0)*sqrtPi*g0*0.25*sqr(1.0 + e)*(2.0*e - 1.0)*sqr(alpha)
|
||||
/(49.0/16.0 - 33.0*e/16.0)
|
||||
+ (15.0/32.0)*sqrtPi*alpha/(49.0/16.0 - 33.0*e/16.0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,97 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::conductivityModels::Syamlal
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
Syamlal.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Syamlal_H
|
||||
#define Syamlal_H
|
||||
|
||||
#include "conductivityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace conductivityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Syamlal Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Syamlal
|
||||
:
|
||||
public conductivityModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Syamlal");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
Syamlal(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Syamlal();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> kappa
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace conductivityModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
defineTypeNameAndDebug(conductivityModel, 0);
|
||||
|
||||
defineRunTimeSelectionTable(conductivityModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::conductivityModel::conductivityModel
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
dict_(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::conductivityModel::~conductivityModel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,128 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::conductivityModel
|
||||
|
||||
SourceFiles
|
||||
conductivityModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef conductivityModel_H
|
||||
#define conductivityModel_H
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "volFields.H"
|
||||
#include "dimensionedTypes.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
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& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,59 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::kineticTheoryModels::conductivityModel>
|
||||
Foam::kineticTheoryModels::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));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,124 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "JohnsonJacksonFrictionalStress.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace frictionalStressModels
|
||||
{
|
||||
defineTypeNameAndDebug(JohnsonJackson, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
frictionalStressModel,
|
||||
JohnsonJackson,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::
|
||||
JohnsonJackson
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
frictionalStressModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::
|
||||
~JohnsonJackson()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::
|
||||
frictionalPressure
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMinFriction,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const dimensionedScalar& Fr,
|
||||
const dimensionedScalar& eta,
|
||||
const dimensionedScalar& p
|
||||
) const
|
||||
{
|
||||
|
||||
return
|
||||
Fr*pow(max(alpha - alphaMinFriction, scalar(0)), eta)
|
||||
/pow(max(alphaMax - alpha, scalar(5.0e-2)), p);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::
|
||||
frictionalPressurePrime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMinFriction,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const dimensionedScalar& Fr,
|
||||
const dimensionedScalar& eta,
|
||||
const dimensionedScalar& p
|
||||
) const
|
||||
{
|
||||
return Fr*
|
||||
(
|
||||
eta*pow(max(alpha - alphaMinFriction, scalar(0)), eta - 1.0)
|
||||
*(alphaMax-alpha) + p*pow(max(alpha - alphaMinFriction, scalar(0)), eta)
|
||||
)/pow(max(alphaMax - alpha, scalar(5.0e-2)), p + 1.0);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::muf
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const volScalarField& pf,
|
||||
const volSymmTensorField& D,
|
||||
const dimensionedScalar& phi
|
||||
) const
|
||||
{
|
||||
return dimensionedScalar("0.5", dimTime, 0.5)*pf*sin(phi);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,116 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
JohnsonJacksonFrictionalStress.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef JohnsonJackson_H
|
||||
#define JohnsonJackson_H
|
||||
|
||||
#include "frictionalStressModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace frictionalStressModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class JohnsonJackson Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class JohnsonJackson
|
||||
:
|
||||
public frictionalStressModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("JohnsonJackson");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
JohnsonJackson(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~JohnsonJackson();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
virtual tmp<volScalarField> frictionalPressure
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMinFriction,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const dimensionedScalar& Fr,
|
||||
const dimensionedScalar& eta,
|
||||
const dimensionedScalar& p
|
||||
) const;
|
||||
|
||||
virtual tmp<volScalarField> frictionalPressurePrime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMinFriction,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const dimensionedScalar& Fr,
|
||||
const dimensionedScalar& eta,
|
||||
const dimensionedScalar& p
|
||||
) const;
|
||||
|
||||
virtual tmp<volScalarField> muf
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const volScalarField& pf,
|
||||
const volSymmTensorField& D,
|
||||
const dimensionedScalar& phi
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace frictionalStressModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,156 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "SchaefferFrictionalStress.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace frictionalStressModels
|
||||
{
|
||||
defineTypeNameAndDebug(Schaeffer, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
frictionalStressModel,
|
||||
Schaeffer,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
frictionalStressModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::~Schaeffer()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::
|
||||
frictionalPressure
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMinFriction,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const dimensionedScalar& Fr,
|
||||
const dimensionedScalar& eta,
|
||||
const dimensionedScalar& p
|
||||
) const
|
||||
{
|
||||
return
|
||||
dimensionedScalar("1e24", dimensionSet(1, -1, -2, 0, 0), 1e24)
|
||||
*pow(Foam::max(alpha - alphaMinFriction, scalar(0)), 10.0);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::
|
||||
frictionalPressurePrime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMinFriction,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const dimensionedScalar& Fr,
|
||||
const dimensionedScalar& eta,
|
||||
const dimensionedScalar& p
|
||||
) const
|
||||
{
|
||||
return
|
||||
dimensionedScalar("1e25", dimensionSet(1, -1, -2, 0, 0), 1e25)
|
||||
*pow(Foam::max(alpha - alphaMinFriction, scalar(0)), 9.0);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::muf
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const volScalarField& pf,
|
||||
const volSymmTensorField& D,
|
||||
const dimensionedScalar& phi
|
||||
) const
|
||||
{
|
||||
const scalar I2Dsmall = 1.0e-15;
|
||||
|
||||
// Creating muf assuming it should be 0 on the boundary which may not be
|
||||
// true
|
||||
tmp<volScalarField> tmuf
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"muf",
|
||||
alpha.mesh().time().timeName(),
|
||||
alpha.mesh()
|
||||
),
|
||||
alpha.mesh(),
|
||||
dimensionedScalar("muf", dimensionSet(1, -1, -1, 0, 0), 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& muff = tmuf();
|
||||
|
||||
forAll (D, celli)
|
||||
{
|
||||
if (alpha[celli] > alphaMax.value() - 5e-2)
|
||||
{
|
||||
muff[celli] =
|
||||
0.5*pf[celli]*sin(phi.value())
|
||||
/(
|
||||
sqrt(1.0/6.0*(sqr(D[celli].xx() - D[celli].yy())
|
||||
+ sqr(D[celli].yy() - D[celli].zz())
|
||||
+ sqr(D[celli].zz() - D[celli].xx()))
|
||||
+ sqr(D[celli].xy()) + sqr(D[celli].xz())
|
||||
+ sqr(D[celli].yz())) + I2Dsmall
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return tmuf;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,116 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::frictionalStressModels::Schaeffer
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
SchaefferFrictionalStress.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Schaeffer_H
|
||||
#define Schaeffer_H
|
||||
|
||||
#include "frictionalStressModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace frictionalStressModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Schaeffer Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Schaeffer
|
||||
:
|
||||
public frictionalStressModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Schaeffer");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
Schaeffer(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Schaeffer();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
virtual tmp<volScalarField> frictionalPressure
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMinFriction,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const dimensionedScalar& Fr,
|
||||
const dimensionedScalar& eta,
|
||||
const dimensionedScalar& p
|
||||
) const;
|
||||
|
||||
virtual tmp<volScalarField> frictionalPressurePrime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMinFriction,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const dimensionedScalar& Fr,
|
||||
const dimensionedScalar& n,
|
||||
const dimensionedScalar& p
|
||||
) const;
|
||||
|
||||
virtual tmp<volScalarField> muf
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const volScalarField& pf,
|
||||
const volSymmTensorField& D,
|
||||
const dimensionedScalar& phi
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace frictionalStressModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "frictionalStressModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
defineTypeNameAndDebug(frictionalStressModel, 0);
|
||||
|
||||
defineRunTimeSelectionTable(frictionalStressModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::frictionalStressModel::frictionalStressModel
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
dict_(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::frictionalStressModel::~frictionalStressModel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,147 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::frictionalStressModel
|
||||
|
||||
SourceFiles
|
||||
frictionalStressModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef frictionalStressModel_H
|
||||
#define frictionalStressModel_H
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "volFields.H"
|
||||
#include "dimensionedTypes.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class frictionalStressModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class frictionalStressModel
|
||||
{
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
frictionalStressModel(const frictionalStressModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const frictionalStressModel&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
const dictionary& dict_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("frictionalStressModel");
|
||||
|
||||
// Declare runtime constructor selection table
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
frictionalStressModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
frictionalStressModel(const dictionary& dict);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
static autoPtr<frictionalStressModel> New
|
||||
(
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~frictionalStressModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
virtual tmp<volScalarField> frictionalPressure
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMinFriction,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const dimensionedScalar& Fr,
|
||||
const dimensionedScalar& eta,
|
||||
const dimensionedScalar& p
|
||||
) const = 0;
|
||||
|
||||
virtual tmp<volScalarField> frictionalPressurePrime
|
||||
(
|
||||
const volScalarField& alphaf,
|
||||
const dimensionedScalar& alphaMinFriction,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const dimensionedScalar& Fr,
|
||||
const dimensionedScalar& eta,
|
||||
const dimensionedScalar& p
|
||||
) const = 0;
|
||||
|
||||
virtual tmp<volScalarField> muf
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax,
|
||||
const volScalarField& pf,
|
||||
const volSymmTensorField& D,
|
||||
const dimensionedScalar& phi
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "frictionalStressModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::kineticTheoryModels::frictionalStressModel>
|
||||
Foam::kineticTheoryModels::frictionalStressModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word frictionalStressModelType(dict.lookup("frictionalStressModel"));
|
||||
|
||||
Info<< "Selecting frictionalStressModel "
|
||||
<< frictionalStressModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(frictionalStressModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalError
|
||||
<< "frictionalStressModel::New(const dictionary&) : " << endl
|
||||
<< " unknown frictionalStressModelType type "
|
||||
<< frictionalStressModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid frictionalStressModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<frictionalStressModel>(cstrIter()(dict));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,98 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "LunPressure.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace granularPressureModels
|
||||
{
|
||||
defineTypeNameAndDebug(Lun, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
granularPressureModel,
|
||||
Lun,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::granularPressureModels::Lun::Lun
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
granularPressureModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::granularPressureModels::Lun::~Lun()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::granularPressureModels::Lun::granularPressureCoeff
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const dimensionedScalar& e
|
||||
) const
|
||||
{
|
||||
|
||||
return rhoa*alpha*(1.0 + 2.0*(1.0 + e)*alpha*g0);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::granularPressureModels::Lun::
|
||||
granularPressureCoeffPrime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& g0,
|
||||
const volScalarField& g0prime,
|
||||
const dimensionedScalar& rhoa,
|
||||
const dimensionedScalar& e
|
||||
) const
|
||||
{
|
||||
return rhoa*(1.0 + alpha*(1.0 + e)*(4.0*g0 + 2.0*g0prime*alpha));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,104 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::Lun
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
LunPressure.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Lun_H
|
||||
#define Lun_H
|
||||
|
||||
#include "granularPressureModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace granularPressureModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Lun Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Lun
|
||||
:
|
||||
public granularPressureModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Lun");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
Lun(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Lun();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> granularPressureCoeff
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const dimensionedScalar& e
|
||||
) const;
|
||||
|
||||
tmp<volScalarField> granularPressureCoeffPrime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& g0,
|
||||
const volScalarField& g0prime,
|
||||
const dimensionedScalar& rhoa,
|
||||
const dimensionedScalar& e
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace granularPressureModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,101 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "SyamlalRogersOBrienPressure.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace granularPressureModels
|
||||
{
|
||||
defineTypeNameAndDebug(SyamlalRogersOBrien, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
granularPressureModel,
|
||||
SyamlalRogersOBrien,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::granularPressureModels::SyamlalRogersOBrien::
|
||||
SyamlalRogersOBrien
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
granularPressureModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::granularPressureModels::SyamlalRogersOBrien::
|
||||
~SyamlalRogersOBrien()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::granularPressureModels::SyamlalRogersOBrien::
|
||||
granularPressureCoeff
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const dimensionedScalar& e
|
||||
) const
|
||||
{
|
||||
|
||||
return 2.0*rhoa*(1.0 + e)*sqr(alpha)*g0;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::granularPressureModels::SyamlalRogersOBrien::
|
||||
granularPressureCoeffPrime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& g0,
|
||||
const volScalarField& g0prime,
|
||||
const dimensionedScalar& rhoa,
|
||||
const dimensionedScalar& e
|
||||
) const
|
||||
{
|
||||
return rhoa*alpha*(1.0 + e)*(4.0*g0 + 2.0*g0prime*alpha);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,104 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::SyamlalRogersOBrien
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
SyamlalRogersOBrienPressure.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef SyamlalRogersOBrien_H
|
||||
#define SyamlalRogersOBrien_H
|
||||
|
||||
#include "granularPressureModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace granularPressureModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class SyamlalRogersOBrien Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class SyamlalRogersOBrien
|
||||
:
|
||||
public granularPressureModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("SyamlalRogersOBrien");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
SyamlalRogersOBrien(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~SyamlalRogersOBrien();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> granularPressureCoeff
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const dimensionedScalar& e
|
||||
) const;
|
||||
|
||||
tmp<volScalarField> granularPressureCoeffPrime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& g0,
|
||||
const volScalarField& g0prime,
|
||||
const dimensionedScalar& rhoa,
|
||||
const dimensionedScalar& e
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace granularPressureModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "granularPressureModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
defineTypeNameAndDebug(granularPressureModel, 0);
|
||||
|
||||
defineRunTimeSelectionTable(granularPressureModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::granularPressureModel::granularPressureModel
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
dict_(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::granularPressureModel::~granularPressureModel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,137 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::granularPressureModel
|
||||
|
||||
SourceFiles
|
||||
granularPressureModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef granularPressureModel_H
|
||||
#define granularPressureModel_H
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "volFields.H"
|
||||
#include "dimensionedTypes.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class granularPressureModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class granularPressureModel
|
||||
{
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
granularPressureModel(const granularPressureModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const granularPressureModel&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
const dictionary& dict_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("granularPressureModel");
|
||||
|
||||
// Declare runtime constructor selection table
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
granularPressureModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
granularPressureModel(const dictionary& dict);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
static autoPtr<granularPressureModel> New
|
||||
(
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~granularPressureModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Granular pressure coefficient
|
||||
virtual tmp<volScalarField> granularPressureCoeff
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const dimensionedScalar& e
|
||||
) const = 0;
|
||||
|
||||
//- Derivative of the granular pressure coefficient
|
||||
virtual tmp<volScalarField> granularPressureCoeffPrime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& g0,
|
||||
const volScalarField& g0prime,
|
||||
const dimensionedScalar& rhoa,
|
||||
const dimensionedScalar& e
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "granularPressureModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::kineticTheoryModels::granularPressureModel>
|
||||
Foam::kineticTheoryModels::granularPressureModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word granularPressureModelType(dict.lookup("granularPressureModel"));
|
||||
|
||||
Info<< "Selecting granularPressureModel "
|
||||
<< granularPressureModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(granularPressureModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalError
|
||||
<< "granularPressureModel::New(const dictionary&) : " << endl
|
||||
<< " unknown granularPressureModelType type "
|
||||
<< granularPressureModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid granularPressureModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<granularPressureModel>(cstrIter()(dict));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,390 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "kineticTheoryModel.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "fvCFD.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModel::kineticTheoryModel
|
||||
(
|
||||
const Foam::phaseModel& phase1,
|
||||
const Foam::volVectorField& Ub,
|
||||
const Foam::volScalarField& alpha,
|
||||
const Foam::dragModel& draga
|
||||
)
|
||||
:
|
||||
phase1_(phase1),
|
||||
Ua_(phase1.U()),
|
||||
Ub_(Ub),
|
||||
alpha_(alpha),
|
||||
phia_(phase1.phi()),
|
||||
draga_(draga),
|
||||
|
||||
rhoa_(phase1.rho()),
|
||||
nua_(phase1.nu()),
|
||||
|
||||
kineticTheoryProperties_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"kineticTheoryProperties",
|
||||
Ua_.time().constant(),
|
||||
Ua_.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
kineticTheory_(kineticTheoryProperties_.lookup("kineticTheory")),
|
||||
equilibrium_(kineticTheoryProperties_.lookup("equilibrium")),
|
||||
|
||||
viscosityModel_
|
||||
(
|
||||
kineticTheoryModels::viscosityModel::New
|
||||
(
|
||||
kineticTheoryProperties_
|
||||
)
|
||||
),
|
||||
conductivityModel_
|
||||
(
|
||||
kineticTheoryModels::conductivityModel::New
|
||||
(
|
||||
kineticTheoryProperties_
|
||||
)
|
||||
),
|
||||
radialModel_
|
||||
(
|
||||
kineticTheoryModels::radialModel::New
|
||||
(
|
||||
kineticTheoryProperties_
|
||||
)
|
||||
),
|
||||
granularPressureModel_
|
||||
(
|
||||
kineticTheoryModels::granularPressureModel::New
|
||||
(
|
||||
kineticTheoryProperties_
|
||||
)
|
||||
),
|
||||
frictionalStressModel_
|
||||
(
|
||||
kineticTheoryModels::frictionalStressModel::New
|
||||
(
|
||||
kineticTheoryProperties_
|
||||
)
|
||||
),
|
||||
e_(kineticTheoryProperties_.lookup("e")),
|
||||
alphaMax_(kineticTheoryProperties_.lookup("alphaMax")),
|
||||
alphaMinFriction_(kineticTheoryProperties_.lookup("alphaMinFriction")),
|
||||
Fr_(kineticTheoryProperties_.lookup("Fr")),
|
||||
eta_(kineticTheoryProperties_.lookup("eta")),
|
||||
p_(kineticTheoryProperties_.lookup("p")),
|
||||
phi_(dimensionedScalar(kineticTheoryProperties_.lookup("phi"))*M_PI/180.0),
|
||||
Theta_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Theta",
|
||||
Ua_.time().timeName(),
|
||||
Ua_.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
Ua_.mesh()
|
||||
),
|
||||
mua_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"mua",
|
||||
Ua_.time().timeName(),
|
||||
Ua_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
Ua_.mesh(),
|
||||
dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0)
|
||||
),
|
||||
lambda_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"lambda",
|
||||
Ua_.time().timeName(),
|
||||
Ua_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
Ua_.mesh(),
|
||||
dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0)
|
||||
),
|
||||
pa_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pa",
|
||||
Ua_.time().timeName(),
|
||||
Ua_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
Ua_.mesh(),
|
||||
dimensionedScalar("zero", dimensionSet(1, -1, -2, 0, 0), 0.0)
|
||||
),
|
||||
kappa_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"kappa",
|
||||
Ua_.time().timeName(),
|
||||
Ua_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
Ua_.mesh(),
|
||||
dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0)
|
||||
),
|
||||
gs0_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"gs0",
|
||||
Ua_.time().timeName(),
|
||||
Ua_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
Ua_.mesh(),
|
||||
dimensionedScalar("zero", dimensionSet(0, 0, 0, 0, 0), 1.0)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModel::~kineticTheoryModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::kineticTheoryModel::solve(const volTensorField& gradUat)
|
||||
{
|
||||
if (!kineticTheory_)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const scalar sqrtPi = sqrt(constant::mathematical::pi);
|
||||
|
||||
volScalarField da_(phase1_.d());
|
||||
|
||||
surfaceScalarField phi(1.5*rhoa_*phia_*fvc::interpolate(alpha_));
|
||||
|
||||
volTensorField dU(gradUat.T()); //fvc::grad(Ua_);
|
||||
volSymmTensorField D(symm(dU));
|
||||
|
||||
// NB, drag = K*alpha*beta,
|
||||
// (the alpha and beta has been extracted from the drag function for
|
||||
// numerical reasons)
|
||||
volScalarField Ur(mag(Ua_ - Ub_));
|
||||
volScalarField betaPrim(alpha_*(1.0 - alpha_)*draga_.K(Ur));
|
||||
|
||||
// Calculating the radial distribution function (solid volume fraction is
|
||||
// limited close to the packing limit, but this needs improvements)
|
||||
// The solution is higly unstable close to the packing limit.
|
||||
gs0_ = radialModel_->g0
|
||||
(
|
||||
min(max(alpha_, scalar(1e-6)), alphaMax_ - 0.01),
|
||||
alphaMax_
|
||||
);
|
||||
|
||||
// particle pressure - coefficient in front of Theta (Eq. 3.22, p. 45)
|
||||
volScalarField PsCoeff
|
||||
(
|
||||
granularPressureModel_->granularPressureCoeff
|
||||
(
|
||||
alpha_,
|
||||
gs0_,
|
||||
rhoa_,
|
||||
e_
|
||||
)
|
||||
);
|
||||
|
||||
// 'thermal' conductivity (Table 3.3, p. 49)
|
||||
kappa_ = conductivityModel_->kappa(alpha_, Theta_, gs0_, rhoa_, da_, e_);
|
||||
|
||||
// particle viscosity (Table 3.2, p.47)
|
||||
mua_ = viscosityModel_->mua(alpha_, Theta_, gs0_, rhoa_, da_, e_);
|
||||
|
||||
dimensionedScalar Tsmall
|
||||
(
|
||||
"small",
|
||||
dimensionSet(0 , 2 ,-2 ,0 , 0, 0, 0),
|
||||
1.0e-6
|
||||
);
|
||||
|
||||
dimensionedScalar TsmallSqrt = sqrt(Tsmall);
|
||||
volScalarField ThetaSqrt(sqrt(Theta_));
|
||||
|
||||
// dissipation (Eq. 3.24, p.50)
|
||||
volScalarField gammaCoeff
|
||||
(
|
||||
12.0*(1.0 - sqr(e_))*sqr(alpha_)*rhoa_*gs0_*(1.0/da_)*ThetaSqrt/sqrtPi
|
||||
);
|
||||
|
||||
// Eq. 3.25, p. 50 Js = J1 - J2
|
||||
volScalarField J1(3.0*betaPrim);
|
||||
volScalarField J2
|
||||
(
|
||||
0.25*sqr(betaPrim)*da_*sqr(Ur)
|
||||
/(max(alpha_, scalar(1e-6))*rhoa_*sqrtPi*(ThetaSqrt + TsmallSqrt))
|
||||
);
|
||||
|
||||
// bulk viscosity p. 45 (Lun et al. 1984).
|
||||
lambda_ = (4.0/3.0)*sqr(alpha_)*rhoa_*da_*gs0_*(1.0+e_)*ThetaSqrt/sqrtPi;
|
||||
|
||||
// stress tensor, Definitions, Table 3.1, p. 43
|
||||
volSymmTensorField tau(2.0*mua_*D + (lambda_ - (2.0/3.0)*mua_)*tr(D)*I);
|
||||
|
||||
if (!equilibrium_)
|
||||
{
|
||||
// construct the granular temperature equation (Eq. 3.20, p. 44)
|
||||
// NB. note that there are two typos in Eq. 3.20
|
||||
// no grad infront of Ps
|
||||
// wrong sign infront of laplacian
|
||||
fvScalarMatrix ThetaEqn
|
||||
(
|
||||
fvm::ddt(1.5*alpha_*rhoa_, Theta_)
|
||||
+ fvm::div(phi, Theta_, "div(phi,Theta)")
|
||||
==
|
||||
fvm::SuSp(-((PsCoeff*I) && dU), Theta_)
|
||||
+ (tau && dU)
|
||||
+ fvm::laplacian(kappa_, Theta_, "laplacian(kappa,Theta)")
|
||||
+ fvm::Sp(-gammaCoeff, Theta_)
|
||||
+ fvm::Sp(-J1, Theta_)
|
||||
+ fvm::Sp(J2/(Theta_ + Tsmall), Theta_)
|
||||
);
|
||||
|
||||
ThetaEqn.relax();
|
||||
ThetaEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
// equilibrium => dissipation == production
|
||||
// Eq. 4.14, p.82
|
||||
volScalarField K1(2.0*(1.0 + e_)*rhoa_*gs0_);
|
||||
volScalarField K3
|
||||
(
|
||||
0.5*da_*rhoa_*
|
||||
(
|
||||
(sqrtPi/(3.0*(3.0-e_)))
|
||||
*(1.0 + 0.4*(1.0 + e_)*(3.0*e_ - 1.0)*alpha_*gs0_)
|
||||
+1.6*alpha_*gs0_*(1.0 + e_)/sqrtPi
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField K2
|
||||
(
|
||||
4.0*da_*rhoa_*(1.0 + e_)*alpha_*gs0_/(3.0*sqrtPi) - 2.0*K3/3.0
|
||||
);
|
||||
|
||||
volScalarField K4(12.0*(1.0 - sqr(e_))*rhoa_*gs0_/(da_*sqrtPi));
|
||||
|
||||
volScalarField trD(tr(D));
|
||||
volScalarField tr2D(sqr(trD));
|
||||
volScalarField trD2(tr(D & D));
|
||||
|
||||
volScalarField t1(K1*alpha_ + rhoa_);
|
||||
volScalarField l1(-t1*trD);
|
||||
volScalarField l2(sqr(t1)*tr2D);
|
||||
volScalarField l3
|
||||
(
|
||||
4.0
|
||||
*K4
|
||||
*max(alpha_, scalar(1e-6))
|
||||
*(2.0*K3*trD2 + K2*tr2D)
|
||||
);
|
||||
|
||||
Theta_ = sqr((l1 + sqrt(l2 + l3))/(2.0*(alpha_ + 1.0e-4)*K4));
|
||||
}
|
||||
|
||||
Theta_.max(1.0e-15);
|
||||
Theta_.min(1.0e+3);
|
||||
|
||||
volScalarField pf
|
||||
(
|
||||
frictionalStressModel_->frictionalPressure
|
||||
(
|
||||
alpha_,
|
||||
alphaMinFriction_,
|
||||
alphaMax_,
|
||||
Fr_,
|
||||
eta_,
|
||||
p_
|
||||
)
|
||||
);
|
||||
|
||||
PsCoeff += pf/(Theta_+Tsmall);
|
||||
|
||||
PsCoeff.min(1.0e+10);
|
||||
PsCoeff.max(-1.0e+10);
|
||||
|
||||
// update particle pressure
|
||||
pa_ = PsCoeff*Theta_;
|
||||
|
||||
// frictional shear stress, Eq. 3.30, p. 52
|
||||
volScalarField muf
|
||||
(
|
||||
frictionalStressModel_->muf
|
||||
(
|
||||
alpha_,
|
||||
alphaMax_,
|
||||
pf,
|
||||
D,
|
||||
phi_
|
||||
)
|
||||
);
|
||||
|
||||
// add frictional stress
|
||||
mua_ += muf;
|
||||
mua_.min(1.0e+2);
|
||||
mua_.max(0.0);
|
||||
|
||||
Info<< "kinTheory: max(Theta) = " << max(Theta_).value() << endl;
|
||||
|
||||
volScalarField ktn(mua_/rhoa_);
|
||||
|
||||
Info<< "kinTheory: min(nua) = " << min(ktn).value()
|
||||
<< ", max(nua) = " << max(ktn).value() << endl;
|
||||
|
||||
Info<< "kinTheory: min(pa) = " << min(pa_).value()
|
||||
<< ", max(pa) = " << max(pa_).value() << endl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,197 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModel
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
kineticTheoryModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef kineticTheoryModel_H
|
||||
#define kineticTheoryModel_H
|
||||
|
||||
#include "dragModel.H"
|
||||
#include "phaseModel.H"
|
||||
#include "autoPtr.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "conductivityModel.H"
|
||||
#include "radialModel.H"
|
||||
#include "granularPressureModel.H"
|
||||
#include "frictionalStressModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class kineticTheoryModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class kineticTheoryModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
const phaseModel& phase1_;
|
||||
const volVectorField& Ua_;
|
||||
const volVectorField& Ub_;
|
||||
const volScalarField& alpha_;
|
||||
const surfaceScalarField& phia_;
|
||||
|
||||
const dragModel& draga_;
|
||||
|
||||
const dimensionedScalar& rhoa_;
|
||||
const dimensionedScalar& nua_;
|
||||
|
||||
//- dictionary holding the modeling info
|
||||
IOdictionary kineticTheoryProperties_;
|
||||
|
||||
//- use kinetic theory or not.
|
||||
Switch kineticTheory_;
|
||||
|
||||
//- use generation == dissipation
|
||||
Switch equilibrium_;
|
||||
|
||||
autoPtr<kineticTheoryModels::viscosityModel> viscosityModel_;
|
||||
|
||||
autoPtr<kineticTheoryModels::conductivityModel> conductivityModel_;
|
||||
|
||||
autoPtr<kineticTheoryModels::radialModel> radialModel_;
|
||||
|
||||
autoPtr<kineticTheoryModels::granularPressureModel>
|
||||
granularPressureModel_;
|
||||
|
||||
autoPtr<kineticTheoryModels::frictionalStressModel>
|
||||
frictionalStressModel_;
|
||||
|
||||
//- coefficient of restitution
|
||||
const dimensionedScalar e_;
|
||||
|
||||
//- maximum packing
|
||||
const dimensionedScalar alphaMax_;
|
||||
|
||||
//- min value for which the frictional stresses are zero
|
||||
const dimensionedScalar alphaMinFriction_;
|
||||
|
||||
//- material constant for frictional normal stress
|
||||
const dimensionedScalar Fr_;
|
||||
|
||||
//- material constant for frictional normal stress
|
||||
const dimensionedScalar eta_;
|
||||
|
||||
//- material constant for frictional normal stress
|
||||
const dimensionedScalar p_;
|
||||
|
||||
//- angle of internal friction
|
||||
const dimensionedScalar phi_;
|
||||
|
||||
//- The granular energy/temperature
|
||||
volScalarField Theta_;
|
||||
|
||||
//- The granular viscosity
|
||||
volScalarField mua_;
|
||||
|
||||
//- The granular bulk viscosity
|
||||
volScalarField lambda_;
|
||||
|
||||
//- The granular pressure
|
||||
volScalarField pa_;
|
||||
|
||||
//- The granular temperature conductivity
|
||||
volScalarField kappa_;
|
||||
|
||||
//- The radial distribution function
|
||||
volScalarField gs0_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
kineticTheoryModel(const kineticTheoryModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const kineticTheoryModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
kineticTheoryModel
|
||||
(
|
||||
const phaseModel& phase1,
|
||||
const volVectorField& Ub,
|
||||
const volScalarField& alpha,
|
||||
const dragModel& draga
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~kineticTheoryModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
void solve(const volTensorField& gradUat);
|
||||
|
||||
bool on() const
|
||||
{
|
||||
return kineticTheory_;
|
||||
}
|
||||
|
||||
const volScalarField& mua() const
|
||||
{
|
||||
return mua_;
|
||||
}
|
||||
|
||||
const volScalarField& pa() const
|
||||
{
|
||||
return pa_;
|
||||
}
|
||||
|
||||
const volScalarField& lambda() const
|
||||
{
|
||||
return lambda_;
|
||||
}
|
||||
|
||||
const volScalarField& kappa() const
|
||||
{
|
||||
return kappa_;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,99 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "CarnahanStarlingRadial.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace radialModels
|
||||
{
|
||||
defineTypeNameAndDebug(CarnahanStarling, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
radialModel,
|
||||
CarnahanStarling,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::radialModels::CarnahanStarling::CarnahanStarling
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
radialModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::radialModels::CarnahanStarling::~CarnahanStarling()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::radialModels::CarnahanStarling::g0
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const
|
||||
{
|
||||
|
||||
return
|
||||
1.0/(1.0 - alpha)
|
||||
+ 3.0*alpha/(2.0*sqr(1.0 - alpha))
|
||||
+ sqr(alpha)/(2.0*pow(1.0 - alpha, 3));
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::radialModels::CarnahanStarling::g0prime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const
|
||||
{
|
||||
return
|
||||
- alpha/sqr(1.0 - alpha)
|
||||
+ (3.0*(1.0 - alpha) + 6.0*sqr(alpha))/(2.0*(1.0 - alpha))
|
||||
+ (2.0*alpha*(1.0 - alpha) + 3.0*pow(alpha, 3))
|
||||
/(2.0*pow(1.0 - alpha, 4));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,100 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::radialModels::CarnahanStarling
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
CarnahanStarlingRadial.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef CarnahanStarling_H
|
||||
#define CarnahanStarling_H
|
||||
|
||||
#include "radialModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace radialModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class CarnahanStarling Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class CarnahanStarling
|
||||
:
|
||||
public radialModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("CarnahanStarling");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
CarnahanStarling(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~CarnahanStarling();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
tmp<volScalarField> g0
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const;
|
||||
|
||||
tmp<volScalarField> g0prime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace radialModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,93 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "GidaspowRadial.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace radialModels
|
||||
{
|
||||
defineTypeNameAndDebug(Gidaspow, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
radialModel,
|
||||
Gidaspow,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::radialModels::Gidaspow::Gidaspow
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
radialModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::radialModels::Gidaspow::~Gidaspow()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::radialModels::Gidaspow::g0
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const
|
||||
{
|
||||
return 0.6/(1.0 - pow(alpha/alphaMax, 1.0/3.0));
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::radialModels::Gidaspow::g0prime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const
|
||||
{
|
||||
return
|
||||
(-1.0/5.0)*pow(alpha/alphaMax, -2.0/3.0)
|
||||
/(alphaMax*sqr(1.0 - pow(alpha/alphaMax, 1.0/3.0)));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,99 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::radialModels::Gidaspow
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
GidaspowRadial.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Gidaspow_H
|
||||
#define Gidaspow_H
|
||||
|
||||
#include "radialModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace radialModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Gidaspow Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Gidaspow
|
||||
:
|
||||
public radialModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Gidaspow");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
Gidaspow(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Gidaspow();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> g0
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const;
|
||||
|
||||
tmp<volScalarField> g0prime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace radialModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,92 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "LunSavageRadial.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace radialModels
|
||||
{
|
||||
defineTypeNameAndDebug(LunSavage, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
radialModel,
|
||||
LunSavage,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::radialModels::LunSavage::LunSavage
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
radialModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::radialModels::LunSavage::~LunSavage()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::radialModels::LunSavage::g0
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const
|
||||
{
|
||||
|
||||
return pow(1.0 - alpha/alphaMax, -2.5*alphaMax);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::radialModels::LunSavage::g0prime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const
|
||||
{
|
||||
return 2.5*alphaMax*alpha*pow(1.0 - alpha, -1.0 - 2.5*alphaMax);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,99 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::radialModels::LunSavage
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
LunSavage.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef LunSavage_H
|
||||
#define LunSavage_H
|
||||
|
||||
#include "radialModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace radialModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class LunSavage Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class LunSavage
|
||||
:
|
||||
public radialModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("LunSavage");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
LunSavage(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~LunSavage();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> g0
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const;
|
||||
|
||||
tmp<volScalarField> g0prime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace radialModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,93 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "SinclairJacksonRadial.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace radialModels
|
||||
{
|
||||
defineTypeNameAndDebug(SinclairJackson, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
radialModel,
|
||||
SinclairJackson,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::radialModels::SinclairJackson::SinclairJackson
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
radialModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::radialModels::SinclairJackson::~SinclairJackson()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::radialModels::SinclairJackson::g0
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const
|
||||
{
|
||||
return 1.0/(1.0 - pow(alpha/alphaMax, 1.0/3.0));
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::radialModels::SinclairJackson::g0prime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const
|
||||
{
|
||||
return
|
||||
(-1.0/3.0)*pow(alpha/alphaMax, -2.0/3.0)
|
||||
/(alphaMax*sqr(1.0 - pow(alpha/alphaMax, 1.0/3.0)));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,99 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::SinclairJackson
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
SinclairJacksonRadial.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef SinclairJackson_H
|
||||
#define SinclairJackson_H
|
||||
|
||||
#include "radialModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace radialModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class SinclairJackson Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class SinclairJackson
|
||||
:
|
||||
public radialModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("SinclairJackson");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
SinclairJackson(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~SinclairJackson();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<volScalarField> g0
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const;
|
||||
|
||||
tmp<volScalarField> g0prime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace radialModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
defineTypeNameAndDebug(radialModel, 0);
|
||||
|
||||
defineRunTimeSelectionTable(radialModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::radialModel::radialModel
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
dict_(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::radialModel::~radialModel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,132 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::radialModel
|
||||
|
||||
SourceFiles
|
||||
radialModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef radialModel_H
|
||||
#define radialModel_H
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "volFields.H"
|
||||
#include "dimensionedTypes.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class radialModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class radialModel
|
||||
{
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
radialModel(const radialModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const radialModel&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
const dictionary& dict_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("radialModel");
|
||||
|
||||
// Declare runtime constructor selection table
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
radialModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
radialModel(const dictionary& dict);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
static autoPtr<radialModel> New
|
||||
(
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~radialModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Radial distribution function
|
||||
virtual tmp<volScalarField> g0
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const = 0;
|
||||
|
||||
//- Derivative of the radial distribution function
|
||||
virtual tmp<volScalarField> g0prime
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const dimensionedScalar& alphaMax
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,87 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "GidaspowViscosity.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace viscosityModels
|
||||
{
|
||||
defineTypeNameAndDebug(Gidaspow, 0);
|
||||
addToRunTimeSelectionTable(viscosityModel, Gidaspow, dictionary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::viscosityModels::Gidaspow::Gidaspow
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
viscosityModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::viscosityModels::Gidaspow::~Gidaspow()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::viscosityModels::Gidaspow::mua
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const
|
||||
{
|
||||
const scalar sqrtPi = sqrt(constant::mathematical::pi);
|
||||
|
||||
return rhoa*da*sqrt(Theta)*
|
||||
(
|
||||
(4.0/5.0)*sqr(alpha)*g0*(1.0 + e)/sqrtPi
|
||||
+ (1.0/15.0)*sqrtPi*g0*(1.0 + e)*sqr(alpha)
|
||||
+ (1.0/6.0)*sqrtPi*alpha
|
||||
+ (10.0/96.0)*sqrtPi/((1.0 + e)*g0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,96 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::viscosityModels::Gidaspow
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
GidaspowViscosity.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Gidaspow_H
|
||||
#define Gidaspow_H
|
||||
|
||||
#include "viscosityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace viscosityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Gidaspow Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Gidaspow
|
||||
:
|
||||
public viscosityModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Gidaspow");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
Gidaspow(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Gidaspow();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
tmp<volScalarField> mua
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace viscosityModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,101 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "HrenyaSinclairViscosity.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace viscosityModels
|
||||
{
|
||||
defineTypeNameAndDebug(HrenyaSinclair, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
viscosityModel,
|
||||
HrenyaSinclair,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::HrenyaSinclair
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
viscosityModel(dict),
|
||||
coeffsDict_(dict.subDict(typeName + "Coeffs")),
|
||||
L_(coeffsDict_.lookup("L"))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::~HrenyaSinclair()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::mua
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const
|
||||
{
|
||||
const scalar sqrtPi = sqrt(constant::mathematical::pi);
|
||||
|
||||
volScalarField lamda
|
||||
(
|
||||
scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_
|
||||
);
|
||||
|
||||
return rhoa*da*sqrt(Theta)*
|
||||
(
|
||||
(4.0/5.0)*sqr(alpha)*g0*(1.0 + e)/sqrtPi
|
||||
+ (1.0/15.0)*sqrtPi*g0*(1.0 + e)*(3.0*e - 1)*sqr(alpha)/(3.0-e)
|
||||
+ (1.0/6.0)*sqrtPi*alpha*(0.5*lamda + 0.25*(3.0*e - 1.0))
|
||||
/(0.5*(3.0 - e)*lamda)
|
||||
+ (10/96.0)*sqrtPi/((1.0 + e)*0.5*(3.0 - e)*g0*lamda)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,104 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
HrenyaSinclairViscosity.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef HrenyaSinclair_H
|
||||
#define HrenyaSinclair_H
|
||||
|
||||
#include "viscosityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace viscosityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class HrenyaSinclair Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class HrenyaSinclair
|
||||
:
|
||||
public viscosityModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
dictionary coeffsDict_;
|
||||
|
||||
//- characteristic length of geometry
|
||||
dimensionedScalar L_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("HrenyaSinclair");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
HrenyaSinclair(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~HrenyaSinclair();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
tmp<volScalarField> mua
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace viscosityModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,86 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "SyamlalViscosity.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace viscosityModels
|
||||
{
|
||||
defineTypeNameAndDebug(Syamlal, 0);
|
||||
addToRunTimeSelectionTable(viscosityModel, Syamlal, dictionary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::viscosityModels::Syamlal::Syamlal
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
viscosityModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::viscosityModels::Syamlal::~Syamlal()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::kineticTheoryModels::viscosityModels::Syamlal::mua
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const
|
||||
{
|
||||
const scalar sqrtPi = sqrt(constant::mathematical::pi);
|
||||
|
||||
return rhoa*da*sqrt(Theta)*
|
||||
(
|
||||
(4.0/5.0)*sqr(alpha)*g0*(1.0 + e)/sqrtPi
|
||||
+ (1.0/15.0)*sqrtPi*g0*(1.0 + e)*(3.0*e - 1.0)*sqr(alpha)/(3.0 - e)
|
||||
+ (1.0/6.0)*alpha*sqrtPi/(3.0 - e)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,97 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::kineticTheoryModels::viscosityModels::Syamlal
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
SyamlalViscosity.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Syamlal_H
|
||||
#define Syamlal_H
|
||||
|
||||
#include "viscosityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
namespace viscosityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Syamlal Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Syamlal
|
||||
:
|
||||
public viscosityModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Syamlal");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
Syamlal(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Syamlal();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
tmp<volScalarField> mua
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace viscosityModels
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,75 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "noneViscosity.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
defineTypeNameAndDebug(noneViscosity, 0);
|
||||
addToRunTimeSelectionTable(viscosityModel, noneViscosity, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::noneViscosity::noneViscosity(const dictionary& dict)
|
||||
:
|
||||
viscosityModel(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::noneViscosity::~noneViscosity()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::noneViscosity::mua
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const
|
||||
{
|
||||
return dimensionedScalar
|
||||
(
|
||||
"0",
|
||||
dimensionSet(1, -1, -1, 0, 0, 0, 0),
|
||||
0.0
|
||||
)*alpha;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,94 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::noneViscosity
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
noneViscosity.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef noneViscosity_H
|
||||
#define noneViscosity_H
|
||||
|
||||
#include "viscosityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class noneViscosity Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class noneViscosity
|
||||
:
|
||||
public viscosityModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("none");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
noneViscosity(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~noneViscosity();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
tmp<volScalarField> mua
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,59 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "viscosityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::kineticTheoryModels::viscosityModel>
|
||||
Foam::kineticTheoryModels::viscosityModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word viscosityModelType(dict.lookup("viscosityModel"));
|
||||
|
||||
Info<< "Selecting viscosityModel "
|
||||
<< viscosityModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(viscosityModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalError
|
||||
<< "viscosityModel::New(const dictionary&) : " << endl
|
||||
<< " unknown viscosityModelType type "
|
||||
<< viscosityModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid viscosityModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<viscosityModel>(cstrIter()(dict));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,57 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "viscosityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
defineTypeNameAndDebug(viscosityModel, 0);
|
||||
defineRunTimeSelectionTable(viscosityModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::viscosityModel::viscosityModel
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
dict_(dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::kineticTheoryModels::viscosityModel::~viscosityModel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,130 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::viscosityModel
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
viscosityModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef viscosityModel_H
|
||||
#define viscosityModel_H
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "volFields.H"
|
||||
#include "dimensionedTypes.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace kineticTheoryModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class viscosityModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class viscosityModel
|
||||
{
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
viscosityModel(const viscosityModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const viscosityModel&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
const dictionary& dict_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("viscosityModel");
|
||||
|
||||
// Declare runtime constructor selection table
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
viscosityModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
viscosityModel(const dictionary& dict);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
static autoPtr<viscosityModel> New
|
||||
(
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~viscosityModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
virtual tmp<volScalarField> mua
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& Theta,
|
||||
const volScalarField& g0,
|
||||
const dimensionedScalar& rhoa,
|
||||
const volScalarField& da,
|
||||
const dimensionedScalar& e
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace kineticTheoryModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,115 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Application
|
||||
multiphaseEulerFoam
|
||||
|
||||
Description
|
||||
Solver for a system of many compressible fluid phases including
|
||||
heat-transfer.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "multiphaseSystem.H"
|
||||
#include "phaseModel.H"
|
||||
#include "dragModel.H"
|
||||
#include "heatTransferModel.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "LESModel.H"
|
||||
|
||||
#include "MRFZones.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createMRFZones.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "correctPhi.H"
|
||||
#include "CourantNos.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "CourantNos.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
for (pimple.start(); pimple.loop(); pimple++)
|
||||
{
|
||||
if (pimple.nOuterCorr() != 1)
|
||||
{
|
||||
p.storePrevIter();
|
||||
}
|
||||
|
||||
sgsModel->correct();
|
||||
fluid.solve();
|
||||
rho = fluid.rho();
|
||||
|
||||
//#include "interfacialCoeffs.H"
|
||||
//#include "TEqns.H"
|
||||
#include "UEqns.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=0; corr<pimple.nCorr(); corr++)
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
#include "DDtU.H"
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< runTime.elapsedCpuTime()
|
||||
<< " s\n\n" << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,169 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "multiphaseFixedFluxPressureFvPatchScalarField.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(p, iF),
|
||||
UName_("U"),
|
||||
phiName_("phi"),
|
||||
rhoName_("rho")
|
||||
{}
|
||||
|
||||
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const multiphaseFixedFluxPressureFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(ptf, p, iF, mapper),
|
||||
UName_(ptf.UName_),
|
||||
phiName_(ptf.phiName_),
|
||||
rhoName_(ptf.rhoName_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(p, iF),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho"))
|
||||
{
|
||||
if (dict.found("gradient"))
|
||||
{
|
||||
gradient() = scalarField("gradient", dict, p.size());
|
||||
fixedGradientFvPatchScalarField::updateCoeffs();
|
||||
fixedGradientFvPatchScalarField::evaluate();
|
||||
}
|
||||
else
|
||||
{
|
||||
fvPatchField<scalar>::operator=(patchInternalField());
|
||||
gradient() = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(wbppsf),
|
||||
UName_(wbppsf.UName_),
|
||||
phiName_(wbppsf.phiName_),
|
||||
rhoName_(wbppsf.rhoName_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(wbppsf, iF),
|
||||
UName_(wbppsf.UName_),
|
||||
phiName_(wbppsf.phiName_),
|
||||
rhoName_(wbppsf.rhoName_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::multiphaseFixedFluxPressureFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const fvPatchField<vector>& Up =
|
||||
patch().lookupPatchField<volVectorField, vector>(UName_);
|
||||
|
||||
const surfaceScalarField& phi =
|
||||
db().lookupObject<surfaceScalarField>(phiName_);
|
||||
|
||||
fvsPatchField<scalar> phip =
|
||||
patch().patchField<surfaceScalarField, scalar>(phi);
|
||||
|
||||
if (phi.dimensions() == dimDensity*dimVelocity*dimArea)
|
||||
{
|
||||
const fvPatchField<scalar>& rhop =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
|
||||
phip /= rhop;
|
||||
}
|
||||
|
||||
const fvsPatchField<scalar>& Dpp =
|
||||
patch().lookupPatchField<surfaceScalarField, scalar>("Dp");
|
||||
|
||||
gradient() = (phip - (patch().Sf() & Up))/patch().magSf()/Dpp;
|
||||
|
||||
fixedGradientFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::multiphaseFixedFluxPressureFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchScalarField::write(os);
|
||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
gradient().writeEntry("gradient", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,154 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField
|
||||
|
||||
Description
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField
|
||||
|
||||
SourceFiles
|
||||
multiphaseFixedFluxPressureFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef multiphaseFixedFluxPressureFvPatchScalarFields_H
|
||||
#define multiphaseFixedFluxPressureFvPatchScalarFields_H
|
||||
|
||||
#include "fvPatchFields.H"
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
#include "Switch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class multiphaseFixedFluxPressureFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class multiphaseFixedFluxPressureFvPatchScalarField
|
||||
:
|
||||
public fixedGradientFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of the velocity field
|
||||
word UName_;
|
||||
|
||||
//- Name of the flux transporting the field
|
||||
word phiName_;
|
||||
|
||||
//- Name of the density field used to normalise the mass flux
|
||||
// if neccessary
|
||||
word rhoName_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("multiphaseFixedFluxPressure");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given multiphaseFixedFluxPressureFvPatchScalarField onto
|
||||
// a new patch
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const multiphaseFixedFluxPressureFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const multiphaseFixedFluxPressureFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new multiphaseFixedFluxPressureFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const multiphaseFixedFluxPressureFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new multiphaseFixedFluxPressureFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,4 @@
|
||||
alphaContactAngle/alphaContactAngleFvPatchScalarField.C
|
||||
multiphaseSystem.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libmultiphaseSystem
|
||||
@ -0,0 +1,15 @@
|
||||
EXE_INC = -ggdb3 \
|
||||
-I../phaseModel/lnInclude \
|
||||
-I../interfacialModels/lnInclude \
|
||||
-IalphaContactAngle \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lcompressibleMultiPhaseModel \
|
||||
-linterfaceProperties \
|
||||
-lincompressibleTransportModels \
|
||||
-lcompressibleMultiphaseEulerianInterfacialModels \
|
||||
-lfiniteVolume
|
||||
@ -0,0 +1,146 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "alphaContactAngleFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
alphaContactAngleFvPatchScalarField::interfaceThetaProps::interfaceThetaProps
|
||||
(
|
||||
Istream& is
|
||||
)
|
||||
:
|
||||
theta0_(readScalar(is)),
|
||||
uTheta_(readScalar(is)),
|
||||
thetaA_(readScalar(is)),
|
||||
thetaR_(readScalar(is))
|
||||
{}
|
||||
|
||||
|
||||
Istream& operator>>
|
||||
(
|
||||
Istream& is,
|
||||
alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
|
||||
)
|
||||
{
|
||||
is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_;
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
|
||||
)
|
||||
{
|
||||
os << tp.theta0_ << token::SPACE
|
||||
<< tp.uTheta_ << token::SPACE
|
||||
<< tp.thetaA_ << token::SPACE
|
||||
<< tp.thetaR_;
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
zeroGradientFvPatchScalarField(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const alphaContactAngleFvPatchScalarField& gcpsf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper),
|
||||
thetaProps_(gcpsf.thetaProps_)
|
||||
{}
|
||||
|
||||
|
||||
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
zeroGradientFvPatchScalarField(p, iF),
|
||||
thetaProps_(dict.lookup("thetaProperties"))
|
||||
{
|
||||
evaluate();
|
||||
}
|
||||
|
||||
|
||||
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const alphaContactAngleFvPatchScalarField& gcpsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
zeroGradientFvPatchScalarField(gcpsf, iF),
|
||||
thetaProps_(gcpsf.thetaProps_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchScalarField::write(os);
|
||||
os.writeKeyword("thetaProperties")
|
||||
<< thetaProps_ << token::END_STATEMENT << nl;
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
alphaContactAngleFvPatchScalarField
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,215 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::alphaContactAngleFvPatchScalarField
|
||||
|
||||
Description
|
||||
Contact-angle boundary condition for multi-phase interface-capturing
|
||||
simulations. Used in conjuction with multiphaseSystem.
|
||||
|
||||
SourceFiles
|
||||
alphaContactAngleFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef alphaContactAngleFvPatchScalarField_H
|
||||
#define alphaContactAngleFvPatchScalarField_H
|
||||
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "multiphaseSystem.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class alphaContactAngleFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class alphaContactAngleFvPatchScalarField
|
||||
:
|
||||
public zeroGradientFvPatchScalarField
|
||||
{
|
||||
public:
|
||||
|
||||
class interfaceThetaProps
|
||||
{
|
||||
//- Equilibrium contact angle
|
||||
scalar theta0_;
|
||||
|
||||
//- Dynamic contact angle velocity scale
|
||||
scalar uTheta_;
|
||||
|
||||
//- Limiting advancing contact angle
|
||||
scalar thetaA_;
|
||||
|
||||
//- Limiting receeding contact angle
|
||||
scalar thetaR_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
interfaceThetaProps()
|
||||
{}
|
||||
|
||||
interfaceThetaProps(Istream&);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return the equilibrium contact angle theta0
|
||||
scalar theta0(bool matched=true) const
|
||||
{
|
||||
if (matched) return theta0_;
|
||||
else return 180.0 - theta0_;
|
||||
}
|
||||
|
||||
//- Return the dynamic contact angle velocity scale
|
||||
scalar uTheta() const
|
||||
{
|
||||
return uTheta_;
|
||||
}
|
||||
|
||||
//- Return the limiting advancing contact angle
|
||||
scalar thetaA(bool matched=true) const
|
||||
{
|
||||
if (matched) return thetaA_;
|
||||
else return 180.0 - thetaA_;
|
||||
}
|
||||
|
||||
//- Return the limiting receeding contact angle
|
||||
scalar thetaR(bool matched=true) const
|
||||
{
|
||||
if (matched) return thetaR_;
|
||||
else return 180.0 - thetaR_;
|
||||
}
|
||||
|
||||
|
||||
// IO functions
|
||||
|
||||
friend Istream& operator>>(Istream&, interfaceThetaProps&);
|
||||
friend Ostream& operator<<(Ostream&, const interfaceThetaProps&);
|
||||
};
|
||||
|
||||
typedef HashTable
|
||||
<
|
||||
interfaceThetaProps,
|
||||
multiphaseSystem::interfacePair,
|
||||
multiphaseSystem::interfacePair::hash
|
||||
> thetaPropsTable;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
thetaPropsTable thetaProps_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("alphaContactAngle");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given alphaContactAngleFvPatchScalarField
|
||||
// onto a new patch
|
||||
alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const alphaContactAngleFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new alphaContactAngleFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
alphaContactAngleFvPatchScalarField
|
||||
(
|
||||
const alphaContactAngleFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new alphaContactAngleFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return the contact angle properties
|
||||
const thetaPropsTable& thetaProps() const
|
||||
{
|
||||
return thetaProps_;
|
||||
}
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,814 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "multiphaseSystem.H"
|
||||
#include "alphaContactAngleFvPatchScalarField.H"
|
||||
#include "Time.H"
|
||||
#include "subCycle.H"
|
||||
#include "MULES.H"
|
||||
#include "fvcSnGrad.H"
|
||||
#include "fvcFlux.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
|
||||
|
||||
const Foam::scalar Foam::multiphaseSystem::convertToRad =
|
||||
Foam::constant::mathematical::pi/180.0;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::multiphaseSystem::calcAlphas()
|
||||
{
|
||||
scalar level = 0.0;
|
||||
alphas_ == 0.0;
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
alphas_ += level*iter();
|
||||
level += 1.0;
|
||||
}
|
||||
|
||||
alphas_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
void Foam::multiphaseSystem::solveAlphas()
|
||||
{
|
||||
word alphaScheme("div(phi,alpha)");
|
||||
word alpharScheme("div(phirb,alpha)");
|
||||
|
||||
surfaceScalarField phic(mag(phi_/mesh_.magSf()));
|
||||
|
||||
PtrList<surfaceScalarField> phiAlphaCorrs(phases_.size());
|
||||
int phasei = 0;
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
phaseModel& phase1 = iter();
|
||||
|
||||
phase1.phiAlpha() =
|
||||
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0);
|
||||
|
||||
phiAlphaCorrs.set
|
||||
(
|
||||
phasei,
|
||||
new surfaceScalarField
|
||||
(
|
||||
fvc::flux
|
||||
(
|
||||
phi_,
|
||||
phase1,
|
||||
alphaScheme
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
surfaceScalarField& phiAlphaCorr = phiAlphaCorrs[phasei];
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter2)
|
||||
{
|
||||
phaseModel& phase2 = iter2();
|
||||
|
||||
if (&phase2 == &phase1) continue;
|
||||
|
||||
surfaceScalarField phir
|
||||
(
|
||||
(phase1.phi() - phase2.phi())
|
||||
+ min(cAlpha(phase1, phase2)*phic, max(phic))*nHatf(phase1, phase2)
|
||||
);
|
||||
|
||||
phiAlphaCorr += fvc::flux
|
||||
(
|
||||
-fvc::flux(-phir, phase2, alpharScheme),
|
||||
phase1,
|
||||
alpharScheme
|
||||
);
|
||||
}
|
||||
|
||||
MULES::limit
|
||||
(
|
||||
geometricOneField(),
|
||||
phase1,
|
||||
phi_,
|
||||
phiAlphaCorr,
|
||||
zeroField(),
|
||||
zeroField(),
|
||||
1,
|
||||
0,
|
||||
3,
|
||||
true
|
||||
);
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
MULES::limitSum(phiAlphaCorrs);
|
||||
|
||||
volScalarField sumAlpha
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"sumAlpha",
|
||||
mesh_.time().timeName(),
|
||||
mesh_
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar("sumAlpha", dimless, 0)
|
||||
);
|
||||
|
||||
phasei = 0;
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
phaseModel& phase1 = iter();
|
||||
|
||||
surfaceScalarField& phiAlpha = phiAlphaCorrs[phasei];
|
||||
phiAlpha += upwind<scalar>(mesh_, phi_).flux(phase1);
|
||||
|
||||
MULES::explicitSolve
|
||||
(
|
||||
geometricOneField(),
|
||||
phase1,
|
||||
phiAlpha,
|
||||
zeroField(),
|
||||
zeroField()
|
||||
);
|
||||
|
||||
phase1.phiAlpha() += phiAlpha;
|
||||
|
||||
Info<< phase1.name() << " volume fraction, min, max = "
|
||||
<< phase1.weightedAverage(mesh_.V()).value()
|
||||
<< ' ' << min(phase1).value()
|
||||
<< ' ' << max(phase1).value()
|
||||
<< endl;
|
||||
|
||||
sumAlpha += phase1;
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
Info<< "Phase-sum volume fraction, min, max = "
|
||||
<< sumAlpha.weightedAverage(mesh_.V()).value()
|
||||
<< ' ' << min(sumAlpha).value()
|
||||
<< ' ' << max(sumAlpha).value()
|
||||
<< endl;
|
||||
|
||||
calcAlphas();
|
||||
}
|
||||
|
||||
|
||||
Foam::dimensionedScalar Foam::multiphaseSystem::sigma
|
||||
(
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
) const
|
||||
{
|
||||
scalarCoeffTable::const_iterator sigma
|
||||
(
|
||||
sigmas_.find(interfacePair(phase1, phase2))
|
||||
);
|
||||
|
||||
if (sigma == sigmas_.end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"multiphaseSystem::sigma(const phaseModel& phase1, const phaseModel& phase2) const"
|
||||
) << "Cannot find interface " << interfacePair(phase1, phase2)
|
||||
<< " in list of sigma values"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return dimensionedScalar("sigma", dimSigma_, sigma());
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::multiphaseSystem::cAlpha
|
||||
(
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
) const
|
||||
{
|
||||
scalarCoeffTable::const_iterator cAlpha
|
||||
(
|
||||
cAlphas_.find(interfacePair(phase1, phase2))
|
||||
);
|
||||
|
||||
if (cAlpha == cAlphas_.end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"multiphaseSystem::cAlpha(const phaseModel& phase1, const phaseModel& phase2) const"
|
||||
) << "Cannot find interface " << interfacePair(phase1, phase2)
|
||||
<< " in list of cAlpha values"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cAlpha();
|
||||
}
|
||||
|
||||
|
||||
Foam::dimensionedScalar Foam::multiphaseSystem::Cvm
|
||||
(
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
) const
|
||||
{
|
||||
scalarCoeffTable::const_iterator Cvm
|
||||
(
|
||||
Cvms_.find(interfacePair(phase1, phase2))
|
||||
);
|
||||
|
||||
if (Cvm != Cvms_.end())
|
||||
{
|
||||
return Cvm()*phase2.rho();
|
||||
}
|
||||
|
||||
Cvm = Cvms_.find(interfacePair(phase2, phase1));
|
||||
|
||||
if (Cvm != Cvms_.end())
|
||||
{
|
||||
return Cvm()*phase1.rho();
|
||||
}
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"multiphaseSystem::sigma(const phaseModel& phase1, const phaseModel& phase2) const"
|
||||
) << "Cannot find interface " << interfacePair(phase1, phase2)
|
||||
<< " in list of sigma values"
|
||||
<< exit(FatalError);
|
||||
|
||||
return Cvm()*phase2.rho();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceVectorField> Foam::multiphaseSystem::nHatfv
|
||||
(
|
||||
const volScalarField& alpha1,
|
||||
const volScalarField& alpha2
|
||||
) const
|
||||
{
|
||||
/*
|
||||
// Cell gradient of alpha
|
||||
volVectorField gradAlpha =
|
||||
alpha2*fvc::grad(alpha1) - alpha1*fvc::grad(alpha2);
|
||||
|
||||
// Interpolated face-gradient of alpha
|
||||
surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha);
|
||||
*/
|
||||
|
||||
surfaceVectorField gradAlphaf
|
||||
(
|
||||
fvc::interpolate(alpha2)*fvc::interpolate(fvc::grad(alpha1))
|
||||
- fvc::interpolate(alpha1)*fvc::interpolate(fvc::grad(alpha2))
|
||||
);
|
||||
|
||||
// Face unit interface normal
|
||||
return gradAlphaf/(mag(gradAlphaf) + deltaN_);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::nHatf
|
||||
(
|
||||
const volScalarField& alpha1,
|
||||
const volScalarField& alpha2
|
||||
) const
|
||||
{
|
||||
// Face unit interface normal flux
|
||||
return nHatfv(alpha1, alpha2) & mesh_.Sf();
|
||||
}
|
||||
|
||||
|
||||
// Correction for the boundary condition on the unit normal nHat on
|
||||
// walls to produce the correct contact angle.
|
||||
|
||||
// The dynamic contact angle is calculated from the component of the
|
||||
// velocity on the direction of the interface, parallel to the wall.
|
||||
|
||||
void Foam::multiphaseSystem::correctContactAngle
|
||||
(
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2,
|
||||
surfaceVectorField::GeometricBoundaryField& nHatb
|
||||
) const
|
||||
{
|
||||
const volScalarField::GeometricBoundaryField& gbf
|
||||
= phase1.boundaryField();
|
||||
|
||||
const fvBoundaryMesh& boundary = mesh_.boundary();
|
||||
|
||||
forAll(boundary, patchi)
|
||||
{
|
||||
if (isA<alphaContactAngleFvPatchScalarField>(gbf[patchi]))
|
||||
{
|
||||
const alphaContactAngleFvPatchScalarField& acap =
|
||||
refCast<const alphaContactAngleFvPatchScalarField>(gbf[patchi]);
|
||||
|
||||
vectorField& nHatPatch = nHatb[patchi];
|
||||
|
||||
vectorField AfHatPatch
|
||||
(
|
||||
mesh_.Sf().boundaryField()[patchi]
|
||||
/mesh_.magSf().boundaryField()[patchi]
|
||||
);
|
||||
|
||||
alphaContactAngleFvPatchScalarField::thetaPropsTable::
|
||||
const_iterator tp =
|
||||
acap.thetaProps().find(interfacePair(phase1, phase2));
|
||||
|
||||
if (tp == acap.thetaProps().end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"multiphaseSystem::correctContactAngle"
|
||||
"(const phaseModel& phase1, const phaseModel& phase2, "
|
||||
"fvPatchVectorFieldField& nHatb) const"
|
||||
) << "Cannot find interface " << interfacePair(phase1, phase2)
|
||||
<< "\n in table of theta properties for patch "
|
||||
<< acap.patch().name()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
bool matched = (tp.key().first() == phase1.name());
|
||||
|
||||
scalar theta0 = convertToRad*tp().theta0(matched);
|
||||
scalarField theta(boundary[patchi].size(), theta0);
|
||||
|
||||
scalar uTheta = tp().uTheta();
|
||||
|
||||
// Calculate the dynamic contact angle if required
|
||||
if (uTheta > SMALL)
|
||||
{
|
||||
scalar thetaA = convertToRad*tp().thetaA(matched);
|
||||
scalar thetaR = convertToRad*tp().thetaR(matched);
|
||||
|
||||
// Calculated the component of the velocity parallel to the wall
|
||||
vectorField Uwall
|
||||
(
|
||||
phase1.U().boundaryField()[patchi].patchInternalField()
|
||||
- phase1.U().boundaryField()[patchi]
|
||||
);
|
||||
Uwall -= (AfHatPatch & Uwall)*AfHatPatch;
|
||||
|
||||
// Find the direction of the interface parallel to the wall
|
||||
vectorField nWall
|
||||
(
|
||||
nHatPatch - (AfHatPatch & nHatPatch)*AfHatPatch
|
||||
);
|
||||
|
||||
// Normalise nWall
|
||||
nWall /= (mag(nWall) + SMALL);
|
||||
|
||||
// Calculate Uwall resolved normal to the interface parallel to
|
||||
// the interface
|
||||
scalarField uwall(nWall & Uwall);
|
||||
|
||||
theta += (thetaA - thetaR)*tanh(uwall/uTheta);
|
||||
}
|
||||
|
||||
|
||||
// Reset nHatPatch to correspond to the contact angle
|
||||
|
||||
scalarField a12(nHatPatch & AfHatPatch);
|
||||
|
||||
scalarField b1(cos(theta));
|
||||
|
||||
scalarField b2(nHatPatch.size());
|
||||
|
||||
forAll(b2, facei)
|
||||
{
|
||||
b2[facei] = cos(acos(a12[facei]) - theta[facei]);
|
||||
}
|
||||
|
||||
scalarField det(1.0 - a12*a12);
|
||||
|
||||
scalarField a((b1 - a12*b2)/det);
|
||||
scalarField b((b2 - a12*b1)/det);
|
||||
|
||||
nHatPatch = a*AfHatPatch + b*nHatPatch;
|
||||
|
||||
nHatPatch /= (mag(nHatPatch) + deltaN_.value());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::K
|
||||
(
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
) const
|
||||
{
|
||||
tmp<surfaceVectorField> tnHatfv = nHatfv(phase1, phase2);
|
||||
|
||||
correctContactAngle(phase1, phase2, tnHatfv().boundaryField());
|
||||
|
||||
// Simple expression for curvature
|
||||
return -fvc::div(tnHatfv & mesh_.Sf());
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::multiphaseSystem::multiphaseSystem
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
phases_(lookup("phases"), phaseModel::iNew(mesh)),
|
||||
|
||||
mesh_(mesh),
|
||||
phi_(phi),
|
||||
|
||||
alphas_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"alphas",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar("alphas", dimless, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
),
|
||||
|
||||
sigmas_(lookup("sigmas")),
|
||||
dimSigma_(1, 0, -2, 0, 0),
|
||||
cAlphas_(lookup("interfaceCompression")),
|
||||
Cvms_(lookup("virtualMass")),
|
||||
deltaN_
|
||||
(
|
||||
"deltaN",
|
||||
1e-8/pow(average(mesh_.V()), 1.0/3.0)
|
||||
)
|
||||
{
|
||||
calcAlphas();
|
||||
alphas_.write();
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
phaseModelTable_.add(iter());
|
||||
}
|
||||
|
||||
interfaceDictTable dragModelsDict(lookup("drag"));
|
||||
|
||||
forAllConstIter(interfaceDictTable, dragModelsDict, iter)
|
||||
{
|
||||
dragModels_.insert
|
||||
(
|
||||
iter.key(),
|
||||
dragModel::New
|
||||
(
|
||||
iter(),
|
||||
*phaseModelTable_.find(iter.key().first())(),
|
||||
*phaseModelTable_.find(iter.key().second())()
|
||||
).ptr()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::rho() const
|
||||
{
|
||||
PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
|
||||
|
||||
tmp<volScalarField> trho = iter()*iter().rho();
|
||||
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
trho() += iter()*iter().rho();
|
||||
}
|
||||
|
||||
return trho;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::Cvm
|
||||
(
|
||||
const phaseModel& phase
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> tCvm
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Cvm",
|
||||
mesh_.time().timeName(),
|
||||
mesh_
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
"Cvm",
|
||||
dimensionSet(1, -3, 0, 0, 0),
|
||||
0
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
const phaseModel& phase2 = iter();
|
||||
|
||||
if (&phase2 != &phase)
|
||||
{
|
||||
tCvm() += Cvm(phase, phase2)*phase2;
|
||||
}
|
||||
}
|
||||
|
||||
return tCvm;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volVectorField> Foam::multiphaseSystem::Svm
|
||||
(
|
||||
const phaseModel& phase
|
||||
) const
|
||||
{
|
||||
tmp<volVectorField> tSvm
|
||||
(
|
||||
new volVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Svm",
|
||||
mesh_.time().timeName(),
|
||||
mesh_
|
||||
),
|
||||
mesh_,
|
||||
dimensionedVector
|
||||
(
|
||||
"Svm",
|
||||
dimensionSet(1, -2, -2, 0, 0),
|
||||
vector::zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
const phaseModel& phase2 = iter();
|
||||
|
||||
if (&phase2 != &phase)
|
||||
{
|
||||
tSvm() += Cvm(phase, phase2)*phase2*phase2.DDtU();
|
||||
}
|
||||
}
|
||||
|
||||
return tSvm;
|
||||
}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::multiphaseSystem::dragCoeffFields>
|
||||
Foam::multiphaseSystem::dragCoeffs() const
|
||||
{
|
||||
autoPtr<dragCoeffFields> dragCoeffsPtr(new dragCoeffFields);
|
||||
|
||||
forAllConstIter(dragModelTable, dragModels_, iter)
|
||||
{
|
||||
const dragModel& dm = *iter();
|
||||
|
||||
dragCoeffsPtr().insert
|
||||
(
|
||||
iter.key(),
|
||||
(
|
||||
dm.phase1()*dm.phase2()
|
||||
*dm.K(mag(dm.phase1().U() - dm.phase2().U()))
|
||||
+ dm.residualDrag()
|
||||
).ptr()
|
||||
);
|
||||
}
|
||||
|
||||
return dragCoeffsPtr;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::dragCoeff
|
||||
(
|
||||
const phaseModel& phase,
|
||||
const dragCoeffFields& dragCoeffs
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> tdragCoeff
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dragCoeff",
|
||||
mesh_.time().timeName(),
|
||||
mesh_
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
"dragCoeff",
|
||||
dimensionSet(1, -3, -1, 0, 0),
|
||||
0
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
dragModelTable::const_iterator dmIter = dragModels_.begin();
|
||||
dragCoeffFields::const_iterator dcIter = dragCoeffs.begin();
|
||||
for
|
||||
(
|
||||
;
|
||||
dmIter != dragModels_.end() && dcIter != dragCoeffs.end();
|
||||
++dmIter, ++dcIter
|
||||
)
|
||||
{
|
||||
if
|
||||
(
|
||||
&phase == &dmIter()->phase1()
|
||||
|| &phase == &dmIter()->phase2()
|
||||
)
|
||||
{
|
||||
tdragCoeff() += *dcIter();
|
||||
}
|
||||
}
|
||||
|
||||
return tdragCoeff;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField>
|
||||
Foam::multiphaseSystem::surfaceTensionForce() const
|
||||
{
|
||||
tmp<surfaceScalarField> tstf
|
||||
(
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"surfaceTensionForce",
|
||||
mesh_.time().timeName(),
|
||||
mesh_
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
"surfaceTensionForce",
|
||||
dimensionSet(1, -2, -2, 0, 0),
|
||||
0.0
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
surfaceScalarField& stf = tstf();
|
||||
|
||||
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter1)
|
||||
{
|
||||
const phaseModel& phase1 = iter1();
|
||||
|
||||
PtrDictionary<phaseModel>::const_iterator iter2 = iter1;
|
||||
++iter2;
|
||||
|
||||
for (; iter2 != phases_.end(); ++iter2)
|
||||
{
|
||||
const phaseModel& phase2 = iter2();
|
||||
|
||||
stf += sigma(phase1, phase2)
|
||||
*fvc::interpolate(K(phase1, phase2))*
|
||||
(
|
||||
fvc::interpolate(phase2)*fvc::snGrad(phase1)
|
||||
- fvc::interpolate(phase1)*fvc::snGrad(phase2)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return tstf;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::multiphaseSystem::nearInterface() const
|
||||
{
|
||||
tmp<volScalarField> tnearInt
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"nearInterface",
|
||||
mesh_.time().timeName(),
|
||||
mesh_
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar("nearInterface", dimless, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
tnearInt() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter()));
|
||||
}
|
||||
|
||||
return tnearInt;
|
||||
}
|
||||
|
||||
|
||||
void Foam::multiphaseSystem::solve()
|
||||
{
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
iter().correct();
|
||||
}
|
||||
|
||||
const Time& runTime = mesh_.time();
|
||||
|
||||
const dictionary& pimpleDict = mesh_.solutionDict().subDict("PIMPLE");
|
||||
|
||||
label nAlphaSubCycles(readLabel(pimpleDict.lookup("nAlphaSubCycles")));
|
||||
|
||||
volScalarField& alpha = phases_.first();
|
||||
|
||||
if (nAlphaSubCycles > 1)
|
||||
{
|
||||
dimensionedScalar totalDeltaT = runTime.deltaT();
|
||||
|
||||
for
|
||||
(
|
||||
subCycle<volScalarField> alphaSubCycle(alpha, nAlphaSubCycles);
|
||||
!(++alphaSubCycle).end();
|
||||
)
|
||||
{
|
||||
solveAlphas();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
solveAlphas();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Foam::multiphaseSystem::read()
|
||||
{
|
||||
if (regIOobject::read())
|
||||
{
|
||||
bool readOK = true;
|
||||
|
||||
PtrList<entry> phaseData(lookup("phases"));
|
||||
label phasei = 0;
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
readOK &= iter().read(phaseData[phasei++].dict());
|
||||
}
|
||||
|
||||
lookup("sigmas") >> sigmas_;
|
||||
lookup("interfaceCompression") >> cAlphas_;
|
||||
lookup("virtualMass") >> Cvms_;
|
||||
|
||||
return readOK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,317 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::multiphaseSystem
|
||||
|
||||
Description
|
||||
Incompressible multi-phase mixture with built in solution for the
|
||||
phase fractions with interface compression for interface-capturing.
|
||||
|
||||
Derived from transportModel so that it can be unsed in conjunction with
|
||||
the incompressible turbulence models.
|
||||
|
||||
Surface tension and contact-angle is handled for the interface
|
||||
between each phase-pair.
|
||||
|
||||
SourceFiles
|
||||
multiphaseSystem.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef multiphaseSystem_H
|
||||
#define multiphaseSystem_H
|
||||
|
||||
#include "incompressible/transportModel/transportModel.H"
|
||||
#include "phaseModel.H"
|
||||
#include "PtrDictionary.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "dragModel.H"
|
||||
#include "HashPtrTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class multiphaseSystem Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class multiphaseSystem
|
||||
:
|
||||
public IOdictionary
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
class interfacePair
|
||||
:
|
||||
public Pair<word>
|
||||
{
|
||||
public:
|
||||
|
||||
class hash
|
||||
:
|
||||
public Hash<interfacePair>
|
||||
{
|
||||
public:
|
||||
|
||||
hash()
|
||||
{}
|
||||
|
||||
label operator()(const interfacePair& key) const
|
||||
{
|
||||
return word::hash()(key.first()) + word::hash()(key.second());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
interfacePair()
|
||||
{}
|
||||
|
||||
interfacePair(const word& alpha1Name, const word& alpha2Name)
|
||||
:
|
||||
Pair<word>(alpha1Name, alpha2Name)
|
||||
{}
|
||||
|
||||
interfacePair(const phaseModel& alpha1, const phaseModel& alpha2)
|
||||
:
|
||||
Pair<word>(alpha1.name(), alpha2.name())
|
||||
{}
|
||||
|
||||
|
||||
// Friend Operators
|
||||
|
||||
friend bool operator==
|
||||
(
|
||||
const interfacePair& a,
|
||||
const interfacePair& b
|
||||
)
|
||||
{
|
||||
return
|
||||
(
|
||||
((a.first() == b.first()) && (a.second() == b.second()))
|
||||
|| ((a.first() == b.second()) && (a.second() == b.first()))
|
||||
);
|
||||
}
|
||||
|
||||
friend bool operator!=
|
||||
(
|
||||
const interfacePair& a,
|
||||
const interfacePair& b
|
||||
)
|
||||
{
|
||||
return (!(a == b));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
typedef HashPtrTable<dragModel, interfacePair, interfacePair::hash>
|
||||
dragModelTable;
|
||||
|
||||
typedef HashPtrTable<volScalarField, interfacePair, interfacePair::hash>
|
||||
dragCoeffFields;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Dictionary of phases
|
||||
PtrDictionary<phaseModel> phases_;
|
||||
|
||||
//- phaseModelTable
|
||||
class phaseModelTable
|
||||
:
|
||||
public HashTable<const phaseModel*>
|
||||
{
|
||||
public:
|
||||
|
||||
phaseModelTable()
|
||||
{}
|
||||
|
||||
void add(const phaseModel& pm)
|
||||
{
|
||||
this->insert(pm.name(), &pm);
|
||||
}
|
||||
};
|
||||
|
||||
//- Phase model table for quick lookup
|
||||
phaseModelTable phaseModelTable_;
|
||||
|
||||
const fvMesh& mesh_;
|
||||
const surfaceScalarField& phi_;
|
||||
|
||||
volScalarField alphas_;
|
||||
|
||||
typedef HashTable<scalar, interfacePair, interfacePair::hash>
|
||||
scalarCoeffTable;
|
||||
|
||||
scalarCoeffTable sigmas_;
|
||||
dimensionSet dimSigma_;
|
||||
|
||||
scalarCoeffTable cAlphas_;
|
||||
|
||||
scalarCoeffTable Cvms_;
|
||||
|
||||
typedef HashTable<dictionary, interfacePair, interfacePair::hash>
|
||||
interfaceDictTable;
|
||||
|
||||
dragModelTable dragModels_;
|
||||
|
||||
//- Stabilisation for normalisation of the interface normal
|
||||
const dimensionedScalar deltaN_;
|
||||
|
||||
//- Conversion factor for degrees into radians
|
||||
static const scalar convertToRad;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
void calcAlphas();
|
||||
|
||||
void solveAlphas();
|
||||
|
||||
dimensionedScalar sigma
|
||||
(
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
) const;
|
||||
|
||||
scalar cAlpha
|
||||
(
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
) const;
|
||||
|
||||
dimensionedScalar Cvm
|
||||
(
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
) const;
|
||||
|
||||
tmp<surfaceVectorField> nHatfv
|
||||
(
|
||||
const volScalarField& alpha1,
|
||||
const volScalarField& alpha2
|
||||
) const;
|
||||
|
||||
tmp<surfaceScalarField> nHatf
|
||||
(
|
||||
const volScalarField& alpha1,
|
||||
const volScalarField& alpha2
|
||||
) const;
|
||||
|
||||
void correctContactAngle
|
||||
(
|
||||
const phaseModel& alpha1,
|
||||
const phaseModel& alpha2,
|
||||
surfaceVectorField::GeometricBoundaryField& nHatb
|
||||
) const;
|
||||
|
||||
tmp<volScalarField> K(const phaseModel& alpha1, const phaseModel& alpha2) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
multiphaseSystem
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const surfaceScalarField& phi
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~multiphaseSystem()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the phases
|
||||
const PtrDictionary<phaseModel>& phases() const
|
||||
{
|
||||
return phases_;
|
||||
}
|
||||
|
||||
//- Return the phases
|
||||
PtrDictionary<phaseModel>& phases()
|
||||
{
|
||||
return phases_;
|
||||
}
|
||||
|
||||
//- Return the mixture density
|
||||
tmp<volScalarField> rho() const;
|
||||
|
||||
//- Return the virtual-mass coefficient for the given phase
|
||||
tmp<volScalarField> Cvm(const phaseModel& phase) const;
|
||||
|
||||
//- Return the virtual-mass source for the given phase
|
||||
tmp<volVectorField> Svm(const phaseModel& phase) const;
|
||||
|
||||
//- Return the table of drag models
|
||||
const dragModelTable& dragModels() const
|
||||
{
|
||||
return dragModels_;
|
||||
}
|
||||
|
||||
//- Return the drag coefficients for all of the interfaces
|
||||
autoPtr<dragCoeffFields> dragCoeffs() const;
|
||||
|
||||
//- Return the sum of the drag coefficients for the given phase
|
||||
tmp<volScalarField> dragCoeff
|
||||
(
|
||||
const phaseModel& phase,
|
||||
const dragCoeffFields& dragCoeffs
|
||||
) const;
|
||||
|
||||
tmp<surfaceScalarField> surfaceTensionForce() const;
|
||||
|
||||
//- Indicator of the proximity of the interface
|
||||
// Field values are 1 near and 0 away for the interface.
|
||||
tmp<volScalarField> nearInterface() const;
|
||||
|
||||
//- Solve for the mixture phase-fractions
|
||||
void solve();
|
||||
|
||||
//- Read base transportProperties dictionary
|
||||
bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
237
applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H
Normal file
237
applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H
Normal file
@ -0,0 +1,237 @@
|
||||
{
|
||||
// rho1 = rho10 + psi1*p;
|
||||
// rho2 = rho20 + psi2*p;
|
||||
|
||||
// tmp<fvScalarMatrix> pEqnComp1;
|
||||
// tmp<fvScalarMatrix> pEqnComp2;
|
||||
|
||||
// //if (transonic)
|
||||
// //{
|
||||
// //}
|
||||
// //else
|
||||
// {
|
||||
// surfaceScalarField phid1("phid1", fvc::interpolate(psi1)*phi1);
|
||||
// surfaceScalarField phid2("phid2", fvc::interpolate(psi2)*phi2);
|
||||
|
||||
// pEqnComp1 =
|
||||
// fvc::ddt(rho1) + psi1*correction(fvm::ddt(p))
|
||||
// + fvc::div(phid1, p)
|
||||
// - fvc::Sp(fvc::div(phid1), p);
|
||||
|
||||
// pEqnComp2 =
|
||||
// fvc::ddt(rho2) + psi2*correction(fvm::ddt(p))
|
||||
// + fvc::div(phid2, p)
|
||||
// - fvc::Sp(fvc::div(phid2), p);
|
||||
// }
|
||||
|
||||
PtrList<surfaceScalarField> alphafs(fluid.phases().size());
|
||||
PtrList<volVectorField> U0s(fluid.phases().size());
|
||||
PtrList<surfaceScalarField> phi0s(fluid.phases().size());
|
||||
PtrList<volScalarField> rAUs(fluid.phases().size());
|
||||
PtrList<surfaceScalarField> rAlphaAUfs(fluid.phases().size());
|
||||
|
||||
phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
|
||||
U0s.set(phasei, new volVectorField(phase.U()));
|
||||
phi0s.set(phasei, new surfaceScalarField(phase.phi()));
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
const volScalarField& alpha = phase;
|
||||
|
||||
alphafs.set(phasei, fvc::interpolate(alpha).ptr());
|
||||
rAUs.set(phasei, (1.0/UEqns[phasei].A()).ptr());
|
||||
rAlphaAUfs.set(phasei, fvc::interpolate(alpha*rAUs[phasei]).ptr());
|
||||
|
||||
phase.U() = rAUs[phasei]*UEqns[phasei].H();
|
||||
|
||||
phase.phi() =
|
||||
(
|
||||
(fvc::interpolate(phase.U()) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAUs[phasei], alpha, phase.U(), phase.phi())
|
||||
);
|
||||
|
||||
mrfZones.relativeFlux(phase.phi());
|
||||
phase.phi() += rAlphaAUfs[phasei]*(g & mesh.Sf());
|
||||
|
||||
multiphaseSystem::dragModelTable::const_iterator dmIter = fluid.dragModels().begin();
|
||||
multiphaseSystem::dragCoeffFields::const_iterator dcIter = dragCoeffs().begin();
|
||||
for
|
||||
(
|
||||
;
|
||||
dmIter != fluid.dragModels().end() && dcIter != dragCoeffs().end();
|
||||
++dmIter, ++dcIter
|
||||
)
|
||||
{
|
||||
if
|
||||
(
|
||||
&phase == &dmIter()->phase1()
|
||||
|| &phase == &dmIter()->phase2()
|
||||
)
|
||||
{
|
||||
int phasej = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter2)
|
||||
{
|
||||
phaseModel& phase2 = iter2();
|
||||
|
||||
if
|
||||
(
|
||||
(&phase == &dmIter()->phase1() && &phase2 == &dmIter()->phase2())
|
||||
|| (&phase == &dmIter()->phase2() && &phase2 == &dmIter()->phase1())
|
||||
) break;
|
||||
|
||||
phasej++;
|
||||
}
|
||||
|
||||
phase.phi() +=
|
||||
fvc::interpolate((1.0/phase.rho())*rAUs[phasei]*(*dcIter()))*phi0s[phasej];
|
||||
}
|
||||
}
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
phi = dimensionedScalar("phi", phi.dimensions(), 0);
|
||||
surfaceScalarField Dp
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Dp",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("Dp", dimensionSet(-1, 3, 1, 0, 0), 0)
|
||||
);
|
||||
|
||||
phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
phi += alphafs[phasei]*phase.phi();
|
||||
Dp += alphafs[phasei]*rAlphaAUfs[phasei]/phase.rho();
|
||||
|
||||
phasei++;
|
||||
}
|
||||
Dp = mag(Dp);
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqnIncomp
|
||||
(
|
||||
fvc::div(phi)
|
||||
- fvm::laplacian(Dp, p)
|
||||
);
|
||||
|
||||
solve
|
||||
(
|
||||
// (
|
||||
// (alpha1/rho1)*pEqnComp1()
|
||||
// + (alpha2/rho2)*pEqnComp2()
|
||||
// ) +
|
||||
pEqnIncomp,
|
||||
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
|
||||
);
|
||||
|
||||
if (nonOrth == pimple.nNonOrthCorr())
|
||||
{
|
||||
surfaceScalarField mSfGradp = pEqnIncomp.flux()/Dp;
|
||||
|
||||
phasei = 0;
|
||||
phi = dimensionedScalar("phi", phi.dimensions(), 0);
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
|
||||
phase.phi() += rAlphaAUfs[phasei]*mSfGradp/phase.rho();
|
||||
phi += alphafs[phasei]*phase.phi();
|
||||
|
||||
phasei++;
|
||||
}
|
||||
|
||||
// dgdt =
|
||||
// (
|
||||
// pos(alpha2)*(pEqnComp2 & p)/rho2
|
||||
// - pos(alpha1)*(pEqnComp1 & p)/rho1
|
||||
// );
|
||||
|
||||
p.relax();
|
||||
mSfGradp = pEqnIncomp.flux()/Dp;
|
||||
|
||||
U = dimensionedVector("U", dimVelocity, vector::zero);
|
||||
|
||||
phasei = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
phaseModel& phase = iter();
|
||||
const volScalarField& alpha = phase;
|
||||
|
||||
phase.U() +=
|
||||
fvc::reconstruct
|
||||
(
|
||||
rAlphaAUfs[phasei]*(g & mesh.Sf())
|
||||
+ rAlphaAUfs[phasei]*mSfGradp/phase.rho()
|
||||
);
|
||||
|
||||
multiphaseSystem::dragModelTable::const_iterator dmIter = fluid.dragModels().begin();
|
||||
multiphaseSystem::dragCoeffFields::const_iterator dcIter = dragCoeffs().begin();
|
||||
for
|
||||
(
|
||||
;
|
||||
dmIter != fluid.dragModels().end() && dcIter != dragCoeffs().end();
|
||||
++dmIter, ++dcIter
|
||||
)
|
||||
{
|
||||
if
|
||||
(
|
||||
&phase == &dmIter()->phase1()
|
||||
|| &phase == &dmIter()->phase2()
|
||||
)
|
||||
{
|
||||
int phasej = 0;
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter2)
|
||||
{
|
||||
phaseModel& phase2 = iter2();
|
||||
|
||||
if
|
||||
(
|
||||
(&phase == &dmIter()->phase1() && &phase2 == &dmIter()->phase2())
|
||||
|| (&phase == &dmIter()->phase2() && &phase2 == &dmIter()->phase1())
|
||||
) break;
|
||||
|
||||
phasej++;
|
||||
}
|
||||
|
||||
phase.U() += (1.0/phase.rho())*rAUs[phasei]*(*dcIter())*U0s[phasej];
|
||||
}
|
||||
}
|
||||
|
||||
phase.U() = fvc::reconstruct(phase.phi());
|
||||
phase.U().correctBoundaryConditions();
|
||||
|
||||
U += alpha*phase.U();
|
||||
|
||||
phasei++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//p = max(p, pMin);
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
// rho1 = rho10 + psi1*p;
|
||||
// rho2 = rho20 + psi2*p;
|
||||
|
||||
// Dp1Dt = fvc::DDt(phi1, p);
|
||||
// Dp2Dt = fvc::DDt(phi2, p);
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
if (packingLimiter)
|
||||
{
|
||||
// Calculating exceeding volume fractions
|
||||
volScalarField alphaEx(max(alpha1 - alphaMax, scalar(0)));
|
||||
|
||||
// Finding neighbouring cells of the whole domain
|
||||
labelListList neighbour = mesh.cellCells();
|
||||
scalarField cellVolumes(mesh.cellVolumes());
|
||||
|
||||
forAll (alphaEx, celli)
|
||||
{
|
||||
// Finding the labels of the neighbouring cells
|
||||
labelList neighbourCell = neighbour[celli];
|
||||
|
||||
// Initializing neighbouring cells contribution
|
||||
scalar neighboursEx = 0.0;
|
||||
|
||||
forAll (neighbourCell, cellj)
|
||||
{
|
||||
labelList neighboursNeighbour = neighbour[neighbourCell[cellj]];
|
||||
scalar neighboursNeighbourCellVolumes = 0.0;
|
||||
|
||||
forAll (neighboursNeighbour, cellk)
|
||||
{
|
||||
neighboursNeighbourCellVolumes +=
|
||||
cellVolumes[neighboursNeighbour[cellk]];
|
||||
}
|
||||
|
||||
neighboursEx +=
|
||||
alphaEx[neighbourCell[cellj]]*cellVolumes[celli]
|
||||
/neighboursNeighbourCellVolumes;
|
||||
}
|
||||
|
||||
alpha1[celli] += neighboursEx - alphaEx[celli];
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user