36template<
class BasePhaseSystem>
50 return dmdtSign**
iDmdt_[key];
54template<
class BasePhaseSystem>
61 if (!wDmdt_.found(key))
66 const scalar dmdtSign(Pair<word>::compare(wDmdt_.find(key).key(), key));
74template<
class BasePhaseSystem>
81 BasePhaseSystem(
mesh),
82 volatile_(this->template getOrDefault<
word>(
"volatile",
"none")),
87 phaseChange_(this->
lookup(
"phaseChange"))
113 this->mesh().time().timeName(),
132 this->mesh().time().timeName(),
151 this->mesh().time().timeName(),
166template<
class BasePhaseSystem>
174template<
class BasePhaseSystem>
182template<
class BasePhaseSystem>
189 return BasePhaseSystem::dmdt(key) + this->
iDmdt(key) + this->
wDmdt(key);
193template<
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);
221template<
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")
283template<
class BasePhaseSystem>
288 BasePhaseSystem::massTransfer();
313 if (Yi[i].member() != volatile_)
334 *eqns[otherName] -= dmdt;
342template<
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);
438 <<
": min = " <<
limits.min()
439 <<
", mean = " << avg
440 <<
", max = " <<
limits.max()
444 scalar iDmdtRelax(this->
mesh().fieldRelaxationFactor(
"iDmdt"));
445 iDmdt = (1 - iDmdtRelax)*iDmdt + iDmdtRelax*iDmdtNew;
453 <<
": min = " <<
limits.min()
454 <<
", mean = " << avg
455 <<
", max = " <<
limits.max()
465 bool wallBoilingActive =
false;
499 const alphatPhaseChangeWallFunction& PCpatch =
507 if (PCpatch.activePhasePair(key))
509 wallBoilingActive =
true;
523 const label faceCelli =
525 wDmdt[faceCelli] -=
sign*patchDmdt[facei];
526 wMDotL[faceCelli] -=
sign*patchMDotL[facei];
534 if (wallBoilingActive)
540 <<
": min = " <<
limits.min()
541 <<
", mean = " << avg
542 <<
", max = " <<
limits.max()
550template<
class BasePhaseSystem>
553 if (BasePhaseSystem::read())
CGAL::Exact_predicates_exact_constructions_kernel K
const Mesh & mesh() const noexcept
Return const reference to mesh.
void clamp_min(const Type &lower)
Impose lower (floor) clamp on the field values (in-place).
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
bool set(const Key &key, T *ptr)
Assign a new entry, overwrites existing.
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static word member(const word &name)
Return member (name without the extension).
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
static int compare(const Pair< T > &a, const Pair< T > &b)
Compare Pairs.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
virtual ~ThermalPhaseChangePhaseSystem()
Destructor.
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Return the heat transfer matrices.
autoPtr< saturationModel > saturationModel_
The saturation model used to evaluate Tsat = Tf.
virtual void correctInterfaceThermo()
Correct the interface thermodynamics.
tmp< volScalarField > wDmdt(const phasePairKey &key) const
Return the boundary mass transfer rate for a pair.
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > iDmdtTable
wMDotLTable wMDotL_
Boundary thermal energy transfer rate.
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
iDmdtTable iDmdt_
Interfacial Mass transfer rate.
ThermalPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
tmp< volScalarField > iDmdt(const phasePairKey &key) const
Return the interfacial mass transfer rate for a pair.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
word volatile_
Name of the volatile specie.
wDmdtTable wDmdt_
Boundary Mass transfer rate.
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > wDmdtTable
virtual bool read()
Read base phaseProperties dictionary.
const saturationModel & saturation() const
Return the saturationModel.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Abstract base-class for all alphatWallFunctions supporting phase-change.
Mesh data needed to do the Finite Volume discretisation.
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual const labelUList & faceCells() const
Return faceCells.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
const phaseModel & otherPhase() const
Return the other phase in this two-phase system.
const word & name() const
An ordered or unorder pair of phase names. Typically specified as follows.
bool ordered() const noexcept
Return the ordered flag.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
virtual word name() const
Pair name.
const multiphaseInter::phaseModel & phase1() const
const multiphaseInter::phaseModel & phase2() const
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
HashPtrTable< fvScalarMatrix > massTransferTable
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
HashPtrTable< fvScalarMatrix > heatTransferTable
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
const word & name() const
Lookup type of boundary radiation properties.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
const polyBoundaryMesh & patches
Volume integrate volField creating a volField.
Calculate the finiteVolume matrix for implicit and explicit sources.
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
Type gAverage(const FieldField< Field, Type > &f, const label comm)
The global arithmetic average of a FieldField.
dimensionedScalar pos(const dimensionedScalar &ds)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
PtrList< fvPatch > fvPatchList
Store lists of fvPatch as a PtrList.
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedScalar sign(const dimensionedScalar &ds)
const dimensionSet dimEnergy
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere).
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar negPart(const dimensionedScalar &ds)
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
dimensionedScalar neg(const dimensionedScalar &ds)
MinMax< Type > gMinMax(const FieldField< Field, Type > &f)
static constexpr const zero Zero
Global zero (0).
dimensionedScalar neg0(const dimensionedScalar &ds)
const dimensionSet dimVolume(pow3(dimLength))
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimDensity
dimensionedScalar posPart(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.
const vector L(dict.get< vector >("L"))