28 #include "BlendedInterfacialModel.H" 29 #include "heatTransferModel.H" 40 template<
class BasePhaseSystem>
49 this->generatePairsAndSubModels
59 heatTransferModelTable,
64 const phasePair& pair = this->phasePairs_[heatTransferModelIter.key()];
66 if (!heatTransferModels_[pair].first().valid())
69 <<
"A heat transfer model for the " << pair.phase1().name()
70 <<
" side of the " << pair <<
" pair is not specified" 73 if (!heatTransferModels_[pair].second().valid())
76 <<
"A heat transfer model for the " << pair.phase2().name()
77 <<
" side of the " << pair <<
" pair is not specified" 85 heatTransferModelTable,
90 const phasePair& pair = this->phasePairs_[heatTransferModelIter.key()];
92 const phaseModel& phase1 = pair.phase1();
93 const phaseModel& phase2 = pair.phase2();
110 this->
mesh().time().timeName(),
115 (H1*T1 + H2*T2)/
max(H1 + H2, HSmall)
124 template<
class BasePhaseSystem>
132 template<
class BasePhaseSystem>
137 autoPtr<phaseSystem::heatTransferTable> eqnsPtr
146 const phaseModel& phase = this->phaseModels_[
phasei];
158 heatTransferModelTable,
160 heatTransferModelIter
163 const phasePair& pair
165 this->phasePairs_[heatTransferModelIter.key()]
170 const Pair<tmp<volScalarField>> Ks
172 heatTransferModelIter().first()->
K(),
173 heatTransferModelIter().second()->
K()
178 Ks.first()()*Ks.second()()
181 Ks.first()() + Ks.second()(),
188 const phaseModel& phase = iter();
193 *eqns[phase.name()] +=
194 Ks[iter.index()]*(Tf - phase.thermo().T())
207 const phasePair& pair(phasePairIter());
214 const phaseModel& phase1 = pair.phase1();
215 const phaseModel& phase2 = pair.phase2();
227 *eqns[phase1.name()] += -
fvm::Sp(dmdt21, he1) + dmdt21*(
K2 -
K1);
229 *eqns[phase2.name()] -= -
fvm::Sp(dmdt12,
he2) + dmdt12*(
K1 -
K2);
231 if (this->heatTransferModels_.found(phasePairIter.key()))
235 *eqns[phase1.name()] +=
236 dmdt21*phase1.thermo().he(phase1.thermo().p(), Tf);
238 *eqns[phase2.name()] -=
239 dmdt12*phase2.thermo().he(phase2.thermo().p(), Tf);
243 *eqns[phase1.name()] += dmdt21*
he2;
245 *eqns[phase2.name()] -= dmdt12*he1;
253 template<
class BasePhaseSystem>
263 template<
class BasePhaseSystem>
269 heatTransferModelTable,
271 heatTransferModelIter
274 const phasePair& pair
276 this->phasePairs_[heatTransferModelIter.key()]
279 const phaseModel& phase1 = pair.phase1();
280 const phaseModel& phase2 = pair.phase2();
291 phase1.thermo().he(
p, Tf) - phase2.thermo().he(
p, Tf)
298 this->heatTransferModels_[pair].first()->
K()
303 this->heatTransferModels_[pair].second()->
K()
310 Tf = (H1*T1 + H2*T2 +
dmdt*L)/(H1 + H2);
312 Info<<
"Tf." << pair.name()
313 <<
": min = " <<
min(Tf.primitiveField())
314 <<
", mean = " <<
average(Tf.primitiveField())
315 <<
", max = " <<
max(Tf.primitiveField())
321 template<
class BasePhaseSystem>
fvMatrix< scalar > fvScalarMatrix
#define forAll(list, i)
Loop across all elements in list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
HashPtrTable< fvScalarMatrix > heatTransferTable
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
CGAL::Exact_predicates_exact_constructions_kernel K
dimensionedScalar posPart(const dimensionedScalar &ds)
static const dimensionSet dimK
Coefficient dimensions.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual void correctInterfaceThermo()
Correct the interface thermodynamics.
static word groupName(Name name, const word &group)
virtual void correctInterfaceThermo()
Correct the interface thermodynamics.
virtual void correctThermo()
Correct the thermodynamics.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
virtual void correctThermo()
Correct the thermodynamics.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Calculate the divergence of the given field.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const dimensionSet dimEnergy
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Return the heat transfer matrices.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual ~TwoResistanceHeatTransferPhaseSystem()
Destructor.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Calculate the matrix for implicit and explicit sources.
dimensionedScalar negPart(const dimensionedScalar &ds)
TwoResistanceHeatTransferPhaseSystem(const fvMesh &)
Construct from fvMesh.
virtual bool read()
Read base phaseProperties dictionary.