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());
9  tUEqn.clear();
11  (
12  "phiHbyA",
14  );
15 
16  MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
17 
18  // Update the pressure BCs to ensure flux consistency
20 
21  while (simple.correctNonOrthogonal())
22  {
23  fvScalarMatrix pEqn
24  (
27  ==
28  parcels.Srho()
29  + fvOptions(psi, p, rho.name())
30  );
31 
32  pEqn.solve();
33 
34  if (simple.finalNonOrthogonalIter())
35  {
36  phi = phiHbyA + pEqn.flux();
37  }
38  }
39 
40  p.relax();
41 
42  // Second part of thermodynamic density update
43  thermo.rho() += psi*p;
44 
45  #include "compressibleContinuityErrs.H"
46 
48  U.correctBoundaryConditions();
49  fvOptions.correct(U);
50 
51  rho = thermo.rho();
52  rho = max(rho, rhoMin);
53  rho = min(rho, rhoMax);
54  rho.relax();
55 
56  Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
57 }
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:37
rho
Definition: pEqn.H:1
p
Definition: pEqn.H:50
volScalarField rAU(1.0/UEqn.A())
phiHbyA
Definition: pEqn.H:20
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:40
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:531
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:82
const dimensionedScalar rhoMin
fv::options & fvOptions
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
psiReactionThermo & thermo
Definition: createFields.H:28
IOMRFZoneList & MRF
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:40
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:28
HbyA
Definition: pEqn.H:4
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:26
const dictionary & simple
U
Definition: pEqn.H:72
mesh interpolate(rAU)
fvVectorMatrix & UEqn
Definition: UEqn.H:13
messageStream Info
Information stream (stdout output on master, null elsewhere)
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
phi
Definition: pEqn.H:18
const volScalarField & psi
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facGrad.C:51
const dimensionedScalar rhoMax