EEqn.H
Go to the documentation of this file.
1 {
2  volScalarField& he = thermo.he();
3 
5  (
6  fvm::div(phi, he)
7  + (
8  he.name() == "e"
9  ? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
10  : fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
11  )
12  - fvm::laplacian(turb.alphaEff(), he)
13  ==
14  rho*(U&g)
15  + rad.Sh(thermo, he)
16  + fvOptions(rho, he)
17  );
18 
19  EEqn.relax();
20 
21  fvOptions.constrain(EEqn);
22 
23  if (coupled)
24  {
25  fvMatrixAssemblyPtr->addFvMatrix(EEqn);
26  }
27  else
28  {
29  EEqn.solve();
30 
31  fvOptions.correct(he);
32 
33  thermo.correct();
34  rad.correct();
35 
36  Info<< "Min/max T:" << min(thermo.T()).value() << ' '
37  << max(thermo.T()).value() << endl;
38  }
39 }
p
volScalarField & p
Definition: createFieldRefs.H:8
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:50
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::magSqr
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:44
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+fvOptions(rho, he))
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:23
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
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
he
he
Definition: EEqn.H:38
g
const uniformDimensionedVectorField & g
Definition: createFluidFields.H:26
U
U
Definition: pEqn.H:72
rad
radiation::radiationModel & rad
Definition: setRegionFluidFields.H:20
rho
rho
Definition: EEqn.H:45
alphaEff
volScalarField alphaEff("alphaEff", turbulence->nu()/Pr+alphat)
coupled
bool coupled(solutionDict.getOrDefault("coupledEnergyField", false))
Foam::fac::laplacian
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:47
turb
compressible::turbulenceModel & turb
Definition: setRegionFluidFields.H:10
fvMatrixAssemblyPtr
autoPtr< fvMatrix< scalar > > fvMatrixAssemblyPtr
Definition: createCoupledRegions.H:5