Loading...
Searching...
No Matches
pEqn.H
Go to the documentation of this file.
1// Solve pressure equation
2volScalarField rAU(1.0 / UEqn.A());
3volVectorField HbyA(constrainHbyA(rAU* UEqn.H(), U, p));
4surfaceScalarField phiHbyA
5(
6 "phiHbyA",
7 fvc::flux(HbyA)
8 + fvc::interpolate(rAU)*fvc::ddtCorr(U, phi)
9 );
10
11MRF.makeRelative(phiHbyA);
12
14
15// Update the pressure BCs to ensure flux consistency
17
18// Non-orthogonal pressure corrector loop
19while (piso.correctNonOrthogonal())
20{
21 // Pressure corrector
22 fvScalarMatrix pEqn
23 (
24 fvm::laplacian(rAU, p) == fvc::div(phiHbyA)
25 );
26 pEqn.setReference(pRefCell, pRefValue);
27 pEqn.solve(mesh.solver(p.select(piso.finalInnerIter())));
28
29 if (piso.finalNonOrthogonalIter())
30 {
31 phi = phiHbyA - pEqn.flux();
32 }
33}
34
35#include "continuityErrs.H"
36
37U = HbyA - rAU * fvc::grad(p);
38U.correctBoundaryConditions();
39fvOptions.correct(U);
fvScalarMatrix pEqn
Definition CFM.H:31
Foam::fvMesh & mesh
Definition createMesh.H:47
surfaceScalarField & phi
fvVectorMatrix & UEqn
Definition UEqn.H:37
volScalarField & p
scalar pRefValue
label pRefCell
constrainPressure(p, U, phiHbyA, rAtU(), MRF)
adjustPhi(phiHbyA, U, p)
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA))
volVectorField HbyA(constrainHbyA(rAU *UEqn.H(), U, p))
U
Definition pEqn.H:79
volScalarField rAU(1.0/UEqn.A())