28 #include "heatTransferModel.H" 34 template<
class BasePhaseSystem>
37 const phaseSystem::dmdtfTable& dmdtfs,
38 const phaseSystem::dmdtfTable& Tfs,
39 const latentHeatScheme scheme,
40 const latentHeatTransfer transfer,
41 phaseSystem::heatTransferTable& eqns
44 HeatTransferPhaseSystem<BasePhaseSystem>::addDmdtHefsWithoutL
55 const phasePairKey& key = dmdtfIter.key();
56 const phasePair& pair(this->phasePairs_[key]);
62 const phaseModel& phase1 = pair.phase1();
63 const phaseModel& phase2 = pair.phase2();
64 const rhoThermo& thermo1 = phase1.thermo();
65 const rhoThermo& thermo2 = phase2.thermo();
76 case latentHeatTransfer::heat:
78 *eqns[phase1.name()] +=
79 - HEff*(thermo2.T() - thermo1.T()) + H1*(Tf - thermo1.T());
81 *eqns[phase2.name()] +=
82 - HEff*(thermo1.T() - thermo2.T()) + H2*(Tf - thermo2.T());
86 case latentHeatTransfer::mass:
90 *eqns[phase1.name()] += H1Fac*dmdtf*L;
91 *eqns[phase2.name()] += (1 - H1Fac)*dmdtf*L;
100 template<
class BasePhaseSystem>
103 const phaseSystem::dmidtfTable& dmidtfs,
104 const phaseSystem::dmdtfTable& Tfs,
105 const latentHeatScheme scheme,
106 const latentHeatTransfer transfer,
107 phaseSystem::heatTransferTable& eqns
110 HeatTransferPhaseSystem<BasePhaseSystem>::addDmidtHefsWithoutL
121 const phasePairKey& key = dmidtfIter.key();
122 const phasePair& pair(this->phasePairs_[key]);
126 const phaseModel& phase1 = pair.phase1();
127 const phaseModel& phase2 = pair.phase2();
128 const rhoThermo& thermo1 = phase1.thermo();
129 const rhoThermo& thermo2 = phase2.thermo();
138 forAllConstIter(HashPtrTable<volScalarField>, *dmidtfIter(), dmidtfJter)
140 const word& specie = dmidtfJter.key();
151 case latentHeatTransfer::heat:
157 case latentHeatTransfer::mass:
161 this->Li(pair, specie, dmidtf, Tf, scheme)
164 *eqns[phase1.name()] += H1Fac*dmidtf*Li;
165 *eqns[phase2.name()] += (1 - H1Fac)*dmidtf*Li;
175 case latentHeatTransfer::heat:
177 *eqns[phase1.name()] +=
178 - HEff*(thermo2.T() - thermo1.T()) + H1*(Tf - thermo1.T());
180 *eqns[phase2.name()] +=
181 - HEff*(thermo1.T() - thermo2.T()) + H2*(Tf - thermo2.T());
185 case latentHeatTransfer::mass:
198 template<
class BasePhaseSystem>
205 HeatTransferPhaseSystem<BasePhaseSystem>(mesh)
207 this->generatePairsAndSubModels
217 heatTransferModelTable,
219 heatTransferModelIter
222 const phasePair& pair = this->phasePairs_[heatTransferModelIter.key()];
224 if (!heatTransferModels_[pair].first().valid())
227 <<
"A heat transfer model for the " << pair.phase1().name()
228 <<
" side of the " << pair <<
" pair is not specified" 231 if (!heatTransferModels_[pair].second().valid())
234 <<
"A heat transfer model for the " << pair.phase2().name()
235 <<
" side of the " << pair <<
" pair is not specified" 244 template<
class BasePhaseSystem>
252 template<
class BasePhaseSystem>
257 autoPtr<phaseSystem::heatTransferTable> eqnsPtr
266 const phaseModel& phase = this->phaseModels_[
phasei];
277 heatTransferModelTable,
279 heatTransferModelIter
282 const phasePair& pair = this->phasePairs_[heatTransferModelIter.key()];
284 const phaseModel& phase1 = pair.phase1();
285 const phaseModel& phase2 = pair.phase2();
295 *eqns[phase1.name()] +=
296 HEff*(phase2.thermo().T() - phase1.thermo().T())
297 + H1/Cpv1*he1 -
fvm::Sp(H1/Cpv1, he1);
298 *eqns[phase2.name()] +=
299 HEff*(phase1.thermo().T() - phase2.thermo().T())
300 + H2/Cpv2*he2 -
fvm::Sp(H2/Cpv2, he2);
307 template<
class BasePhaseSystem>
311 BasePhaseSystem::correctEnergyTransport();
317 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)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static int compare(const Pair< word > &a, const Pair< word > &b)
Compare Pairs.
HashPtrTable< fvScalarMatrix > heatTransferTable
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
CGAL::Exact_predicates_exact_constructions_kernel K
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimTime
virtual void correctInterfaceThermo()
Correct the interface thermodynamics.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const dimensionSet dimEnergy
void addDmdtHefs(const phaseSystem::dmdtfTable &dmdtfs, const phaseSystem::dmdtfTable &Tfs, const latentHeatScheme scheme, const latentHeatTransfer transfer, phaseSystem::heatTransferTable &eqns) const
Add energy transfer terms which result from bulk phase changes.
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Return the heat transfer matrices.
virtual ~TwoResistanceHeatTransferPhaseSystem()
Destructor.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
virtual void correctEnergyTransport()
Correct the energy transport e.g. alphat and Tf.
void addDmidtHefs(const phaseSystem::dmidtfTable &dmidtfs, const phaseSystem::dmdtfTable &Tfs, const latentHeatScheme scheme, const latentHeatTransfer transfer, phaseSystem::heatTransferTable &eqns) const
Add energy transfer terms which result from specie phase changes.
Calculate the matrix for implicit and explicit sources.
TwoResistanceHeatTransferPhaseSystem(const fvMesh &)
Construct from fvMesh.
virtual bool read()
Read base phaseProperties dictionary.