46 for (
label i = 0; i < 2; ++ i)
48 if (isA<fluidThermo>(
thermos()[i]))
50 return refCast<const fluidThermo>(
thermos()[i]).p();
72 tvf->internalFieldRef() = tvif();
73 tvf->correctBoundaryConditions();
99 const word& modelType,
107 thermos_(mesh, phaseNames()),
108 fluidThermos_(thermos_),
109 specieThermos_(thermos_),
112 forAll(fluidThermos_.valid(), i)
114 if (!fluidThermos_.valid()[i] && fluidThermosRequired[i])
117 <<
"Model " <<
name <<
" of type " << modelType
118 <<
" requires a fluid thermo for phase "
123 forAll(specieThermos_.valid(), i)
125 if (!specieThermos_.valid()[i] && specieThermosRequired[i])
128 <<
"Model " <<
name <<
" of type " << modelType
129 <<
" requires a multicomponent thermo for phase "
143 return pos0(mDot)*thermos().first().
T() +
neg(mDot)*thermos().second().
T();
153 return vfToVif(kappa2/(kappa1 + kappa2));
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
T & first()
Return the first element of the list.
A list of keyword definitions, which are a keyword followed by any number of values (e....
dimensioned< Type > T() const
Return transpose.
Mesh data needed to do the Finite Volume discretisation.
const fvMesh & mesh() const
Return const access to the mesh database.
const word & name() const
Return const access to the source name.
Base class for mass transfers between phases.
const Pair< word > & phaseNames() const
Return the names of the phases.
Base class for phase change models.
phaseChange(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict, const Pair< bool > &fluidThermosRequired, const Pair< bool > &specieThermosRequired)
Construct from explicit source name and mesh.
virtual tmp< DimensionedField< scalar, volMesh > > Lfraction() const
Return the fraction of the latent heat that is transferred into.
static tmp< DimensionedField< scalar, volMesh > > vfToVif(const tmp< volScalarField > &tvf)
Remove the boundary field from the given geometric field.
const volScalarField & p() const
Access the pressure field.
virtual tmp< DimensionedField< scalar, volMesh > > Tchange() const
Return the temperature at which the phases are considered to be.
const ThermoRefPair< basicThermo > & thermos() const
Return the thermo references.
static tmp< volScalarField > vifToVf(const tmp< DimensionedField< scalar, volMesh >> &tvif)
Add a boundary field to the given internal field.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
A class for managing temporary objects.
T * ptr() const
Return tmp pointer for reuse.
void clear() const
If object pointer points to valid object:
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
defineTypeNameAndDebug(bound, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionedScalar pos0(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const HashTable< dimensionSet > & dimensions()
Get the table of dimension sets.
word name(const bool)
Return a word representation of a bool.
labelList second(const UList< labelPair > &p)
labelList first(const UList< labelPair > &p)
dimensionedScalar neg(const dimensionedScalar &ds)