EEqn.H
Go to the documentation of this file.
1 {
2  volScalarField& he = thermo.he();
3 
5  (
7  + fvc::ddt(rho, K) + fvc::div(phi, K)
8  + (
9  he.name() == "e"
10  ? fvc::div
11  (
13  p,
14  "div(phiv,p)"
15  )
16  : -dpdt
17  )
18  - fvm::laplacian(turbulence.alphaEff(), he)
19  ==
20  rho*(U&g)
21  + rad.Sh(thermo, he)
22  + Qdot
23  + fvOptions(rho, he)
24  );
25 
26  EEqn.relax();
27 
28  fvOptions.constrain(EEqn);
29 
30  if (coupled)
31  {
32  fvMatrixAssemblyPtr->addFvMatrix(EEqn);
33  }
34  else
35  {
36  EEqn.solve(mesh.solver(he.select(finalIter)));
37  fvOptions.correct(he);
38 
39  thermo.correct();
40  rad.correct();
41 
42  Info<< "Min/max T:" << min(thermo.T()).value() << ' '
43  << max(thermo.T()).value() << endl;
44  }
45 }
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:37
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:40
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
bool coupled(solutionDict.getOrDefault("coupledEnergyField", false))
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:43
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:487
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
Definition: facDdt.C:40
CGAL::Exact_predicates_exact_constructions_kernel K
scalar Qdot
Definition: solveChemistry.H:2
fv::options & fvOptions
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:84
psiReactionThermo & thermo
Definition: createFields.H:28
he
Definition: EEqn.H:38
dynamicFvMesh & mesh
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:40
volScalarField & dpdt
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:26
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))
const uniformDimensionedVectorField & g
radiation::radiationModel & rad
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
rho
Definition: EEqn.H:45
autoPtr< fvMatrix< scalar > > fvMatrixAssemblyPtr
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
Definition: fvcMeshPhi.C:183
U
Definition: pEqn.H:72
messageStream Info
Information stream (stdout output on master, null elsewhere)
volScalarField alphaEff("alphaEff", turbulence->nu()/Pr+alphat)
volScalarField & p