pEqn.H
Go to the documentation of this file.
1 volScalarField rAU(1.0/UEqn.A());
4 tUEqn.clear();
5 
6 bool closedVolume = false;
7 
9 MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
10 
11 // Update the pressure BCs to ensure flux consistency
13 
14 if (simple.transonic())
15 {
17  (
18  "phid",
20  );
21 
23 
24  while (simple.correctNonOrthogonal())
25  {
26  fvScalarMatrix pEqn
27  (
29  + fvm::div(phid, p)
31  ==
32  fvOptions(psi, p, rho.name())
33  );
34 
35  // Relax the pressure equation to ensure diagonal-dominance
36  pEqn.relax();
37 
38  pEqn.setReference
39  (
40  pressureControl.refCell(),
41  pressureControl.refValue()
42  );
43 
44  pEqn.solve();
45 
46  if (simple.finalNonOrthogonalIter())
47  {
48  phi = phiHbyA + pEqn.flux();
49  }
50  }
51 }
52 else
53 {
55 
56  while (simple.correctNonOrthogonal())
57  {
58  fvScalarMatrix pEqn
59  (
62  ==
63  fvOptions(psi, p, rho.name())
64  );
65 
66  pEqn.setReference
67  (
68  pressureControl.refCell(),
69  pressureControl.refValue()
70  );
71 
72  pEqn.solve();
73 
74  if (simple.finalNonOrthogonalIter())
75  {
76  phi = phiHbyA + pEqn.flux();
77  }
78  }
79 }
80 
82 
83 // Explicitly relax pressure for momentum corrector
84 p.relax();
85 
87 U.correctBoundaryConditions();
88 fvOptions.correct(U);
89 
90 bool pLimited = pressureControl.limit(p);
91 
92 // For closed-volume cases adjust the pressure and density levels
93 // to obey overall mass continuity
95 {
98 }
99 
101 {
102  p.correctBoundaryConditions();
103 }
104 
105 rho = thermo.rho();
106 
107 if (!simple.transonic())
108 {
109  rho.relax();
110 }
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:37
rho
Definition: pEqn.H:1
dimensionedScalar initialMass
Definition: createFields.H:57
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.
bool pLimited
Definition: pEqn.H:102
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:43
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
Calculates and prints the continuity errors.
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:82
const pressureControl & pressureControl
surfaceScalarField phid("phid", fvc::interpolate(psi) *(fvc::flux(HbyA)+MRF.zeroFilter(rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho))))
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
adjustPhi(phiHbyA, U, p_rgh)
const dictionary & simple
U
Definition: pEqn.H:72
mesh interpolate(rAU)
fvVectorMatrix & UEqn
Definition: UEqn.H:13
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
bool closedVolume
Definition: pEqn.H:10