32 template<
class BasePhaseSystem>
39 HeatAndMassTransferPhaseSystem<BasePhaseSystem>(mesh)
41 this->generatePairsAndSubModels
43 "interfaceComposition",
44 interfaceCompositionModels_
51 template<
class BasePhaseSystem>
59 template<
class BasePhaseSystem>
65 autoPtr<phaseSystem::massTransferTable> eqnsPtr
74 const phaseModel& phase = this->phaseModels_[
phasei];
76 const PtrList<volScalarField>& Yi = phase.Y();
96 const phasePair& pair(phasePairIter());
104 *this->dmdtExplicit_[pair];
106 *this->dmdtExplicit_[pair] =
113 interfaceCompositionModelTable,
114 interfaceCompositionModels_,
115 interfaceCompositionModelIter
118 const interfaceCompositionModel& compositionModel
120 interfaceCompositionModelIter()
123 const phasePair& pair
125 this->phasePairs_[interfaceCompositionModelIter.key()]
127 const phaseModel& phase = pair.phase1();
128 const phaseModel& otherPhase = pair.phase2();
129 const phasePairKey key(phase.name(), otherPhase.name());
140 this->massTransferModels_[key][phase.name()]->K()
146 compositionModel.species(),
150 const word& member = *memberIter;
164 K*compositionModel.D(member)
169 compositionModel.Yf(member, Tf)
178 dmdtExplicit += dmdtSign*phase.rho()*KD*Yf;
179 dmdt -= dmdtSign*phase.rho()*KD*eqns[
name]->psi();
182 if (eqns.found(otherName))
185 otherPhase.rho()*KD*compositionModel.dY(member, Tf);
194 template<
class BasePhaseSystem>
219 const phasePair& pair(phasePairIter());
226 const phasePairKey key12(pair.first(), pair.second(),
true);
227 const phasePairKey key21(pair.second(), pair.first(),
true);
259 if (this->interfaceCompositionModels_.found(key12))
261 this->interfaceCompositionModels_[key12]->addMDotL
263 this->massTransferModels_[pair][pair.first()]->K(),
269 if (this->interfaceCompositionModels_.found(key21))
271 this->interfaceCompositionModels_[key21]->addMDotL
273 this->massTransferModels_[pair][pair.second()]->K(),
284 H1*(Tf - pair.phase1().thermo().T())
285 + H2*(Tf - pair.phase2().thermo().T())
289 max(H1 + H2 + mDotLPrime, HSmall)
294 Info<<
"Tf." << pair.name()
295 <<
": min = " <<
min(Tf.primitiveField())
296 <<
", mean = " <<
average(Tf.primitiveField())
297 <<
", max = " <<
max(Tf.primitiveField())
301 if (this->interfaceCompositionModels_.found(key12))
303 this->interfaceCompositionModels_[key12]->update(Tf);
305 if (this->interfaceCompositionModels_.found(key21))
307 this->interfaceCompositionModels_[key21]->update(Tf);
313 template<
class BasePhaseSystem>
fvMatrix< scalar > fvScalarMatrix
#define forAll(list, i)
Loop across all elements in list.
virtual ~InterfaceCompositionPhaseChangePhaseSystem()
Destructor.
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
InterfaceCompositionPhaseChangePhaseSystem(const fvMesh &)
Construct from fvMesh.
static int compare(const Pair< word > &a, const Pair< word > &b)
Compare Pairs.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the interfacial mass flow rate.
CGAL::Exact_predicates_exact_constructions_kernel K
static const dimensionSet dimK
Coefficient dimensions.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimVolume(pow3(dimLength))
heatTransferModelTable heatTransferModels_
Heat transfer models.
static word groupName(Name name, const word &group)
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
const dimensionSet dimEnergy
const dimensionSet dimDensity
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
void correctBoundaryConditions()
Correct boundary field.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
HashPtrTable< fvScalarMatrix, word, string::hash > massTransferTable
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
virtual bool read()
Read base phaseProperties dictionary.
virtual void correctThermo()
Correct the thermodynamics.