solveFluid.H
Go to the documentation of this file.
1 if (finalIter)
2 {
3  mesh.data::add("finalIteration", true);
4 }
5 
7 {
8  #include "EEqn.H"
9 }
10 else
11 {
12  if (oCorr == 0)
13  {
14  #include "rhoEqn.H"
15  }
16 
17  #include "UEqn.H"
18  //#include "EEqn.H"
19 
20  volScalarField& he = thermo.he();
21 
23  (
25  + fvc::ddt(rho, K) + fvc::div(phi, K)
26  + (
27  he.name() == "e"
28  ? fvc::div
29  (
31  p,
32  "div(phiv,p)"
33  )
34  : -dpdt
35  )
36  - fvm::laplacian(turb.alphaEff(), he)
37  ==
38  rho*(U&g)
39  + rad.Sh(thermo)
40  + fvOptions(rho, he)
41  );
42 
43  EEqn.relax();
44 
45  fvOptions.constrain(EEqn);
46 
47  EEqn.solve(mesh.solver(he.select(finalIter)));
48 
49  fvOptions.correct(he);
50 
51  thermo.correct();
52  rad.correct();
53 
54  Info << "radiation model is " <<endl;
55 
56  Info << rad <<endl;
57 
58  Info<< "Min/max T:" << min(thermo.T()).value() << ' '
59  << max(thermo.T()).value() << endl;
60 
61  // --- PISO loop
62  for (int corr=0; corr<nCorr; corr++)
63  {
64  #include "pEqn.H"
65  }
66 
67  turb.correct();
68 
69  rho = thermo.rho();
70 }
71 
72 if (finalIter)
73 {
74  mesh.data::remove("finalIteration");
75 }
p
p
Definition: pEqn.H:62
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
nCorr
const int nCorr
Definition: readFluidMultiRegionPIMPLEControls.H:3
Foam::MULES::interpolate
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Definition: IMULESTemplates.C:40
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
g
const dimensionedVector & g
Definition: setRegionFluidFields.H:33
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::dimensioned::value
const Type & value() const
Return const reference to value.
Definition: dimensionedType.C:261
rho
rho
Definition: solveFluid.H:28
dpdt
volScalarField & dpdt
Definition: setRegionFluidFields.H:12
UEqn.H
U
U
Definition: pEqn.H:46
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:56
Foam::fvc::laplacian
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
frozenFlow
const bool frozenFlow
Definition: setRegionFluidFields.H:29
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
Foam::Info
messageStream Info
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
rad
radiation::radiationModel & rad
Definition: setRegionFluidFields.H:25
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::max
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
he
volScalarField & he
Definition: YEEqn.H:56
EEqn
fvScalarMatrix EEqn(fvm::ddt(rho, he)+fvm::div(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(turb.alphaEff(), he)==rho *(U &g)+rad.Sh(thermo)+fvOptions(rho, he))
EEqn.H
pEqn.H
Foam::fvc::ddt
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
turb
compressible::turbulenceModel & turb
Definition: setRegionFluidFields.H:10
Foam::min
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::fvc::absolute
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
Definition: fvcMeshPhi.C:187
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:16