Go to the documentation of this file.
36 template<
class BasePhaseSystem>
43 if (!iDmdt_.found(
key))
45 return phaseSystem::dmdt(
key);
50 return dmdtSign**iDmdt_[
key];
54 template<
class BasePhaseSystem>
61 if (!wDmdt_.found(
key))
63 return phaseSystem::dmdt(
key);
68 return dmdtSign**wDmdt_[
key];
74 template<
class BasePhaseSystem>
81 BasePhaseSystem(
mesh),
82 volatile_(this->
template getOrDefault<word>(
"volatile",
"none")),
87 phaseChange_(this->
lookup(
"phaseChange"))
112 IOobject::groupName(
"iDmdt", pair.
name()),
113 this->
mesh().time().timeName(),
115 IOobject::READ_IF_PRESENT,
131 IOobject::groupName(
"wDmdt", pair.
name()),
132 this->
mesh().time().timeName(),
134 IOobject::READ_IF_PRESENT,
150 IOobject::groupName(
"wMDotL", pair.
name()),
151 this->
mesh().time().timeName(),
153 IOobject::READ_IF_PRESENT,
166 template<
class BasePhaseSystem>
174 template<
class BasePhaseSystem>
178 return saturationModel_();
182 template<
class BasePhaseSystem>
189 return BasePhaseSystem::dmdt(
key) + this->iDmdt(
key) + this->wDmdt(
key);
193 template<
class BasePhaseSystem>
201 const phasePair& pair = this->phasePairs_[iDmdtIter.key()];
204 this->addField(pair.
phase1(),
"dmdt", iDmdt, dmdts);
205 this->addField(pair.
phase2(),
"dmdt", - iDmdt, dmdts);
210 const phasePair& pair = this->phasePairs_[wDmdtIter.key()];
213 this->addField(pair.
phase1(),
"dmdt", wDmdt, dmdts);
214 this->addField(pair.
phase2(),
"dmdt", - wDmdt, dmdts);
221 template<
class BasePhaseSystem>
226 BasePhaseSystem::heatTransfer();
238 if (this->wMDotL_.found(phasePairIter.key()))
255 phase1.thermo().he().member() ==
"e"
256 ||
phase2.thermo().he().member() ==
"e"
261 this->iDmdt(pair) + this->wDmdt(pair)
264 if (
phase1.thermo().he().member() ==
"e")
270 if (
phase2.thermo().he().member() ==
"e")
283 template<
class BasePhaseSystem>
313 if (Yi[i].member() != volatile_)
320 IOobject::groupName(volatile_,
phase.
name())
325 IOobject::groupName(volatile_, otherPhase.
name())
334 *eqns[otherName] -= dmdt;
342 template<
class BasePhaseSystem>
347 alphatPhaseChangeWallFunction;
351 typename BasePhaseSystem::heatTransferModelTable,
352 this->heatTransferModels_,
353 heatTransferModelIter
358 this->phasePairs_[heatTransferModelIter.key()]
406 (
neg0(iDmdt)*hf2 +
pos(iDmdt)*h2)
407 - (
pos0(iDmdt)*hf1 +
neg(iDmdt)*h1)
417 iDmdtNew = (H1*(Tsat - T1) + H2*(Tsat - T2))/
L;
431 Tf = (H1*T1 + H2*T2 + iDmdtNew*
L)/(H1 + H2);
433 Info<<
"Tf." << pair.name()
439 scalar iDmdtRelax(this->
mesh().fieldRelaxationFactor(
"iDmdt"));
440 iDmdt = (1 - iDmdtRelax)*iDmdt + iDmdtRelax*iDmdtNew;
444 Info<<
"iDmdt." << pair.name()
445 <<
": min = " <<
gMin(iDmdt.primitiveField())
446 <<
", mean = " <<
gAverage(iDmdt.primitiveField())
447 <<
", max = " <<
gMax(iDmdt.primitiveField())
457 bool wallBoilingActive =
false;
485 isA<alphatPhaseChangeWallFunction>
491 const alphatPhaseChangeWallFunction& PCpatch =
492 refCast<const alphatPhaseChangeWallFunction>
499 if (PCpatch.activePhasePair(
key))
501 wallBoilingActive =
true;
515 const label faceCelli =
517 wDmdt[faceCelli] -=
sign*patchDmdt[facei];
518 wMDotL[faceCelli] -=
sign*patchMDotL[facei];
526 if (wallBoilingActive)
528 Info<<
"wDmdt." << pair.name()
539 template<
class BasePhaseSystem>
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const vector L(dict.get< vector >("L"))
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
A class for handling words, derived from Foam::string.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
tmp< volScalarField > iDmdt(const phasePairKey &key) const
Return the interfacial mass transfer rate for a pair.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
A class for managing temporary objects.
const dimensionSet dimEnergy
const dimensionSet dimDensity
Type gAverage(const FieldField< Field, Type > &f)
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
dimensionedScalar posPart(const dimensionedScalar &ds)
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
dimensionedScalar neg0(const dimensionedScalar &ds)
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
Abstract base-class for all alphatWallFunctions supporting phase-change.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedScalar sign(const dimensionedScalar &ds)
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.
#define forAll(list, i)
Loop across all elements in list.
virtual bool read()
Read base phaseProperties dictionary.
CGAL::Exact_predicates_exact_constructions_kernel K
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
bool ordered() const noexcept
Return the ordered flag.
phaseSystem::massTransferTable & massTransfer(massTransferPtr())
virtual ~ThermalPhaseChangePhaseSystem()
Destructor.
messageStream Info
Information stream (stdout output on master, null elsewhere)
ThermalPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void correctInterfaceThermo()
Correct the interface thermodynamics.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
An ordered or unorder pair of phase names. Typically specified as follows.
Lookup type of boundary radiation properties.
Mesh data needed to do the Finite Volume discretisation.
Calculate the matrix for implicit and explicit sources.
const word & name() const
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
const word & name() const
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
dimensionedScalar negPart(const dimensionedScalar &ds)
An ordered pair of two objects of type <T> with first() and second() elements.
const phaseModel & otherPhase() const
Return the other phase in this two-phase system.
virtual word name() const
Pair name.
const saturationModel & saturation() const
Return the saturationModel.
Volume integrate volField creating a volField.
const polyBoundaryMesh & patches
const phaseModel & phase2() const
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
virtual const labelUList & faceCells() const
Return faceCells.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
void max(const dimensioned< Type > &dt)
Use the maximum of the field and specified value.
Type gMin(const FieldField< Field, Type > &f)
const dimensionSet dimVolume(pow3(dimLength))
const phaseModel & phase1() const
dimensionedScalar neg(const dimensionedScalar &ds)
Type gMax(const FieldField< Field, Type > &f)
tmp< volScalarField > wDmdt(const phasePairKey &key) const
Return the boundary mass transfer rate for a pair.
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Return the heat transfer matrices.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
dimensionedScalar pos(const dimensionedScalar &ds)