reactingTwoPhaseEulerFoam: New twoPhaseEulerFoam supporting mass-transfer and reactions

Multi-species, mass-transfer and reaction support and multi-phase
structure provided by William Bainbridge.

Integration of the latest p-U and face-p_U algorithms with William's
multi-phase structure is not quite complete due to design
incompatibilities which needs further development.  However the
integration of the functionality is complete.

The results of the tutorials are not exactly the same for the
twoPhaseEulerFoam and reactingTwoPhaseEulerFoam solvers but are very
similar.  Further analysis in needed to ensure these differences are
physical or to resolve them; in the meantime the twoPhaseEulerFoam
solver will be maintained.
This commit is contained in:
Henry Weller
2015-06-12 09:52:17 +01:00
parent ee6660794f
commit eb53f9bdf0
575 changed files with 88511 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso phaseSystems
wclean libso interfacialModels
wclean libso interfacialCompositionModels
wclean libso phaseCompressibleTurbulenceModels
wclean
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,13 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
set -x
wmakeLnInclude interfacialModels
wmakeLnInclude interfacialCompositionModels
wmake libso phaseSystems
wmake libso interfacialModels
wmake libso interfacialCompositionModels
wmake libso phaseCompressibleTurbulenceModels
wmake
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,51 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Global
CourantNo
Description
Calculates and outputs the mean and maximum Courant Numbers.
\*---------------------------------------------------------------------------*/
scalar CoNum = 0.0;
scalar meanCoNum = 0.0;
if (mesh.nInternalFaces())
{
scalarField sumPhi
(
fvc::surfaceSum(mag(phi))().internalField()
);
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
meanCoNum =
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
}
Info<< "Courant Number mean: " << meanCoNum
<< " max: " << CoNum << endl;
// ************************************************************************* //

View File

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

View File

@ -0,0 +1,47 @@
{
autoPtr<phaseSystem::heatTransferTable>
heatTransferPtr(fluid.heatTransfer());
phaseSystem::heatTransferTable&
heatTransfer = heatTransferPtr();
{
tmp<fvScalarMatrix> he1Eqn(phase1.heEqn());
if (he1Eqn.valid())
{
he1Eqn =
(
he1Eqn
==
*heatTransfer[phase1.name()]
+ fvOptions(alpha1, rho1, phase1.thermo().he())
);
he1Eqn->relax();
fvOptions.constrain(he1Eqn());
he1Eqn->solve();
}
}
{
tmp<fvScalarMatrix> he2Eqn(phase2.heEqn());
if (he2Eqn.valid())
{
he2Eqn =
(
he2Eqn
==
*heatTransfer[phase2.name()]
+ fvOptions(alpha2, rho2, phase2.thermo().he())
);
he2Eqn->relax();
fvOptions.constrain(he2Eqn());
he2Eqn->solve();
}
}
}
fluid.correctThermo();

View File

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

View File

@ -0,0 +1,24 @@
EXE_INC = \
-IphaseSystems/lnInclude \
-IinterfacialModels/lnInclude \
-IinterfacialCompositionModels/lnInclude \
-IphaseCompressibleTurbulenceModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
-lreactingTwoPhaseSystem \
-lreactingEulerianInterfacialModels \
-lreactingEulerianInterfacialCompositionModels \
-lphaseReactingTurbulenceModels \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lsampling

View File

@ -0,0 +1,50 @@
{
autoPtr<phaseSystem::massTransferTable>
massTransferPtr(fluid.massTransfer());
phaseSystem::massTransferTable&
massTransfer(massTransferPtr());
PtrList<volScalarField>& Y1 = phase1.Y();
PtrList<volScalarField>& Y2 = phase2.Y();
forAll(Y1, i)
{
tmp<fvScalarMatrix> Y1iEqn(phase1.YiEqn(Y1[i]));
if (Y1iEqn.valid())
{
Y1iEqn =
(
Y1iEqn
==
*massTransfer[Y1[i].name()]
+ fvOptions(alpha1, rho1, Y1[i])
);
Y1iEqn->relax();
Y1iEqn->solve(mesh.solver("Yi"));
}
}
forAll(Y2, i)
{
tmp<fvScalarMatrix> Y2iEqn(phase2.YiEqn(Y2[i]));
if (Y2iEqn.valid())
{
Y2iEqn =
(
Y2iEqn
==
*massTransfer[Y2[i].name()]
+ fvOptions(alpha2, rho2, Y2[i])
);
Y2iEqn->relax();
Y2iEqn->solve(mesh.solver("Yi"));
}
}
fluid.massTransfer(); // updates interfacial mass flow rates
}

View File

@ -0,0 +1,7 @@
phase1.continuityError() =
fvc::ddt(alpha1, rho1) + fvc::div(alphaRhoPhi1)
- (fvOptions(alpha1, rho1)&rho1);
phase2.continuityError() =
fvc::ddt(alpha2, rho2) + fvc::div(alphaRhoPhi2)
- (fvOptions(alpha2, rho2)&rho2);

View File

@ -0,0 +1,73 @@
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
Info<< "Creating phaseSystem\n" << endl;
autoPtr<twoPhaseSystem> fluidPtr
(
twoPhaseSystem::New(mesh)
);
twoPhaseSystem& fluid = fluidPtr();
phaseModel& phase1 = fluid.phase1();
phaseModel& phase2 = fluid.phase2();
volScalarField& alpha1 = phase1;
volScalarField& alpha2 = phase2;
volVectorField& U1 = phase1.U();
surfaceScalarField& phi1 = phase1.phi();
surfaceScalarField& alphaPhi1 = phase1.alphaPhi();
surfaceScalarField& alphaRhoPhi1 = phase1.alphaRhoPhi();
volVectorField& U2 = phase2.U();
surfaceScalarField& phi2 = phase2.phi();
surfaceScalarField& alphaPhi2 = phase2.alphaPhi();
surfaceScalarField& alphaRhoPhi2 = phase2.alphaRhoPhi();
surfaceScalarField& phi = fluid.phi();
dimensionedScalar pMin
(
"pMin",
dimPressure,
fluid.lookup("pMin")
);
#include "gh.H"
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();
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
p_rgh,
pimple.dict(),
pRefCell,
pRefValue
);

View File

@ -0,0 +1,3 @@
IOMRFZoneList MRF(mesh);
MRF.correctBoundaryVelocity(U1);
MRF.correctBoundaryVelocity(U2);

View File

@ -0,0 +1,20 @@
massTransferModels/massTransferModel/massTransferModel.C
massTransferModels/massTransferModel/newMassTransferModel.C
massTransferModels/Frossling/Frossling.C
massTransferModels/sphericalMassTransfer/sphericalMassTransfer.C
surfaceTensionModels/surfaceTensionModel/surfaceTensionModel.C
surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C
surfaceTensionModels/constantSurfaceTensionCoefficient/constantSurfaceTensionCoefficient.C
interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C
interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C
interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModels.C
saturationPressureModels/saturationPressureModel/saturationPressureModel.C
saturationPressureModels/saturationPressureModel/newSaturationPressureModel.C
saturationPressureModels/Antoine/Antoine.C
saturationPressureModels/AntoineExtended/AntoineExtended.C
saturationPressureModels/ArdenBuck/ArdenBuck.C
LIB = $(FOAM_LIBBIN)/libreactingEulerianInterfacialCompositionModels

View File

@ -0,0 +1,27 @@
EXE_INC = \
-I../phaseSystems/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-lreactingTwoPhaseSystem \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \
-lspecie

View File

@ -0,0 +1,144 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "Henry.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::interfaceCompositionModels::Henry<Thermo, OtherThermo>::Henry
(
const dictionary& dict,
const phasePair& pair
)
:
InterfaceCompositionModel<Thermo, OtherThermo>(dict, pair),
k_(dict.lookup("k")),
YSolvent_
(
IOobject
(
IOobject::groupName("YSolvent", pair.name()),
pair.phase1().mesh().time().timeName(),
pair.phase1().mesh()
),
pair.phase1().mesh(),
dimensionedScalar("one", dimless, 1)
)
{
if (k_.size() != this->speciesNames_.size())
{
FatalErrorIn
(
"template<class Thermo, class OtherThermo> "
"Foam::interfaceCompositionModels::Henry<Thermo, OtherThermo>:: "
"Henry "
"( "
"const dictionary& dict, "
"const phasePair& pair "
")"
) << "Differing number of species and solubilities"
<< exit(FatalError);
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::interfaceCompositionModels::Henry<Thermo, OtherThermo>::~Henry()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
void Foam::interfaceCompositionModels::Henry<Thermo, OtherThermo>::update
(
const volScalarField& Tf
)
{
YSolvent_ = scalar(1);
forAllConstIter(hashedWordList, this->speciesNames_, iter)
{
YSolvent_ -= Yf(*iter, Tf);
}
}
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::interfaceCompositionModels::Henry<Thermo, OtherThermo>::Yf
(
const word& speciesName,
const volScalarField& Tf
) const
{
if (this->speciesNames_.contains(speciesName))
{
const label index = this->speciesNames_[speciesName];
return
k_[index]
*this->otherThermo_.composition().Y(speciesName)
*this->otherThermo_.rhoThermo::rho()
/this->thermo_.rhoThermo::rho();
}
else
{
return
YSolvent_
*this->thermo_.composition().Y(speciesName);
}
}
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::interfaceCompositionModels::Henry<Thermo, OtherThermo>::YfPrime
(
const word& speciesName,
const volScalarField& Tf
) const
{
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
IOobject::groupName("YfPrime", this->pair_.name()),
this->pair_.phase1().mesh().time().timeName(),
this->pair_.phase1().mesh()
),
this->pair_.phase1().mesh(),
dimensionedScalar("zero", dimless/dimTemperature, 0)
)
);
}
// ************************************************************************* //

View File

@ -0,0 +1,129 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::Henry
Description
Henry's law for gas solubiliy in liquid. The concentration of the dissolved
species in the liquid is proportional to its partial pressure in the gas.
The dimensionless constant of proportionality between concentrations on
each side of the interface is \f$k\f$, and is given for each species.
Mixing in the gas is assumed to be ideal.
SourceFiles
Henry.C
\*---------------------------------------------------------------------------*/
#ifndef Henry_H
#define Henry_H
#include "InterfaceCompositionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace interfaceCompositionModels
{
/*---------------------------------------------------------------------------*\
Class Henry Declaration
\*---------------------------------------------------------------------------*/
template<class Thermo, class OtherThermo>
class Henry
:
public InterfaceCompositionModel<Thermo, OtherThermo>
{
private:
// Private data
//- Solubility coefficients
const scalarList k_;
//- The remaining solvent species fraction
volScalarField YSolvent_;
public:
//- Runtime type information
TypeName("Henry");
// Constructors
//- Construct from components
Henry
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~Henry();
// Member Functions
//- Update the composition
virtual void update(const volScalarField& Tf);
//- The interface species fraction
virtual tmp<volScalarField> Yf
(
const word& speciesName,
const volScalarField& Tf
) const;
//- The interface species fraction derivative w.r.t. temperature
virtual tmp<volScalarField> YfPrime
(
const word& speciesName,
const volScalarField& Tf
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace interfaceCompositionModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "Henry.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,248 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "InterfaceCompositionModel.H"
#include "phaseModel.H"
#include "phasePair.H"
#include "pureMixture.H"
#include "multiComponentMixture.H"
#include "rhoThermo.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
template<class ThermoType>
const typename Foam::multiComponentMixture<ThermoType>::thermoType&
Foam::InterfaceCompositionModel<Thermo, OtherThermo>::getLocalThermo
(
const word& speciesName,
const multiComponentMixture<ThermoType>& globalThermo
) const
{
return
globalThermo.getLocalThermo
(
globalThermo.species()
[
speciesName
]
);
}
template<class Thermo, class OtherThermo>
template<class ThermoType>
const typename Foam::pureMixture<ThermoType>::thermoType&
Foam::InterfaceCompositionModel<Thermo, OtherThermo>::getLocalThermo
(
const word& speciesName,
const pureMixture<ThermoType>& globalThermo
) const
{
return globalThermo.cellMixture(0);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::InterfaceCompositionModel<Thermo, OtherThermo>::InterfaceCompositionModel
(
const dictionary& dict,
const phasePair& pair
)
:
interfaceCompositionModel(dict, pair),
thermo_
(
pair.phase1().mesh().lookupObject<Thermo>
(
IOobject::groupName(basicThermo::dictName, pair.phase1().name())
)
),
otherThermo_
(
pair.phase2().mesh().lookupObject<OtherThermo>
(
IOobject::groupName(basicThermo::dictName, pair.phase2().name())
)
),
Le_("Le", dimless, dict.lookup("Le"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::InterfaceCompositionModel<Thermo, OtherThermo>::
~InterfaceCompositionModel()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::InterfaceCompositionModel<Thermo, OtherThermo>::dY
(
const word& speciesName,
const volScalarField& Tf
) const
{
return
Yf(speciesName, Tf)
- thermo_.composition().Y()
[
thermo_.composition().species()[speciesName]
];
}
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::InterfaceCompositionModel<Thermo, OtherThermo>::D
(
const word& speciesName
) const
{
const typename Thermo::thermoType& localThermo =
getLocalThermo
(
speciesName,
thermo_
);
const volScalarField& p(thermo_.p());
const volScalarField& T(thermo_.T());
tmp<volScalarField> tmpD
(
new volScalarField
(
IOobject
(
IOobject::groupName("D", pair_.name()),
p.time().timeName(),
p.mesh()
),
p.mesh(),
dimensionedScalar("zero", dimArea/dimTime, 0)
)
);
volScalarField& D(tmpD());
forAll(p, cellI)
{
D[cellI] =
localThermo.alphah(p[cellI], T[cellI])
/localThermo.rho(p[cellI], T[cellI]);
}
D /= Le_;
return tmpD;
}
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::InterfaceCompositionModel<Thermo, OtherThermo>::L
(
const word& speciesName,
const volScalarField& Tf
) const
{
const typename Thermo::thermoType& localThermo =
getLocalThermo
(
speciesName,
thermo_
);
const typename OtherThermo::thermoType& otherLocalThermo =
getLocalThermo
(
speciesName,
otherThermo_
);
const volScalarField& p(thermo_.p());
const volScalarField& otherP(otherThermo_.p());
tmp<volScalarField> tmpL
(
new volScalarField
(
IOobject
(
IOobject::groupName("L", pair_.name()),
p.time().timeName(),
p.mesh()
),
p.mesh(),
dimensionedScalar("zero", dimEnergy/dimMass, 0)
)
);
volScalarField& L(tmpL());
forAll(p, cellI)
{
L[cellI] =
localThermo.Ha(p[cellI], Tf[cellI])
- otherLocalThermo.Ha(otherP[cellI], Tf[cellI]);
}
return tmpL;
}
template<class Thermo, class OtherThermo>
void Foam::InterfaceCompositionModel<Thermo, OtherThermo>::addMDotL
(
const volScalarField& K,
const volScalarField& Tf,
volScalarField& mDotL,
volScalarField& mDotLPrime
) const
{
forAllConstIter(hashedWordList, this->speciesNames_, iter)
{
volScalarField rhoKDL
(
thermo_.rhoThermo::rho()
*K
*D(*iter)
*L(*iter, Tf)
);
mDotL += rhoKDL*dY(*iter, Tf);
mDotLPrime += rhoKDL*YfPrime(*iter, Tf);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,216 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::InterfaceCompositionModel
Description
Base class for interface composition models, templated on the two
thermodynamic models either side of the interface.
SourceFiles
InterfaceCompositionModel.C
\*---------------------------------------------------------------------------*/
#ifndef InterfaceCompositionModel_H
#define InterfaceCompositionModel_H
#include "interfaceCompositionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phaseModel;
class phasePair;
template <class ThermoType> class pureMixture;
template <class ThermoType> class multiComponentMixture;
/*---------------------------------------------------------------------------*\
Class InterfaceCompositionModel Declaration
\*---------------------------------------------------------------------------*/
template<class Thermo, class OtherThermo>
class InterfaceCompositionModel
:
public interfaceCompositionModel
{
protected:
// Private data
//- Thermo
const Thermo& thermo_;
//- Other Thermo
const OtherThermo& otherThermo_;
//- Lewis number
const dimensionedScalar Le_;
// Private member functions
//- Get a reference to the local thermo for a pure mixture
template<class ThermoType>
const typename pureMixture<ThermoType>::thermoType&
getLocalThermo
(
const word& speciesName,
const pureMixture<ThermoType>& globalThermo
) const;
//- Get a reference to the local thermo for a multi component mixture
template<class ThermoType>
const typename multiComponentMixture<ThermoType>::thermoType&
getLocalThermo
(
const word& speciesName,
const multiComponentMixture<ThermoType>& globalThermo
) const;
public:
// Constructors
//- Construct from components
InterfaceCompositionModel
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
~InterfaceCompositionModel();
// Member Functions
//- Mass fraction difference between the interface and the field
virtual tmp<volScalarField> dY
(
const word& speciesName,
const volScalarField& Tf
) const;
//- Mass diffusivity
virtual tmp<volScalarField> D
(
const word& speciesName
) const;
//- Latent heat
virtual tmp<volScalarField> L
(
const word& speciesName,
const volScalarField& Tf
) const;
//- Add latent heat flow rate to total
virtual void addMDotL
(
const volScalarField& K,
const volScalarField& Tf,
volScalarField& mDotL,
volScalarField& mDotLPrime
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Instantiation for multi-component-multi-component pairs
#define makeInterfaceCompositionType(Type, Thermo, Comp, Mix, Phys, OtherThermo, OtherComp, OtherMix, OtherPhys)\
\
typedef Thermo<Comp, SpecieMixture<Mix<Phys> > > \
Type##Thermo##Comp##Mix##Phys; \
\
typedef OtherThermo<OtherComp, OtherMix<OtherPhys> > \
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys; \
\
addInterfaceCompositionToRunTimeSelectionTable \
( \
Type, \
Type##Thermo##Comp##Mix##Phys, \
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys \
)
// Instantiation for multi-component-single-component pairs
#define makeSpecieInterfaceCompositionType(Type, Thermo, Comp, Mix, Phys, OtherThermo, OtherComp, OtherMix, OtherPhys)\
\
typedef Thermo<Comp, SpecieMixture<Mix<Phys> > > \
Type##Thermo##Comp##Mix##Phys; \
\
typedef OtherThermo<OtherComp, SpecieMixture<OtherMix<OtherPhys> > > \
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys; \
\
addInterfaceCompositionToRunTimeSelectionTable \
( \
Type, \
Type##Thermo##Comp##Mix##Phys, \
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys \
)
// Addition to the run-time selection table
#define addInterfaceCompositionToRunTimeSelectionTable(Type, Thermo, OtherThermo)\
\
typedef Type<Thermo, OtherThermo> \
Type##Thermo##OtherThermo; \
\
defineTemplateTypeNameAndDebugWithName \
( \
Type##Thermo##OtherThermo, \
( \
word(Type##Thermo##OtherThermo::typeName_()) + "<" \
+ word(Thermo::typeName) + "," \
+ word(OtherThermo::typeName) + ">" \
).c_str(), \
0 \
); \
\
addToRunTimeSelectionTable \
( \
interfaceCompositionModel, \
Type##Thermo##OtherThermo, \
dictionary \
)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "InterfaceCompositionModel.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,155 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "interfaceCompositionModel.H"
#include "InterfaceCompositionModel.H"
#include "Henry.H"
#include "NonRandomTwoLiquid.H"
#include "Raoult.H"
#include "Saturated.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "makeReactionThermo.H"
#include "thermoPhysicsTypes.H"
#include "rhoConst.H"
#include "perfectFluid.H"
#include "pureMixture.H"
#include "multiComponentMixture.H"
#include "reactingMixture.H"
#include "SpecieMixture.H"
#include "rhoThermo.H"
#include "rhoReactionThermo.H"
#include "heRhoThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef
constTransport
<
species::thermo
<
hConstThermo
<
perfectFluid<specie>
>,
sensibleInternalEnergy
>
> constFluidEThermoPhysics;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// multi-component liquid
makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoThermo,
multiComponentMixture,
constTransport,
sensibleInternalEnergy,
hConstThermo,
perfectFluid,
specie
);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
using namespace interfaceCompositionModels;
// multi-component gas in the presence of a pure liquid
makeInterfaceCompositionType
(
Saturated,
heRhoThermo,
rhoReactionThermo,
multiComponentMixture,
gasEThermoPhysics,
heRhoThermo,
rhoThermo,
pureMixture,
constFluidEThermoPhysics
);
// reacting gas in the presence of a pure liquid
makeInterfaceCompositionType
(
Saturated,
heRhoThermo,
rhoReactionThermo,
reactingMixture,
gasEThermoPhysics,
heRhoThermo,
rhoThermo,
pureMixture,
constFluidEThermoPhysics
);
// multi-component gas in the presence of a multi-component liquid
makeSpecieInterfaceCompositionType
(
Saturated,
heRhoThermo,
rhoReactionThermo,
multiComponentMixture,
constGasEThermoPhysics,
heRhoThermo,
rhoReactionThermo,
multiComponentMixture,
constFluidEThermoPhysics
);
// multi-component liquid in the presence of a multi-component gas
makeSpecieInterfaceCompositionType
(
Henry,
heRhoThermo,
rhoReactionThermo,
multiComponentMixture,
constFluidEThermoPhysics,
heRhoThermo,
rhoReactionThermo,
multiComponentMixture,
constGasEThermoPhysics
);
}
// ************************************************************************* //

View File

@ -0,0 +1,274 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "NonRandomTwoLiquid.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::interfaceCompositionModels::NonRandomTwoLiquid<Thermo, OtherThermo>::
NonRandomTwoLiquid
(
const dictionary& dict,
const phasePair& pair
)
:
InterfaceCompositionModel<Thermo, OtherThermo>(dict, pair),
gamma1_
(
IOobject
(
IOobject::groupName("gamma1", pair.name()),
pair.phase1().mesh().time().timeName(),
pair.phase1().mesh()
),
pair.phase1().mesh(),
dimensionedScalar("one", dimless, 1)
),
gamma2_
(
IOobject
(
IOobject::groupName("gamma2", pair.name()),
pair.phase1().mesh().time().timeName(),
pair.phase1().mesh()
),
pair.phase1().mesh(),
dimensionedScalar("one", dimless, 1)
),
beta12_("", dimless/dimTemperature, 0),
beta21_("", dimless/dimTemperature, 0)
{
if (this->speciesNames_.size() != 2)
{
FatalErrorIn
(
"template<class Thermo, class OtherThermo>"
"Foam::interfaceCompositionModels::"
"NonRandomTwoLiquid<Thermo, OtherThermo>::"
"NonRandomTwoLiquid"
"( "
"const dictionary& dict, "
"const phasePair& pair "
")"
) << "NonRandomTwoLiquid model is suitable for two species only."
<< exit(FatalError);
}
species1Name_ = this->speciesNames_[0];
species2Name_ = this->speciesNames_[1];
species1Index_ = this->thermo_.composition().species()[species1Name_];
species2Index_ = this->thermo_.composition().species()[species2Name_];
alpha12_ = dimensionedScalar
(
"alpha12",
dimless,
dict.subDict(species1Name_).lookup("alpha")
);
alpha21_ = dimensionedScalar
(
"alpha21",
dimless,
dict.subDict(species2Name_).lookup("alpha")
);
beta12_ = dimensionedScalar
(
"beta12",
dimless/dimTemperature,
dict.subDict(species1Name_).lookup("beta")
);
beta21_ = dimensionedScalar
(
"beta21",
dimless/dimTemperature,
dict.subDict(species2Name_).lookup("beta")
);
saturationPressureModel12_.reset
(
saturationPressureModel::New
(
dict.subDict(species1Name_).subDict("interaction")
).ptr()
);
saturationPressureModel21_.reset
(
saturationPressureModel::New
(
dict.subDict(species2Name_).subDict("interaction")
).ptr()
);
speciesModel1_.reset
(
interfaceCompositionModel::New
(
dict.subDict(species1Name_),
pair
).ptr()
);
speciesModel2_.reset
(
interfaceCompositionModel::New
(
dict.subDict(species2Name_),
pair
).ptr()
);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::interfaceCompositionModels::NonRandomTwoLiquid<Thermo, OtherThermo>::
~NonRandomTwoLiquid()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
void
Foam::interfaceCompositionModels::NonRandomTwoLiquid<Thermo, OtherThermo>::
update
(
const volScalarField& Tf
)
{
volScalarField W(this->thermo_.composition().W());
volScalarField X1
(
this->thermo_.composition().Y(species1Index_)
*W
/this->thermo_.composition().W(species1Index_)
);
volScalarField X2
(
this->thermo_.composition().Y(species2Index_)
*W
/this->thermo_.composition().W(species2Index_)
);
volScalarField alpha12(alpha12_ + Tf*beta12_);
volScalarField alpha21(alpha21_ + Tf*beta21_);
volScalarField tau12(saturationPressureModel12_->lnPSat(Tf));
volScalarField tau21(saturationPressureModel21_->lnPSat(Tf));
volScalarField G12(exp(- alpha12*tau12));
volScalarField G21(exp(- alpha21*tau21));
gamma1_ =
exp
(
sqr(X2)
*(
tau21*sqr(G21)/max(sqr(X1 + X2*G21), SMALL)
+ tau12*G12/max(sqr(X2 + X1*G12), SMALL)
)
);
gamma2_ =
exp
(
sqr(X1)
*(
tau12*sqr(G12)/max(sqr(X2 + X1*G12), SMALL)
+ tau21*G21/max(sqr(X1 + X2*G21), SMALL)
)
);
}
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::interfaceCompositionModels::NonRandomTwoLiquid<Thermo, OtherThermo>::Yf
(
const word& speciesName,
const volScalarField& Tf
) const
{
if (speciesName == species1Name_)
{
return
this->otherThermo_.composition().Y(speciesName)
*speciesModel1_->Yf(speciesName, Tf)
*gamma1_;
}
else if(speciesName == species2Name_)
{
return
this->otherThermo_.composition().Y(speciesName)
*speciesModel2_->Yf(speciesName, Tf)
*gamma2_;
}
else
{
return
this->thermo_.composition().Y(speciesName)
*(scalar(1) - Yf(species1Name_, Tf) - Yf(species2Name_, Tf));
}
}
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::interfaceCompositionModels::NonRandomTwoLiquid<Thermo, OtherThermo>::
YfPrime
(
const word& speciesName,
const volScalarField& Tf
) const
{
if (speciesName == species1Name_)
{
return
this->otherThermo_.composition().Y(speciesName)
*speciesModel1_->YfPrime(speciesName, Tf)
*gamma1_;
}
else if(speciesName == species2Name_)
{
return
this->otherThermo_.composition().Y(speciesName)
*speciesModel2_->YfPrime(speciesName, Tf)
*gamma2_;
}
else
{
return
- this->thermo_.composition().Y(speciesName)
*(YfPrime(species1Name_, Tf) + YfPrime(species2Name_, Tf));
}
}
// ************************************************************************* //

View File

@ -0,0 +1,167 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::NonRandomTwoLiquid
Description
Non ideal law for the mixing of two species. A separate composition model
is given for each species. The composition of a species is equal to the
value given by the model, scaled by the species fraction in the bulk of the
other phase, and multiplied by the activity coefficient for that species.
The gas behaviour is assumed ideal; i.e. the fugacity coefficient is taken
as equal to 1.
SourceFiles
NonRandomTwoLiquid.C
\*---------------------------------------------------------------------------*/
#ifndef NonRandomTwoLiquid_H
#define NonRandomTwoLiquid_H
#include "InterfaceCompositionModel.H"
#include "saturationPressureModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace interfaceCompositionModels
{
/*---------------------------------------------------------------------------*\
Class NonRandomTwoLiquid Declaration
\*---------------------------------------------------------------------------*/
template<class Thermo, class OtherThermo>
class NonRandomTwoLiquid
:
public InterfaceCompositionModel<Thermo, OtherThermo>
{
private:
// Private data
//- Activity coefficient for species 1
volScalarField gamma1_;
//- Activity coefficient for species 2
volScalarField gamma2_;
//- Name of species 1
word species1Name_;
//- Name of species 2
word species2Name_;
//- Indiex of species 1 within this thermo
label species1Index_;
//- Indiex of species 2 within this thermo
label species2Index_;
//- Non-randomness constant parameter for species 1
dimensionedScalar alpha12_;
//- Non-randomness constant parameter for species 2
dimensionedScalar alpha21_;
//- Non-randomness linear paramater for species 1
dimensionedScalar beta12_;
//- Non-randomness linear paramater for species 2
dimensionedScalar beta21_;
//- Interaction parameter model for species 1
autoPtr<saturationPressureModel> saturationPressureModel12_;
//- Interaction parameter model for species 2
autoPtr<saturationPressureModel> saturationPressureModel21_;
//- Composition model for species 1
autoPtr<interfaceCompositionModel> speciesModel1_;
//- Composition model for species 2
autoPtr<interfaceCompositionModel> speciesModel2_;
public:
//- Runtime type information
TypeName("NonRandomTwoLiquid");
// Constructors
//- Construct from components
NonRandomTwoLiquid
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~NonRandomTwoLiquid();
// Member Functions
//- Update the composition
virtual void update(const volScalarField& Tf);
//- The interface species fraction
virtual tmp<volScalarField> Yf
(
const word& speciesName,
const volScalarField& Tf
) const;
//- The interface species fraction derivative w.r.t. temperature
virtual tmp<volScalarField> YfPrime
(
const word& speciesName,
const volScalarField& Tf
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace interfaceCompositionModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "NonRandomTwoLiquid.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,162 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "Raoult.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::interfaceCompositionModels::Raoult<Thermo, OtherThermo>::Raoult
(
const dictionary& dict,
const phasePair& pair
)
:
InterfaceCompositionModel<Thermo, OtherThermo>(dict, pair),
YNonVapour_
(
IOobject
(
IOobject::groupName("YNonVapour", pair.name()),
pair.phase1().mesh().time().timeName(),
pair.phase1().mesh()
),
pair.phase1().mesh(),
dimensionedScalar("one", dimless, 1)
),
YNonVapourPrime_
(
IOobject
(
IOobject::groupName("YNonVapourPrime", pair.name()),
pair.phase1().mesh().time().timeName(),
pair.phase1().mesh()
),
pair.phase1().mesh(),
dimensionedScalar("zero", dimless/dimTemperature, 0)
)
{
forAllConstIter(hashedWordList, this->speciesNames_, iter)
{
speciesModels_.insert
(
*iter,
autoPtr<interfaceCompositionModel>
(
interfaceCompositionModel::New
(
dict.subDict(*iter),
pair
)
)
);
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::interfaceCompositionModels::Raoult<Thermo, OtherThermo>::~Raoult()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
void Foam::interfaceCompositionModels::Raoult<Thermo, OtherThermo>::update
(
const volScalarField& Tf
)
{
YNonVapour_ = scalar(1);
forAllIter
(
HashTable<autoPtr<interfaceCompositionModel> >,
speciesModels_,
iter
)
{
iter()->update(Tf);
YNonVapour_ -=
this->otherThermo_.composition().Y(iter.key())
*iter()->Yf(iter.key(), Tf);
YNonVapourPrime_ -=
this->otherThermo_.composition().Y(iter.key())
*iter()->YfPrime(iter.key(), Tf);
}
}
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::interfaceCompositionModels::Raoult<Thermo, OtherThermo>::Yf
(
const word& speciesName,
const volScalarField& Tf
) const
{
if (this->speciesNames_.contains(speciesName))
{
return
this->otherThermo_.composition().Y(speciesName)
*speciesModels_[speciesName]->Yf(speciesName, Tf);
}
else
{
return
this->thermo_.composition().Y(speciesName)
*YNonVapour_;
}
}
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::interfaceCompositionModels::Raoult<Thermo, OtherThermo>::YfPrime
(
const word& speciesName,
const volScalarField& Tf
) const
{
if (this->speciesNames_.contains(speciesName))
{
return
this->otherThermo_.composition().Y(speciesName)
*speciesModels_[speciesName]->YfPrime(speciesName, Tf);
}
else
{
return
this->otherThermo_.composition().Y(speciesName)
*YNonVapourPrime_;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,130 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::Raoult
Description
Raoult's law of ideal mixing. A separate composition model is given for
each species. The composition of a species is equal to the value given by
the model scaled by the species fraction in the bulk of the other phase.
SourceFiles
Raoult.C
\*---------------------------------------------------------------------------*/
#ifndef Raoult_H
#define Raoult_H
#include "InterfaceCompositionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace interfaceCompositionModels
{
/*---------------------------------------------------------------------------*\
Class Raoult Declaration
\*---------------------------------------------------------------------------*/
template<class Thermo, class OtherThermo>
class Raoult
:
public InterfaceCompositionModel<Thermo, OtherThermo>
{
private:
// Private data
//- Non-vapour species fraction
volScalarField YNonVapour_;
//- Non-vapour species fraction derivative w.r.t. temperature
volScalarField YNonVapourPrime_;
//- Species' individual composition models
HashTable<autoPtr<interfaceCompositionModel> > speciesModels_;
public:
//- Runtime type information
TypeName("Raoult");
// Constructors
//- Construct from components
Raoult
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~Raoult();
// Member Functions
//- Update the composition
virtual void update(const volScalarField& Tf);
//- The interface species fraction
virtual tmp<volScalarField> Yf
(
const word& speciesName,
const volScalarField& Tf
) const;
//- The interface species fraction derivative w.r.t. temperature
virtual tmp<volScalarField> YfPrime
(
const word& speciesName,
const volScalarField& Tf
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace interfaceCompositionModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "Raoult.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,156 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "Saturated.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::interfaceCompositionModels::Saturated<Thermo, OtherThermo>::
wRatioByP() const
{
return
this->thermo_.composition().W(saturatedIndex_)
/this->thermo_.composition().W()
/this->thermo_.p();
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::interfaceCompositionModels::Saturated<Thermo, OtherThermo>::Saturated
(
const dictionary& dict,
const phasePair& pair
)
:
InterfaceCompositionModel<Thermo, OtherThermo>(dict, pair),
saturatedName_(this->speciesNames_[0]),
saturatedIndex_
(
this->thermo_.composition().species()[saturatedName_]
),
saturationPressureModel_
(
saturationPressureModel::New
(
dict.subDict("saturationPressure")
)
)
{
if (this->speciesNames_.size() != 1)
{
FatalErrorIn
(
"template<class Thermo, class OtherThermo>"
"Foam::interfaceCompositionModels::Saturated<Thermo, OtherThermo>::"
"Saturated"
"( "
"const dictionary& dict, "
"const phasePair& pair "
")"
) << "Saturated model is suitable for one species only."
<< exit(FatalError);
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::interfaceCompositionModels::Saturated<Thermo, OtherThermo>::~Saturated()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
void
Foam::interfaceCompositionModels::Saturated<Thermo, OtherThermo>::update
(
const volScalarField& Tf
)
{
// do nothing
}
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::interfaceCompositionModels::Saturated<Thermo, OtherThermo>::Yf
(
const word& speciesName,
const volScalarField& Tf
) const
{
if (saturatedName_ == speciesName)
{
return wRatioByP()*saturationPressureModel_->pSat(Tf);
}
else
{
const label speciesIndex
(
this->thermo_.composition().species()[speciesName]
);
return
this->thermo_.Y()[speciesIndex]
*(scalar(1) - wRatioByP()*saturationPressureModel_->pSat(Tf))
/max(scalar(1) - this->thermo_.Y()[saturatedIndex_], SMALL);
}
}
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::interfaceCompositionModels::Saturated<Thermo, OtherThermo>::YfPrime
(
const word& speciesName,
const volScalarField& Tf
) const
{
if (saturatedName_ == speciesName)
{
return wRatioByP()*saturationPressureModel_->pSatPrime(Tf);
}
else
{
const label speciesIndex
(
this->thermo_.composition().species()[speciesName]
);
return
- this->thermo_.Y()[speciesIndex]
*wRatioByP()*saturationPressureModel_->pSatPrime(Tf)
/max(scalar(1) - this->thermo_.Y()[saturatedIndex_], SMALL);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,137 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::Saturated
Description
Model which uses a saturation pressure model for a single species to
calculate the interface composition.
SourceFiles
Saturated.C
\*---------------------------------------------------------------------------*/
#ifndef Saturated_H
#define Saturated_H
#include "InterfaceCompositionModel.H"
#include "saturationPressureModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace interfaceCompositionModels
{
/*---------------------------------------------------------------------------*\
Class Saturated Declaration
\*---------------------------------------------------------------------------*/
template<class Thermo, class OtherThermo>
class Saturated
:
public InterfaceCompositionModel<Thermo, OtherThermo>
{
protected:
// Private data
//- Saturated species name
word saturatedName_;
//- Saturated species index
label saturatedIndex_;
//- Saturation pressure model
autoPtr<saturationPressureModel> saturationPressureModel_;
// Private Member Functions
//- Constant of propotionality between partial pressure and mass
// fraction
tmp<volScalarField> wRatioByP() const;
public:
//- Runtime type information
TypeName("Saturated");
// Constructors
//- Construct from components
Saturated
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~Saturated();
// Member Functions
//- Update the composition
virtual void update(const volScalarField& Tf);
//- The interface species fraction
virtual tmp<volScalarField> Yf
(
const word& speciesName,
const volScalarField& Tf
) const;
//- The interface species fraction derivative w.r.t. temperature
virtual tmp<volScalarField> YfPrime
(
const word& speciesName,
const volScalarField& Tf
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace interfaceCompositionModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "Saturated.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,80 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "interfaceCompositionModel.H"
#include "phaseModel.H"
#include "phasePair.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(interfaceCompositionModel, 0);
defineRunTimeSelectionTable(interfaceCompositionModel, dictionary);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::interfaceCompositionModel::interfaceCompositionModel
(
const dictionary& dict,
const phasePair& pair
)
:
pair_(pair),
speciesNames_(dict.lookup("species"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::interfaceCompositionModel::~interfaceCompositionModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::hashedWordList& Foam::interfaceCompositionModel::species() const
{
return speciesNames_;
}
bool Foam::interfaceCompositionModel::transports
(
word& speciesName
) const
{
if (this->speciesNames_.contains(speciesName))
{
return true;
}
return false;
}
// ************************************************************************* //

View File

@ -0,0 +1,182 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::interfaceCompositionModel
Description
Generic base class for interface composition models. These models describe
the composition in phase 1 of the supplied pair at the interface with phase
2.
SourceFiles
interfaceCompositionModel.C
\*---------------------------------------------------------------------------*/
#ifndef interfaceCompositionModel_H
#define interfaceCompositionModel_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "volFields.H"
#include "dictionary.H"
#include "hashedWordList.H"
#include "runTimeSelectionTables.H"
namespace Foam
{
class phaseModel;
class phasePair;
/*---------------------------------------------------------------------------*\
Class interfaceCompositionModel Declaration
\*---------------------------------------------------------------------------*/
class interfaceCompositionModel
{
protected:
// Protected data
//- Phase pair
const phasePair& pair_;
//- Names of the transferring species
const hashedWordList speciesNames_;
public:
//- Runtime type information
TypeName("interfaceCompositionModel");
// Declare runtime construction
declareRunTimeSelectionTable
(
autoPtr,
interfaceCompositionModel,
dictionary,
(
const dictionary& dict,
const phasePair& pair
),
(dict, pair)
);
// Constructors
//- Construct from a dictionary and a phase pair
interfaceCompositionModel
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~interfaceCompositionModel();
// Selectors
static autoPtr<interfaceCompositionModel> New
(
const dictionary& dict,
const phasePair& pair
);
// Member Functions
//- Update the composition
virtual void update(const volScalarField& Tf) = 0;
//- Return the transferring species names
const hashedWordList& species() const;
//- Returns whether the species is transported by the model and
// provides the name of the diffused species
bool transports
(
word& speciesName
) const;
//- Interface mass fraction
virtual tmp<volScalarField> Yf
(
const word& speciesName,
const volScalarField& Tf
) const = 0;
//- The interface mass fraction derivative w.r.t. temperature
virtual tmp<volScalarField> YfPrime
(
const word& speciesName,
const volScalarField& Tf
) const = 0;
//- Mass fraction difference between the interface and the field
virtual tmp<volScalarField> dY
(
const word& speciesName,
const volScalarField& Tf
) const = 0;
//- Mass diffusivity
virtual tmp<volScalarField> D
(
const word& speciesName
) const = 0;
//- Latent heat
virtual tmp<volScalarField> L
(
const word& speciesName,
const volScalarField& Tf
) const = 0;
//- Add latent heat flow rate to total
virtual void addMDotL
(
const volScalarField& K,
const volScalarField& Tf,
volScalarField& mDotL,
volScalarField& mDotLPrime
) const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,69 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "interfaceCompositionModel.H"
#include "phasePair.H"
#include "rhoThermo.H"
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::interfaceCompositionModel>
Foam::interfaceCompositionModel::New
(
const dictionary& dict,
const phasePair& pair
)
{
word interfaceCompositionModelType
(
word(dict.lookup("type"))
+ "<"
+ pair.phase1().thermo().type()
+ ","
+ pair.phase2().thermo().type()
+ ">"
);
Info<< "Selecting interfaceCompositionModel for "
<< pair << ": " << interfaceCompositionModelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(interfaceCompositionModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn("interfaceCompositionModel::New")
<< "Unknown interfaceCompositionModelType type "
<< interfaceCompositionModelType << endl << endl
<< "Valid interfaceCompositionModel types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return cstrIter()(dict, pair);
}
// ************************************************************************* //

View File

@ -0,0 +1,72 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "Frossling.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace massTransferModels
{
defineTypeNameAndDebug(Frossling, 0);
addToRunTimeSelectionTable(massTransferModel, Frossling, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::massTransferModels::Frossling::Frossling
(
const dictionary& dict,
const phasePair& pair
)
:
massTransferModel(dict, pair),
Le_("Le", dimless, dict.lookup("Le"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::massTransferModels::Frossling::~Frossling()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::massTransferModels::Frossling::K() const
{
volScalarField Sh(scalar(2) + 0.552*sqrt(pair_.Re())*cbrt(Le_*pair_.Pr()));
return 6.0*pair_.dispersed()*Sh/sqr(pair_.dispersed().d());
}
// ************************************************************************* //

View File

@ -0,0 +1,103 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::massTransferModels::Frossling
Description
Frossling correlation for turbulent mass transfer from the surface of a
sphere to the surrounding fluid.
SourceFiles
Frossling.C
\*---------------------------------------------------------------------------*/
#ifndef Frossling_H
#define Frossling_H
#include "massTransferModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace massTransferModels
{
/*---------------------------------------------------------------------------*\
Class Frossling Declaration
\*---------------------------------------------------------------------------*/
class Frossling
:
public massTransferModel
{
private:
// Private data
//- Lewis number
const dimensionedScalar Le_;
public:
//- Runtime type information
TypeName("Frossling");
// Constructors
//- Construct from components
Frossling
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~Frossling();
// Member Functions
//- The implicit mass transfer coefficient
virtual tmp<volScalarField> K() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace massTransferModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,58 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "massTransferModel.H"
#include "phasePair.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(massTransferModel, 0);
defineRunTimeSelectionTable(massTransferModel, dictionary);
}
const Foam::dimensionSet Foam::massTransferModel::dimK(0, -2, 0, 0, 0);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::massTransferModel::massTransferModel
(
const dictionary& dict,
const phasePair& pair
)
:
pair_(pair)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::massTransferModel::~massTransferModel()
{}
// ************************************************************************* //

View File

@ -0,0 +1,128 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::massTransferModel
Description
SourceFiles
massTransferModel.C
\*---------------------------------------------------------------------------*/
#ifndef massTransferModel_H
#define massTransferModel_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "volFields.H"
#include "dictionary.H"
#include "runTimeSelectionTables.H"
namespace Foam
{
class phasePair;
/*---------------------------------------------------------------------------*\
Class massTransferModel Declaration
\*---------------------------------------------------------------------------*/
class massTransferModel
{
protected:
// Protected data
//- Phase pair
const phasePair& pair_;
public:
//- Runtime type information
TypeName("massTransferModel");
// Declare runtime construction
declareRunTimeSelectionTable
(
autoPtr,
massTransferModel,
dictionary,
(
const dictionary& dict,
const phasePair& pair
),
(dict, pair)
);
// Static data members
//- Coefficient dimensions
static const dimensionSet dimK;
// Constructors
//- Construct from a dictionary and a phase pair
massTransferModel
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~massTransferModel();
// Selectors
static autoPtr<massTransferModel> New
(
const dictionary& dict,
const phasePair& pair
);
// Member Functions
//- The implicit mass transfer coefficient
// Note: this has had the species mass diffusivity factored out
virtual tmp<volScalarField> K() const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "massTransferModel.H"
#include "phasePair.H"
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::massTransferModel> Foam::massTransferModel::New
(
const dictionary& dict,
const phasePair& pair
)
{
word massTransferModelType(dict.lookup("type"));
Info<< "Selecting massTransferModel for "
<< pair << ": " << massTransferModelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(massTransferModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn("massTransferModel::New")
<< "Unknown massTransferModelType type "
<< massTransferModelType << endl << endl
<< "Valid massTransferModel types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return cstrIter()(dict, pair);
}
// ************************************************************************* //

View File

@ -0,0 +1,75 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "sphericalMassTransfer.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace massTransferModels
{
defineTypeNameAndDebug(sphericalMassTransfer, 0);
addToRunTimeSelectionTable
(
massTransferModel,
sphericalMassTransfer,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::massTransferModels::sphericalMassTransfer::sphericalMassTransfer
(
const dictionary& dict,
const phasePair& pair
)
:
massTransferModel(dict, pair),
Le_("Le", dimless, dict.lookup("Le"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::massTransferModels::sphericalMassTransfer::~sphericalMassTransfer()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::massTransferModels::sphericalMassTransfer::K() const
{
return 60.0*pair_.dispersed()/sqr(pair_.dispersed().d());
}
// ************************************************************************* //

View File

@ -0,0 +1,103 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::massTransferModels::sphericalMassTransfer
Description
Model which applies an analytical solution for mass transfer from the
surface of a sphere to the fluid within the sphere.
SourceFiles
sphericalMassTransfer.C
\*---------------------------------------------------------------------------*/
#ifndef sphericalMassTransfer_H
#define sphericalMassTransfer_H
#include "massTransferModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace massTransferModels
{
/*---------------------------------------------------------------------------*\
Class sphericalMassTransfer Declaration
\*---------------------------------------------------------------------------*/
class sphericalMassTransfer
:
public massTransferModel
{
private:
// Private data
//- Lewis number
const dimensionedScalar Le_;
public:
//- Runtime type information
TypeName("spherical");
// Constructors
//- Construct from components
sphericalMassTransfer
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~sphericalMassTransfer();
// Member Functions
//- The implicit mass transfer coefficient
virtual tmp<volScalarField> K() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace massTransferModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,92 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "Antoine.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace saturationPressureModels
{
defineTypeNameAndDebug(Antoine, 0);
addToRunTimeSelectionTable(saturationPressureModel, Antoine, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::saturationPressureModels::Antoine::Antoine(const dictionary& dict)
:
saturationPressureModel(),
A_("A", dimless, dict.lookup("A")),
B_("B", dimTemperature, dict.lookup("B")),
C_("C", dimTemperature, dict.lookup("C"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::saturationPressureModels::Antoine::~Antoine()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::saturationPressureModels::Antoine::pSat
(
const volScalarField& T
) const
{
return
dimensionedScalar("one", dimPressure, 1)
*exp(A_ + B_/(C_ + T));
}
Foam::tmp<Foam::volScalarField>
Foam::saturationPressureModels::Antoine::pSatPrime
(
const volScalarField& T
) const
{
return - pSat(T)*B_/sqr(C_ + T);
}
Foam::tmp<Foam::volScalarField>
Foam::saturationPressureModels::Antoine::lnPSat
(
const volScalarField& T
) const
{
return A_ + B_/(C_ + T);
}
// ************************************************************************* //

View File

@ -0,0 +1,113 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::saturationPressureModels::Antoine
Description
Antoine equation for the vapour pressure.
\f[
\log p = A + \frac{B}{C + T}
\f]
Coefficients \f$A\f$, \f$B\f$ and \f$C\f$ are to be supplied and should be
suitable for natural logarithms and temperatures in Kelvin.
SourceFiles
Antoine.C
\*---------------------------------------------------------------------------*/
#ifndef Antoine_H
#define Antoine_H
#include "saturationPressureModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace saturationPressureModels
{
/*---------------------------------------------------------------------------*\
Class Antoine Declaration
\*---------------------------------------------------------------------------*/
class Antoine
:
public saturationPressureModel
{
protected:
// Private data
//- Constant A
dimensionedScalar A_;
//- Constant B
dimensionedScalar B_;
//- Constant C
dimensionedScalar C_;
public:
//- Runtime type information
TypeName("Antoine");
// Constructors
//- Construct from a dictionary
Antoine(const dictionary& dict);
//- Destructor
virtual ~Antoine();
// Member Functions
//- Saturation pressure
virtual tmp<volScalarField> pSat(const volScalarField& T) const;
//- Saturation pressure derivetive w.r.t. temperature
virtual tmp<volScalarField> pSatPrime(const volScalarField& T) const;
//- Natural log of the saturation pressure
virtual tmp<volScalarField> lnPSat(const volScalarField& T) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace saturationPressureModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "AntoineExtended.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace saturationPressureModels
{
defineTypeNameAndDebug(AntoineExtended, 0);
addToRunTimeSelectionTable
(
saturationPressureModel,
AntoineExtended,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::saturationPressureModels::AntoineExtended::AntoineExtended
(
const dictionary& dict
)
:
Antoine(dict),
D_("D", dimless, dict.lookup("D")),
F_("F", dimless, dict.lookup("F")),
E_("E", dimless/pow(dimTemperature, F_), dict.lookup("E"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::saturationPressureModels::AntoineExtended::~AntoineExtended()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::saturationPressureModels::AntoineExtended::pSat
(
const volScalarField& T
) const
{
return
dimensionedScalar("one", dimPressure/pow(dimTemperature, D_), 1)
*exp(A_ + B_/(C_ + T) + E_*pow(T, F_))
*pow(T, D_);
}
Foam::tmp<Foam::volScalarField>
Foam::saturationPressureModels::AntoineExtended::pSatPrime
(
const volScalarField& T
) const
{
return pSat(T)*((D_ + E_*F_*pow(T, F_))/T - B_/sqr(C_ + T));
}
Foam::tmp<Foam::volScalarField>
Foam::saturationPressureModels::AntoineExtended::lnPSat
(
const volScalarField& T
) const
{
return
A_
+ B_/(C_ + T)
+ D_*log(T*dimensionedScalar("one", dimless/dimTemperature, 1))
+ E_*pow(T, F_);
}
// ************************************************************************* //

View File

@ -0,0 +1,115 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::saturationPressureModels::AntoineExtended
Description
Extended Antoine equation for the vapour pressure.
\f[
\log (p) = A + \frac{B}{C + T} + D \log (T) + E T^F
\f]
Coefficients \f$A\f$, \f$B\f$, \f$C\f$, \f$D\f$, \f$E\f$ and \f$F\f$ are
to be supplied and should be suitable for natural logarithms and
temperatures in Kelvin.
SourceFiles
AntoineExtended.C
\*---------------------------------------------------------------------------*/
#ifndef AntoineExtended_H
#define AntoineExtended_H
#include "Antoine.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace saturationPressureModels
{
/*---------------------------------------------------------------------------*\
Class AntoineExtended Declaration
\*---------------------------------------------------------------------------*/
class AntoineExtended
:
public Antoine
{
private:
// Private data
//- Constant D
dimensionedScalar D_;
//- Constant F
dimensionedScalar F_;
//- Constant E
// (after F so F's dimensions can be used in the construction)
dimensionedScalar E_;
public:
//- Runtime type information
TypeName("AntoineExtended");
// Constructors
//- Construct from a dictionary
AntoineExtended(const dictionary& dict);
//- Destructor
virtual ~AntoineExtended();
// Member Functions
//- Saturation pressure
virtual tmp<volScalarField> pSat(const volScalarField& T) const;
//- Saturation pressure derivetive w.r.t. temperature
virtual tmp<volScalarField> pSatPrime(const volScalarField& T) const;
//- Natural log of the saturation pressure
virtual tmp<volScalarField> lnPSat(const volScalarField& T) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace saturationPressureModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,112 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "ArdenBuck.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace saturationPressureModels
{
defineTypeNameAndDebug(ArdenBuck, 0);
addToRunTimeSelectionTable(saturationPressureModel, ArdenBuck, dictionary);
}
}
static const Foam::dimensionedScalar zeroC("", Foam::dimTemperature, 273.15);
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21);
static const Foam::dimensionedScalar B("", Foam::dimless, 18.678);
static const Foam::dimensionedScalar C("", Foam::dimTemperature, 234.5);
static const Foam::dimensionedScalar D("", Foam::dimTemperature, 257.14);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::saturationPressureModels::ArdenBuck::xByTC
(
const volScalarField& TC
) const
{
return (B - TC/C)/(D + TC);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::saturationPressureModels::ArdenBuck::ArdenBuck(const dictionary& dict)
:
saturationPressureModel()
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::saturationPressureModels::ArdenBuck::~ArdenBuck()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::saturationPressureModels::ArdenBuck::pSat
(
const volScalarField& T
) const
{
volScalarField TC(T - zeroC);
return A*exp(TC*xByTC(TC));
}
Foam::tmp<Foam::volScalarField>
Foam::saturationPressureModels::ArdenBuck::pSatPrime
(
const volScalarField& T
) const
{
volScalarField TC(T - zeroC);
volScalarField x(xByTC(TC));
return A*exp(TC*x)*(D*x - TC/C)/(D + TC);
}
Foam::tmp<Foam::volScalarField>
Foam::saturationPressureModels::ArdenBuck::lnPSat
(
const volScalarField& T
) const
{
volScalarField TC(T - zeroC);
return log(A.value()) + TC*xByTC(TC);
}
// ************************************************************************* //

View File

@ -0,0 +1,100 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::saturationPressureModels::ArdenBuck
Description
ArdenBuck equation for the vapour pressure of steam.
SourceFiles
ArdenBuck.C
\*---------------------------------------------------------------------------*/
#ifndef ArdenBuck_H
#define ArdenBuck_H
#include "saturationPressureModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace saturationPressureModels
{
/*---------------------------------------------------------------------------*\
Class ArdenBuck Declaration
\*---------------------------------------------------------------------------*/
class ArdenBuck
:
public saturationPressureModel
{
private:
// Private Member Functions
//- Exponent divided by the temperature
tmp<volScalarField> xByTC(const volScalarField& TC) const;
public:
//- Runtime type information
TypeName("ArdenBuck");
// Constructors
//- Construct from a dictionary
ArdenBuck(const dictionary& dict);
//- Destructor
virtual ~ArdenBuck();
// Member Functions
//- Saturation pressure
virtual tmp<volScalarField> pSat(const volScalarField& T) const;
//- Saturation pressure derivetive w.r.t. temperature
virtual tmp<volScalarField> pSatPrime(const volScalarField& T) const;
//- Natural log of the saturation pressure
virtual tmp<volScalarField> lnPSat(const volScalarField& T) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace saturationPressureModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,57 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "saturationPressureModel.H"
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::saturationPressureModel> Foam::saturationPressureModel::New
(
const dictionary& dict
)
{
word saturationPressureModelType(dict.lookup("type"));
Info<< "Selecting saturationPressureModel: "
<< saturationPressureModelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(saturationPressureModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn("saturationPressureModel::New")
<< "Unknown saturationPressureModelType type "
<< saturationPressureModelType << endl << endl
<< "Valid saturationPressureModel types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return cstrIter()(dict);
}
// ************************************************************************* //

View File

@ -0,0 +1,49 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "saturationPressureModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(saturationPressureModel, 0);
defineRunTimeSelectionTable(saturationPressureModel, dictionary);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::saturationPressureModel::saturationPressureModel()
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::saturationPressureModel::~saturationPressureModel()
{}
// ************************************************************************* //

View File

@ -0,0 +1,127 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::saturationPressureModel
Description
SourceFiles
saturationPressureModel.C
newSaturationPressureModel.C
\*---------------------------------------------------------------------------*/
#ifndef saturationPressureModel_H
#define saturationPressureModel_H
#include "volFields.H"
#include "dictionary.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class saturationPressureModel Declaration
\*---------------------------------------------------------------------------*/
class saturationPressureModel
{
// Private Member Functions
//- Disallow default bitwise copy construct
saturationPressureModel(const saturationPressureModel&);
//- Disallow default bitwise assignment
void operator=(const saturationPressureModel&);
public:
//- Runtime type information
TypeName("saturationPressureModel");
//- Declare runtime construction
declareRunTimeSelectionTable
(
autoPtr,
saturationPressureModel,
dictionary,
(
const dictionary& dict
),
(dict)
);
// Constructors
//- Construct null
saturationPressureModel();
// Selectors
//- Select null constructed
static autoPtr<saturationPressureModel> New(const dictionary& dict);
//- Destructor
virtual ~saturationPressureModel();
// Member Functions
//- Saturation pressure
virtual tmp<volScalarField> pSat
(
const volScalarField& T
) const = 0;
//- Saturation pressure derivetive w.r.t. temperature
virtual tmp<volScalarField> pSatPrime
(
const volScalarField& T
) const = 0;
//- Natural log of the saturation pressure
virtual tmp<volScalarField> lnPSat
(
const volScalarField& T
) const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,96 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "constantSurfaceTensionCoefficient.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace surfaceTensionModels
{
defineTypeNameAndDebug(constantSurfaceTensionCoefficient, 0);
addToRunTimeSelectionTable
(
surfaceTensionModel,
constantSurfaceTensionCoefficient,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::surfaceTensionModels::constantSurfaceTensionCoefficient::
constantSurfaceTensionCoefficient
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
)
:
surfaceTensionModel(dict, pair, registerObject),
sigma_("sigma", dimSigma, dict.lookup("sigma"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::surfaceTensionModels::constantSurfaceTensionCoefficient::
~constantSurfaceTensionCoefficient()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::surfaceTensionModels::constantSurfaceTensionCoefficient::sigma() const
{
const fvMesh& mesh(this->pair_.phase1().mesh());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"sigma",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh,
sigma_
)
);
}
// ************************************************************************* //

View File

@ -0,0 +1,98 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::constantSurfaceTensionCoefficient
Description
Constant value surface tension model.
SourceFiles
constantSurfaceTensionCoefficient.C
\*---------------------------------------------------------------------------*/
#ifndef constantSurfaceTensionCoefficient_H
#define constantSurfaceTensionCoefficient_H
#include "surfaceTensionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace surfaceTensionModels
{
/*---------------------------------------------------------------------------*\
Class constantSurfaceTensionCoefficient Declaration
\*---------------------------------------------------------------------------*/
class constantSurfaceTensionCoefficient
:
public surfaceTensionModel
{
// Private data
//- Constant surface tension value
const dimensionedScalar sigma_;
public:
//- Runtime type information
TypeName("constant");
// Constructors
//- Construct from a dictionary and a phase pair
constantSurfaceTensionCoefficient
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~constantSurfaceTensionCoefficient();
// Member Functions
//- Aspect ratio
virtual tmp<volScalarField> sigma() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace surfaceTensionModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,60 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "surfaceTensionModel.H"
#include "phasePair.H"
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::surfaceTensionModel >
Foam::surfaceTensionModel::New
(
const dictionary& dict,
const phasePair& pair
)
{
word surfaceTensionModelType(dict.lookup("type"));
Info<< "Selecting surfaceTensionModel for "
<< pair << ": " << surfaceTensionModelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(surfaceTensionModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn("surfaceTensionModel::New")
<< "Unknown surfaceTensionModelType type "
<< surfaceTensionModelType << endl << endl
<< "Valid surfaceTensionModel types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return cstrIter()(dict, pair, true);
}
// ************************************************************************* //

View File

@ -0,0 +1,79 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "surfaceTensionModel.H"
#include "phasePair.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(surfaceTensionModel, 0);
defineRunTimeSelectionTable(surfaceTensionModel, dictionary);
}
const Foam::dimensionSet Foam::surfaceTensionModel::dimSigma(1, 0, -2, 0, 0);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::surfaceTensionModel::surfaceTensionModel
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
)
:
regIOobject
(
IOobject
(
IOobject::groupName(typeName, pair.name()),
pair.phase1().mesh().time().timeName(),
pair.phase1().mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
registerObject
)
),
pair_(pair)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::surfaceTensionModel::~surfaceTensionModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::surfaceTensionModel::writeData(Ostream& os) const
{
return os.good();
}
// ************************************************************************* //

View File

@ -0,0 +1,134 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::surfaceTensionModel
Description
SourceFiles
surfaceTensionModel.C
newAspectRatioModel.C
\*---------------------------------------------------------------------------*/
#ifndef surfaceTensionModel_H
#define surfaceTensionModel_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "volFields.H"
#include "dictionary.H"
#include "runTimeSelectionTables.H"
namespace Foam
{
class phasePair;
/*---------------------------------------------------------------------------*\
Class surfaceTensionModel Declaration
\*---------------------------------------------------------------------------*/
class surfaceTensionModel
:
public regIOobject
{
protected:
// Protected data
//- Phase pair
const phasePair& pair_;
public:
//- Runtime type information
TypeName("surfaceTensionModel");
// Declare runtime construction
declareRunTimeSelectionTable
(
autoPtr,
surfaceTensionModel,
dictionary,
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
),
(dict, pair, registerObject)
);
// Static data members
//- Coefficient dimensions
static const dimensionSet dimSigma;
// Constructors
//- Construct from a dictionary and a phase pair
surfaceTensionModel
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~surfaceTensionModel();
// Selectors
static autoPtr<surfaceTensionModel> New
(
const dictionary& dict,
const phasePair& pair
);
// Member Functions
//- Aspect ratio
virtual tmp<volScalarField> sigma() const = 0;
//- Dummy write for regIOobject
bool writeData(Ostream& os) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,64 @@
dragModels/dragModel/dragModel.C
dragModels/dragModel/newDragModel.C
dragModels/segregated/segregated.C
dragModels/Ergun/Ergun.C
dragModels/Gibilaro/Gibilaro.C
dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C
dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C
dragModels/Lain/Lain.C
dragModels/SchillerNaumann/SchillerNaumann.C
dragModels/SyamlalOBrien/SyamlalOBrien.C
dragModels/TomiyamaCorrelated/TomiyamaCorrelated.C
dragModels/TomiyamaAnalytic/TomiyamaAnalytic.C
dragModels/WenYu/WenYu.C
dragModels/IshiiZuber/IshiiZuber.C
swarmCorrections/swarmCorrection/swarmCorrection.C
swarmCorrections/swarmCorrection/newSwarmCorrection.C
swarmCorrections/noSwarm/noSwarm.C
swarmCorrections/TomiyamaSwarm/TomiyamaSwarm.C
liftModels/liftModel/liftModel.C
liftModels/liftModel/newLiftModel.C
liftModels/noLift/noLift.C
liftModels/constantLiftCoefficient/constantLiftCoefficient.C
liftModels/Moraga/Moraga.C
liftModels/LegendreMagnaudet/LegendreMagnaudet.C
liftModels/TomiyamaLift/TomiyamaLift.C
heatTransferModels/heatTransferModel/heatTransferModel.C
heatTransferModels/heatTransferModel/newHeatTransferModel.C
heatTransferModels/RanzMarshall/RanzMarshall.C
heatTransferModels/sphericalHeatTransfer/sphericalHeatTransfer.C
virtualMassModels/virtualMassModel/virtualMassModel.C
virtualMassModels/virtualMassModel/newVirtualMassModel.C
virtualMassModels/noVirtualMass/noVirtualMass.C
virtualMassModels/constantVirtualMassCoefficient/constantVirtualMassCoefficient.C
virtualMassModels/Lamb/Lamb.C
wallLubricationModels/wallLubricationModel/wallLubricationModel.C
wallLubricationModels/wallLubricationModel/newWallLubricationModel.C
wallLubricationModels/noWallLubrication/noWallLubrication.C
wallLubricationModels/Antal/Antal.C
wallLubricationModels/Frank/Frank.C
wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C
turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C
turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C
turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C
turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C
turbulentDispersionModels/Burns/Burns.C
turbulentDispersionModels/Gosman/Gosman.C
turbulentDispersionModels/LopezDeBertodano/LopezDeBertodano.C
aspectRatioModels/aspectRatioModel/aspectRatioModel.C
aspectRatioModels/aspectRatioModel/newAspectRatioModel.C
aspectRatioModels/constantAspectRatio/constantAspectRatio.C
aspectRatioModels/TomiyamaAspectRatio/TomiyamaAspectRatio.C
aspectRatioModels/VakhrushevEfremov/VakhrushevEfremov.C
aspectRatioModels/Wellek/Wellek.C
wallDependentModel/wallDependentModel.C
LIB = $(FOAM_LIBBIN)/libreactingEulerianInterfacialModels

View File

@ -0,0 +1,16 @@
EXE_INC = \
-I../phaseSystems/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/transportModel \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-lreactingTwoPhaseSystem \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie

View File

@ -0,0 +1,81 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "TomiyamaAspectRatio.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace aspectRatioModels
{
defineTypeNameAndDebug(TomiyamaAspectRatio, 0);
addToRunTimeSelectionTable
(
aspectRatioModel,
TomiyamaAspectRatio,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::aspectRatioModels::TomiyamaAspectRatio::TomiyamaAspectRatio
(
const dictionary& dict,
const phasePair& pair
)
:
VakhrushevEfremov(dict, pair),
wallDependentModel(pair.phase1().mesh())
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::aspectRatioModels::TomiyamaAspectRatio::~TomiyamaAspectRatio()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::aspectRatioModels::TomiyamaAspectRatio::E() const
{
return
VakhrushevEfremov::E()
*max
(
scalar(1) - 0.35*yWall()/pair_.dispersed().d(),
scalar(0.65)
);
}
// ************************************************************************* //

View File

@ -0,0 +1,101 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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::aspectRatioModels::TomiyamaAspectRatio
Description
Aspect ratio model of Tomiyama.
Reference:
\verbatim
"Implementation and Comparison of Correlations for interfacial Forces
in a Gas-Liquid System within an Euler-Euler Framework"
Otromke, M.,
PhD Thesis, April 2013
\endverbatim
SourceFiles
TomiyamaAspectRatio.C
\*---------------------------------------------------------------------------*/
#ifndef TomiyamaAspectRatio_H
#define TomiyamaAspectRatio_H
#include "VakhrushevEfremov.H"
#include "wallDependentModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace aspectRatioModels
{
/*---------------------------------------------------------------------------*\
Class TomiyamaAspectRatio Declaration
\*---------------------------------------------------------------------------*/
class TomiyamaAspectRatio
:
public VakhrushevEfremov,
public wallDependentModel
{
public:
//- Runtime type information
TypeName("Tomiyama");
// Constructors
//- Construct from a dictionary and an ordered phase pair
TomiyamaAspectRatio
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~TomiyamaAspectRatio();
// Member Functions
//- Aspect ratio
virtual tmp<volScalarField> E() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace aspectRatioModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,80 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "VakhrushevEfremov.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace aspectRatioModels
{
defineTypeNameAndDebug(VakhrushevEfremov, 0);
addToRunTimeSelectionTable
(
aspectRatioModel,
VakhrushevEfremov,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::aspectRatioModels::VakhrushevEfremov::VakhrushevEfremov
(
const dictionary& dict,
const phasePair& pair
)
:
aspectRatioModel(dict, pair)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::aspectRatioModels::VakhrushevEfremov::~VakhrushevEfremov()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::aspectRatioModels::VakhrushevEfremov::E() const
{
volScalarField Ta(pair_.Ta());
return
neg(Ta - scalar(1))*scalar(1)
+ pos(Ta - scalar(1))*neg(Ta - scalar(39.8))
*pow3(0.81 + 0.206*tanh(1.6 - 2*log10(max(Ta, scalar(1)))))
+ pos(Ta - scalar(39.8))*0.24;
}
// ************************************************************************* //

View File

@ -0,0 +1,100 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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::VakhrushevEfremov
Description
Aspect ratio model of Vakhrushev and Efremov.
Reference:
\verbatim
"Interpolation formula for computing the velocities of single gas
bubbles in liquids"
Vakhrushev, I.A. and Efremov, G.I.,
Chemistry and Technology of Fuels and Oils
Volume 6, Issue 5, May 1970, pp. 376-379,
\endverbatim
SourceFiles
VakhrushevEfremov.C
\*---------------------------------------------------------------------------*/
#ifndef VakhrushevEfremov_H
#define VakhrushevEfremov_H
#include "aspectRatioModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace aspectRatioModels
{
/*---------------------------------------------------------------------------*\
Class VakhrushevEfremov Declaration
\*---------------------------------------------------------------------------*/
class VakhrushevEfremov
:
public aspectRatioModel
{
public:
//- Runtime type information
TypeName("VakhrushevEfremov");
// Constructors
//- Construct from a dictionary and an ordered phase pair
VakhrushevEfremov
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~VakhrushevEfremov();
// Member Functions
//- Aspect ratio
virtual tmp<volScalarField> E() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace aspectRatioModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,74 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "Wellek.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace aspectRatioModels
{
defineTypeNameAndDebug(Wellek, 0);
addToRunTimeSelectionTable
(
aspectRatioModel,
Wellek,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::aspectRatioModels::Wellek::Wellek
(
const dictionary& dict,
const phasePair& pair
)
:
aspectRatioModel(dict, pair)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::aspectRatioModels::Wellek::~Wellek()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::aspectRatioModels::Wellek::E() const
{
return scalar(1)/(scalar(1) + 0.163*pow(pair_.Eo(), 0.757));
}
// ************************************************************************* //

View File

@ -0,0 +1,106 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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::aspectRatioModels::Wellek
Description
Aspect ratio model of Wellek et al.
References:
\verbatim
"Implementation and Comparison of Correlations for interfacial Forces
in a Gas-Liquid System within an Euler-Euler Framework"
Otromke, M.,
PhD Thesis, April 2013
\endverbatim
\verbatim
"Shape of liquid drops moving in liquid media"
Wellek, R.M., Agrawal, A.K., Skelland, A.H.P.,
International Journal of Multiphase Flow
Volume 12, Issue 5, September 1966, pp. 854-862
\endverbatim
SourceFiles
Wellek.C
\*---------------------------------------------------------------------------*/
#ifndef Wellek_H
#define Wellek_H
#include "aspectRatioModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace aspectRatioModels
{
/*---------------------------------------------------------------------------*\
Class Wellek Declaration
\*---------------------------------------------------------------------------*/
class Wellek
:
public aspectRatioModel
{
public:
//- Runtime type information
TypeName("Wellek");
// Constructors
//- Construct from a dictionary and an ordered phase pair
Wellek
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~Wellek();
// Member Functions
//- Aspect ratio
virtual tmp<volScalarField> E() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace aspectRatioModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,56 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "aspectRatioModel.H"
#include "phasePair.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(aspectRatioModel, 0);
defineRunTimeSelectionTable(aspectRatioModel, dictionary);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::aspectRatioModel::aspectRatioModel
(
const dictionary& dict,
const phasePair& pair
)
:
pair_(pair)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::aspectRatioModel::~aspectRatioModel()
{}
// ************************************************************************* //

View File

@ -0,0 +1,121 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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::aspectRatioModel
Description
SourceFiles
aspectRatioModel.C
newAspectRatioModel.C
\*---------------------------------------------------------------------------*/
#ifndef aspectRatioModel_H
#define aspectRatioModel_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "volFields.H"
#include "dictionary.H"
#include "runTimeSelectionTables.H"
namespace Foam
{
class phasePair;
/*---------------------------------------------------------------------------*\
Class aspectRatioModel Declaration
\*---------------------------------------------------------------------------*/
class aspectRatioModel
{
protected:
// Protected data
//- Phase pair
const phasePair& pair_;
public:
//- Runtime type information
TypeName("aspectRatioModel");
// Declare runtime construction
declareRunTimeSelectionTable
(
autoPtr,
aspectRatioModel,
dictionary,
(
const dictionary& dict,
const phasePair& pair
),
(dict, pair)
);
// Constructors
//- Construct from a dictionary and an ordered phase pair
aspectRatioModel
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~aspectRatioModel();
// Selectors
static autoPtr<aspectRatioModel> New
(
const dictionary& dict,
const phasePair& pair
);
// Member Functions
//- Aspect ratio
virtual tmp<volScalarField> E() const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,60 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "aspectRatioModel.H"
#include "phasePair.H"
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::aspectRatioModel>
Foam::aspectRatioModel::New
(
const dictionary& dict,
const phasePair& pair
)
{
word aspectRatioModelType(dict.lookup("type"));
Info<< "Selecting aspectRatioModel for "
<< pair << ": " << aspectRatioModelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(aspectRatioModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn("aspectRatioModel::New")
<< "Unknown aspectRatioModelType type "
<< aspectRatioModelType << endl << endl
<< "Valid aspectRatioModel types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return cstrIter()(dict, pair);
}
// ************************************************************************* //

View File

@ -0,0 +1,91 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "constantAspectRatio.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace aspectRatioModels
{
defineTypeNameAndDebug(constantAspectRatio, 0);
addToRunTimeSelectionTable
(
aspectRatioModel,
constantAspectRatio,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::aspectRatioModels::constantAspectRatio::constantAspectRatio
(
const dictionary& dict,
const phasePair& pair
)
:
aspectRatioModel(dict, pair),
E0_("E0", dimless, dict.lookup("E0"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::aspectRatioModels::constantAspectRatio::~constantAspectRatio()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::aspectRatioModels::constantAspectRatio::E() const
{
const fvMesh& mesh(this->pair_.phase1().mesh());
return
tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"zero",
mesh.time().timeName(),
mesh
),
mesh,
E0_
)
);
}
// ************************************************************************* //

View File

@ -0,0 +1,97 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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::constantAspectRatio
Description
Constant value aspect ratio model.
SourceFiles
constantAspectRatio.C
\*---------------------------------------------------------------------------*/
#ifndef constantAspectRatio_H
#define constantAspectRatio_H
#include "aspectRatioModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace aspectRatioModels
{
/*---------------------------------------------------------------------------*\
Class constantAspectRatio Declaration
\*---------------------------------------------------------------------------*/
class constantAspectRatio
:
public aspectRatioModel
{
// Private data
//- Constant aspect ratio value
const dimensionedScalar E0_;
public:
//- Runtime type information
TypeName("constant");
// Constructors
//- Construct from a dictionary and an ordered phase pair
constantAspectRatio
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~constantAspectRatio();
// Member Functions
//- Aspect ratio
virtual tmp<volScalarField> E() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace aspectRatioModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,80 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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 "phasePair.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& dict,
const phasePair& pair,
const bool registerObject
)
:
dragModel(dict, pair, registerObject)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::Ergun::~Ergun()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::Ergun::CdRe() const
{
return
(4/3)
*(
150
*max
(
scalar(1) - pair_.continuous(),
pair_.continuous().residualAlpha()
)/max(pair_.continuous(), pair_.continuous().residualAlpha())
+ 1.75
*pair_.Re()
);
}
// ************************************************************************* //

View File

@ -0,0 +1,98 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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
{
class phasePair;
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class Ergun Declaration
\*---------------------------------------------------------------------------*/
class Ergun
:
public dragModel
{
public:
//- Runtime type information
TypeName("Ergun");
// Constructors
//- Construct from a dictionary and a phase pair
Ergun
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~Ergun();
// Member Functions
//- Drag coefficient
virtual tmp<volScalarField> CdRe() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,78 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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 "phasePair.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& dict,
const phasePair& pair,
const bool registerObject
)
:
dragModel(dict, pair, registerObject)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::Gibilaro::~Gibilaro()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::Gibilaro::CdRe() const
{
volScalarField alpha2
(
max(scalar(1) - pair_.dispersed(), pair_.continuous().residualAlpha())
);
return
(4/3)
*(17.3/alpha2 + 0.336*pair_.Re())
*max(pair_.continuous(), pair_.continuous().residualAlpha())
*pow(alpha2, -2.8);
}
// ************************************************************************* //

View File

@ -0,0 +1,98 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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
{
class phasePair;
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class Gibilaro Declaration
\*---------------------------------------------------------------------------*/
class Gibilaro
:
public dragModel
{
public:
//- Runtime type information
TypeName("Gibilaro");
// Constructors
//- Construct from a dictionary and a phase pair
Gibilaro
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~Gibilaro();
// Member Functions
//- Drag coefficient
virtual tmp<volScalarField> CdRe() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,92 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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 "phasePair.H"
#include "Ergun.H"
#include "WenYu.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& dict,
const phasePair& pair,
const bool registerObject
)
:
dragModel(dict, pair, registerObject),
Ergun_
(
new Ergun
(
dict,
pair,
false
)
),
WenYu_
(
new WenYu
(
dict,
pair,
false
)
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::GidaspowErgunWenYu::~GidaspowErgunWenYu()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::dragModels::GidaspowErgunWenYu::CdRe() const
{
return
pos(pair_.continuous() - 0.8)*WenYu_->CdRe()
+ neg(pair_.continuous() - 0.8)*Ergun_->CdRe();
}
// ************************************************************************* //

View File

@ -0,0 +1,114 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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
Gidaspow, Ergun, Wen and Yu drag model
Reference:
\verbatim
"Multiphase flow and fluidization",
Gidaspow, D.,
Academic Press, New York, 1994.
\endverbatim
SourceFiles
GidaspowErgunWenYu.C
\*---------------------------------------------------------------------------*/
#ifndef GidaspowErgunWenYu_H
#define GidaspowErgunWenYu_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace dragModels
{
class Ergun;
class WenYu;
/*---------------------------------------------------------------------------*\
Class GidaspowErgunWenYu Declaration
\*---------------------------------------------------------------------------*/
class GidaspowErgunWenYu
:
public dragModel
{
// Private data
//- Ergun drag model
autoPtr<Ergun> Ergun_;
//- Wen Yu drag model
autoPtr<WenYu> WenYu_;
public:
//- Runtime type information
TypeName("GidaspowErgunWenYu");
// Constructors
//- Construct from a dictionary and an ordered phase pair
GidaspowErgunWenYu
(
const dictionary& interfaceDict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~GidaspowErgunWenYu();
// Member Functions
//- Drag coefficient
virtual tmp<volScalarField> CdRe() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,87 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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 "phasePair.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& dict,
const phasePair& pair,
const bool registerObject
)
:
dragModel(dict, pair, registerObject),
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::GidaspowSchillerNaumann::~GidaspowSchillerNaumann()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::dragModels::GidaspowSchillerNaumann::CdRe() const
{
volScalarField alpha2
(
max(scalar(1) - pair_.dispersed(), pair_.continuous().residualAlpha())
);
volScalarField Re(alpha2*pair_.Re());
volScalarField CdsRe
(
neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687))/alpha2
+ pos(Re - 1000)*0.44*max(Re, residualRe_)
);
return
CdsRe
*pow(alpha2, -2.65)
*max(pair_.continuous(), pair_.continuous().residualAlpha());
}
// ************************************************************************* //

View File

@ -0,0 +1,115 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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
Gidaspow, Schiller and Naumann drag model
References:
\verbatim
"Eulerian Two-Phase Flow Theory Applied to Fluidization"
Enwald, H., Peirano, E., Almstedt, A-E.,
Int. J. Multiphase Flow, Vol. 22, Suppl, 1996, pp. 21-66
Eq. 86-87, p. 40
This is identical to the Wen and Yu, Rowe model Table 3.6 p.56 in
"Derivation, Implementation and Validation of Computer Simulation Models
for Gas-Solid Fluidized Beds",
Berend van Wachem
Ph.D. thesis.
\endverbatim
SourceFiles
GidaspowSchillerNaumann.C
\*---------------------------------------------------------------------------*/
#ifndef GidaspowSchillerNaumann_H
#define GidaspowSchillerNaumann_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class GidaspowSchillerNaumann Declaration
\*---------------------------------------------------------------------------*/
class GidaspowSchillerNaumann
:
public dragModel
{
// Private data
//- Residual Reynolds Number
const dimensionedScalar residualRe_;
public:
//- Runtime type information
TypeName("GidaspowSchillerNaumann");
// Constructors
//- Construct from a dictionary and a phase pair
GidaspowSchillerNaumann
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~GidaspowSchillerNaumann();
// Member Functions
//- Drag coefficient
virtual tmp<volScalarField> CdRe() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,101 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "IshiiZuber.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(IshiiZuber, 0);
addToRunTimeSelectionTable(dragModel, IshiiZuber, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModels::IshiiZuber::IshiiZuber
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
)
:
dragModel(dict, pair, registerObject)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::IshiiZuber::~IshiiZuber()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::dragModels::IshiiZuber::CdRe() const
{
volScalarField Re(pair_.Re());
volScalarField Eo(pair_.Eo());
volScalarField mud(pair_.dispersed().mu());
volScalarField muc(pair_.continuous().mu());
volScalarField muStar((mud + 0.4*muc)/(mud + muc));
volScalarField muMix
(
muc
*pow(max(1 - pair_.dispersed(), scalar(1e-3)), -2.5*muStar)
);
volScalarField ReM(Re*muc/muMix);
volScalarField CdRe
(
pos(1000 - ReM)*24.0*(scalar(1) + 0.15*pow(ReM, 0.687))
+ neg(1000 - ReM)*0.44*ReM
);
volScalarField F((muc/muMix)*sqrt(1 - pair_.dispersed()));
F.max(1e-3);
volScalarField Ealpha((1 + 17.67*pow(F, 0.8571428))/(18.67*F));
volScalarField CdReEllipse(Ealpha*0.6666*sqrt(Eo)*Re);
return
pos(CdReEllipse - CdRe)
*min(CdReEllipse, Re*sqr(1 - pair_.dispersed())*2.66667)
+ neg(CdReEllipse - CdRe)*CdRe;
}
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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::IshiiZuber
Description
Ishii and Zuber (1979) drag model for dense dispersed bubbly flows.
Reference:
\verbatim
"Drag Coefficient and relative velocity in bubbly, droplet and
particulate flows",
Ishii, M., Zuber, N.,
AIChE Journal 5, Vol. 25, 1979, pp. 843-855.
\endverbatim
SourceFiles
IshiiZuber.C
\*---------------------------------------------------------------------------*/
#ifndef IshiiZuber_H
#define IshiiZuber_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class IshiiZuber Declaration
\*---------------------------------------------------------------------------*/
class IshiiZuber
:
public dragModel
{
public:
//- Runtime type information
TypeName("IshiiZuber");
// Constructors
//- Construct from a dictionary and a phase pair
IshiiZuber
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~IshiiZuber();
// Member Functions
//- Drag coefficient
virtual tmp<volScalarField> CdRe() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,75 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "Lain.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(Lain, 0);
addToRunTimeSelectionTable(dragModel, Lain, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModels::Lain::Lain
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
)
:
dragModel(dict, pair, registerObject)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::Lain::~Lain()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::Lain::CdRe() const
{
volScalarField Re(pair_.Re());
return
neg(Re - 1.5)*16.0
+ pos(Re - 1.5)*neg(Re - 80.0)*14.9*pow(Re, 0.22)
+ pos(Re - 80.0)*neg(Re - 1500.0)*48*(1.0 - 2.21/sqrt(max(Re, SMALL)))
+ pos(Re - 1500.0)*2.61*Re;
}
// ************************************************************************* //

View File

@ -0,0 +1,111 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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::Lain
Description
Drag model of Lain et al.
References:
\verbatim
"Implementation and Comparison of Correlations for interfacial Forces
in a Gas-Liquid System within an Euler-Euler Framework"
Otromke, M.,
PhD Thesis, April 2013
\endverbatim
\verbatim
"Modelling hydrodynamics and turbulence in a bubble column using the
Euler-Lagrange procedure"
Lain, S., Brodera, D., Sommerfelda, M., Goza, M.F.,
International Journal of Multiphase Flow
Volume 28, Issue 8, August 2002, pp. 1381-1407
\endverbatim
SourceFiles
Lain.C
\*---------------------------------------------------------------------------*/
#ifndef Lain_H
#define Lain_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class Lain Declaration
\*---------------------------------------------------------------------------*/
class Lain
:
public dragModel
{
public:
//- Runtime type information
TypeName("Lain");
// Constructors
//- Construct from a dictionary and a phase pair
Lain
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~Lain();
// Member Functions
//- Drag coefficient
virtual tmp<volScalarField> CdRe() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,74 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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 "phasePair.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& dict,
const phasePair& pair,
const bool registerObject
)
:
dragModel(dict, pair, registerObject),
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::SchillerNaumann::~SchillerNaumann()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::SchillerNaumann::CdRe() const
{
volScalarField Re(pair_.Re());
return
neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687))
+ pos(Re - 1000)*0.44*max(Re, residualRe_);
}
// ************************************************************************* //

View File

@ -0,0 +1,101 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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
Schiller and Naumann drag model for dispersed bubbly flows.
SourceFiles
SchillerNaumann.C
\*---------------------------------------------------------------------------*/
#ifndef SchillerNaumann_H
#define SchillerNaumann_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class SchillerNaumann Declaration
\*---------------------------------------------------------------------------*/
class SchillerNaumann
:
public dragModel
{
// Private data
//- Residual Reynolds Number
const dimensionedScalar residualRe_;
public:
//- Runtime type information
TypeName("SchillerNaumann");
// Constructors
//- Construct from a dictionary and a phase pair
SchillerNaumann
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~SchillerNaumann();
// Member Functions
//- Drag coefficient
virtual tmp<volScalarField> CdRe() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,93 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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 "phasePair.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& dict,
const phasePair& pair,
const bool registerObject
)
:
dragModel(dict, pair, registerObject)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::SyamlalOBrien::~SyamlalOBrien()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::CdRe() const
{
volScalarField alpha2
(
max(scalar(1) - pair_.dispersed(), pair_.continuous().residualAlpha())
);
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(pair_.Re());
volScalarField Vr
(
0.5
*(
A - 0.06*Re + sqrt(sqr(0.06*Re) + 0.12*Re*(2.0*B - A) + sqr(A))
)
);
volScalarField CdsRe(sqr(0.63*sqrt(Re) + 4.8*sqrt(Vr)));
return
CdsRe
*max(pair_.continuous(), pair_.continuous().residualAlpha())
/sqr(Vr);
}
// ************************************************************************* //

View File

@ -0,0 +1,97 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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
{
class phasePair;
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class SyamlalOBrien Declaration
\*---------------------------------------------------------------------------*/
class SyamlalOBrien
:
public dragModel
{
public:
//- Runtime type information
TypeName("SyamlalOBrien");
// Constructors
//- Construct from a dictionary and a phase pair
SyamlalOBrien
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~SyamlalOBrien();
// Member Functions
//- Drag coefficient
virtual tmp<volScalarField> CdRe() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,89 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "TomiyamaAnalytic.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(TomiyamaAnalytic, 0);
addToRunTimeSelectionTable(dragModel, TomiyamaAnalytic, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModels::TomiyamaAnalytic::TomiyamaAnalytic
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
)
:
dragModel(dict, pair, registerObject),
residualRe_("residualRe", dimless, dict.lookup("residualRe")),
residualEo_("residualEo", dimless, dict.lookup("residualEo")),
residualE_("residualE", dimless, dict.lookup("residualE"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::TomiyamaAnalytic::~TomiyamaAnalytic()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::dragModels::TomiyamaAnalytic::CdRe() const
{
volScalarField Eo(max(pair_.Eo(), residualEo_));
volScalarField E(max(pair_.E(), residualE_));
volScalarField OmEsq(max(scalar(1) - sqr(E), sqr(residualE_)));
volScalarField rtOmEsq(sqrt(OmEsq));
volScalarField F(max(asin(rtOmEsq) - E*rtOmEsq, residualE_)/OmEsq);
return
(8.0/3.0)
*Eo
/(
Eo*pow(E, 2.0/3.0)/OmEsq
+ 16*pow(E, 4.0/3.0)
)
/sqr(F)
*max(pair_.Re(), residualRe_);
}
// ************************************************************************* //

View File

@ -0,0 +1,116 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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::TomiyamaAnalytic
Description
Analytical drag model of Tomiyama et al.
Reference:
\verbatim
"Drag Coefficients of Bubbles. 1st Report. Drag Coefficients of a
Single Bubble in a Stagnant Liquid."
Tomiyama, A., Kataoka, I., and Sakaguchi, T.,
Nippon Kikai Gakkai Ronbunshu
Volume 61, Issue 587, 1995, pp. 2357-2364
\endverbatim
SourceFiles
TomiyamaAnalytic.C
\*---------------------------------------------------------------------------*/
#ifndef TomiyamaAnalytic_H
#define TomiyamaAnalytic_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class TomiyamaAnalytic Declaration
\*---------------------------------------------------------------------------*/
class TomiyamaAnalytic
:
public dragModel
{
// Private data
//- Residual Reynolds Number
const dimensionedScalar residualRe_;
//- Residual Eotvos number
const dimensionedScalar residualEo_;
//- Residual aspect ratio
const dimensionedScalar residualE_;
public:
//- Runtime type information
TypeName("TomiyamaAnalytic");
// Constructors
//- Construct from a dictionary and a phase pair
TomiyamaAnalytic
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~TomiyamaAnalytic();
// Member Functions
// Drag coefficient
virtual tmp<volScalarField> CdRe() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,85 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "TomiyamaCorrelated.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(TomiyamaCorrelated, 0);
addToRunTimeSelectionTable(dragModel, TomiyamaCorrelated, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModels::TomiyamaCorrelated::TomiyamaCorrelated
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
)
:
dragModel(dict, pair, registerObject),
A_("A", dimless, dict.lookup("A"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::TomiyamaCorrelated::~TomiyamaCorrelated()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::dragModels::TomiyamaCorrelated::CdRe() const
{
volScalarField Re(pair_.Re());
volScalarField Eo(pair_.Eo());
return
max
(
A_
*min
(
(1 + 0.15*pow(Re, 0.687)),
scalar(3)
),
8*Eo*Re/(3*Eo + 12)
);
}
// ************************************************************************* //

View File

@ -0,0 +1,110 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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::TomiyamaCorrelated
Description
Correlation of Tomiyama et al.
Reference:
\verbatim
"Terminal velocity of single bubbles in surface tension force dominant
regime"
Tomiyama, T., Celata, G.P., Hosokawa, S., Yoshida, S.,
International Journal of Multiphase Flow
Volume 28, Issue 9, September 2002, pp. 1497-1519
\endverbatim
SourceFiles
TomiyamaCorrelated.C
\*---------------------------------------------------------------------------*/
#ifndef TomiyamaCorrelated_H
#define TomiyamaCorrelated_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class TomiyamaCorrelated Declaration
\*---------------------------------------------------------------------------*/
class TomiyamaCorrelated
:
public dragModel
{
// Private data
//- Coefficient
const dimensionedScalar A_;
public:
//- Runtime type information
TypeName("TomiyamaCorrelated");
// Constructors
//- Construct from a dictionary and a phase pair
TomiyamaCorrelated
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~TomiyamaCorrelated();
// Member Functions
//- Drag coefficient
virtual tmp<volScalarField> CdRe() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,85 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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 "phasePair.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& dict,
const phasePair& pair,
const bool registerObject
)
:
dragModel(dict, pair, registerObject),
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::WenYu::~WenYu()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::CdRe() const
{
volScalarField alpha2
(
max(scalar(1) - pair_.dispersed(), pair_.continuous().residualAlpha())
);
volScalarField Re(pair_.Re());
volScalarField CdsRe
(
neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687))
+ pos(Re - 1000)*0.44*max(Re, residualRe_)
);
return
CdsRe
*pow(alpha2, -2.65)
*max(pair_.continuous(), pair_.continuous().residualAlpha());
}
// ************************************************************************* //

View File

@ -0,0 +1,109 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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
Wen and Yu drag model
Reference:
\verbatim
"Eulerian Two-Phase Flow Theory Applied to Fluidization"
Enwald, H., Peirano, E., Almstedt, A-E.,
Int. J. Multiphase Flow, Vol. 22, Suppl, 1996, pp. 21-66
Eq. 86-87, p. 40
\endverbatim
SourceFiles
WenYu.C
\*---------------------------------------------------------------------------*/
#ifndef WenYu_H
#define WenYu_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class WenYu Declaration
\*---------------------------------------------------------------------------*/
class WenYu
:
public dragModel
{
// Private data
//- Residual Reynolds Number
const dimensionedScalar residualRe_;
public:
//- Runtime type information
TypeName("WenYu");
// Constructors
//- Construct from a dictionary and a phase pair
WenYu
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~WenYu();
// Member Functions
//- Drag coefficient
virtual tmp<volScalarField> CdRe() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,140 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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"
#include "phasePair.H"
#include "swarmCorrection.H"
#include "surfaceInterpolate.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(dragModel, 0);
defineRunTimeSelectionTable(dragModel, dictionary);
}
const Foam::dimensionSet Foam::dragModel::dimK(1, -3, -1, 0, 0);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModel::dragModel
(
const phasePair& pair,
const bool registerObject
)
:
regIOobject
(
IOobject
(
IOobject::groupName(typeName, pair.name()),
pair.phase1().mesh().time().timeName(),
pair.phase1().mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
registerObject
)
),
pair_(pair)
{}
Foam::dragModel::dragModel
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
)
:
regIOobject
(
IOobject
(
IOobject::groupName(typeName, pair.name()),
pair.phase1().mesh().time().timeName(),
pair.phase1().mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
registerObject
)
),
pair_(pair),
swarmCorrection_
(
swarmCorrection::New
(
dict.subDict("swarmCorrection"),
pair
)
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModel::~dragModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModel::Ki() const
{
return
0.75
*CdRe()
*swarmCorrection_->Cs()
*pair_.continuous().rho()
*pair_.continuous().nu()
/sqr(pair_.dispersed().d());
}
Foam::tmp<Foam::volScalarField> Foam::dragModel::K() const
{
return max(pair_.dispersed(), pair_.dispersed().residualAlpha())*Ki();
}
Foam::tmp<Foam::surfaceScalarField> Foam::dragModel::Kf() const
{
return
max
(
fvc::interpolate(pair_.dispersed()),
pair_.dispersed().residualAlpha()
)*fvc::interpolate(Ki());
}
bool Foam::dragModel::writeData(Ostream& os) const
{
return os.good();
}
// ************************************************************************* //

View File

@ -0,0 +1,162 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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 "volFields.H"
#include "dictionary.H"
#include "runTimeSelectionTables.H"
namespace Foam
{
class phasePair;
class swarmCorrection;
/*---------------------------------------------------------------------------*\
Class dragModel Declaration
\*---------------------------------------------------------------------------*/
class dragModel
:
public regIOobject
{
protected:
// Protected data
//- Phase pair
const phasePair& pair_;
//- Swarm correction
autoPtr<swarmCorrection> swarmCorrection_;
public:
//- Runtime type information
TypeName("dragModel");
// Declare runtime construction
declareRunTimeSelectionTable
(
autoPtr,
dragModel,
dictionary,
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
),
(dict, pair, registerObject)
);
// Static data members
//- Coefficient dimensions
static const dimensionSet dimK;
// Constructors
// Construct without residual constants
dragModel
(
const phasePair& pair,
const bool registerObject
);
// Construct with residual constants
dragModel
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~dragModel();
// Selectors
static autoPtr<dragModel> New
(
const dictionary& dict,
const phasePair& pair
);
// Member Functions
//- Drag coefficient
virtual tmp<volScalarField> CdRe() const = 0;
//- Return the phase-intensive drag coefficient Ki
// used in the momentum equations
// ddt(alpha1*rho1*U1) + ... = ... alphad*K*(U1-U2)
// ddt(alpha2*rho2*U2) + ... = ... alphad*K*(U2-U1)
virtual tmp<volScalarField> Ki() const;
//- Return the drag coefficient K
// used in the momentum equations
// ddt(alpha1*rho1*U1) + ... = ... K*(U1-U2)
// ddt(alpha2*rho2*U2) + ... = ... K*(U2-U1)
virtual tmp<volScalarField> K() const;
//- Return the drag coefficient Kf
// used in the face-momentum equations
virtual tmp<surfaceScalarField> Kf() const;
//- Dummy write for regIOobject
bool writeData(Ostream& os) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 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"
#include "phasePair.H"
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
(
const dictionary& dict,
const phasePair& pair
)
{
word dragModelType(dict.lookup("type"));
Info<< "Selecting dragModel for "
<< pair << ": " << 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()(dict, pair, true);
}
// ************************************************************************* //

View File

@ -0,0 +1,157 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "segregated.H"
#include "phasePair.H"
#include "fvcGrad.H"
#include "surfaceInterpolate.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace dragModels
{
defineTypeNameAndDebug(segregated, 0);
addToRunTimeSelectionTable(dragModel, segregated, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dragModels::segregated::segregated
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
)
:
dragModel(dict, pair, registerObject),
m_("m", dimless, dict.lookup("m")),
n_("n", dimless, dict.lookup("n"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::segregated::~segregated()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::CdRe() const
{
FatalErrorIn("Foam::dragModels::segregated::CdRe() const")
<< "Not implemented."
<< "Drag coefficient not defined for the segregated model."
<< exit(FatalError);
return pair_.phase1();
}
Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::K() const
{
const fvMesh& mesh(pair_.phase1().mesh());
const volScalarField& alpha1(pair_.phase1());
const volScalarField& alpha2(pair_.phase2());
const volScalarField& rho1(pair_.phase1().rho());
const volScalarField& rho2(pair_.phase2().rho());
tmp<volScalarField> tnu1(pair_.phase1().nu());
tmp<volScalarField> tnu2(pair_.phase2().nu());
const volScalarField& nu1(tnu1());
const volScalarField& nu2(tnu2());
volScalarField L
(
IOobject
(
"L",
mesh.time().timeName(),
mesh
),
mesh,
dimensionedScalar("L", dimLength, 0),
zeroGradientFvPatchField<scalar>::typeName
);
L.internalField() = cbrt(mesh.V());
L.correctBoundaryConditions();
volScalarField I
(
alpha1
/max
(
alpha1 + alpha2,
pair_.phase1().residualAlpha() + pair_.phase2().residualAlpha()
)
);
volScalarField magGradI
(
max
(
mag(fvc::grad(I)),
(pair_.phase1().residualAlpha() + pair_.phase2().residualAlpha())/L
)
);
volScalarField muI
(
rho1*nu1*rho2*nu2
/(rho1*nu1 + rho2*nu2)
);
volScalarField muAlphaI
(
alpha1*rho1*nu1*alpha2*rho2*nu2
/(alpha1*rho1*nu1 + alpha2*rho2*nu2)
);
volScalarField ReI
(
pair_.rho()
*pair_.magUr()
/(magGradI*muI)
);
volScalarField lambda(m_*ReI + n_*muAlphaI/muI);
return lambda*sqr(magGradI)*muI;
}
Foam::tmp<Foam::surfaceScalarField> Foam::dragModels::segregated::Kf() const
{
return fvc::interpolate(K());
}
// ************************************************************************* //

View File

@ -0,0 +1,117 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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::segregated
Description
Segregated drag model for use in regions with no obvious dispersed phase.
Reference:
\verbatim
"Towards the Numerical Simulation of Multi-scale Two-phase Flows",
Marschall, H.,
PhD Thesis, TU München, 2011
\endverbatim
SourceFiles
segregated.C
\*---------------------------------------------------------------------------*/
#ifndef segregated_H
#define segregated_H
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace dragModels
{
/*---------------------------------------------------------------------------*\
Class segregated Declaration
\*---------------------------------------------------------------------------*/
class segregated
:
public dragModel
{
// Private data
//- M coefficient
const dimensionedScalar m_;
//- N coefficient
const dimensionedScalar n_;
public:
//- Runtime type information
TypeName("segregated");
// Constructors
//- Construct from components
segregated
(
const dictionary& dict,
const phasePair& pair,
const bool registerObject
);
//- Destructor
virtual ~segregated();
// Member Functions
//- Drag coefficient
virtual tmp<volScalarField> CdRe() const;
//- The drag function used in the momentum equation
virtual tmp<volScalarField> K() const;
//- The drag function Kf used in the face-momentum equations
virtual tmp<surfaceScalarField> Kf() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace dragModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,76 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "RanzMarshall.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace heatTransferModels
{
defineTypeNameAndDebug(RanzMarshall, 0);
addToRunTimeSelectionTable(heatTransferModel, RanzMarshall, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::heatTransferModels::RanzMarshall::RanzMarshall
(
const dictionary& dict,
const phasePair& pair
)
:
heatTransferModel(dict, pair)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::heatTransferModels::RanzMarshall::~RanzMarshall()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::heatTransferModels::RanzMarshall::K() const
{
volScalarField Nu(scalar(2) + 0.6*sqrt(pair_.Re())*cbrt(pair_.Pr()));
return
6.0
*max(pair_.dispersed(), residualAlpha_)
*pair_.continuous().kappa()
*Nu
/sqr(pair_.dispersed().d());
}
// ************************************************************************* //

View File

@ -0,0 +1,95 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::heatTransferModels::RanzMarshall
Description
Ranz-Marshall correlation for turbulent heat transfer from the surface of a
sphere to the surrounding fluid.
SourceFiles
RanzMarshall.C
\*---------------------------------------------------------------------------*/
#ifndef RanzMarshall_H
#define RanzMarshall_H
#include "heatTransferModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace heatTransferModels
{
/*---------------------------------------------------------------------------*\
Class RanzMarshall Declaration
\*---------------------------------------------------------------------------*/
class RanzMarshall
:
public heatTransferModel
{
public:
//- Runtime type information
TypeName("RanzMarshall");
// Constructors
//- Construct from components
RanzMarshall
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~RanzMarshall();
// Member Functions
//- The heat transfer function K used in the enthalpy equation
tmp<volScalarField> K() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace heatTransferModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

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

View File

@ -0,0 +1,132 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::heatTransferModel
Description
SourceFiles
heatTransferModel.C
\*---------------------------------------------------------------------------*/
#ifndef heatTransferModel_H
#define heatTransferModel_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "volFields.H"
#include "dictionary.H"
#include "runTimeSelectionTables.H"
namespace Foam
{
class phasePair;
/*---------------------------------------------------------------------------*\
Class heatTransferModel Declaration
\*---------------------------------------------------------------------------*/
class heatTransferModel
{
protected:
// Protected data
//- Phase pair
const phasePair& pair_;
//- Residual phase fraction
const dimensionedScalar residualAlpha_;
public:
//- Runtime type information
TypeName("heatTransferModel");
// Declare runtime construction
declareRunTimeSelectionTable
(
autoPtr,
heatTransferModel,
dictionary,
(
const dictionary& dict,
const phasePair& pair
),
(dict, pair)
);
// Static data members
//- Coefficient dimensions
static const dimensionSet dimK;
// Constructors
//- Construct froma dictionary and a phase pair
heatTransferModel
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~heatTransferModel();
// Selectors
static autoPtr<heatTransferModel> New
(
const dictionary& dict,
const phasePair& pair
);
// Member Functions
//- The heat transfer function K used in the enthalpy equation
// ddt(alpha1*rho1*ha) + ... = ... K*(Ta - Tb)
// ddt(alpha2*rho2*hb) + ... = ... K*(Tb - Ta)
virtual tmp<volScalarField> K() const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

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

View File

@ -0,0 +1,78 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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 "sphericalHeatTransfer.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace heatTransferModels
{
defineTypeNameAndDebug(sphericalHeatTransfer, 0);
addToRunTimeSelectionTable
(
heatTransferModel,
sphericalHeatTransfer,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::heatTransferModels::sphericalHeatTransfer::sphericalHeatTransfer
(
const dictionary& dict,
const phasePair& pair
)
:
heatTransferModel(dict, pair)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::heatTransferModels::sphericalHeatTransfer::~sphericalHeatTransfer()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::heatTransferModels::sphericalHeatTransfer::K() const
{
return
60.0
*max(pair_.dispersed(), residualAlpha_)
*pair_.continuous().kappa()
/sqr(pair_.dispersed().d());
}
// ************************************************************************* //

View File

@ -0,0 +1,95 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::heatTransferModels::sphericalHeatTransfer
Description
Model which applies an analytical solution for heat transfer from the
surface of a sphere to the fluid within the sphere.
SourceFiles
sphericalHeatTransfer.C
\*---------------------------------------------------------------------------*/
#ifndef sphericalHeatTransfer_H
#define sphericalHeatTransfer_H
#include "heatTransferModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace heatTransferModels
{
/*---------------------------------------------------------------------------*\
Class sphericalHeatTransfer Declaration
\*---------------------------------------------------------------------------*/
class sphericalHeatTransfer
:
public heatTransferModel
{
public:
//- Runtime type information
TypeName("spherical");
// Constructors
//- Construct from components
sphericalHeatTransfer
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~sphericalHeatTransfer();
// Member Functions
//- The heat transfer function K used in the enthalpy equation
tmp<volScalarField> K() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace heatTransferModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,98 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "LegendreMagnaudet.H"
#include "phasePair.H"
#include "fvcGrad.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace liftModels
{
defineTypeNameAndDebug(LegendreMagnaudet, 0);
addToRunTimeSelectionTable(liftModel, LegendreMagnaudet, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::liftModels::LegendreMagnaudet::LegendreMagnaudet
(
const dictionary& dict,
const phasePair& pair
)
:
liftModel(dict, pair),
residualRe_("residualRe", dimless, dict.lookup("residualRe"))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::liftModels::LegendreMagnaudet::~LegendreMagnaudet()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::liftModels::LegendreMagnaudet::Cl() const
{
volScalarField Re(max(pair_.Re(), residualRe_));
volScalarField Sr
(
sqr(pair_.dispersed().d())
/(
Re
*pair_.continuous().nu()
)
*mag(fvc::grad(pair_.continuous().U()))
);
volScalarField ClLowSqr
(
sqr(6.0*2.255)
*sqr(Sr)
/(
pow4(constant::mathematical::pi)
*Re
*pow3(Sr + 0.2*Re)
)
);
volScalarField ClHighSqr
(
sqr(0.5*(Re + 16.0)/(Re + 29.0))
);
return sqrt(ClLowSqr + ClHighSqr);
}
// ************************************************************************* //

View File

@ -0,0 +1,116 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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::liftModels::LegendreMagnaudet
Description
Lift model of Legendre and Magnaudet.
References:
\verbatim
"Implementation and Comparison of Correlations for interfacial Forces
in a Gas-Liquid System within an Euler-Euler Framework"
Otromke, M.
PhD Thesis
April 2013
\endverbatim
\verbatim
"The lift force on a spherical bubble in a viscous linear shear flow"
Legendre, D., Magnaudet, J.,
Journal of Fluid Mechanics
Volume 368, August 1998, pp. 81-126
\endverbatim
SourceFiles
LegendreMagnaudet.C
\*---------------------------------------------------------------------------*/
#ifndef LegendreMagnaudet_H
#define LegendreMagnaudet_H
#include "liftModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace liftModels
{
/*---------------------------------------------------------------------------*\
Class LegendreMagnaudet Declaration
\*---------------------------------------------------------------------------*/
class LegendreMagnaudet
:
public liftModel
{
// Private data
//- Residual Reynold's number
const dimensionedScalar residualRe_;
public:
//- Runtime type information
TypeName("LegendreMagnaudet");
// Constructors
//- Construct from a dictionary and a phase pair
LegendreMagnaudet
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~LegendreMagnaudet();
// Member Functions
//- Lift coefficient
virtual tmp<volScalarField> Cl() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace liftModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,101 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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 "Moraga.H"
#include "phasePair.H"
#include "fvcGrad.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace liftModels
{
defineTypeNameAndDebug(Moraga, 0);
addToRunTimeSelectionTable(liftModel, Moraga, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::liftModels::Moraga::Moraga
(
const dictionary& dict,
const phasePair& pair
)
:
liftModel(dict, pair)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::liftModels::Moraga::~Moraga()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::liftModels::Moraga::Cl() const
{
volScalarField Re(pair_.Re());
volScalarField sqrSr
(
sqr(pair_.dispersed().d())
/pair_.continuous().nu()
*mag(fvc::grad(pair_.continuous().U()))
);
if
(
min(Re).value() < 1200.0
|| max(Re).value() > 18800.0
|| min(sqrSr).value() < 0.0016
|| max(sqrSr).value() > 0.04
)
{
WarningIn
(
"Foam::tmp<Foam::volScalarField> "
"Foam::liftModels::Moraga::Cl() const"
) << "Re and/or Sr are out of the range of applicability of the "
<< "Moraga model. Clamping to range bounds"
<< endl;
}
Re.min(1200.0);
Re.max(18800.0);
sqrSr.min(0.0016);
sqrSr.max(0.04);
return 0.2*exp(- Re*sqrSr/3.6e5 - 0.12)*exp(Re*sqrSr/3.0e7);
}
// ************************************************************************* //

View File

@ -0,0 +1,109 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 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::liftModels::Moraga
Description
Lift model of Moraga et al.
References:
\verbatim
"Implementation and Comparison of Correlations for interfacial Forces
in a Gas-Liquid System within an Euler-Euler Framework"
Otromke, M.,
PhD Thesis, April 2013
\endverbatim
\verbatim
"Lateral forces on spheres in turbulent uniform shear flow"
Moraga, F.J., Bonetto, F.J., Lahey, R.T.,
International Journal of Multiphase Flow
Volume 25, Issues 6-7, September 1999, pp. 1321-1372
\endverbatim
SourceFiles
Moraga.C
\*---------------------------------------------------------------------------*/
#ifndef Moraga_H
#define Moraga_H
#include "liftModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace liftModels
{
/*---------------------------------------------------------------------------*\
Class Moraga Declaration
\*---------------------------------------------------------------------------*/
class Moraga
:
public liftModel
{
public:
//- Runtime type information
TypeName("Moraga");
// Constructors
//- Construct from a dictionary and a phase pair
Moraga
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~Moraga();
// Member Functions
//- Lift coefficient
virtual tmp<volScalarField> Cl() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace liftModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

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