32 template<
class BasePhaseSystem>
36 const phasePairKey& key
39 if (!rDmdt_.found(key))
41 return phaseSystem::dmdt(key);
46 return rDmdtSign**rDmdt_[key];
52 template<
class BasePhaseSystem>
60 this->generatePairsAndSubModels
69 phaseTransferModelTable,
71 phaseTransferModelIter
76 phaseTransferModelIter.key(),
85 template<
class BasePhaseSystem>
93 template<
class BasePhaseSystem>
97 const phasePairKey& key
100 return BasePhaseSystem::dmdt(key) + this->rDmdt(key);
104 template<
class BasePhaseSystem>
108 PtrList<volScalarField> dmdts(BasePhaseSystem::dmdts());
112 const phasePair& pair = this->phasePairs_[rDmdtIter.key()];
115 this->addField(pair.phase1(),
"dmdt", rDmdt, dmdts);
116 this->addField(pair.phase2(),
"dmdt", - rDmdt, dmdts);
123 template<
class BasePhaseSystem>
128 autoPtr<phaseSystem::massTransferTable> eqnsPtr
137 const phaseModel& phase = this->phaseModels_[
phasei];
139 const PtrList<volScalarField>& Yi = phase.Y();
154 phaseTransferModelTable,
155 phaseTransferModels_,
156 phaseTransferModelIter
159 const phasePair& pair(this->phasePairs_[phaseTransferModelIter.key()]);
161 const phaseModel& phase = pair.phase1();
162 const phaseModel& otherPhase = pair.phase2();
171 const PtrList<volScalarField>& Yi = phase.Y();
186 dmdt21*eqns[otherName]->psi()
190 dmdt12*eqns[
name]->psi()
200 template<
class BasePhaseSystem>
207 phaseTransferModelTable,
208 phaseTransferModels_,
209 phaseTransferModelIter
212 *rDmdt_[phaseTransferModelIter.key()] =
218 phaseTransferModelTable,
219 phaseTransferModels_,
220 phaseTransferModelIter
223 *rDmdt_[phaseTransferModelIter.key()] +=
224 phaseTransferModelIter()->dmdt();
229 template<
class BasePhaseSystem>
A simple container for copying or transferring objects of type <T>.
fvMatrix< scalar > fvScalarMatrix
#define forAll(list, i)
Loop across all elements in list.
PhaseTransferPhaseSystem(const fvMesh &)
Construct from fvMesh.
HashPtrTable< fvScalarMatrix > massTransferTable
static int compare(const Pair< word > &a, const Pair< word > &b)
Compare Pairs.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
dimensionedScalar posPart(const dimensionedScalar &ds)
virtual tmp< volScalarField > rDmdt(const phasePairKey &key) const
Return the representation mass transfer rate.
virtual void correct()
Correct the mass transfer rates.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual Xfer< PtrList< volScalarField > > dmdts() const
Return the mass transfer rates for each phase.
virtual bool read()
Read base phaseProperties dictionary.
static word groupName(Name name, const word &group)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
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/ubuntu/OpenFOAM-6/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
word name(const complex &)
Return a string representation of a complex.
const dimensionSet dimDensity
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const volScalarField & psi
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
Calculate the matrix for implicit and explicit sources.
dimensionedScalar negPart(const dimensionedScalar &ds)
virtual ~PhaseTransferPhaseSystem()
Destructor.