EEqns.H
Go to the documentation of this file.
1 for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
2 {
3  fluid.correctEnergyTransport();
4 
5  autoPtr<phaseSystem::heatTransferTable>
6  heatTransferPtr(fluid.heatTransfer());
7 
8  phaseSystem::heatTransferTable& heatTransfer = heatTransferPtr();
9 
10  forAll(fluid.anisothermalPhases(), anisothermalPhasei)
11  {
12  phaseModel& phase = fluid.anisothermalPhases()[anisothermalPhasei];
13 
14  const volScalarField& alpha = phase;
15  const tmp<volScalarField> trho = phase.rho();
16  const tmp<volVectorField> tU = phase.U();
17 
18  const auto& rho = trho();
19  const auto& U = tU();
20 
22  (
23  phase.heEqn()
24  ==
25  *heatTransfer[phase.name()]
26  + alpha*rho*(U&g)
27  + fvOptions(alpha, rho, phase.thermoRef().he())
28  );
29 
30  EEqn.relax();
31  fvOptions.constrain(EEqn);
32  EEqn.solve();
33  fvOptions.correct(phase.thermoRef().he());
34  }
35 
36  fluid.correctThermo();
37  fluid.correct();
38 }
39 
40 
42 {
43  phaseModel& phase = phases[phasei];
44 
45  Info<< phase.name() << " min/max T "
46  << min(phase.thermo().T()).value()
47  << " - "
48  << max(phase.thermo().T()).value()
49  << endl;
50 }
twoPhaseSystem & fluid
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:37
multiphaseSystem::phaseModelList & phases
Definition: createFields.H:12
label phasei
Definition: pEqn.H:27
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:40
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:529
tmp< volScalarField > trho
fvScalarMatrix EEqn(fvm::ddt(rho, he)+mvConvection->fvmDiv(phi, he)+fvc::ddt(rho, K)+fvc::div(phi, K)+(he.name()=="e" ? fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U), p, "div(phiv,p)") :-dpdt) - fvm::laplacian(turbulence->alphaEff(), he)==Qdot+radiation->Sh(thermo, he)+parcels.Sh(he)+surfaceFilm.Sh()+fvOptions(rho, he))
fv::options & fvOptions
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:72
int nEnergyCorrectors(pimpleDict.getOrDefault< int >("nEnergyCorrectors", 1))
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:26
const uniformDimensionedVectorField & g
forAll(phases, phasei)
Definition: EEqns.H:41
U
Definition: pEqn.H:72
messageStream Info
Information stream (stdout output on master, null elsewhere)
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].