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,
87 template<
class BasePhaseModel>
94 template<
class BasePhaseModel>
97 BasePhaseModel::correctThermo();
99 this->thermo_->correct();
103 template<
class BasePhaseModel>
110 template<
class BasePhaseModel>
147 if (he.
name() == this->thermo_->phasePropertyName(
"e"))
149 tEEqn.
ref() += filterPressureWork
159 else if (this->thermo_->dpdt())
161 tEEqn.
ref() -= filterPressureWork(
alpha*this->fluid().dpdt());
Generic GeometricField class.
const word & name() const
Return name.
Class which represents a phase for which the temperature (strictly energy) varies....
virtual ~ThermalPhaseModel()
Destructor.
ThermalPhaseModel(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.
Class which makes thermophysical transport modelling available to derived classes.
Base-class for fluid thermodynamic properties.
Class to represent a system of phases.
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
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 > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
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)