36 void Foam::solvers::multiphaseEuler::compositionPredictor()
38 autoPtr<phaseSystem::specieTransferTable>
42 specieTransfer(specieTransferPtr());
50 UPtrList<volScalarField>&
Y = phase.YRef();
56 if (phase.solveSpecie(i))
62 *specieTransfer[
Y[i].name()]
76 Y[i].correctBoundaryConditions();
85 void Foam::solvers::multiphaseEuler::energyPredictor()
87 autoPtr<phaseSystem::heatTransferTable>
88 heatTransferPtr(fluid.heatTransfer());
92 forAll(fluid.anisothermalPhases(), anisothermalPhasei)
94 phaseModel& phase = fluid_.anisothermalPhases()[anisothermalPhasei];
103 *heatTransfer[phase.name()]
113 fluid_.correctThermo();
114 fluid_.correctContinuityError();
122 if (
pimple.thermophysics())
124 for (
int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
126 fluid_.predictThermophysicalTransport();
127 compositionPredictor();
130 forAll(
fluid.anisothermalPhases(), anisothermalPhasei)
133 fluid.anisothermalPhases()[anisothermalPhasei];
135 Info<< phase.
name() <<
" min/max T "
fvScalarMatrix EEqn(fvm::div(phi, he)+(he.name()=="e" ? fvc::div(phi, volScalarField("Ekp", 0.5 *magSqr(U)+p/rho)) :fvc::div(phi, volScalarField("K", 0.5 *magSqr(U))))+thermophysicalTransport->divq(he)==fvModels.source(rho, he))
#define forAll(list, i)
Loop across all elements in list.
virtual const volScalarField & T() const =0
Temperature [K].
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
virtual const rhoThermo & thermo() const =0
Return the thermophysical model.
const word & name() const
Return the name of this phase.
virtual autoPtr< specieTransferTable > specieTransfer() const =0
Return the specie transfer matrices.
virtual void correctReactions()
Correct the reactions.
virtual void correctSpecies()
Correct the species mass fractions.
const phaseModelPartialList & multicomponentPhases() const
Return the models for phases that have multiple species.
HashPtrTable< fvScalarMatrix > specieTransferTable
HashPtrTable< fvScalarMatrix > heatTransferTable
Foam::fvModels & fvModels() const
Return the fvModels that are created on demand.
Foam::fvConstraints & fvConstraints() const
Return the fvConstraints that are created on demand.
Solver module for steady or transient turbulent flow of compressible fluids with heat-transfer for HV...
virtual void thermophysicalPredictor()
Construct and solve the energy equation,.
const phaseSystem & fluid
Reference to the multiphase fluid.
Foam::fvConstraints & fvConstraints(Foam::fvConstraints::New(mesh))
Foam::fvModels & fvModels(Foam::fvModels::New(mesh))
pimpleControl pimple(mesh)
Calculate the first temporal derivative.
Calculate the divergence of the given field.
Calculate the field for explicit evaluation of implicit and explicit sources.
Calculate the matrix for the first temporal derivative.
Calculate the matrix for the divergence of the given field and flux.
Calculate the matrix for implicit and explicit sources.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Ostream & endl(Ostream &os)
Add newline and flush stream.
fvMatrix< scalar > fvScalarMatrix
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
VolField< scalar > volScalarField
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
PtrList< volScalarField > & Y