27 #include "heatTransferModel.H" 33 template<
class BasePhaseSystem>
36 const phaseSystem::dmdtfTable& dmdtfs,
37 const phaseSystem::dmdtfTable& Tfs,
38 const latentHeatScheme scheme,
39 const latentHeatTransfer transfer,
40 phaseSystem::heatTransferTable& eqns
43 HeatTransferPhaseSystem<BasePhaseSystem>::addDmdtHefsWithoutL
54 const phaseInterface interface(*
this, dmdtfIter.key());
60 const phaseModel& phase1 = interface.phase1();
61 const phaseModel& phase2 = interface.phase2();
62 const rhoThermo& thermo1 = phase1.thermo();
63 const rhoThermo& thermo2 = phase2.thermo();
66 const sidedBlendedHeatTransferModel& heatTransferModel =
67 heatTransferModels_[interface];
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 phaseInterface interface(*
this, dmidtfIter.key());
125 const phaseModel& phase1 = interface.phase1();
126 const phaseModel& phase2 = interface.phase2();
127 const rhoThermo& thermo1 = phase1.thermo();
128 const rhoThermo& thermo2 = phase2.thermo();
131 const sidedBlendedHeatTransferModel& heatTransferModel =
132 heatTransferModels_[interface];
133 const volScalarField H1(heatTransferModel.modelInThe(phase1).K());
134 const volScalarField H2(heatTransferModel.modelInThe(phase2).K());
139 forAllConstIter(HashPtrTable<volScalarField>, *dmidtfIter(), dmidtfJter)
141 const word& specie = dmidtfJter.key();
148 case latentHeatTransfer::heat:
154 case latentHeatTransfer::mass:
158 this->Li(interface, specie, dmidtf, Tf, scheme)
161 *eqns[phase1.name()] += H1Fac*dmidtf*Li;
162 *eqns[phase2.name()] += (1 - H1Fac)*dmidtf*Li;
172 case latentHeatTransfer::heat:
174 *eqns[phase1.name()] +=
175 - HEff*(thermo2.T() - thermo1.T()) + H1*(Tf - thermo1.T());
177 *eqns[phase2.name()] +=
178 - HEff*(thermo1.T() - thermo2.T()) + H2*(Tf - thermo2.T());
182 case latentHeatTransfer::mass:
195 template<
class BasePhaseSystem>
202 HeatTransferPhaseSystem<BasePhaseSystem>(mesh)
204 this->generateInterfacialModels(heatTransferModels_);
209 heatTransferModelTable,
211 heatTransferModelIter
214 const phaseInterface&
interface = heatTransferModelIter()->interface();
218 if (!heatTransferModelIter()->haveModelInThe(iter()))
221 <<
"A heat transfer model for the " << iter().name()
222 <<
" side of the " << interface.name()
223 <<
" interface is not specified" 233 template<
class BasePhaseSystem>
241 template<
class BasePhaseSystem>
246 autoPtr<phaseSystem::heatTransferTable> eqnsPtr
255 const phaseModel& phase = this->phaseModels_[
phasei];
266 heatTransferModelTable,
268 heatTransferModelIter
271 const sidedBlendedHeatTransferModel& model = heatTransferModelIter()();
273 const phaseModel& phase1 = model.interface().phase1();
274 const phaseModel& phase2 = model.interface().phase2();
284 *eqns[phase1.name()] +=
285 HEff*(phase2.thermo().T() - phase1.thermo().T())
286 + H1/Cpv1*he1 -
fvm::Sp(H1/Cpv1, he1);
287 *eqns[phase2.name()] +=
288 HEff*(phase1.thermo().T() - phase2.thermo().T())
289 + H2/Cpv2*he2 -
fvm::Sp(H2/Cpv2, he2);
296 template<
class BasePhaseSystem>
300 BasePhaseSystem::correctEnergyTransport();
306 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.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
HashPtrTable< fvScalarMatrix > heatTransferTable
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimTime
virtual void correctInterfaceThermo()
Correct the interface thermodynamics.
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.