mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
reactingTwoPhaseEulerFoam: Moved into reactingEulerFoam
and two-phase functionality separated from multiphase functionality
This commit is contained in:
@ -1,11 +0,0 @@
|
||||
#!/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
|
||||
@ -1,13 +0,0 @@
|
||||
#!/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
|
||||
@ -1,12 +0,0 @@
|
||||
#include "CourantNo.H"
|
||||
|
||||
{
|
||||
scalar UrCoNum = 0.5*gMax
|
||||
(
|
||||
fvc::surfaceSum(mag(phi1 - phi2))().internalField()/mesh.V().field()
|
||||
)*runTime.deltaTValue();
|
||||
|
||||
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
|
||||
|
||||
CoNum = max(CoNum, UrCoNum);
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
{
|
||||
autoPtr<phaseSystem::heatTransferTable>
|
||||
heatTransferPtr(fluid.heatTransfer());
|
||||
|
||||
phaseSystem::heatTransferTable&
|
||||
heatTransfer = heatTransferPtr();
|
||||
|
||||
{
|
||||
tmp<fvScalarMatrix> E1Eqn(phase1.heEqn());
|
||||
|
||||
if (E1Eqn.valid())
|
||||
{
|
||||
E1Eqn =
|
||||
(
|
||||
E1Eqn
|
||||
==
|
||||
*heatTransfer[phase1.name()]
|
||||
+ alpha1*rho1*(U1&g)
|
||||
+ fvOptions(alpha1, rho1, phase1.thermo().he())
|
||||
);
|
||||
|
||||
E1Eqn->relax();
|
||||
fvOptions.constrain(E1Eqn());
|
||||
E1Eqn->solve();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
tmp<fvScalarMatrix> E2eqn(phase2.heEqn());
|
||||
|
||||
if (E2eqn.valid())
|
||||
{
|
||||
E2eqn =
|
||||
(
|
||||
E2eqn
|
||||
==
|
||||
*heatTransfer[phase2.name()]
|
||||
+ alpha2*rho2*(U2&g)
|
||||
+ fvOptions(alpha2, rho2, phase2.thermo().he())
|
||||
);
|
||||
|
||||
E2eqn->relax();
|
||||
fvOptions.constrain(E2eqn());
|
||||
E2eqn->solve();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fluid.correctThermo();
|
||||
|
||||
Info<< " phase1.thermo().T(): " << min(phase1.thermo().T()).value()
|
||||
<< " - " << max(phase1.thermo().T()).value() << endl;
|
||||
|
||||
Info<< " phase2.thermo().T(): " << min(phase2.thermo().T()).value()
|
||||
<< " - " << max(phase2.thermo().T()).value() << endl;
|
||||
@ -1,3 +0,0 @@
|
||||
reactingTwoPhaseEulerFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/reactingTwoPhaseEulerFoam
|
||||
@ -1,24 +0,0 @@
|
||||
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
|
||||
@ -1,50 +0,0 @@
|
||||
{
|
||||
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
|
||||
}
|
||||
@ -1,78 +0,0 @@
|
||||
#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
|
||||
);
|
||||
|
||||
#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
|
||||
);
|
||||
mesh.setFluxRequired(p_rgh.name());
|
||||
mesh.setFluxRequired(alpha1.name());
|
||||
|
||||
const IOMRFZoneList& MRF = fluid.MRF();
|
||||
fv::IOoptionList& fvOptions = fluid.fvOptions();
|
||||
@ -1,21 +0,0 @@
|
||||
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
|
||||
|
||||
saturationModels/saturationModel/saturationModel.C
|
||||
saturationModels/saturationModel/newSaturationModel.C
|
||||
saturationModels/Antoine/Antoine.C
|
||||
saturationModels/AntoineExtended/AntoineExtended.C
|
||||
saturationModels/ArdenBuck/ArdenBuck.C
|
||||
saturationModels/constantSaturationConditions/constantSaturationConditions.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libreactingEulerianInterfacialCompositionModels
|
||||
@ -1,27 +0,0 @@
|
||||
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
|
||||
@ -1,144 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,129 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,248 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,216 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,155 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,274 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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")
|
||||
);
|
||||
|
||||
saturationModel12_.reset
|
||||
(
|
||||
saturationModel::New
|
||||
(
|
||||
dict.subDict(species1Name_).subDict("interaction")
|
||||
).ptr()
|
||||
);
|
||||
saturationModel21_.reset
|
||||
(
|
||||
saturationModel::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(saturationModel12_->lnPSat(Tf));
|
||||
volScalarField tau21(saturationModel21_->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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,167 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "saturationModel.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<saturationModel> saturationModel12_;
|
||||
|
||||
//- Interaction parameter model for species 2
|
||||
autoPtr<saturationModel> saturationModel21_;
|
||||
|
||||
//- 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,162 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,130 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,156 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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_]
|
||||
),
|
||||
saturationModel_
|
||||
(
|
||||
saturationModel::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()*saturationModel_->pSat(Tf);
|
||||
}
|
||||
else
|
||||
{
|
||||
const label speciesIndex
|
||||
(
|
||||
this->thermo_.composition().species()[speciesName]
|
||||
);
|
||||
|
||||
return
|
||||
this->thermo_.Y()[speciesIndex]
|
||||
*(scalar(1) - wRatioByP()*saturationModel_->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()*saturationModel_->pSatPrime(Tf);
|
||||
}
|
||||
else
|
||||
{
|
||||
const label speciesIndex
|
||||
(
|
||||
this->thermo_.composition().species()[speciesName]
|
||||
);
|
||||
|
||||
return
|
||||
- this->thermo_.Y()[speciesIndex]
|
||||
*wRatioByP()*saturationModel_->pSatPrime(Tf)
|
||||
/max(scalar(1) - this->thermo_.Y()[saturatedIndex_], SMALL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,137 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "saturationModel.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<saturationModel> saturationModel_;
|
||||
|
||||
|
||||
// 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,80 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,182 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,69 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,72 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * 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());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,103 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,58 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,128 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,59 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,75 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * 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());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,103 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,102 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 saturationModels
|
||||
{
|
||||
defineTypeNameAndDebug(Antoine, 0);
|
||||
addToRunTimeSelectionTable(saturationModel, Antoine, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::saturationModels::Antoine::Antoine(const dictionary& dict)
|
||||
:
|
||||
saturationModel(),
|
||||
A_("A", dimless, dict),
|
||||
B_("B", dimTemperature, dict),
|
||||
C_("C", dimTemperature, dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::saturationModels::Antoine::~Antoine()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::Antoine::pSat
|
||||
(
|
||||
const volScalarField& T
|
||||
) const
|
||||
{
|
||||
return
|
||||
dimensionedScalar("one", dimPressure, 1)
|
||||
*exp(A_ + B_/(C_ + T));
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::Antoine::pSatPrime
|
||||
(
|
||||
const volScalarField& T
|
||||
) const
|
||||
{
|
||||
return - pSat(T)*B_/sqr(C_ + T);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::Antoine::lnPSat
|
||||
(
|
||||
const volScalarField& T
|
||||
) const
|
||||
{
|
||||
return A_ + B_/(C_ + T);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::Antoine::Tsat
|
||||
(
|
||||
const volScalarField& p
|
||||
) const
|
||||
{
|
||||
return B_/(A_ - log10(p)) - C_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,116 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::saturationModels::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 "saturationModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace saturationModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Antoine Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Antoine
|
||||
:
|
||||
public saturationModel
|
||||
{
|
||||
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;
|
||||
|
||||
//- Saturation temperature
|
||||
virtual tmp<volScalarField> Tsat(const volScalarField& p) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace saturationModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,120 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 saturationModels
|
||||
{
|
||||
defineTypeNameAndDebug(AntoineExtended, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
saturationModel,
|
||||
AntoineExtended,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::saturationModels::AntoineExtended::AntoineExtended
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
Antoine(dict),
|
||||
D_("D", dimless, dict),
|
||||
F_("F", dimless, dict),
|
||||
E_("E", dimless/pow(dimTemperature, F_), dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::saturationModels::AntoineExtended::~AntoineExtended()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::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::saturationModels::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::saturationModels::AntoineExtended::lnPSat
|
||||
(
|
||||
const volScalarField& T
|
||||
) const
|
||||
{
|
||||
return
|
||||
A_
|
||||
+ B_/(C_ + T)
|
||||
+ D_*log(T*dimensionedScalar("one", dimless/dimTemperature, 1))
|
||||
+ E_*pow(T, F_);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::AntoineExtended::Tsat
|
||||
(
|
||||
const volScalarField& p
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"saturationModels::AntoineExtended::Tsat(const volScalarField& p)"
|
||||
);
|
||||
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,118 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::saturationModels::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 saturationModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
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;
|
||||
|
||||
//- Saturation temperature
|
||||
virtual tmp<volScalarField> Tsat(const volScalarField& p) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace saturationModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,127 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 saturationModels
|
||||
{
|
||||
defineTypeNameAndDebug(ArdenBuck, 0);
|
||||
addToRunTimeSelectionTable(saturationModel, 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::saturationModels::ArdenBuck::xByTC
|
||||
(
|
||||
const volScalarField& TC
|
||||
) const
|
||||
{
|
||||
return (B - TC/C)/(D + TC);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::saturationModels::ArdenBuck::ArdenBuck(const dictionary& dict)
|
||||
:
|
||||
saturationModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::saturationModels::ArdenBuck::~ArdenBuck()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::ArdenBuck::pSat
|
||||
(
|
||||
const volScalarField& T
|
||||
) const
|
||||
{
|
||||
volScalarField TC(T - zeroC);
|
||||
|
||||
return A*exp(TC*xByTC(TC));
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::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::saturationModels::ArdenBuck::lnPSat
|
||||
(
|
||||
const volScalarField& T
|
||||
) const
|
||||
{
|
||||
volScalarField TC(T - zeroC);
|
||||
|
||||
return log(A.value()) + TC*xByTC(TC);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::ArdenBuck::Tsat
|
||||
(
|
||||
const volScalarField& p
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"saturationModels::ArdenBuck::Tsat(const volScalarField& p)"
|
||||
);
|
||||
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,103 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::saturationModels::ArdenBuck
|
||||
|
||||
Description
|
||||
ArdenBuck equation for the vapour pressure of moist air.
|
||||
|
||||
SourceFiles
|
||||
ArdenBuck.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef ArdenBuck_H
|
||||
#define ArdenBuck_H
|
||||
|
||||
#include "saturationModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace saturationModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class ArdenBuck Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class ArdenBuck
|
||||
:
|
||||
public saturationModel
|
||||
{
|
||||
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;
|
||||
|
||||
//- Saturation temperature
|
||||
virtual tmp<volScalarField> Tsat(const volScalarField& p) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace saturationModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,170 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "constantSaturationConditions.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace saturationModels
|
||||
{
|
||||
defineTypeNameAndDebug(constantSaturationConditions, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
saturationModel,
|
||||
constantSaturationConditions,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::saturationModels::constantSaturationConditions::
|
||||
constantSaturationConditions(const dictionary& dict)
|
||||
:
|
||||
saturationModel(),
|
||||
pSat_("pSat", dimPressure, dict),
|
||||
Tsat_("Tsat", dimTemperature, dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::saturationModels::constantSaturationConditions::
|
||||
~constantSaturationConditions()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::constantSaturationConditions::pSat
|
||||
(
|
||||
const volScalarField& T
|
||||
) const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pSat",
|
||||
T.mesh().time().timeName(),
|
||||
T.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
T.mesh(),
|
||||
pSat_
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::constantSaturationConditions::pSatPrime
|
||||
(
|
||||
const volScalarField& T
|
||||
) const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pSatPrime",
|
||||
T.mesh().time().timeName(),
|
||||
T.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
T.mesh(),
|
||||
dimensionedScalar("zero", dimPressure/dimTemperature, 0)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::constantSaturationConditions::lnPSat
|
||||
(
|
||||
const volScalarField& T
|
||||
) const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"lnPSat",
|
||||
T.mesh().time().timeName(),
|
||||
T.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
T.mesh(),
|
||||
dimensionedScalar("lnPSat", dimless, log(pSat_.value()))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::saturationModels::constantSaturationConditions::Tsat
|
||||
(
|
||||
const volScalarField& p
|
||||
) const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Tsat",
|
||||
p.mesh().time().timeName(),
|
||||
p.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
p.mesh(),
|
||||
Tsat_
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,106 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::saturationModels::constantSaturationConditions
|
||||
|
||||
Description
|
||||
Constant saturation pressure and temperature.
|
||||
|
||||
SourceFiles
|
||||
constantSaturationConditions.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef constantSaturationConditions_H
|
||||
#define constantSaturationConditions_H
|
||||
|
||||
#include "saturationModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace saturationModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class constantSaturationConditions Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class constantSaturationConditions
|
||||
:
|
||||
public saturationModel
|
||||
{
|
||||
protected:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Constant saturation pressure
|
||||
dimensionedScalar pSat_;
|
||||
|
||||
//- Constant saturation temperature
|
||||
dimensionedScalar Tsat_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("constant");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary
|
||||
constantSaturationConditions(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~constantSaturationConditions();
|
||||
|
||||
|
||||
// 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;
|
||||
|
||||
//- Saturation temperature
|
||||
virtual tmp<volScalarField> Tsat(const volScalarField& p) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace saturationModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,57 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "saturationModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::saturationModel> Foam::saturationModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word saturationModelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting saturationModel: "
|
||||
<< saturationModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(saturationModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn("saturationModel::New")
|
||||
<< "Unknown saturationModelType type "
|
||||
<< saturationModelType << endl << endl
|
||||
<< "Valid saturationModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,49 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "saturationModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(saturationModel, 0);
|
||||
defineRunTimeSelectionTable(saturationModel, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::saturationModel::saturationModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::saturationModel::~saturationModel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,133 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::saturationModel
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
saturationModel.C
|
||||
newSaturationModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef saturationModel_H
|
||||
#define saturationModel_H
|
||||
|
||||
#include "volFields.H"
|
||||
#include "dictionary.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class saturationModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class saturationModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
saturationModel(const saturationModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const saturationModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("saturationModel");
|
||||
|
||||
|
||||
//- Declare runtime construction
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
saturationModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
saturationModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Select null constructed
|
||||
static autoPtr<saturationModel> New(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~saturationModel();
|
||||
|
||||
|
||||
// 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;
|
||||
|
||||
//- Saturation temperature
|
||||
virtual tmp<volScalarField> Tsat
|
||||
(
|
||||
const volScalarField& p
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,96 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * 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_
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,98 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,60 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,79 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,134 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,64 +0,0 @@
|
||||
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
|
||||
@ -1,16 +0,0 @@
|
||||
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
|
||||
@ -1,81 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,101 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,80 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,100 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,74 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,106 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,56 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,121 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,60 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,91 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * 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_
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,97 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,80 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,98 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,78 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,98 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,92 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,114 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,87 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * 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());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,115 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,101 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,105 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,75 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,111 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,74 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * 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_);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,101 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,93 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,97 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,89 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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),
|
||||
residualEo_("residualEo", dimless, dict),
|
||||
residualE_("residualE", dimless, dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * 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_);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,116 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,85 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * 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)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,110 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,85 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * 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 Res(alpha2*pair_.Re());
|
||||
volScalarField CdsRes
|
||||
(
|
||||
neg(Res - 1000)*24.0*(1.0 + 0.15*pow(Res, 0.687))
|
||||
+ pos(Res - 1000)*0.44*max(Res, residualRe_)
|
||||
);
|
||||
|
||||
return
|
||||
CdsRes
|
||||
*pow(alpha2, -3.65)
|
||||
*max(pair_.continuous(), pair_.continuous().residualAlpha());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,109 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,140 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,162 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,59 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,157 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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),
|
||||
n_("n", dimless, dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * 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());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,117 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,76 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 scalar residualAlpha) 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());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,95 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 scalar residualAlpha) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace heatTransferModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,77 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::heatTransferModel::K() const
|
||||
{
|
||||
return K(residualAlpha_.value());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,138 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
tmp<volScalarField> K() const;
|
||||
|
||||
//- The heat transfer function K used in the enthalpy equation
|
||||
// ddt(alpha1*rho1*ha) + ... = ... K*(Ta - Tb)
|
||||
// ddt(alpha2*rho2*hb) + ... = ... K*(Tb - Ta)
|
||||
// with a specified residual volume fraction
|
||||
virtual tmp<volScalarField> K(const scalar residualAlpha) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,59 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,81 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 scalar residualAlpha
|
||||
) const
|
||||
{
|
||||
return
|
||||
60.0
|
||||
*max(pair_.dispersed(), residualAlpha)
|
||||
*pair_.continuous().kappa()
|
||||
/sqr(pair_.dispersed().d());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,95 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 scalar residualAlpha) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace heatTransferModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,98 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * 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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,116 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,101 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,109 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,78 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "TomiyamaLift.H"
|
||||
#include "phasePair.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace liftModels
|
||||
{
|
||||
defineTypeNameAndDebug(TomiyamaLift, 0);
|
||||
addToRunTimeSelectionTable(liftModel, TomiyamaLift, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::liftModels::TomiyamaLift::TomiyamaLift
|
||||
(
|
||||
const dictionary& dict,
|
||||
const phasePair& pair
|
||||
)
|
||||
:
|
||||
liftModel(dict, pair)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::liftModels::TomiyamaLift::~TomiyamaLift()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::liftModels::TomiyamaLift::Cl() const
|
||||
{
|
||||
volScalarField EoH(pair_.EoH2());
|
||||
|
||||
volScalarField f
|
||||
(
|
||||
0.0010422*pow3(EoH) - 0.0159*sqr(EoH) - 0.0204*EoH + 0.474
|
||||
);
|
||||
|
||||
return
|
||||
neg(EoH - scalar(4))*min(0.288*tanh(0.121*pair_.Re()), f)
|
||||
+ pos(EoH - scalar(4))*neg(EoH - scalar(10.7))*f
|
||||
+ pos(EoH - scalar(10.7))*(-0.288);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,106 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::TomiyamaLift
|
||||
|
||||
Description
|
||||
Lift model of Tomiyama et al.
|
||||
|
||||
Reference:
|
||||
\verbatim
|
||||
"Transverse migration of single bubbles in simple shear flows"
|
||||
Tomiyama, A., Tamai, H., Zun, I., Hosokawa, S.,
|
||||
Chemical Engineering Science
|
||||
Volume 57, Issue 11, June 2002, pp. 1849-1858
|
||||
\endverbatim
|
||||
|
||||
The coefficient for pow3(EoH) proposed by Tomiyama (2002) has been modified
|
||||
to make the model continuous at EoH = 10.7 while maintaining the
|
||||
lift coefficient proposed by Tomiyama (2002) when EoH >= 10.7.
|
||||
|
||||
SourceFiles
|
||||
TomiyamaLift.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef TomiyamaLift_H
|
||||
#define TomiyamaLift_H
|
||||
|
||||
#include "liftModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class phasePair;
|
||||
|
||||
namespace liftModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class TomiyamaLift Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class TomiyamaLift
|
||||
:
|
||||
public liftModel
|
||||
{
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Tomiyama");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary and a phase pair
|
||||
TomiyamaLift
|
||||
(
|
||||
const dictionary& dict,
|
||||
const phasePair& pair
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~TomiyamaLift();
|
||||
|
||||
|
||||
// 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
Reference in New Issue
Block a user