31 template<
class BasePhaseModel>
34 const phaseSystem&
fluid,
35 const word& phaseName,
39 BasePhaseModel(fluid, phaseName, index),
44 IOobject::groupName(
"K", this->
name()),
56 template<
class BasePhaseModel>
63 template<
class BasePhaseModel>
66 return !this->
thermo().incompressible();
70 template<
class BasePhaseModel>
73 BasePhaseModel::correctKinematics();
78 template<
class BasePhaseModel>
83 this->thermo_->correct();
87 template<
class BasePhaseModel>
91 const tmp<volScalarField>& pressureWork
96 scalar pressureWorkAlphaLimit =
97 this->thermo_->lookupOrDefault(
"pressureWorkAlphaLimit", 0.0);
99 if (pressureWorkAlphaLimit > 0)
103 max(alpha - pressureWorkAlphaLimit, scalar(0))
104 /
max(alpha - pressureWorkAlphaLimit, pressureWorkAlphaLimit)
114 template<
class BasePhaseModel>
129 tmp<fvScalarMatrix> tEEqn
149 if (he.name() == this->thermo_->phasePropertyName(
"e"))
151 tEEqn.ref() += filterPressureWork
157 else if (this->thermo_->dpdt())
159 tEEqn.ref() -= filterPressureWork(alpha*this->
fluid().
dpdt());
166 template<
class BasePhaseModel>
virtual void correctThermo()
Correct the thermodynamics.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Class which represents a phase for which the temperature (strictly energy) varies. Returns the energy equation and corrects the thermodynamic model.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
GeometricField< vector, fvPatchField, volMesh > volVectorField
virtual const volScalarField & K() const
Return the phase kinetic energy.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
volScalarField::Internal contErr((fvc::ddt(rho)+fvc::div(rhoPhi) -(fvOptions(alpha1, mixture.thermo1().rho())&rho1) -(fvOptions(alpha2, mixture.thermo2().rho())&rho2))())
psiReactionThermo & thermo
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
AnisothermalPhaseModel(const phaseSystem &fluid, const word &phaseName, const label index)
virtual void correctKinematics()
Correct the kinematics.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
word name(const complex &)
Return a string representation of a complex.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual bool compressible() const
Return true if the phase is compressible otherwise false.
virtual ~AnisothermalPhaseModel()
Destructor.
volScalarField alphaEff("alphaEff", turbulence->nu()/Pr+alphat)
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
surfaceScalarField alphaPhi(phi.name()+alpha1.name(), fvc::flux(phi, alpha1, alphaScheme))
virtual tmp< fvScalarMatrix > heEqn()
Return the enthalpy equation.
const dimensionSet dimVelocity