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 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
8 volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
9 tUEqn.clear();
10 surfaceScalarField phiHbyA
11 (
12 "phiHbyA",
13 fvc::interpolate(rho)*fvc::flux(HbyA)
14 );
15
16 MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
17
18 // Update the pressure BCs to ensure flux consistency
20
21 while (simple.correctNonOrthogonal())
22 {
23 fvScalarMatrix pEqn
24 (
25 fvc::div(phiHbyA)
26 - fvm::laplacian(rhorAUf, p)
27 ==
28 parcels.Srho()
29 + fvOptions(psi, p, rho.name())
30 );
31
32 pEqn.solve();
33
34 if (simple.finalNonOrthogonalIter())
35 {
36 phi = phiHbyA + pEqn.flux();
37 }
38 }
39
40 p.relax();
41
42 // Second part of thermodynamic density update
43 thermo.rho() += psi*p;
44
45 #include "compressibleContinuityErrs.H"
46
47 U = HbyA - rAU*fvc::grad(p);
48 U.correctBoundaryConditions();
49 fvOptions.correct(U);
50
51 rho = thermo.rho();
52 rho = max(rho, rhoMin);
53 rho = min(rho, rhoMax);
54 rho.relax();
55
56 Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
57}
Y[inertIndex] max(0.0)
fv::options & fvOptions
surfaceScalarField & phi
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
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 dimensionedScalar rhoMin
const dimensionedScalar rhoMax
tmp< volScalarField > rAU
Definition: initCorrectPhi.H:1
const dictionary & simple