pEqn.H
Go to the documentation of this file.
1 // Thermodynamic density needs to be updated by psi*d(p) after the
2 // pressure solution
4 
5 volScalarField rAU(1.0/UEqn.A());
8 tUEqn.clear();
10 (
11  "phiHbyA",
13 );
14 
15 MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
16 
17 // Update the pressure BCs to ensure flux consistency
19 
20 while (simple.correctNonOrthogonal())
21 {
22  fvScalarMatrix pEqn
23  (
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 // Thermodynamic density update
42 thermo.correctRho(psi*p - psip0);
43 
44 #include "compressibleContinuityErrs.H"
45 
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;
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
fv::options & fvOptions
rho
Definition: pEqn.H:1
p
Definition: pEqn.H:50
volScalarField rAU(1.0/UEqn.A())
IOMRFZoneList & MRF
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
phiHbyA
Definition: pEqn.H:20
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:256
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
rhoReactionThermo & thermo
Definition: createFields.H:28
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:33
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
U
Definition: pEqn.H:72
volVectorField & HbyA
Definition: pEqn.H:13
fvVectorMatrix & UEqn
Definition: UEqn.H:13
messageStream Info
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
phi
Definition: pEqn.H:18
const volScalarField & psi
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
Definition: fvcFlux.C:32
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))
const volScalarField psip0(psi *p)
simpleControl simple(mesh)