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 volScalarField& rho = phase.rho();
16  const volVectorField& U = phase.U();
17 
19  (
20  phase.heEqn()
21  ==
22  *heatTransfer[phase.name()]
23  + alpha*rho*(U&g)
24  + fvOptions(alpha, rho, phase.thermoRef().he())
25  );
26 
27  EEqn.relax();
28  fvOptions.constrain(EEqn);
29  EEqn.solve();
30  fvOptions.correct(phase.thermoRef().he());
31  }
32 
33  fluid.correctThermo();
34  fluid.correct();
35 }
36 
37 
39 {
40  phaseModel& phase = phases[phasei];
41 
42  Info<< phase.name() << " min/max T "
43  << min(phase.thermo().T()).value()
44  << " - "
45  << max(phase.thermo().T()).value()
46  << endl;
47 }
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
phasei
label phasei
Definition: pEqn.H:27
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
fluid
twoPhaseSystem & fluid
Definition: setRegionFluidFields.H:3
rho
rho
Definition: readInitialConditions.H:88
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:44
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:23
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
EEqn
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))
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
g
const uniformDimensionedVectorField & g
Definition: createFluidFields.H:26
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:62
U
U
Definition: pEqn.H:72
forAll
forAll(phases, phasei)
Definition: EEqns.H:38
nEnergyCorrectors
int nEnergyCorrectors(pimpleDict.getOrDefault< int >("nEnergyCorrectors", 1))
phases
multiphaseSystem::phaseModelList & phases
Definition: createFields.H:12