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 
47  U = HbyA - rAU*fvc::grad(p);
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 }
PtrList< dimensionedScalar > rhoMax(fluidRegions.size())
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
U
Definition: pEqn.H:83
p
Definition: pEqn.H:50
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
PtrList< dimensionedScalar > rhoMin(fluidRegions.size())
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
tmp< surfaceScalarField > interpolate(const RhoType &rho)
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
fv::options & fvOptions
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
psiReactionThermo & thermo
Definition: createFields.H:31
IOMRFZoneList & MRF
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
Definition: constrainHbyA.C:33
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const dictionary & simple
volVectorField & HbyA
Definition: pEqn.H:13
fvVectorMatrix & UEqn
Definition: UEqn.H:13
messageStream Info
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
rho
Definition: pEqn.H:1
volScalarField rAU(1.0/UEqn.A())