Loading...
Searching...
No Matches
pEqn.H
Go to the documentation of this file.
1// Thermodynamic density needs to be updated by psi*d(p) after the
2// pressure solution
3const volScalarField psip0(psi*p);
4
5volScalarField rAU(1.0/UEqn.A());
6surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
7volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
8tUEqn.clear();
9surfaceScalarField phiHbyA
10(
11 "phiHbyA",
12 fvc::interpolate(rho)*fvc::flux(HbyA)
13);
14
15MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
16
17// Update the pressure BCs to ensure flux consistency
19
20while (simple.correctNonOrthogonal())
21{
22 fvScalarMatrix pEqn
23 (
24 fvc::div(phiHbyA)
25 - fvm::laplacian(rhorAUf, p)
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
39p.relax();
40
41// Thermodynamic density update
42thermo.correctRho(psi*p - psip0);
43
44#include "compressibleContinuityErrs.H"
45
46U = HbyA - rAU*fvc::grad(p);
47U.correctBoundaryConditions();
48fvOptions.correct(U);
49
50rho = thermo.rho();
51rho.clamp_range(rhoMin, rhoMax);
52rho.relax();
53
54Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
fv::options & fvOptions
IOMRFZoneList & MRF
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
U
Definition pEqn.H:72
volScalarField & p
const volScalarField & psi
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF)
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
fvVectorMatrix & UEqn
Definition UEqn.H:13
phiHbyA
Definition pcEqn.H:73
HbyA
Definition pcEqn.H:74
const volScalarField psip0(psi *p)
const dimensionedScalar rhoMin
const dimensionedScalar rhoMax
tmp< volScalarField > rAU
const dictionary & simple