pEqn.H
Go to the documentation of this file.
1 {
2  // Thermodynamic density needs to be updated by psi*d(p) after the
3  // pressure solution - done in 2 parts. Part 1:
4  thermo.rho() -= psi*p;
5 
6  volScalarField rAU(1.0/UEqn().A());
7  volVectorField HbyA("HbyA", U);
8  HbyA = rAU*UEqn().H();
9 
10  UEqn.clear();
11 
13  (
14  "phiHbyA",
16  );
17 
18  MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
19 
20  while (simple.correctNonOrthogonal())
21  {
22  fvScalarMatrix pEqn
23  (
25  - fvm::laplacian(rho*rAU, p)
26  ==
27  parcels.Srho()
28  + fvOptions(psi, p, rho.name())
29  );
30 
31  pEqn.solve();
32 
33  if (simple.finalNonOrthogonalIter())
34  {
35  phi = phiHbyA + pEqn.flux();
36  }
37  }
38 
39  p.relax();
40 
41  // Second part of thermodynamic density update
42  thermo.rho() += psi*p;
43 
44  #include "compressibleContinuityErrs.H"
45 
46  U = HbyA - rAU*fvc::grad(p);
47  U.correctBoundaryConditions();
48  fvOptions.correct(U);
49 
50  rho = thermo.rho();
51  rho = max(rho, rhoMin);
52  rho = min(rho, rhoMax);
53  rho.relax();
54 
55  Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
56 }
phi
Definition: pEqn.H:20
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
messageStream Info
tmp< surfaceScalarField > interpolate(const RhoType &rho)
dynamicFvMesh & mesh
p
Definition: pEqn.H:59
fv::IOoptionList & fvOptions
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
IOMRFZoneList & MRF
fvVectorMatrix UEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const volScalarField & psi
Definition: createFields.H:24
phiHbyA
Definition: pEqn.H:21
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
volScalarField rAU(1.0/UEqn.A())
PtrList< dimensionedScalar > rhoMin(fluidRegions.size())
const dictionary & simple
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
rho
Definition: pEqn.H:1
psiReactionThermo & thermo
Definition: createFields.H:32
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
PtrList< dimensionedScalar > rhoMax(fluidRegions.size())
U
Definition: pEqn.H:82
HbyA
Definition: pEqn.H:7