35 template<
class BasePhaseModel>
39 const tmp<volScalarField>& pressureWork
44 scalar pressureWorkAlphaLimit =
45 this->thermo_->properties()
46 .lookupOrDefault(
"pressureWorkAlphaLimit", 0.0);
48 if (pressureWorkAlphaLimit > 0)
52 max(
alpha - pressureWorkAlphaLimit, scalar(0))
53 /
max(
alpha - pressureWorkAlphaLimit, pressureWorkAlphaLimit)
65 template<
class BasePhaseModel>
69 const word& phaseName,
70 const bool referencePhase,
74 BasePhaseModel(fluid, phaseName, referencePhase, index)
80 template<
class BasePhaseModel>
87 template<
class BasePhaseModel>
90 BasePhaseModel::correctThermo();
92 this->thermo_->correct();
96 template<
class BasePhaseModel>
103 template<
class BasePhaseModel>
139 if (he.
name() == this->thermo_->phasePropertyName(
"e"))
141 tEEqn.
ref() += filterPressureWork
151 else if (this->thermo_->dpdt())
153 tEEqn.
ref() -= filterPressureWork(
alpha*this->fluid().dpdt());
Class which represents a phase for which the temperature (strictly energy) varies....
virtual ~AnisothermalPhaseModel()
Destructor.
AnisothermalPhaseModel(const phaseSystem &fluid, const word &phaseName, const bool referencePhase, const label index)
virtual void correctThermo()
Correct the thermodynamics.
virtual bool isothermal() const
Return whether the phase is isothermal.
virtual tmp< fvScalarMatrix > heEqn()
Return the enthalpy equation.
Generic GeometricField class.
const word & name() const
Return name.
Class to represent a system of phases and model interfacial transfers between them.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
Calculate the first temporal derivative.
Calculate the mesh motion flux and convert fluxes from absolute to relative and back.
Calculate the matrix for the divergence of the given field and flux.
Calculate the matrix for implicit and explicit sources.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
tmp< VolField< Type > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > ddt(const VolField< Type > &vf)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
VolField< scalar > volScalarField
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
fluidMulticomponentThermo & thermo