pEqn.H
Go to the documentation of this file.
1 volVectorField HbyA("HbyA", U);
3 {
4  HbyA = trTU()&UEqn().H();
5 }
6 else
7 {
8  HbyA = trAU()*UEqn().H();
9 }
10 
11 UEqn.clear();
13 
14 MRF.makeRelative(phiHbyA);
15 
16 adjustPhi(phiHbyA, U, p);
17 
18 while (simple.correctNonOrthogonal())
19 {
20  tmp<fvScalarMatrix> tpEqn;
21 
23  {
24  tpEqn = (fvm::laplacian(trTU(), p) == fvc::div(phiHbyA));
25  }
26  else
27  {
28  tpEqn = (fvm::laplacian(trAU(), p) == fvc::div(phiHbyA));
29  }
30 
31  tpEqn().setReference(pRefCell, pRefValue);
32 
33  tpEqn().solve();
34 
35  if (simple.finalNonOrthogonalIter())
36  {
37  phi = phiHbyA - tpEqn().flux();
38  }
39 }
40 
41 #include "continuityErrs.H"
42 
43 // Explicitly relax pressure for momentum corrector
44 p.relax();
45 
47 {
48  U = HbyA - (trTU()&fvc::grad(p));
49 }
50 else
51 {
52  U = HbyA - (trAU()*fvc::grad(p));
53 }
54 
55 U.correctBoundaryConditions();
56 fvOptions.correct(U);
pRefCell
const label pRefCell
Definition: setRegionFluidFields.H:27
Foam::fvc::grad
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
trAU
tmp< volScalarField > trAU
Definition: UEqn.H:20
p
p
Definition: pEqn.H:62
Foam::MULES::interpolate
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Definition: IMULESTemplates.C:40
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
phi
phi
Definition: pEqn.H:20
trTU
tmp< volTensorField > trTU
Definition: UEqn.H:21
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
UEqn
tmp< fvVectorMatrix > UEqn(fvm::div(phi, U)+MRF.DDt(U)+turbulence->divDevReff(U)==fvOptions(U))
MRF
IOMRFZoneList & MRF
Definition: setRegionFluidFields.H:15
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
adjustPhi
adjustPhi(phiHbyA, U, p)
HbyA
HbyA
Definition: pEqn.H:4
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
phiHbyA
phiHbyA
Definition: pEqn.H:21
pressureImplicitPorosity
Switch pressureImplicitPorosity(false)
pRefValue
const scalar pRefValue
Definition: setRegionFluidFields.H:28
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:16