34 template<
class BasePhaseSystem>
41 if (!rDmdt_.found(
key))
43 return phaseSystem::dmdt(
key);
48 return rDmdtSign**rDmdt_[
key];
54 template<
class BasePhaseSystem>
62 this->generatePairsAndSubModels
73 phaseTransferModelIter
78 phaseTransferModelIter.key(),
87 template<
class BasePhaseSystem>
95 template<
class BasePhaseSystem>
102 return BasePhaseSystem::dmdt(
key) + this->rDmdt(
key);
106 template<
class BasePhaseSystem>
114 const phasePair& pair = this->phasePairs_[rDmdtIter.key()];
117 this->addField(pair.
phase1(),
"dmdt", rDmdt, dmdts);
118 this->addField(pair.
phase2(),
"dmdt", - rDmdt, dmdts);
125 template<
class BasePhaseSystem>
156 phaseTransferModelTable,
157 phaseTransferModels_,
158 phaseTransferModelIter
161 const phasePair& pair(this->phasePairs_[phaseTransferModelIter.key()]);
163 const phaseModel& phase = pair.
phase1();
164 const phaseModel& otherPhase = pair.
phase2();
173 const PtrList<volScalarField>& Yi = phase.Y();
188 dmdt21*eqns[otherName]->psi()
192 dmdt12*eqns[
name]->psi()
202 template<
class BasePhaseSystem>
209 phaseTransferModelTable,
210 phaseTransferModels_,
211 phaseTransferModelIter
214 *rDmdt_[phaseTransferModelIter.key()] =
220 phaseTransferModelTable,
221 phaseTransferModels_,
222 phaseTransferModelIter
225 *rDmdt_[phaseTransferModelIter.key()] +=
226 phaseTransferModelIter()->dmdt();
231 template<
class BasePhaseSystem>
fvMatrix< scalar > fvScalarMatrix
const multiphaseInter::phaseModel & phase2() const
PhaseTransferPhaseSystem(const fvMesh &)
Construct from fvMesh.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
virtual void correct()
Correct the mass transfer rates.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
const multiphaseInter::phaseModel & phase1() const
virtual bool read()
Read base phaseProperties dictionary.
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers...
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.
dimensionedScalar posPart(const dimensionedScalar &ds)
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
An ordered pair of two objects of type <T> with first() and second() elements.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
HashTable< autoPtr< BlendedInterfacialModel< phaseTransferModel > >, phasePairKey, phasePairKey::hash > phaseTransferModelTable
bool set(const Key &key, T *ptr)
Assign a new entry, overwrites existing.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
An ordered or unorder pair of phase names. Typically specified as follows.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(psi *p+alphal *rhol0+((alphav *psiv+alphal *psil) - psi) *pSat, rhoMin);# 1 "/home/chef2/andy/OpenFOAM/release/v2406/OpenFOAM-v2406/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=clamp((rho - rholSat)/(rhovSat - rholSat), zero_one{});alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
const dimensionSet dimDensity
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Mesh data needed to do the Finite Volume discretisation.
virtual tmp< volScalarField > rDmdt(const phasePairKey &key) const
Return the representation mass transfer rate.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
virtual ~PhaseTransferPhaseSystem()
Destructor.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
const volScalarField & psi
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
rDmdtTable rDmdt_
Mass transfer rates.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
phaseTransferModelTable phaseTransferModels_
Mass transfer models.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Calculate the finiteVolume matrix for implicit and explicit sources.
dimensionedScalar negPart(const dimensionedScalar &ds)