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  (
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 
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 }
Foam::fvc::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
p
p
Definition: pEqn.H:62
Foam::MULES::interpolate
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Definition: IMULESTemplates.C:40
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::dimensioned::value
const Type & value() const
Return const reference to value.
Definition: dimensionedType.C:261
phi
phi
Definition: pEqn.H:20
A
simpleMatrix< scalar > A(Nc)
simple
Simple relative velocity model.
U
U
Definition: pEqn.H:46
Foam::fvc::laplacian
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
rhoMin
PtrList< dimensionedScalar > rhoMin(fluidRegions.size())
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
Foam::Info
messageStream Info
UEqn
tmp< fvVectorMatrix > UEqn(fvm::div(phi, U)+MRF.DDt(U)+turbulence->divDevReff(U)==fvOptions(U))
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
MRF
IOMRFZoneList & MRF
Definition: setRegionFluidFields.H:15
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
rho
rho
Definition: pEqn.H:3
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
rAU
volScalarField rAU("rAU", 1.0/UEqn().A())
Foam::max
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
HbyA
HbyA
Definition: pEqn.H:4
psi
const volScalarField & psi
Definition: setRegionFluidFields.H:13
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
rhoMax
PtrList< dimensionedScalar > rhoMax(fluidRegions.size())
phiHbyA
phiHbyA
Definition: pEqn.H:21
Foam::min
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:16