Removed twoPhaseEulerFoam and renamed compressibleTwoPhaseEulerFoam -> twoPhaseEulerFoam

This commit is contained in:
Henry
2013-08-15 10:30:09 +01:00
parent d54c9c7327
commit 175f03f87d
419 changed files with 516 additions and 26377 deletions

View File

@ -1,10 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
wclean libso twoPhaseSystem
wclean libso interfacialModels
wclean libso phaseIncompressibleTurbulenceModels
wclean
# ----------------------------------------------------------------- end-of-file

View File

@ -1,11 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
wmakeLnInclude interfacialModels
wmake libso twoPhaseSystem
wmake libso interfacialModels
wmake libso phaseIncompressibleTurbulenceModels
wmake
# ----------------------------------------------------------------- end-of-file

View File

@ -1,12 +0,0 @@
# include "CourantNo.H"
{
scalar UrCoNum = 0.5*gMax
(
fvc::surfaceSum(mag(phi1 - phi2))().internalField()/mesh.V().field()
)*runTime.deltaTValue();
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
CoNum = max(CoNum, UrCoNum);
}

View File

@ -1,13 +0,0 @@
{
DDtU1 =
fvc::ddt(U1)
+ fvc::div(phi1, U1)
- fvc::div(phi1)*U1;
mrfZones.addCoriolis(U1, DDtU1);
DDtU2 =
fvc::ddt(U2)
+ fvc::div(phi2, U2)
- fvc::div(phi2)*U2;
mrfZones.addCoriolis(U2, DDtU2);
}

View File

@ -1,3 +0,0 @@
compressibleTwoPhaseEulerFoam.C
EXE = $(FOAM_APPBIN)/compressibleTwoPhaseEulerFoam

View File

@ -1,23 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
-IphaseIncompressibleTurbulenceModels/lnInclude \
-IinterfacialModels/lnInclude \
-ItwoPhaseSystem/lnInclude \
-Iaveraging
EXE_LIBS = \
-lfluidThermophysicalModels \
-lspecie \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lphaseIncompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lcompressibleTwoPhaseSystem \
-lcompressibleEulerianInterfacialModels \
-lfiniteVolume \
-lmeshTools

View File

@ -1,61 +0,0 @@
mrfZones.correctBoundaryVelocity(U1);
mrfZones.correctBoundaryVelocity(U2);
mrfZones.correctBoundaryVelocity(U);
fvVectorMatrix U1Eqn(U1, U1.dimensions()*dimVol/dimTime);
fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
volScalarField dragCoeff(fluid.dragCoeff());
{
volVectorField liftForce(fluid.liftForce(U));
{
U1Eqn =
(
fvm::ddt(alpha1, U1)
+ fvm::div(alphaPhi1, U1)
// Compressibity correction
- fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), U1)
+ fluid.Cvm()*rho2*alpha1*alpha2/rho1*
(
fvm::ddt(U1)
+ fvm::div(phi1, U1)
- fvm::Sp(fvc::div(phi1), U1)
)
+ turbulence1->divDevReff(U1)
==
- fvm::Sp(dragCoeff/rho1, U1)
- alpha1*alpha2/rho1*(liftForce - fluid.Cvm()*rho2*DDtU2)
);
mrfZones.addCoriolis(alpha1*(1 + fluid.Cvm()*rho2*alpha2/rho1), U1Eqn);
U1Eqn.relax();
}
{
U2Eqn =
(
fvm::ddt(alpha2, U2)
+ fvm::div(alphaPhi2, U2)
// Compressibity correction
- fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), U2)
+ fluid.Cvm()*rho2*alpha1*alpha2/rho2*
(
fvm::ddt(U2)
+ fvm::div(phi2, U2)
- fvm::Sp(fvc::div(phi2), U2)
)
+ turbulence2->divDevReff(U2)
==
- fvm::Sp(dragCoeff/rho2, U2)
+ alpha1*alpha2/rho2*(liftForce + fluid.Cvm()*rho2*DDtU1)
);
mrfZones.addCoriolis(alpha2*(1 + fluid.Cvm()*rho2*alpha1/rho2), U2Eqn);
U2Eqn.relax();
}
}

View File

@ -1,142 +0,0 @@
{
word alphaScheme("div(phi," + alpha1.name() + ')');
word alpharScheme("div(phir," + alpha1.name() + ')');
surfaceScalarField phic("phic", phi);
surfaceScalarField phir("phir", phi1 - phi2);
surfaceScalarField alpha1f(fvc::interpolate(max(alpha1, scalar(0))));
tmp<surfaceScalarField> pPrimeByA;
if (implicitPhasePressure)
{
pPrimeByA =
fvc::interpolate((1.0/rho1)*rAU1*turbulence1().pPrime())
+ fvc::interpolate((1.0/rho2)*rAU2*turbulence2().pPrime());
surfaceScalarField phiP
(
pPrimeByA()*fvc::snGrad(alpha1, "bounded")*mesh.magSf()
);
phic += alpha1f*phiP;
phir += phiP;
}
for (int acorr=0; acorr<nAlphaCorr; acorr++)
{
volScalarField::DimensionedInternalField Sp
(
IOobject
(
"Sp",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar("Sp", dgdt.dimensions(), 0.0)
);
volScalarField::DimensionedInternalField Su
(
IOobject
(
"Su",
runTime.timeName(),
mesh
),
// Divergence term is handled explicitly to be
// consistent with the explicit transport solution
fvc::div(phi)*min(alpha1, scalar(1))
);
forAll(dgdt, celli)
{
if (dgdt[celli] > 0.0 && alpha1[celli] > 0.0)
{
Sp[celli] -= dgdt[celli]*alpha1[celli];
Su[celli] += dgdt[celli]*alpha1[celli];
}
else if (dgdt[celli] < 0.0 && alpha1[celli] < 1.0)
{
Sp[celli] += dgdt[celli]*(1.0 - alpha1[celli]);
}
}
dimensionedScalar totalDeltaT = runTime.deltaT();
if (nAlphaSubCycles > 1)
{
alphaPhi1 = dimensionedScalar("0", alphaPhi1.dimensions(), 0);
}
for
(
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
!(++alphaSubCycle).end();
)
{
surfaceScalarField alphaPhic1
(
fvc::flux
(
phic,
alpha1,
alphaScheme
)
+ fvc::flux
(
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
alpha1,
alpharScheme
)
);
MULES::explicitSolve
(
geometricOneField(),
alpha1,
phi,
alphaPhic1,
Sp,
Su,
1,
0
);
if (nAlphaSubCycles > 1)
{
alphaPhi1 += (runTime.deltaT()/totalDeltaT)*alphaPhic1;
}
else
{
alphaPhi1 = alphaPhic1;
}
}
if (implicitPhasePressure)
{
fvScalarMatrix alpha1Eqn
(
fvm::ddt(alpha1) - fvc::ddt(alpha1)
- fvm::laplacian(alpha1f*pPrimeByA, alpha1, "bounded")
);
alpha1Eqn.relax();
alpha1Eqn.solve();
alphaPhi1 += alpha1Eqn.flux();
}
alphaPhi2 = phi - alphaPhi1;
alpha2 = scalar(1) - alpha1;
Info<< "Dispersed phase volume fraction = "
<< alpha1.weightedAverage(mesh.V()).value()
<< " Min(alpha1) = " << min(alpha1).value()
<< " Max(alpha1) = " << max(alpha1).value()
<< endl;
}
}
rho = fluid.rho();

View File

@ -1,110 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
compressibleTwoPhaseEulerFoam
Description
Solver for a system of 2 compressible fluid phases with one phase
dispersed, e.g. gas bubbles in a liquid including heat-transfer.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "MULES.H"
#include "subCycle.H"
#include "rhoThermo.H"
#include "twoPhaseSystem.H"
#include "dragModel.H"
#include "heatTransferModel.H"
#include "PhaseIncompressibleTurbulenceModel.H"
#include "pimpleControl.H"
#include "IOMRFZoneList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createMRFZones.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "CourantNos.H"
#include "setInitialDeltaT.H"
pimpleControl pimple(mesh);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readTwoPhaseEulerFoamControls.H"
#include "CourantNos.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#include "alphaEqn.H"
#include "EEqns.H"
#include "UEqns.H"
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
#include "DDtU.H"
if (pimple.turbCorr())
{
turbulence1->correct();
turbulence2->correct();
}
}
#include "write.H"
Info<< "ExecutionTime = "
<< runTime.elapsedCpuTime()
<< " s\n\n" << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -1,185 +0,0 @@
Info<< "Creating twoPhaseSystem\n" << endl;
twoPhaseSystem fluid(mesh);
phaseModel& phase1 = fluid.phase1();
phaseModel& phase2 = fluid.phase2();
volScalarField& alpha1 = phase1;
volScalarField& alpha2 = phase2;
volVectorField& U1 = phase1.U();
surfaceScalarField& phi1 = phase1.phi();
surfaceScalarField alphaPhi1
(
IOobject::groupName("alphaPhi", phase1.name()),
fvc::interpolate(alpha1)*phi1
);
volVectorField& U2 = phase2.U();
surfaceScalarField& phi2 = phase2.phi();
surfaceScalarField alphaPhi2
(
IOobject::groupName("alphaPhi", phase2.name()),
fvc::interpolate(alpha2)*phi2
);
dimensionedScalar pMin
(
"pMin",
dimPressure,
fluid.lookup("pMin")
);
rhoThermo& thermo1 = phase1.thermo();
rhoThermo& thermo2 = phase2.thermo();
volScalarField& p = thermo1.p();
volScalarField& rho1 = thermo1.rho();
const volScalarField& psi1 = thermo1.psi();
volScalarField& rho2 = thermo2.rho();
const volScalarField& psi2 = thermo2.psi();
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fluid.U()
);
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fluid.phi()
);
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fluid.rho()
);
Info<< "Calculating field DDtU1 and DDtU2\n" << endl;
volVectorField DDtU1
(
fvc::ddt(U1)
+ fvc::div(phi1, U1)
- fvc::div(phi1)*U1
);
volVectorField DDtU2
(
fvc::ddt(U2)
+ fvc::div(phi2, U2)
- fvc::div(phi2)*U2
);
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
volScalarField rAU1
(
IOobject
(
IOobject::groupName("rAU", phase1.name()),
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0)
);
volScalarField rAU2
(
IOobject
(
IOobject::groupName("rAU", phase2.name()),
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0)
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
volScalarField dgdt
(
pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001))
);
Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt
(
IOobject
(
"dpdt",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
);
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K1(IOobject::groupName("K", phase1.name()), 0.5*magSqr(U1));
volScalarField K2(IOobject::groupName("K", phase2.name()), 0.5*magSqr(U2));
autoPtr<PhaseIncompressibleTurbulenceModel<phaseModel> >
turbulence1
(
PhaseIncompressibleTurbulenceModel<phaseModel>::New
(
alpha1,
U1,
alphaPhi1,
phi1,
phase1
)
);
autoPtr<PhaseIncompressibleTurbulenceModel<phaseModel> >
turbulence2
(
PhaseIncompressibleTurbulenceModel<phaseModel>::New
(
alpha2,
U2,
alphaPhi2,
phi2,
phase2
)
);

View File

@ -1,4 +0,0 @@
IOMRFZoneList mrfZones(mesh);
mrfZones.correctBoundaryVelocity(U1);
mrfZones.correctBoundaryVelocity(U2);
mrfZones.correctBoundaryVelocity(U);

View File

@ -1,15 +0,0 @@
dragModels/dragModel/dragModel.C
dragModels/dragModel/newDragModel.C
dragModels/Ergun/Ergun.C
dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C
dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C
dragModels/SchillerNaumann/SchillerNaumann.C
dragModels/Gibilaro/Gibilaro.C
dragModels/WenYu/WenYu.C
dragModels/SyamlalOBrien/SyamlalOBrien.C
heatTransferModels/heatTransferModel/heatTransferModel.C
heatTransferModels/heatTransferModel/newHeatTransferModel.C
heatTransferModels/RanzMarshall/RanzMarshall.C
LIB = $(FOAM_LIBBIN)/libcompressibleEulerianInterfacialModels

View File

@ -1,10 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/transportModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I../twoPhaseSystem/lnInclude
LIB_LIBS = \
-lcompressibleTwoPhaseSystem \
-lfluidThermophysicalModels \
-lspecie

View File

@ -1,83 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "Ergun.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(Ergun, 0);
addToRunTimeSelectionTable
(
dragModel,
Ergun,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModels::Ergun::Ergun
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
)
:
dragModel(interfaceDict, alpha1, phase1, phase2)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::Ergun::~Ergun()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::Ergun::K
(
const volScalarField& Ur
) const
{
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
return
150.0*alpha1_*phase2_.nu()*phase2_.rho()
/sqr(alpha2*phase1_.d())
+ 1.75*phase2_.rho()*Ur/(alpha2*phase1_.d());
}
// ************************************************************************* //

View File

@ -1,96 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::dragModels::Ergun
Description
H, Enwald, E. Peirano, A-E Almstedt
'Eulerian Two-Phase Flow Theory Applied to Fluidization'
Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996)
Eq. 104, p. 42
SourceFiles
Ergun.C
\*---------------------------------------------------------------------------*/
#ifndef Ergun_H
#define Ergun_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class Ergun Declaration
\*---------------------------------------------------------------------------*/
class Ergun
:
public dragModel
{
public:
//- Runtime type information
TypeName("Ergun");
// Constructors
//- Construct from components
Ergun
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
);
//- Destructor
virtual ~Ergun();
// Member Functions
tmp<volScalarField> K(const volScalarField& Ur) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,82 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "Gibilaro.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(Gibilaro, 0);
addToRunTimeSelectionTable
(
dragModel,
Gibilaro,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModels::Gibilaro::Gibilaro
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
)
:
dragModel(interfaceDict, alpha1, phase1, phase2)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::Gibilaro::~Gibilaro()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::Gibilaro::K
(
const volScalarField& Ur
) const
{
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
volScalarField bp(pow(alpha2, -2.8));
volScalarField Re(max(alpha2*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
return (17.3/Re + scalar(0.336))*phase2_.rho()*Ur*bp/phase1_.d();
}
// ************************************************************************* //

View File

@ -1,96 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::dragModels::Gibilaro
Description
H, Enwald, E. Peirano, A-E Almstedt
'Eulerian Two-Phase Flow Theory Applied to Fluidization'
Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996)
Eq. 106, p. 43
SourceFiles
Gibilaro.C
\*---------------------------------------------------------------------------*/
#ifndef Gibilaro_H
#define Gibilaro_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class Gibilaro Declaration
\*---------------------------------------------------------------------------*/
class Gibilaro
:
public dragModel
{
public:
//- Runtime type information
TypeName("Gibilaro");
// Constructors
//- Construct from components
Gibilaro
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
);
//- Destructor
virtual ~Gibilaro();
// Member Functions
tmp<volScalarField> K(const volScalarField& Ur) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,99 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "GidaspowErgunWenYu.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(GidaspowErgunWenYu, 0);
addToRunTimeSelectionTable
(
dragModel,
GidaspowErgunWenYu,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModels::GidaspowErgunWenYu::GidaspowErgunWenYu
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
)
:
dragModel(interfaceDict, alpha1, phase1, phase2)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::GidaspowErgunWenYu::~GidaspowErgunWenYu()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowErgunWenYu::K
(
const volScalarField& Ur
) const
{
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
volScalarField d(phase1_.d());
volScalarField bp(pow(alpha2, -2.65));
volScalarField Re(max(Ur*d/phase2_.nu(), scalar(1.0e-3)));
volScalarField Cds
(
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
+ pos(Re - 1000)*0.44
);
// Wen and Yu (1966)
return
(
pos(alpha2 - 0.8)
*(0.75*Cds*phase2_.rho()*Ur*bp/d)
+ neg(alpha2 - 0.8)
*(
150.0*alpha1_*phase2_.nu()*phase2_.rho()/(sqr(alpha2*d))
+ 1.75*phase2_.rho()*Ur/(alpha2*d)
)
);
}
// ************************************************************************* //

View File

@ -1,94 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::dragModels::GidaspowErgunWenYu
Description
D. Gidaspow, Multiphase flow and fluidization,
Academic Press, New York, 1994.
SourceFiles
GidaspowErgunWenYu.C
\*---------------------------------------------------------------------------*/
#ifndef GidaspowErgunWenYu_H
#define GidaspowErgunWenYu_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class GidaspowErgunWenYu Declaration
\*---------------------------------------------------------------------------*/
class GidaspowErgunWenYu
:
public dragModel
{
public:
//- Runtime type information
TypeName("GidaspowErgunWenYu");
// Constructors
//- Construct from components
GidaspowErgunWenYu
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
);
//- Destructor
virtual ~GidaspowErgunWenYu();
// Member Functions
tmp<volScalarField> K(const volScalarField& Ur) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,88 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "GidaspowSchillerNaumann.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(GidaspowSchillerNaumann, 0);
addToRunTimeSelectionTable
(
dragModel,
GidaspowSchillerNaumann,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModels::GidaspowSchillerNaumann::GidaspowSchillerNaumann
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
)
:
dragModel(interfaceDict, alpha1, phase1, phase2)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::GidaspowSchillerNaumann::~GidaspowSchillerNaumann()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowSchillerNaumann::K
(
const volScalarField& Ur
) const
{
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1e-6)));
volScalarField bp(pow(alpha2, -2.65));
volScalarField Re(max(alpha2*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
volScalarField Cds
(
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
+ pos(Re - 1000)*0.44
);
return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d();
}
// ************************************************************************* //

View File

@ -1,103 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::dragModels::GidaspowSchillerNaumann
Description
H, Enwald, E. Peirano, A-E Almstedt
'Eulerian Two-Phase Flow Theory Applied to Fluidization'
Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996)
Eq. 86-87, p. 40
This is identical to the Wen and Yu, Rowe model Table 3.6 p.56 in
the Ph.D. thesis of Berend van Wachem
'Derivation, Implementation and Validation
of
Computer Simulation Models
for Gas-Solid Fluidized Beds'
SourceFiles
GidaspowSchillerNaumann.C
\*---------------------------------------------------------------------------*/
#ifndef GidaspowSchillerNaumann_H
#define GidaspowSchillerNaumann_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class GidaspowSchillerNaumann Declaration
\*---------------------------------------------------------------------------*/
class GidaspowSchillerNaumann
:
public dragModel
{
public:
//- Runtime type information
TypeName("GidaspowSchillerNaumann");
// Constructors
//- Construct from components
GidaspowSchillerNaumann
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
);
//- Destructor
virtual ~GidaspowSchillerNaumann();
// Member Functions
tmp<volScalarField> K(const volScalarField& Ur) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,85 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "SchillerNaumann.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(SchillerNaumann, 0);
addToRunTimeSelectionTable
(
dragModel,
SchillerNaumann,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModels::SchillerNaumann::SchillerNaumann
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
)
:
dragModel(interfaceDict, alpha1, phase1, phase2)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::SchillerNaumann::~SchillerNaumann()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::SchillerNaumann::K
(
const volScalarField& Ur
) const
{
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
volScalarField Cds
(
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
+ pos(Re - 1000)*0.44
);
return 0.75*Cds*phase2_.rho()*Ur/phase1_.d();
}
// ************************************************************************* //

View File

@ -1,92 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::dragModels::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 volScalarField& alpha1,
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
// ************************************************************************* //

View File

@ -1,98 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "SyamlalOBrien.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(SyamlalOBrien, 0);
addToRunTimeSelectionTable
(
dragModel,
SyamlalOBrien,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModels::SyamlalOBrien::SyamlalOBrien
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
)
:
dragModel(interfaceDict, alpha1, phase1, phase2)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::SyamlalOBrien::~SyamlalOBrien()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::K
(
const volScalarField& Ur
) const
{
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
volScalarField A(pow(alpha2, 4.14));
volScalarField B
(
neg(alpha2 - 0.85)*(0.8*pow(alpha2, 1.28))
+ pos(alpha2 - 0.85)*(pow(alpha2, 2.65))
);
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
volScalarField Vr
(
0.5*
(
A - 0.06*Re + sqrt(sqr(0.06*Re) + 0.12*Re*(2.0*B - A) + sqr(A))
)
);
volScalarField Cds(sqr(0.63 + 4.8*sqrt(Vr/Re)));
return 0.75*Cds*phase2_.rho()*Ur/(phase1_.d()*sqr(Vr));
}
// ************************************************************************* //

View File

@ -1,95 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::dragModels::SyamlalOBrien
Description
Syamlal, M., Rogers, W. and O'Brien, T. J. (1993) MFIX documentation,
Theory Guide. Technical Note DOE/METC-94/1004. Morgantown, West Virginia,
USA.
SourceFiles
SyamlalOBrien.C
\*---------------------------------------------------------------------------*/
#ifndef SyamlalOBrien_H
#define SyamlalOBrien_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class SyamlalOBrien Declaration
\*---------------------------------------------------------------------------*/
class SyamlalOBrien
:
public dragModel
{
public:
//- Runtime type information
TypeName("SyamlalOBrien");
// Constructors
//- Construct from components
SyamlalOBrien
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
);
//- Destructor
virtual ~SyamlalOBrien();
// Member Functions
tmp<volScalarField> K(const volScalarField& Ur) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,88 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "WenYu.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(WenYu, 0);
addToRunTimeSelectionTable
(
dragModel,
WenYu,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModels::WenYu::WenYu
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
)
:
dragModel(interfaceDict, alpha1, phase1, phase2)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::WenYu::~WenYu()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::K
(
const volScalarField& Ur
) const
{
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
volScalarField bp(pow(alpha2, -2.65));
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
volScalarField Cds
(
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
+ pos(Re - 1000)*0.44
);
return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d();
}
// ************************************************************************* //

View File

@ -1,106 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::dragModels::WenYu
Description
H, Enwald, E. Peirano, A-E Almstedt
'Eulerian Two-Phase Flow Theory Applied to Fluidization'
Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996)
Eq. 86-87, p. 40
This is identical to the Wen and Yu, Rowe model Table 3.6 p.56 in
the Ph.D. thesis of Berend van Wachem
'Derivation, Implementation and Validation
of
Computer Simulation Models
for Gas-Solid Fluidized Beds'
NB: The difference between the Gidaspow-version is the void-fraction
in the Re-number
SourceFiles
WenYu.C
\*---------------------------------------------------------------------------*/
#ifndef WenYu_H
#define WenYu_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class WenYu Declaration
\*---------------------------------------------------------------------------*/
class WenYu
:
public dragModel
{
public:
//- Runtime type information
TypeName("WenYu");
// Constructors
//- Construct from components
WenYu
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
);
//- Destructor
virtual ~WenYu();
// Member Functions
tmp<volScalarField> K(const volScalarField& Ur) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,60 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "dragModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(dragModel, 0);
defineRunTimeSelectionTable(dragModel, dictionary);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModel::dragModel
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
)
:
interfaceDict_(interfaceDict),
alpha1_(alpha1),
phase1_(phase1),
phase2_(phase2)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModel::~dragModel()
{}
// ************************************************************************* //

View File

@ -1,135 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::dragModel
Description
SourceFiles
dragModel.C
newDragModel.C
\*---------------------------------------------------------------------------*/
#ifndef dragModel_H
#define dragModel_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "dictionary.H"
#include "phaseModel.H"
#include "runTimeSelectionTables.H"
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class dragModel Declaration
\*---------------------------------------------------------------------------*/
class dragModel
{
protected:
// Protected data
const dictionary& interfaceDict_;
const volScalarField& alpha1_;
const phaseModel& phase1_;
const phaseModel& phase2_;
public:
//- Runtime type information
TypeName("dragModel");
// Declare runtime construction
declareRunTimeSelectionTable
(
autoPtr,
dragModel,
dictionary,
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
),
(interfaceDict, alpha1, phase1, phase2)
);
// Constructors
dragModel
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
);
//- Destructor
virtual ~dragModel();
// Selectors
static autoPtr<dragModel> New
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
);
// Member Functions
//- the dragfunction K used in the momentum eq.
// ddt(alpha1*rho1*U1) + ... = ... alpha1*alpha2*K*(U1-U2)
// ddt(alpha2*rho2*U2) + ... = ... alpha1*alpha2*K*(U2-U1)
// ********************************** NB! *****************************
// for numerical reasons alpha1 and alpha2 has been
// extracted from the dragFunction K,
// so you MUST divide K by alpha1*alpha2 when implemnting the drag
// function
// ********************************** NB! *****************************
virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,65 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
)
{
word dragModelType
(
interfaceDict.lookup(phase1.name())
);
Info << "Selecting dragModel for phase "
<< phase1.name()
<< ": "
<< dragModelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(dragModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn("dragModel::New")
<< "Unknown dragModelType type "
<< dragModelType << endl << endl
<< "Valid dragModel types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return cstrIter()(interfaceDict, alpha1, phase1, phase2);
}
// ************************************************************************* //

View File

@ -1,227 +0,0 @@
{
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
surfaceScalarField alpha2f(scalar(1) - alpha1f);
rAU1 = 1.0/U1Eqn.A();
rAU2 = 1.0/U2Eqn.A();
surfaceScalarField rAlphaAU1f(fvc::interpolate(alpha1*rAU1));
surfaceScalarField rAlphaAU2f(fvc::interpolate(alpha2*rAU2));
volVectorField HbyA1
(
IOobject::groupName("HbyA", phase1.name()),
U1
);
HbyA1 = rAU1*U1Eqn.H();
volVectorField HbyA2
(
IOobject::groupName("HbyA", phase2.name()),
U2
);
HbyA2 = rAU2*U2Eqn.H();
mrfZones.absoluteFlux(phi1.oldTime());
mrfZones.absoluteFlux(phi1);
mrfZones.absoluteFlux(phi2.oldTime());
mrfZones.absoluteFlux(phi2);
// Phase-1 pressure flux (e.g. due to particle-particle pressure)
surfaceScalarField phiP1
(
"phiP1",
fvc::interpolate((1.0/rho1)*rAU1*turbulence1().pPrime())
*fvc::snGrad(alpha1)*mesh.magSf()
);
// Phase-2 pressure flux (e.g. due to particle-particle pressure)
surfaceScalarField phiP2
(
"phiP2",
fvc::interpolate((1.0/rho2)*rAU2*turbulence2().pPrime())
*fvc::snGrad(alpha2)*mesh.magSf()
);
surfaceScalarField phiHbyA1
(
IOobject::groupName("phiHbyA", phase1.name()),
(fvc::interpolate(HbyA1) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU1, alpha1, U1, phi1)
);
surfaceScalarField phiHbyA2
(
IOobject::groupName("phiHbyA", phase2.name()),
(fvc::interpolate(HbyA2) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU2, alpha2, U2, phi2)
);
phi = alpha1f*phiHbyA1 + alpha2f*phiHbyA2;
mrfZones.relativeFlux(phi);
phiHbyA1 +=
(
fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2
- phiP1
+ rAlphaAU1f*(g & mesh.Sf())
);
mrfZones.relativeFlux(phiHbyA1);
phiHbyA2 +=
(
fvc::interpolate((1.0/rho2)*rAU2*dragCoeff)*phi1
- phiP2
+ rAlphaAU2f*(g & mesh.Sf())
);
mrfZones.relativeFlux(phiHbyA2);
mrfZones.relativeFlux(phi1.oldTime());
mrfZones.relativeFlux(phi1);
mrfZones.relativeFlux(phi2.oldTime());
mrfZones.relativeFlux(phi2);
surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2);
HbyA1 += (1.0/rho1)*rAU1*dragCoeff*U2;
HbyA2 += (1.0/rho2)*rAU2*dragCoeff*U1;
surfaceScalarField Dp
(
"Dp",
mag
(
alpha1f*rAlphaAU1f/fvc::interpolate(rho1)
+ alpha2f*rAlphaAU2f/fvc::interpolate(rho2)
)
);
tmp<fvScalarMatrix> pEqnComp1;
tmp<fvScalarMatrix> pEqnComp2;
if (pimple.transonic())
{
surfaceScalarField phid1
(
IOobject::groupName("phid", phase1.name()),
fvc::interpolate(psi1)*phi1
);
surfaceScalarField phid2
(
IOobject::groupName("phid", phase2.name()),
fvc::interpolate(psi2)*phi2
);
pEqnComp1 =
fvc::ddt(rho1)
+ fvc::div(phi1, rho1) - fvc::Sp(fvc::div(phi1), rho1)
+ correction
(
psi1*fvm::ddt(p)
+ fvm::div(phid1, p) - fvm::Sp(fvc::div(phid1), p)
);
deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr());
pEqnComp1().relax();
pEqnComp2 =
fvc::ddt(rho2)
+ fvc::div(phi2, rho2) - fvc::Sp(fvc::div(phi2), rho2)
+ correction
(
psi2*fvm::ddt(p)
+ fvm::div(phid2, p) - fvm::Sp(fvc::div(phid2), p)
);
deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr());
pEqnComp2().relax();
}
else
{
pEqnComp1 =
fvc::ddt(rho1) + psi1*correction(fvm::ddt(p))
+ fvc::div(phi1, rho1) - fvc::Sp(fvc::div(phi1), rho1);
pEqnComp2 =
fvc::ddt(rho2) + psi2*correction(fvm::ddt(p))
+ fvc::div(phi2, rho2) - fvc::Sp(fvc::div(phi2), rho2);
}
// Cache p prior to solve for density update
volScalarField p_0(p);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqnIncomp
(
fvc::div(phiHbyA)
- fvm::laplacian(Dp, p)
);
solve
(
(
(alpha1/rho1)*pEqnComp1()
+ (alpha2/rho2)*pEqnComp2()
)
+ pEqnIncomp,
mesh.solver(p.select(pimple.finalInnerIter()))
);
if (pimple.finalNonOrthogonalIter())
{
surfaceScalarField mSfGradp(pEqnIncomp.flux()/Dp);
phi1 = phiHbyA1 + rAlphaAU1f*mSfGradp/fvc::interpolate(rho1);
phi2 = phiHbyA2 + rAlphaAU2f*mSfGradp/fvc::interpolate(rho2);
phi = alpha1f*phi1 + alpha2f*phi2;
dgdt =
(
pos(alpha2)*(pEqnComp2 & p)/rho2
- pos(alpha1)*(pEqnComp1 & p)/rho1
);
p.relax();
mSfGradp = pEqnIncomp.flux()/Dp;
U1 = HbyA1
+ fvc::reconstruct
(
rAlphaAU1f
*(
(g & mesh.Sf())
+ mSfGradp/fvc::interpolate(rho1)
)
- phiP1
);
U1.correctBoundaryConditions();
U2 = HbyA2
+ fvc::reconstruct
(
rAlphaAU2f
*(
(g & mesh.Sf())
+ mSfGradp/fvc::interpolate(rho2)
)
- phiP2
);
U2.correctBoundaryConditions();
U = fluid.U();
}
}
p = max(p, pMin);
// Update densities from change in p
rho1 += psi1*(p - p_0);
rho2 += psi2*(p - p_0);
K1 = 0.5*magSqr(U1);
K2 = 0.5*magSqr(U2);
if (thermo1.dpdt() || thermo2.dpdt())
{
dpdt = fvc::ddt(p);
}
}

View File

@ -1,31 +0,0 @@
IOdictionary ppProperties
(
IOobject
(
"ppProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
scalar preAlphaExp
(
readScalar(ppProperties.lookup("preAlphaExp"))
);
scalar alphaMax
(
readScalar(ppProperties.lookup("alphaMax"))
);
scalar expMax
(
readScalar(ppProperties.lookup("expMax"))
);
dimensionedScalar g0
(
ppProperties.lookup("g0")
);

View File

@ -1,7 +0,0 @@
#include "readTimeControls.H"
#include "alphaControls.H"
Switch implicitPhasePressure
(
alphaControls.lookupOrDefault<Switch>("implicitPhasePressure", false)
);

View File

@ -1,17 +0,0 @@
if (runTime.outputTime())
{
volVectorField Ur
(
IOobject
(
"Ur",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
U1 - U2
);
runTime.write();
}

View File

@ -2,9 +2,9 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wclean libso phaseModel
wclean libso twoPhaseSystem
wclean libso interfacialModels
wclean libso kineticTheoryModels
wclean libso phaseIncompressibleTurbulenceModels
wclean
# ----------------------------------------------------------------- end-of-file

View File

@ -2,9 +2,10 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso phaseModel
wmakeLnInclude interfacialModels
wmake libso twoPhaseSystem
wmake libso interfacialModels
wmake libso kineticTheoryModels
wmake libso phaseIncompressibleTurbulenceModels
wmake
# ----------------------------------------------------------------- end-of-file

View File

@ -1,16 +1,23 @@
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-IturbulenceModel \
-IkineticTheoryModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
-IphaseIncompressibleTurbulenceModels/lnInclude \
-IinterfacialModels/lnInclude \
-IphaseModel/lnInclude \
-ItwoPhaseSystem/lnInclude \
-Iaveraging
EXE_LIBS = \
-lEulerianInterfacialModels \
-lfiniteVolume \
-lmeshTools \
-lfluidThermophysicalModels \
-lspecie \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lphaseIncompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lphaseModel \
-lkineticTheoryModel
-lcompressibleTwoPhaseSystem \
-lcompressibleEulerianInterfacialModels \
-lfiniteVolume \
-lmeshTools

View File

@ -1,99 +1,61 @@
mrfZones.correctBoundaryVelocity(U1);
mrfZones.correctBoundaryVelocity(U2);
mrfZones.correctBoundaryVelocity(U);
fvVectorMatrix U1Eqn(U1, U1.dimensions()*dimVol/dimTime);
fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
{
{
volTensorField gradU1T(T(fvc::grad(U1)));
volScalarField dragCoeff(fluid.dragCoeff());
if (kineticTheory.on())
{
kineticTheory.solve(gradU1T);
nuEff1 = kineticTheory.mu1()/rho1;
}
else // If not using kinetic theory is using Ct model
volVectorField liftForce(fluid.liftForce(U));
{
nuEff1 = sqr(Ct)*nut2 + nu1;
}
volTensorField Rc1
(
"Rc1",
(((2.0/3.0)*I)*nuEff1)*tr(gradU1T) - nuEff1*gradU1T
);
if (kineticTheory.on())
{
Rc1 -= ((kineticTheory.lambda()/rho1)*tr(gradU1T))*tensor(I);
}
surfaceScalarField phiR1
(
-fvc::interpolate(nuEff1)*mesh.magSf()*fvc::snGrad(alpha1)
/fvc::interpolate(alpha1 + scalar(0.001))
);
U1Eqn =
(
(scalar(1) + Cvm*rho2*alpha2/rho1)*
fvm::ddt(alpha1, U1)
+ fvm::div(alphaPhi1, U1)
// Compressibity correction
- fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), U1)
+ fluid.Cvm()*rho2*alpha1*alpha2/rho1*
(
fvm::ddt(U1)
+ fvm::div(phi1, U1, "div(phi1,U1)")
+ fvm::div(phi1, U1)
- fvm::Sp(fvc::div(phi1), U1)
)
- fvm::laplacian(nuEff1, U1)
+ fvc::div(Rc1)
+ fvm::div(phiR1, U1, "div(phi1,U1)")
- fvm::Sp(fvc::div(phiR1), U1)
+ (fvc::grad(alpha1)/(fvc::average(alpha1) + scalar(0.001)) & Rc1)
+ turbulence1->divDevReff(U1)
==
// g // Buoyancy term transfered to p-equation
- fvm::Sp(alpha2/rho1*K, U1)
//+ alpha2/rho1*K*U2 // Explicit drag transfered to p-equation
- alpha2/rho1*(liftCoeff - Cvm*rho2*DDtU2)
- fvm::Sp(dragCoeff/rho1, U1)
- alpha1*alpha2/rho1*(liftForce - fluid.Cvm()*rho2*DDtU2)
);
mrfZones.addCoriolis(scalar(1) + Cvm*rho2*alpha2/rho1, U1Eqn);
mrfZones.addCoriolis(alpha1*(1 + fluid.Cvm()*rho2*alpha2/rho1), U1Eqn);
U1Eqn.relax();
}
{
volTensorField gradU2T(T(fvc::grad(U2)));
volTensorField Rc2
(
"Rc2",
(((2.0/3.0)*I)*nuEff2)*tr(gradU2T) - nuEff2*gradU2T
);
surfaceScalarField phiR2
(
-fvc::interpolate(nuEff2)*mesh.magSf()*fvc::snGrad(alpha2)
/fvc::interpolate(alpha2 + scalar(0.001))
);
U2Eqn =
(
(scalar(1) + Cvm*rho2*alpha1/rho2)*
fvm::ddt(alpha2, U2)
+ fvm::div(alphaPhi2, U2)
// Compressibity correction
- fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), U2)
+ fluid.Cvm()*rho2*alpha1*alpha2/rho2*
(
fvm::ddt(U2)
+ fvm::div(phi2, U2, "div(phi2,U2)")
+ fvm::div(phi2, U2)
- fvm::Sp(fvc::div(phi2), U2)
)
- fvm::laplacian(nuEff2, U2)
+ fvc::div(Rc2)
+ fvm::div(phiR2, U2, "div(phi2,U2)")
- fvm::Sp(fvc::div(phiR2), U2)
+ (fvc::grad(alpha2)/(fvc::average(alpha2) + scalar(0.001)) & Rc2)
+ turbulence2->divDevReff(U2)
==
// g // Buoyancy term transfered to p-equation
- fvm::Sp(alpha1/rho2*K, U2)
//+ alpha1/rho2*K*U1 // Explicit drag transfered to p-equation
+ alpha1/rho2*(liftCoeff + Cvm*rho2*DDtU1)
- fvm::Sp(dragCoeff/rho2, U2)
+ alpha1*alpha2/rho2*(liftForce + fluid.Cvm()*rho2*DDtU1)
);
mrfZones.addCoriolis(scalar(1) + Cvm*rho2*alpha1/rho2, U2Eqn);
mrfZones.addCoriolis(alpha2*(1 + fluid.Cvm()*rho2*alpha1/rho2), U2Eqn);
U2Eqn.relax();
}
}

View File

@ -1,20 +1,75 @@
{
word alphaScheme("div(phi,alpha1)");
word alpharScheme("div(phir,alpha1)");
word alphaScheme("div(phi," + alpha1.name() + ')');
word alpharScheme("div(phir," + alpha1.name() + ')');
surfaceScalarField phic("phic", phi);
surfaceScalarField phir("phir", phi1 - phi2);
if (g0.value() > 0.0)
surfaceScalarField alpha1f(fvc::interpolate(max(alpha1, scalar(0))));
tmp<surfaceScalarField> pPrimeByA;
if (implicitPhasePressure)
{
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
surfaceScalarField phipp(ppMagf*fvc::snGrad(alpha1)*mesh.magSf());
phir += phipp;
phic += alpha1f*phipp;
pPrimeByA =
fvc::interpolate((1.0/rho1)*rAU1*turbulence1().pPrime())
+ fvc::interpolate((1.0/rho2)*rAU2*turbulence2().pPrime());
surfaceScalarField phiP
(
pPrimeByA()*fvc::snGrad(alpha1, "bounded")*mesh.magSf()
);
phic += alpha1f*phiP;
phir += phiP;
}
for (int acorr=0; acorr<nAlphaCorr; acorr++)
{
volScalarField::DimensionedInternalField Sp
(
IOobject
(
"Sp",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar("Sp", dgdt.dimensions(), 0.0)
);
volScalarField::DimensionedInternalField Su
(
IOobject
(
"Su",
runTime.timeName(),
mesh
),
// Divergence term is handled explicitly to be
// consistent with the explicit transport solution
fvc::div(phi)*min(alpha1, scalar(1))
);
forAll(dgdt, celli)
{
if (dgdt[celli] > 0.0 && alpha1[celli] > 0.0)
{
Sp[celli] -= dgdt[celli]*alpha1[celli];
Su[celli] += dgdt[celli]*alpha1[celli];
}
else if (dgdt[celli] < 0.0 && alpha1[celli] < 1.0)
{
Sp[celli] += dgdt[celli]*(1.0 - alpha1[celli]);
}
}
dimensionedScalar totalDeltaT = runTime.deltaT();
if (nAlphaSubCycles > 1)
{
alphaPhi1 = dimensionedScalar("0", alphaPhi1.dimensions(), 0);
}
for
(
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
@ -31,7 +86,7 @@
)
+ fvc::flux
(
-fvc::flux(-phir, alpha2, alpharScheme),
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
alpha1,
alpharScheme
)
@ -39,39 +94,41 @@
MULES::explicitSolve
(
geometricOneField(),
alpha1,
phi,
alphaPhic1,
(g0.value() > 0 ? alphaMax : 1),
Sp,
Su,
1,
0
);
if (nAlphaSubCycles > 1)
{
alphaPhi1 += (runTime.deltaT()/totalDeltaT)*alphaPhic1;
}
else
{
alphaPhi1 = alphaPhic1;
}
}
if (g0.value() > 0)
if (implicitPhasePressure)
{
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
ppMagf =
rAU1f/(alpha1f + scalar(0.0001))
*(g0/rho1)*min(exp(preAlphaExp*(alpha1f - alphaMax)), expMax);
fvScalarMatrix alpha1Eqn
(
fvm::ddt(alpha1) - fvc::ddt(alpha1)
- fvm::laplacian
(
alpha1f*ppMagf,
alpha1,
"laplacian(alpha1PpMag,alpha1)"
)
- fvm::laplacian(alpha1f*pPrimeByA, alpha1, "bounded")
);
alpha1Eqn.relax();
alpha1Eqn.solve();
#include "packingLimiter.H"
alphaPhi1 += alpha1Eqn.flux();
}
alphaPhi2 = phi - alphaPhi1;
alpha2 = scalar(1) - alpha1;
Info<< "Dispersed phase volume fraction = "
@ -82,4 +139,4 @@
}
}
rho = alpha1*rho1 + alpha2*rho2;
rho = fluid.rho();

View File

@ -1,82 +1,46 @@
Info<< "Reading transportProperties\n" << endl;
Info<< "Creating twoPhaseSystem\n" << endl;
IOdictionary transportProperties
twoPhaseSystem fluid(mesh);
phaseModel& phase1 = fluid.phase1();
phaseModel& phase2 = fluid.phase2();
volScalarField& alpha1 = phase1;
volScalarField& alpha2 = phase2;
volVectorField& U1 = phase1.U();
surfaceScalarField& phi1 = phase1.phi();
surfaceScalarField alphaPhi1
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
IOobject::groupName("alphaPhi", phase1.name()),
fvc::interpolate(alpha1)*phi1
);
autoPtr<phaseModel> phase1 = phaseModel::New
volVectorField& U2 = phase2.U();
surfaceScalarField& phi2 = phase2.phi();
surfaceScalarField alphaPhi2
(
mesh,
transportProperties,
"1"
IOobject::groupName("alphaPhi", phase2.name()),
fvc::interpolate(alpha2)*phi2
);
autoPtr<phaseModel> phase2 = phaseModel::New
dimensionedScalar pMin
(
mesh,
transportProperties,
"2"
"pMin",
dimPressure,
fluid.lookup("pMin")
);
volVectorField& U1 = phase1->U();
surfaceScalarField& phi1 = phase1->phi();
const dimensionedScalar& rho1 = phase1->rho();
const dimensionedScalar& nu1 = phase1->nu();
rhoThermo& thermo1 = phase1.thermo();
rhoThermo& thermo2 = phase2.thermo();
volVectorField& U2 = phase2->U();
surfaceScalarField& phi2 = phase2->phi();
const dimensionedScalar& rho2 = phase2->rho();
const dimensionedScalar& nu2 = phase2->nu();
volScalarField& p = thermo1.p();
Info<< "Reading field alpha1\n" << endl;
volScalarField alpha1
(
IOobject
(
"alpha1",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volScalarField& rho1 = thermo1.rho();
const volScalarField& psi1 = thermo1.psi();
volScalarField alpha2
(
IOobject
(
"alpha2",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
scalar(1) - alpha1
//,alpha1.boundaryField().types()
);
Info<< "Reading field p\n" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volScalarField& rho2 = thermo2.rho();
const volScalarField& psi2 = thermo2.psi();
volVectorField U
(
@ -88,28 +52,7 @@
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
alpha1*U1 + alpha2*U2
);
dimensionedScalar Cvm
(
"Cvm",
dimless,
transportProperties.lookup("Cvm")
);
dimensionedScalar Cl
(
"Cl",
dimless,
transportProperties.lookup("Cl")
);
dimensionedScalar Ct
(
"Ct",
dimless,
transportProperties.lookup("Ct")
fluid.U()
);
surfaceScalarField phi
@ -122,7 +65,7 @@
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fvc::interpolate(alpha1)*phi1 + fvc::interpolate(alpha2)*phi2
fluid.phi()
);
volScalarField rho
@ -131,13 +74,13 @@
(
"rho",
runTime.timeName(),
mesh
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
alpha1*rho1 + alpha2*rho2
fluid.rho()
);
#include "createRASTurbulence.H"
Info<< "Calculating field DDtU1 and DDtU2\n" << endl;
volVectorField DDtU1
@ -158,75 +101,11 @@
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
IOdictionary interfacialProperties
volScalarField rAU1
(
IOobject
(
"interfacialProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
autoPtr<dragModel> drag1 = dragModel::New
(
interfacialProperties,
alpha1,
phase1,
phase2
);
autoPtr<dragModel> drag2 = dragModel::New
(
interfacialProperties,
alpha2,
phase2,
phase1
);
word dragPhase("blended");
if (interfacialProperties.found("dragPhase"))
{
dragPhase = word(interfacialProperties.lookup("dragPhase"));
bool validDrag =
dragPhase == "1" || dragPhase == "2" || dragPhase == "blended";
if (!validDrag)
{
FatalErrorIn(args.executable())
<< "invalid dragPhase " << dragPhase
<< exit(FatalError);
}
}
dimensionedScalar residualSlip
(
dimensionedScalar::lookupOrDefault
(
"residualSlip",
interfacialProperties,
0,
dimVelocity
)
);
Info << "dragPhase is " << dragPhase << endl;
kineticTheoryModel kineticTheory
(
phase1,
U2,
alpha1,
drag1
);
surfaceScalarField rAU1f
(
IOobject
(
"rAU1f",
IOobject::groupName("rAU", phase1.name()),
runTime.timeName(),
mesh,
IOobject::NO_READ,
@ -236,21 +115,71 @@
dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0)
);
surfaceScalarField ppMagf
volScalarField rAU2
(
IOobject
(
"ppMagf",
IOobject::groupName("rAU", phase2.name()),
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(0, 2, -1, 0, 0), 0.0)
dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0)
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
volScalarField dgdt
(
pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001))
);
Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt
(
IOobject
(
"dpdt",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
);
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K1(IOobject::groupName("K", phase1.name()), 0.5*magSqr(U1));
volScalarField K2(IOobject::groupName("K", phase2.name()), 0.5*magSqr(U2));
autoPtr<PhaseIncompressibleTurbulenceModel<phaseModel> >
turbulence1
(
PhaseIncompressibleTurbulenceModel<phaseModel>::New
(
alpha1,
U1,
alphaPhi1,
phi1,
phase1
)
);
autoPtr<PhaseIncompressibleTurbulenceModel<phaseModel> >
turbulence2
(
PhaseIncompressibleTurbulenceModel<phaseModel>::New
(
alpha2,
U2,
alphaPhi2,
phi2,
phase2
)
);

View File

@ -1,178 +0,0 @@
IOdictionary RASProperties
(
IOobject
(
"RASProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
Switch turbulence
(
RASProperties.lookup("turbulence")
);
dictionary kEpsilonDict
(
RASProperties.subDictPtr("kEpsilonCoeffs")
);
dimensionedScalar Cmu
(
dimensionedScalar::lookupOrAddToDict
(
"Cmu",
kEpsilonDict,
0.09
)
);
dimensionedScalar C1
(
dimensionedScalar::lookupOrAddToDict
(
"C1",
kEpsilonDict,
1.44
)
);
dimensionedScalar C2
(
dimensionedScalar::lookupOrAddToDict
(
"C2",
kEpsilonDict,
1.92
)
);
dimensionedScalar alpha1k
(
dimensionedScalar::lookupOrAddToDict
(
"alpha1k",
kEpsilonDict,
1.0
)
);
dimensionedScalar alpha1Eps
(
dimensionedScalar::lookupOrAddToDict
(
"alpha1Eps",
kEpsilonDict,
0.76923
)
);
dictionary wallFunctionDict
(
RASProperties.subDictPtr("wallFunctionCoeffs")
);
dimensionedScalar kappa
(
dimensionedScalar::lookupOrAddToDict
(
"kappa",
wallFunctionDict,
0.41
)
);
dimensionedScalar E
(
dimensionedScalar::lookupOrAddToDict
(
"E",
wallFunctionDict,
9.8
)
);
if (RASProperties.lookupOrDefault("printCoeffs", false))
{
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
<< "wallFunctionCoeffs" << wallFunctionDict << endl;
}
nearWallDist y(mesh);
Info<< "Reading field k\n" << endl;
volScalarField k
(
IOobject
(
"k",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field epsilon\n" << endl;
volScalarField epsilon
(
IOobject
(
"epsilon",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Calculating field nut2\n" << endl;
volScalarField nut2
(
IOobject
(
"nut2",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
Cmu*sqr(k)/epsilon
);
Info<< "Calculating field nuEff1\n" << endl;
volScalarField nuEff1
(
IOobject
(
"nuEff1",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
sqr(Ct)*nut2 + nu1
);
Info<< "Calculating field nuEff2\n" << endl;
volScalarField nuEff2
(
IOobject
(
"nuEff2",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
nut2 + nu2
);

View File

@ -8,4 +8,8 @@ dragModels/Gibilaro/Gibilaro.C
dragModels/WenYu/WenYu.C
dragModels/SyamlalOBrien/SyamlalOBrien.C
LIB = $(FOAM_LIBBIN)/libEulerianInterfacialModels
heatTransferModels/heatTransferModel/heatTransferModel.C
heatTransferModels/heatTransferModel/newHeatTransferModel.C
heatTransferModels/RanzMarshall/RanzMarshall.C
LIB = $(FOAM_LIBBIN)/libcompressibleEulerianInterfacialModels

View File

@ -1,6 +1,10 @@
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/transportModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I../phaseModel/lnInclude
-I../twoPhaseSystem/lnInclude
LIB_LIBS = \
-lphaseModel
-lcompressibleTwoPhaseSystem \
-lfluidThermophysicalModels \
-lspecie

View File

@ -29,6 +29,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(Ergun, 0);
@ -39,11 +41,12 @@ namespace Foam
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::Ergun::Ergun
Foam::dragModels::Ergun::Ergun
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
@ -57,13 +60,13 @@ Foam::Ergun::Ergun
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::Ergun::~Ergun()
Foam::dragModels::Ergun::~Ergun()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::Ergun::K
Foam::tmp<Foam::volScalarField> Foam::dragModels::Ergun::K
(
const volScalarField& Ur
) const

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::Ergun
Foam::dragModels::Ergun
Description
H, Enwald, E. Peirano, A-E Almstedt
@ -44,6 +44,8 @@ SourceFiles
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class Ergun Declaration
@ -84,6 +86,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -29,6 +29,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(Gibilaro, 0);
@ -39,11 +41,12 @@ namespace Foam
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::Gibilaro::Gibilaro
Foam::dragModels::Gibilaro::Gibilaro
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
@ -57,13 +60,13 @@ Foam::Gibilaro::Gibilaro
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::Gibilaro::~Gibilaro()
Foam::dragModels::Gibilaro::~Gibilaro()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::Gibilaro::K
Foam::tmp<Foam::volScalarField> Foam::dragModels::Gibilaro::K
(
const volScalarField& Ur
) const

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::Gibilaro
Foam::dragModels::Gibilaro
Description
H, Enwald, E. Peirano, A-E Almstedt
@ -44,6 +44,8 @@ SourceFiles
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class Gibilaro Declaration
@ -84,6 +86,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -29,6 +29,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(GidaspowErgunWenYu, 0);
@ -39,11 +41,12 @@ namespace Foam
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::GidaspowErgunWenYu::GidaspowErgunWenYu
Foam::dragModels::GidaspowErgunWenYu::GidaspowErgunWenYu
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
@ -57,21 +60,21 @@ Foam::GidaspowErgunWenYu::GidaspowErgunWenYu
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::GidaspowErgunWenYu::~GidaspowErgunWenYu()
Foam::dragModels::GidaspowErgunWenYu::~GidaspowErgunWenYu()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::GidaspowErgunWenYu::K
Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowErgunWenYu::K
(
const volScalarField& Ur
) const
{
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
volScalarField d(phase1_.d());
volScalarField bp(pow(alpha2, -2.65));
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
volScalarField Re(max(Ur*d/phase2_.nu(), scalar(1.0e-3)));
volScalarField Cds
(
@ -83,11 +86,11 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowErgunWenYu::K
return
(
pos(alpha2 - 0.8)
*(0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d())
*(0.75*Cds*phase2_.rho()*Ur*bp/d)
+ neg(alpha2 - 0.8)
*(
150.0*alpha1_*phase2_.nu()*phase2_.rho()/(sqr(alpha2*phase1_.d()))
+ 1.75*phase2_.rho()*Ur/(alpha2*phase1_.d())
150.0*alpha1_*phase2_.nu()*phase2_.rho()/(sqr(alpha2*d))
+ 1.75*phase2_.rho()*Ur/(alpha2*d)
)
);
}

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::GidaspowErgunWenYu
Foam::dragModels::GidaspowErgunWenYu
Description
D. Gidaspow, Multiphase flow and fluidization,
@ -42,6 +42,8 @@ SourceFiles
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class GidaspowErgunWenYu Declaration
@ -82,6 +84,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -29,6 +29,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(GidaspowSchillerNaumann, 0);
@ -39,11 +41,12 @@ namespace Foam
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::GidaspowSchillerNaumann::GidaspowSchillerNaumann
Foam::dragModels::GidaspowSchillerNaumann::GidaspowSchillerNaumann
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
@ -57,13 +60,13 @@ Foam::GidaspowSchillerNaumann::GidaspowSchillerNaumann
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::GidaspowSchillerNaumann::~GidaspowSchillerNaumann()
Foam::dragModels::GidaspowSchillerNaumann::~GidaspowSchillerNaumann()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::GidaspowSchillerNaumann::K
Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowSchillerNaumann::K
(
const volScalarField& Ur
) const
@ -72,7 +75,6 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowSchillerNaumann::K
volScalarField bp(pow(alpha2, -2.65));
volScalarField Re(max(alpha2*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
volScalarField Cds
(
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::GidaspowSchillerNaumann
Foam::dragModels::GidaspowSchillerNaumann
Description
H, Enwald, E. Peirano, A-E Almstedt
@ -51,6 +51,8 @@ SourceFiles
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class GidaspowSchillerNaumann Declaration
@ -91,6 +93,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -29,6 +29,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(SchillerNaumann, 0);
@ -39,11 +41,12 @@ namespace Foam
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::SchillerNaumann::SchillerNaumann
Foam::dragModels::SchillerNaumann::SchillerNaumann
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
@ -57,19 +60,18 @@ Foam::SchillerNaumann::SchillerNaumann
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::SchillerNaumann::~SchillerNaumann()
Foam::dragModels::SchillerNaumann::~SchillerNaumann()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::SchillerNaumann::K
Foam::tmp<Foam::volScalarField> Foam::dragModels::SchillerNaumann::K
(
const volScalarField& Ur
) const
{
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
volScalarField Cds
(
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::SchillerNaumann
Foam::dragModels::SchillerNaumann
Description
@ -40,6 +40,8 @@ SourceFiles
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class SchillerNaumann Declaration
@ -80,6 +82,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -29,6 +29,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(SyamlalOBrien, 0);
@ -39,11 +41,12 @@ namespace Foam
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::SyamlalOBrien::SyamlalOBrien
Foam::dragModels::SyamlalOBrien::SyamlalOBrien
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
@ -57,13 +60,13 @@ Foam::SyamlalOBrien::SyamlalOBrien
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::SyamlalOBrien::~SyamlalOBrien()
Foam::dragModels::SyamlalOBrien::~SyamlalOBrien()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::SyamlalOBrien::K
Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::K
(
const volScalarField& Ur
) const

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::SyamlalOBrien
Foam::dragModels::SyamlalOBrien
Description
Syamlal, M., Rogers, W. and O'Brien, T. J. (1993) MFIX documentation,
@ -43,6 +43,8 @@ SourceFiles
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class SyamlalOBrien Declaration
@ -83,6 +85,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -29,6 +29,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(WenYu, 0);
@ -39,11 +41,12 @@ namespace Foam
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::WenYu::WenYu
Foam::dragModels::WenYu::WenYu
(
const dictionary& interfaceDict,
const volScalarField& alpha1,
@ -57,18 +60,19 @@ Foam::WenYu::WenYu
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::WenYu::~WenYu()
Foam::dragModels::WenYu::~WenYu()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::WenYu::K
Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::K
(
const volScalarField& Ur
) const
{
volScalarField alpha2(max(scalar(1) - alpha1_, scalar(1.0e-6)));
volScalarField bp(pow(alpha2, -2.65));
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
volScalarField Cds
@ -77,7 +81,7 @@ Foam::tmp<Foam::volScalarField> Foam::WenYu::K
+ pos(Re - 1000)*0.44
);
return 0.75*Cds*phase2_.rho()*Ur*pow(alpha2, -2.65)/phase1_.d();
return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d();
}

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::WenYu
Foam::dragModels::WenYu
Description
H, Enwald, E. Peirano, A-E Almstedt
@ -54,6 +54,8 @@ SourceFiles
namespace Foam
{
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class WenYu Declaration
@ -94,6 +96,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -37,7 +37,7 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
{
word dragModelType
(
interfaceDict.lookup("dragModel" + phase1.name())
interfaceDict.lookup(phase1.name())
);
Info << "Selecting dragModel for phase "
@ -50,14 +50,12 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalError
<< "dragModel::New : " << endl
<< " unknown dragModelType type "
<< dragModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid dragModel types are : " << endl;
Info << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
FatalErrorIn("dragModel::New")
<< "Unknown dragModelType type "
<< dragModelType << endl << endl
<< "Valid dragModel types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return cstrIter()(interfaceDict, alpha1, phase1, phase2);

View File

@ -1,64 +0,0 @@
if (turbulence)
{
if (mesh.changing())
{
y.correct();
}
tmp<volTensorField> tgradU2 = fvc::grad(U2);
volScalarField G(2*nut2*(tgradU2() && dev(symm(tgradU2()))));
tgradU2.clear();
#include "wallFunctions.H"
// Dissipation equation
fvScalarMatrix epsEqn
(
fvm::ddt(epsilon)
+ fvm::div(phi2, epsilon)
- fvm::Sp(fvc::div(phi2), epsilon)
- fvm::laplacian
(
alpha1Eps*nuEff2, epsilon,
"laplacian(DepsilonEff,epsilon)"
)
==
C1*G*epsilon/k
- fvm::Sp(C2*epsilon/k, epsilon)
);
#include "wallDissipation.H"
epsEqn.relax();
epsEqn.solve();
epsilon.max(dimensionedScalar("zero", epsilon.dimensions(), 1.0e-15));
// Turbulent kinetic energy equation
fvScalarMatrix kEqn
(
fvm::ddt(k)
+ fvm::div(phi2, k)
- fvm::Sp(fvc::div(phi2), k)
- fvm::laplacian
(
alpha1k*nuEff2, k,
"laplacian(DkEff,k)"
)
==
G
- fvm::Sp(epsilon/k, k)
);
kEqn.relax();
kEqn.solve();
k.max(dimensionedScalar("zero", k.dimensions(), 1.0e-8));
//- Re-calculate turbulence viscosity
nut2 = Cmu*sqr(k)/epsilon;
#include "wallViscosity.H"
}
nuEff2 = nut2 + nu2;

View File

@ -1,32 +0,0 @@
kineticTheoryModel/kineticTheoryModel.C
viscosityModel/viscosityModel/viscosityModel.C
viscosityModel/viscosityModel/newViscosityModel.C
viscosityModel/Gidaspow/GidaspowViscosity.C
viscosityModel/Syamlal/SyamlalViscosity.C
viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C
viscosityModel/none/noneViscosity.C
conductivityModel/conductivityModel/conductivityModel.C
conductivityModel/conductivityModel/newConductivityModel.C
conductivityModel/Gidaspow/GidaspowConductivity.C
conductivityModel/Syamlal/SyamlalConductivity.C
conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C
radialModel/radialModel/radialModel.C
radialModel/radialModel/newRadialModel.C
radialModel/CarnahanStarling/CarnahanStarlingRadial.C
radialModel/LunSavage/LunSavageRadial.C
radialModel/SinclairJackson/SinclairJacksonRadial.C
granularPressureModel/granularPressureModel/granularPressureModel.C
granularPressureModel/granularPressureModel/newGranularPressureModel.C
granularPressureModel/Lun/LunPressure.C
granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C
frictionalStressModel/frictionalStressModel/frictionalStressModel.C
frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C
frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C
frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C
LIB = $(FOAM_LIBBIN)/libkineticTheoryModel

View File

@ -1,5 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/foam/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I../phaseModel/lnInclude \
-I../interfacialModels/lnInclude

View File

@ -1,83 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "GidaspowConductivity.H"
#include "mathematicalConstants.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(GidaspowConductivity, 0);
addToRunTimeSelectionTable
(
conductivityModel,
GidaspowConductivity,
dictionary
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::GidaspowConductivity::GidaspowConductivity(const dictionary& dict)
:
conductivityModel(dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::GidaspowConductivity::~GidaspowConductivity()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::GidaspowConductivity::kappa
(
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
const dimensionedScalar& rho1,
const dimensionedScalar& da,
const dimensionedScalar& e
) const
{
const scalar sqrtPi = sqrt(constant::mathematical::pi);
return rho1*da*sqrt(Theta)*
(
2.0*sqr(alpha1)*g0*(1.0 + e)/sqrtPi
+ (9.0/8.0)*sqrtPi*g0*0.5*(1.0 + e)*sqr(alpha1)
+ (15.0/16.0)*sqrtPi*alpha1
+ (25.0/64.0)*sqrtPi/((1.0 + e)*g0)
);
}
// ************************************************************************* //

View File

@ -1,91 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::GidaspowConductivity
Description
SourceFiles
GidaspowConductivity.C
\*---------------------------------------------------------------------------*/
#ifndef GidaspowConductivity_H
#define GidaspowConductivity_H
#include "conductivityModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class GidaspowConductivity Declaration
\*---------------------------------------------------------------------------*/
class GidaspowConductivity
:
public conductivityModel
{
public:
//- Runtime type information
TypeName("Gidaspow");
// Constructors
//- Construct from components
GidaspowConductivity(const dictionary& dict);
//- Destructor
virtual ~GidaspowConductivity();
// Member Functions
tmp<volScalarField> kappa
(
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
const dimensionedScalar& rho1,
const dimensionedScalar& da,
const dimensionedScalar& e
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,96 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "HrenyaSinclairConductivity.H"
#include "mathematicalConstants.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(HrenyaSinclairConductivity, 0);
addToRunTimeSelectionTable
(
conductivityModel,
HrenyaSinclairConductivity,
dictionary
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::HrenyaSinclairConductivity::HrenyaSinclairConductivity
(
const dictionary& dict
)
:
conductivityModel(dict),
coeffsDict_(dict.subDict(typeName + "Coeffs")),
L_(coeffsDict_.lookup("L"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::HrenyaSinclairConductivity::~HrenyaSinclairConductivity()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::HrenyaSinclairConductivity::kappa
(
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
const dimensionedScalar& rho1,
const dimensionedScalar& da,
const dimensionedScalar& e
) const
{
const scalar sqrtPi = sqrt(constant::mathematical::pi);
volScalarField lamda
(
scalar(1) + da/(6.0*sqrt(2.0)*(alpha1 + scalar(1.0e-5)))/L_
);
return rho1*da*sqrt(Theta)*
(
2.0*sqr(alpha1)*g0*(1.0 + e)/sqrtPi
+ (9.0/8.0)*sqrtPi*0.25*sqr(1.0 + e)*(2.0*e - 1.0)*sqr(alpha1)
/(49.0/16.0 - 33.0*e/16.0)
+ (15.0/16.0)*sqrtPi*alpha1*(0.5*sqr(e) + 0.25*e - 0.75 + lamda)
/((49.0/16.0 - 33.0*e/16.0)*lamda)
+ (25.0/64.0)*sqrtPi
/((1.0 + e)*(49.0/16.0 - 33.0*e/16.0)*lamda*g0)
);
}
// ************************************************************************* //

View File

@ -1,96 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::HrenyaSinclairConductivity
Description
SourceFiles
HrenyaSinclairConductivity.C
\*---------------------------------------------------------------------------*/
#ifndef HrenyaSinclairConductivity_H
#define HrenyaSinclairConductivity_H
#include "conductivityModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class HrenyaSinclairConductivity Declaration
\*---------------------------------------------------------------------------*/
class HrenyaSinclairConductivity
:
public conductivityModel
{
dictionary coeffsDict_;
//- characteristic length of geometry
dimensionedScalar L_;
public:
//- Runtime type information
TypeName("HrenyaSinclair");
// Constructors
//- Construct from components
HrenyaSinclairConductivity(const dictionary& dict);
//- Destructor
virtual ~HrenyaSinclairConductivity();
// Member Functions
tmp<volScalarField> kappa
(
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
const dimensionedScalar& rho1,
const dimensionedScalar& da,
const dimensionedScalar& e
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,83 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "SyamlalConductivity.H"
#include "mathematicalConstants.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(SyamlalConductivity, 0);
addToRunTimeSelectionTable
(
conductivityModel,
SyamlalConductivity,
dictionary
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::SyamlalConductivity::SyamlalConductivity(const dictionary& dict)
:
conductivityModel(dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::SyamlalConductivity::~SyamlalConductivity()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::SyamlalConductivity::kappa
(
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
const dimensionedScalar& rho1,
const dimensionedScalar& da,
const dimensionedScalar& e
) const
{
const scalar sqrtPi = sqrt(constant::mathematical::pi);
return rho1*da*sqrt(Theta)*
(
2.0*sqr(alpha1)*g0*(1.0 + e)/sqrtPi
+ (9.0/8.0)*sqrtPi*g0*0.25*sqr(1.0 + e)*(2.0*e - 1.0)*sqr(alpha1)
/(49.0/16.0 - 33.0*e/16.0)
+ (15.0/32.0)*sqrtPi*alpha1/(49.0/16.0 - 33.0*e/16.0)
);
}
// ************************************************************************* //

View File

@ -1,91 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::SyamlalConductivity
Description
SourceFiles
SyamlalConductivity.C
\*---------------------------------------------------------------------------*/
#ifndef SyamlalConductivity_H
#define SyamlalConductivity_H
#include "conductivityModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class SyamlalConductivity Declaration
\*---------------------------------------------------------------------------*/
class SyamlalConductivity
:
public conductivityModel
{
public:
//- Runtime type information
TypeName("Syamlal");
// Constructors
//- Construct from components
SyamlalConductivity(const dictionary& dict);
//- Destructor
virtual ~SyamlalConductivity();
// Member Functions
tmp<volScalarField> kappa
(
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
const dimensionedScalar& rho1,
const dimensionedScalar& da,
const dimensionedScalar& e
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,55 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "conductivityModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(conductivityModel, 0);
defineRunTimeSelectionTable(conductivityModel, dictionary);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::conductivityModel::conductivityModel
(
const dictionary& dict
)
:
dict_(dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::conductivityModel::~conductivityModel()
{}
// ************************************************************************* //

View File

@ -1,125 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::conductivityModel
SourceFiles
conductivityModel.C
\*---------------------------------------------------------------------------*/
#ifndef conductivityModel_H
#define conductivityModel_H
#include "dictionary.H"
#include "volFields.H"
#include "dimensionedTypes.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class conductivityModel Declaration
\*---------------------------------------------------------------------------*/
class conductivityModel
{
// Private member functions
//- Disallow default bitwise copy construct
conductivityModel(const conductivityModel&);
//- Disallow default bitwise assignment
void operator=(const conductivityModel&);
protected:
// Protected data
const dictionary& dict_;
public:
//- Runtime type information
TypeName("conductivityModel");
// Declare runtime constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
conductivityModel,
dictionary,
(
const dictionary& dict
),
(dict)
);
// Constructors
//- Construct from components
conductivityModel(const dictionary& dict);
// Selectors
static autoPtr<conductivityModel> New
(
const dictionary& dict
);
//- Destructor
virtual ~conductivityModel();
// Member Functions
virtual tmp<volScalarField> kappa
(
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
const dimensionedScalar& rho1,
const dimensionedScalar& da,
const dimensionedScalar& e
) const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,58 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "conductivityModel.H"
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::conductivityModel> Foam::conductivityModel::New
(
const dictionary& dict
)
{
word conductivityModelType(dict.lookup("conductivityModel"));
Info<< "Selecting conductivityModel "
<< conductivityModelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(conductivityModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalError
<< "conductivityModel::New(const dictionary&) : " << endl
<< " unknown conductivityModelType type "
<< conductivityModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid conductivityModelType types are :" << endl;
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
}
return autoPtr<conductivityModel>(cstrIter()(dict));
}
// ************************************************************************* //

View File

@ -1,114 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "JohnsonJacksonFrictionalStress.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(JohnsonJacksonFrictionalStress, 0);
addToRunTimeSelectionTable
(
frictionalStressModel,
JohnsonJacksonFrictionalStress,
dictionary
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::JohnsonJacksonFrictionalStress::JohnsonJacksonFrictionalStress
(
const dictionary& dict
)
:
frictionalStressModel(dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::JohnsonJacksonFrictionalStress::~JohnsonJacksonFrictionalStress()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::JohnsonJacksonFrictionalStress::
frictionalPressure
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMinFriction,
const dimensionedScalar& alphaMax,
const dimensionedScalar& Fr,
const dimensionedScalar& eta,
const dimensionedScalar& p
) const
{
return
Fr*pow(max(alpha1 - alphaMinFriction, scalar(0)), eta)
/pow(max(alphaMax - alpha1, scalar(5.0e-2)), p);
}
Foam::tmp<Foam::volScalarField> Foam::JohnsonJacksonFrictionalStress::
frictionalPressurePrime
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMinFriction,
const dimensionedScalar& alphaMax,
const dimensionedScalar& Fr,
const dimensionedScalar& eta,
const dimensionedScalar& p
) const
{
return Fr*
(
eta*pow(max(alpha1 - alphaMinFriction, scalar(0)), eta - 1.0)
*(alphaMax-alpha1)
+ p*pow(max(alpha1 - alphaMinFriction, scalar(0)), eta)
)/pow(max(alphaMax - alpha1, scalar(5.0e-2)), p + 1.0);
}
Foam::tmp<Foam::volScalarField> Foam::JohnsonJacksonFrictionalStress::muf
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMax,
const volScalarField& pf,
const volSymmTensorField& D,
const dimensionedScalar& phi
) const
{
return dimensionedScalar("0.5", dimTime, 0.5)*pf*sin(phi);
}
// ************************************************************************* //

View File

@ -1,110 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::JohnsonJacksonFrictionalStress
Description
SourceFiles
JohnsonJacksonFrictionalStress.C
\*---------------------------------------------------------------------------*/
#ifndef JohnsonJacksonFrictionalStress_H
#define JohnsonJacksonFrictionalStress_H
#include "frictionalStressModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class JohnsonJacksonFrictionalStress Declaration
\*---------------------------------------------------------------------------*/
class JohnsonJacksonFrictionalStress
:
public frictionalStressModel
{
public:
//- Runtime type information
TypeName("JohnsonJackson");
// Constructors
//- Construct from components
JohnsonJacksonFrictionalStress(const dictionary& dict);
//- Destructor
virtual ~JohnsonJacksonFrictionalStress();
// Member functions
virtual tmp<volScalarField> frictionalPressure
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMinFriction,
const dimensionedScalar& alphaMax,
const dimensionedScalar& Fr,
const dimensionedScalar& eta,
const dimensionedScalar& p
) const;
virtual tmp<volScalarField> frictionalPressurePrime
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMinFriction,
const dimensionedScalar& alphaMax,
const dimensionedScalar& Fr,
const dimensionedScalar& eta,
const dimensionedScalar& p
) const;
virtual tmp<volScalarField> muf
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMax,
const volScalarField& pf,
const volSymmTensorField& D,
const dimensionedScalar& phi
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,149 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "SchaefferFrictionalStress.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(SchaefferFrictionalStress, 0);
addToRunTimeSelectionTable
(
frictionalStressModel,
SchaefferFrictionalStress,
dictionary
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::SchaefferFrictionalStress::SchaefferFrictionalStress
(
const dictionary& dict
)
:
frictionalStressModel(dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::SchaefferFrictionalStress::~SchaefferFrictionalStress()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::SchaefferFrictionalStress::
frictionalPressure
(
const volScalarField& alpha1,
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(alpha1 - alphaMinFriction, scalar(0)), 10.0);
}
Foam::tmp<Foam::volScalarField> Foam::SchaefferFrictionalStress::
frictionalPressurePrime
(
const volScalarField& alpha1,
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(alpha1 - alphaMinFriction, scalar(0)), 9.0);
}
Foam::tmp<Foam::volScalarField> Foam::SchaefferFrictionalStress::muf
(
const volScalarField& alpha1,
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",
alpha1.mesh().time().timeName(),
alpha1.mesh()
),
alpha1.mesh(),
dimensionedScalar("muf", dimensionSet(1, -1, -1, 0, 0), 0.0)
)
);
volScalarField& muff = tmuf();
forAll (D, celli)
{
if (alpha1[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
);
}
}
muff.correctBoundaryConditions();
return tmuf;
}
// ************************************************************************* //

View File

@ -1,110 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::SchaefferFrictionalStress
Description
SourceFiles
SchaefferFrictionalStress.C
\*---------------------------------------------------------------------------*/
#ifndef SchaefferFrictionalStress_H
#define SchaefferFrictionalStress_H
#include "frictionalStressModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class SchaefferFrictionalStress Declaration
\*---------------------------------------------------------------------------*/
class SchaefferFrictionalStress
:
public frictionalStressModel
{
public:
//- Runtime type information
TypeName("Schaeffer");
// Constructors
//- Construct from components
SchaefferFrictionalStress(const dictionary& dict);
//- Destructor
virtual ~SchaefferFrictionalStress();
// Member functions
virtual tmp<volScalarField> frictionalPressure
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMinFriction,
const dimensionedScalar& alphaMax,
const dimensionedScalar& Fr,
const dimensionedScalar& eta,
const dimensionedScalar& p
) const;
virtual tmp<volScalarField> frictionalPressurePrime
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMinFriction,
const dimensionedScalar& alphaMax,
const dimensionedScalar& Fr,
const dimensionedScalar& n,
const dimensionedScalar& p
) const;
virtual tmp<volScalarField> muf
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMax,
const volScalarField& pf,
const volSymmTensorField& D,
const dimensionedScalar& phi
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,55 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "frictionalStressModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(frictionalStressModel, 0);
defineRunTimeSelectionTable(frictionalStressModel, dictionary);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::frictionalStressModel::frictionalStressModel
(
const dictionary& dict
)
:
dict_(dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::frictionalStressModel::~frictionalStressModel()
{}
// ************************************************************************* //

View File

@ -1,144 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::frictionalStressModel
SourceFiles
frictionalStressModel.C
\*---------------------------------------------------------------------------*/
#ifndef frictionalStressModel_H
#define frictionalStressModel_H
#include "dictionary.H"
#include "volFields.H"
#include "dimensionedTypes.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
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& alpha1,
const dimensionedScalar& alphaMinFriction,
const dimensionedScalar& alphaMax,
const dimensionedScalar& Fr,
const dimensionedScalar& eta,
const dimensionedScalar& p
) const = 0;
virtual tmp<volScalarField> frictionalPressurePrime
(
const volScalarField& alpha1f,
const dimensionedScalar& alphaMinFriction,
const dimensionedScalar& alphaMax,
const dimensionedScalar& Fr,
const dimensionedScalar& eta,
const dimensionedScalar& p
) const = 0;
virtual tmp<volScalarField> muf
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMax,
const volScalarField& pf,
const volSymmTensorField& D,
const dimensionedScalar& phi
) const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,59 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "frictionalStressModel.H"
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::frictionalStressModel> Foam::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));
}
// ************************************************************************* //

View File

@ -1,85 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "LunPressure.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(LunPressure, 0);
addToRunTimeSelectionTable
(
granularPressureModel,
LunPressure,
dictionary
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::LunPressure::LunPressure(const dictionary& dict)
:
granularPressureModel(dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::LunPressure::~LunPressure()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::LunPressure::granularPressureCoeff
(
const volScalarField& alpha1,
const volScalarField& g0,
const dimensionedScalar& rho1,
const dimensionedScalar& e
) const
{
return rho1*alpha1*(1.0 + 2.0*(1.0 + e)*alpha1*g0);
}
Foam::tmp<Foam::volScalarField> Foam::LunPressure::granularPressureCoeffPrime
(
const volScalarField& alpha1,
const volScalarField& g0,
const volScalarField& g0prime,
const dimensionedScalar& rho1,
const dimensionedScalar& e
) const
{
return rho1*(1.0 + alpha1*(1.0 + e)*(4.0*g0 + 2.0*g0prime*alpha1));
}
// ************************************************************************* //

View File

@ -1,98 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::LunPressure
Description
SourceFiles
LunPressure.C
\*---------------------------------------------------------------------------*/
#ifndef LunPressure_H
#define LunPressure_H
#include "granularPressureModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class LunPressure Declaration
\*---------------------------------------------------------------------------*/
class LunPressure
:
public granularPressureModel
{
public:
//- Runtime type information
TypeName("Lun");
// Constructors
//- Construct from components
LunPressure(const dictionary& dict);
//- Destructor
virtual ~LunPressure();
// Member Functions
tmp<volScalarField> granularPressureCoeff
(
const volScalarField& alpha1,
const volScalarField& g0,
const dimensionedScalar& rho1,
const dimensionedScalar& e
) const;
tmp<volScalarField> granularPressureCoeffPrime
(
const volScalarField& alpha1,
const volScalarField& g0,
const volScalarField& g0prime,
const dimensionedScalar& rho1,
const dimensionedScalar& e
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,91 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "SyamlalRogersOBrienPressure.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(SyamlalRogersOBrienPressure, 0);
addToRunTimeSelectionTable
(
granularPressureModel,
SyamlalRogersOBrienPressure,
dictionary
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::SyamlalRogersOBrienPressure::SyamlalRogersOBrienPressure
(
const dictionary& dict
)
:
granularPressureModel(dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::SyamlalRogersOBrienPressure::~SyamlalRogersOBrienPressure()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::SyamlalRogersOBrienPressure::
granularPressureCoeff
(
const volScalarField& alpha1,
const volScalarField& g0,
const dimensionedScalar& rho1,
const dimensionedScalar& e
) const
{
return 2.0*rho1*(1.0 + e)*sqr(alpha1)*g0;
}
Foam::tmp<Foam::volScalarField> Foam::SyamlalRogersOBrienPressure::
granularPressureCoeffPrime
(
const volScalarField& alpha1,
const volScalarField& g0,
const volScalarField& g0prime,
const dimensionedScalar& rho1,
const dimensionedScalar& e
) const
{
return rho1*alpha1*(1.0 + e)*(4.0*g0 + 2.0*g0prime*alpha1);
}
// ************************************************************************* //

View File

@ -1,98 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::SyamlalRogersOBrienPressure
Description
SourceFiles
SyamlalRogersOBrienPressure.C
\*---------------------------------------------------------------------------*/
#ifndef SyamlalRogersOBrienPressure_H
#define SyamlalRogersOBrienPressure_H
#include "granularPressureModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class SyamlalRogersOBrienPressure Declaration
\*---------------------------------------------------------------------------*/
class SyamlalRogersOBrienPressure
:
public granularPressureModel
{
public:
//- Runtime type information
TypeName("SyamlalRogersOBrien");
// Constructors
//- Construct from components
SyamlalRogersOBrienPressure(const dictionary& dict);
//- Destructor
virtual ~SyamlalRogersOBrienPressure();
// Member Functions
tmp<volScalarField> granularPressureCoeff
(
const volScalarField& alpha1,
const volScalarField& g0,
const dimensionedScalar& rho1,
const dimensionedScalar& e
) const;
tmp<volScalarField> granularPressureCoeffPrime
(
const volScalarField& alpha1,
const volScalarField& g0,
const volScalarField& g0prime,
const dimensionedScalar& rho1,
const dimensionedScalar& e
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,55 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "granularPressureModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(granularPressureModel, 0);
defineRunTimeSelectionTable(granularPressureModel, dictionary);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::granularPressureModel::granularPressureModel
(
const dictionary& dict
)
:
dict_(dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::granularPressureModel::~granularPressureModel()
{}
// ************************************************************************* //

View File

@ -1,134 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::granularPressureModel
SourceFiles
granularPressureModel.C
\*---------------------------------------------------------------------------*/
#ifndef granularPressureModel_H
#define granularPressureModel_H
#include "dictionary.H"
#include "volFields.H"
#include "dimensionedTypes.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
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& alpha1,
const volScalarField& g0,
const dimensionedScalar& rho1,
const dimensionedScalar& e
) const = 0;
//- Derivative of the granular pressure coefficient
virtual tmp<volScalarField> granularPressureCoeffPrime
(
const volScalarField& alpha1,
const volScalarField& g0,
const volScalarField& g0prime,
const dimensionedScalar& rho1,
const dimensionedScalar& e
) const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,59 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "granularPressureModel.H"
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::granularPressureModel> Foam::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));
}
// ************************************************************************* //

View File

@ -1,389 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "kineticTheoryModel.H"
#include "surfaceInterpolate.H"
#include "mathematicalConstants.H"
#include "fvCFD.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::kineticTheoryModel::kineticTheoryModel
(
const Foam::phaseModel& phase1,
const Foam::volVectorField& U2,
const Foam::volScalarField& alpha1,
const Foam::dragModel& drag1
)
:
phase1_(phase1),
U1_(phase1.U()),
U2_(U2),
alpha1_(alpha1),
phi1_(phase1.phi()),
drag1_(drag1),
rho1_(phase1.rho()),
da_(phase1.d()),
nu1_(phase1.nu()),
kineticTheoryProperties_
(
IOobject
(
"kineticTheoryProperties",
U1_.time().constant(),
U1_.mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
)
),
kineticTheory_(kineticTheoryProperties_.lookup("kineticTheory")),
equilibrium_(kineticTheoryProperties_.lookup("equilibrium")),
viscosityModel_
(
kineticTheoryModels::viscosityModel::New
(
kineticTheoryProperties_
)
),
conductivityModel_
(
conductivityModel::New
(
kineticTheoryProperties_
)
),
radialModel_
(
kineticTheoryModels::radialModel::New
(
kineticTheoryProperties_
)
),
granularPressureModel_
(
granularPressureModel::New
(
kineticTheoryProperties_
)
),
frictionalStressModel_
(
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",
U1_.time().timeName(),
U1_.mesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
U1_.mesh()
),
mu1_
(
IOobject
(
"mu1",
U1_.time().timeName(),
U1_.mesh(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
U1_.mesh(),
dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0)
),
lambda_
(
IOobject
(
"lambda",
U1_.time().timeName(),
U1_.mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
U1_.mesh(),
dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0)
),
pa_
(
IOobject
(
"pa",
U1_.time().timeName(),
U1_.mesh(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
U1_.mesh(),
dimensionedScalar("zero", dimensionSet(1, -1, -2, 0, 0), 0.0)
),
kappa_
(
IOobject
(
"kappa",
U1_.time().timeName(),
U1_.mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
U1_.mesh(),
dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0)
),
gs0_
(
IOobject
(
"gs0",
U1_.time().timeName(),
U1_.mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
U1_.mesh(),
dimensionedScalar("zero", dimensionSet(0, 0, 0, 0, 0), 1.0)
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::kineticTheoryModel::~kineticTheoryModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::kineticTheoryModel::solve(const volTensorField& gradU1t)
{
if (!kineticTheory_)
{
return;
}
const scalar sqrtPi = sqrt(constant::mathematical::pi);
surfaceScalarField phi(1.5*rho1_*phi1_*fvc::interpolate(alpha1_));
volTensorField dU(gradU1t.T()); //fvc::grad(U1_);
volSymmTensorField D(symm(dU));
// NB, drag = K*alpha1*alpha2,
// (the alpha1 and alpha2 has been extracted from the drag function for
// numerical reasons)
volScalarField Ur(mag(U1_ - U2_));
volScalarField alpha2Prim(alpha1_*(1.0 - alpha1_)*drag1_.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(alpha1_, scalar(1e-6)), alphaMax_ - 0.01),
alphaMax_
);
// particle pressure - coefficient in front of Theta (Eq. 3.22, p. 45)
volScalarField PsCoeff
(
granularPressureModel_->granularPressureCoeff
(
alpha1_,
gs0_,
rho1_,
e_
)
);
// 'thermal' conductivity (Table 3.3, p. 49)
kappa_ = conductivityModel_->kappa(alpha1_, Theta_, gs0_, rho1_, da_, e_);
// particle viscosity (Table 3.2, p.47)
mu1_ = viscosityModel_->mu1(alpha1_, Theta_, gs0_, rho1_, 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(alpha1_)*rho1_*gs0_*(1.0/da_)*ThetaSqrt/sqrtPi
);
// Eq. 3.25, p. 50 Js = J1 - J2
volScalarField J1(3.0*alpha2Prim);
volScalarField J2
(
0.25*sqr(alpha2Prim)*da_*sqr(Ur)
/(max(alpha1_, scalar(1e-6))*rho1_*sqrtPi*(ThetaSqrt + TsmallSqrt))
);
// bulk viscosity p. 45 (Lun et al. 1984).
lambda_ = (4.0/3.0)*sqr(alpha1_)*rho1_*da_*gs0_*(1.0+e_)*ThetaSqrt/sqrtPi;
// stress tensor, Definitions, Table 3.1, p. 43
volSymmTensorField tau(2.0*mu1_*D + (lambda_ - (2.0/3.0)*mu1_)*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*alpha1_*rho1_, 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_)*rho1_*gs0_);
volScalarField K3
(
0.5*da_*rho1_*
(
(sqrtPi/(3.0*(3.0-e_)))
*(1.0 + 0.4*(1.0 + e_)*(3.0*e_ - 1.0)*alpha1_*gs0_)
+1.6*alpha1_*gs0_*(1.0 + e_)/sqrtPi
)
);
volScalarField K2
(
4.0*da_*rho1_*(1.0 + e_)*alpha1_*gs0_/(3.0*sqrtPi) - 2.0*K3/3.0
);
volScalarField K4(12.0*(1.0 - sqr(e_))*rho1_*gs0_/(da_*sqrtPi));
volScalarField trD(tr(D));
volScalarField tr2D(sqr(trD));
volScalarField trD2(tr(D & D));
volScalarField t1(K1*alpha1_ + rho1_);
volScalarField l1(-t1*trD);
volScalarField l2(sqr(t1)*tr2D);
volScalarField l3
(
4.0
*K4
*max(alpha1_, scalar(1e-6))
*(2.0*K3*trD2 + K2*tr2D)
);
Theta_ = sqr((l1 + sqrt(l2 + l3))/(2.0*(alpha1_ + 1.0e-4)*K4));
}
Theta_.max(1.0e-15);
Theta_.min(1.0e+3);
volScalarField pf
(
frictionalStressModel_->frictionalPressure
(
alpha1_,
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
(
alpha1_,
alphaMax_,
pf,
D,
phi_
)
);
// add frictional stress
mu1_ += muf;
mu1_.min(1.0e+2);
mu1_.max(0.0);
Info<< "kinTheory: max(Theta) = " << max(Theta_).value() << endl;
volScalarField ktn(mu1_/rho1_);
Info<< "kinTheory: min(nu1) = " << min(ktn).value()
<< ", max(nu1) = " << max(ktn).value() << endl;
Info<< "kinTheory: min(pa) = " << min(pa_).value()
<< ", max(pa) = " << max(pa_).value() << endl;
}
// ************************************************************************* //

View File

@ -1,196 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::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& U1_;
const volVectorField& U2_;
const volScalarField& alpha1_;
const surfaceScalarField& phi1_;
const dragModel& drag1_;
const dimensionedScalar& rho1_;
const dimensionedScalar& da_;
const dimensionedScalar& nu1_;
//- dictionary holding the modeling info
IOdictionary kineticTheoryProperties_;
//- use kinetic theory or not.
Switch kineticTheory_;
//- use generation == dissipation
Switch equilibrium_;
autoPtr<kineticTheoryModels::viscosityModel> viscosityModel_;
autoPtr<conductivityModel> conductivityModel_;
autoPtr<kineticTheoryModels::radialModel> radialModel_;
autoPtr<granularPressureModel> granularPressureModel_;
autoPtr<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 mu1_;
//- 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& U2,
const volScalarField& alpha1,
const dragModel& drag1
);
//- Destructor
virtual ~kineticTheoryModel();
// Member Functions
void solve(const volTensorField& gradU1t);
bool on() const
{
return kineticTheory_;
}
const volScalarField& mu1() const
{
return mu1_;
}
const volScalarField& pa() const
{
return pa_;
}
const volScalarField& lambda() const
{
return lambda_;
}
const volScalarField& kappa() const
{
return kappa_;
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,98 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "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
2.5/sqr(1.0 - alpha)
+ 4.0*alpha/pow(1.0 - alpha, 3.0)
+ 1.5*sqr(alpha)/pow(1.0 - alpha, 4.0);
}
// ************************************************************************* //

View File

@ -1,100 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::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
// ************************************************************************* //

View File

@ -1,92 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "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*pow(1.0 - alpha/alphaMax, -1.0 - 2.5*alphaMax);
}
// ************************************************************************* //

View File

@ -1,99 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
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
// ************************************************************************* //

View File

@ -1,93 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "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(max(alpha, scalar(1.0e-6))/alphaMax, -2.0/3.0)
/(alphaMax*sqr(1.0 - pow(alpha/alphaMax, 1.0/3.0)));
}
// ************************************************************************* //

View File

@ -1,99 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
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
// ************************************************************************* //

View File

@ -1,60 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "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));
}
// ************************************************************************* //

Some files were not shown because too many files have changed in this diff Show More