pEqn.H
Go to the documentation of this file.
1rho = thermo.rho();
2
3volScalarField rAU(1.0/UEqn.A());
4surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
5volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
6
7if (pimple.transonic())
8{
9 surfaceScalarField phid
10 (
11 "phid",
12 fvc::interpolate(psi)
13 *(
14 (
15 fvc::flux(HbyA)
16 + MRF.zeroFilter
17 (
18 rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
19 )
20 )
21 )
22 );
23
24 fvc::makeRelative(phid, psi, U);
25 MRF.makeRelative(fvc::interpolate(psi), phid);
26
27 while (pimple.correctNonOrthogonal())
28 {
29 fvScalarMatrix pEqn
30 (
31 fvm::ddt(psi, p)
32 + fvm::div(phid, p)
33 - fvm::laplacian(rhorAUf, p)
34 ==
35 fvOptions(psi, p, rho.name())
36 );
37
38 pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
39
40 if (pimple.finalNonOrthogonalIter())
41 {
42 phi == pEqn.flux();
43 }
44 }
45}
46else
47{
48 surfaceScalarField phiHbyA
49 (
50 "phiHbyA",
51 (
52 fvc::flux(rho*HbyA)
53 + MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, rhoUf))
54 )
55 );
56
57 fvc::makeRelative(phiHbyA, rho, U);
58 MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
59
60 // Update the pressure BCs to ensure flux consistency
62
63 while (pimple.correctNonOrthogonal())
64 {
65 fvScalarMatrix pEqn
66 (
67 fvm::ddt(psi, p)
68 + fvc::div(phiHbyA)
69 - fvm::laplacian(rhorAUf, p)
70 ==
71 fvOptions(psi, p, rho.name())
72 );
73
74 pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
75
76 if (pimple.finalNonOrthogonalIter())
77 {
78 phi = phiHbyA + pEqn.flux();
79 }
80 }
81}
82
83#include "rhoEqn.H"
84#include "compressibleContinuityErrs.H"
85
86U = HbyA - rAU*fvc::grad(p);
87U.correctBoundaryConditions();
88fvOptions.correct(U);
89K = 0.5*magSqr(U);
90
91{
92 rhoUf = fvc::interpolate(rho*U);
93 surfaceVectorField n(mesh.Sf()/mesh.magSf());
94 rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
95}
96
97if (thermo.dpdt())
98{
99 dpdt = fvc::ddt(p) - fvc::div(fvc::meshPhi(rho, U), p);
100}
CGAL::Exact_predicates_exact_constructions_kernel K
label n
fv::options & fvOptions
surfaceScalarField & phi
IOMRFZoneList & MRF
pimpleControl & pimple
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
U
Definition: pEqn.H:72
rhoUf
Definition: pEqn.H:89
volScalarField & p
const volScalarField & psi
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho *rAU))
fvVectorMatrix & UEqn
Definition: UEqn.H:13
phiHbyA
Definition: pcEqn.H:73
HbyA
Definition: pcEqn.H:74
surfaceScalarField phid("phid", fvc::interpolate(psi) *(fvc::flux(HbyA)+MRF.zeroFilter(rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho))))
dynamicFvMesh & mesh
volScalarField & dpdt
tmp< volScalarField > rAU
Definition: initCorrectPhi.H:1