This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/compressible/realFluidPisoFoam/pEqn.H

38 lines
682 B
C++
Raw Normal View History

2013-08-16 08:28:04 +00:00
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H();
2015-08-23 14:26:27 +00:00
phi =
fvc::interpolate(rho)*
(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
);
2016-06-06 12:10:12 +00:00
while (piso.correctNonOrthogonal())
2013-08-16 08:28:04 +00:00
{
2015-08-23 14:26:27 +00:00
fvScalarMatrix pEqn
(
psi*fvm::ddt(p)
+ drhodh*fvc::ddt(h)
+ fvc::div(phi)
- fvm::laplacian(rho*rUA, p)
);
2013-08-16 08:28:04 +00:00
2015-08-23 14:26:27 +00:00
pEqn.solve();
2013-08-16 08:28:04 +00:00
2016-06-06 12:10:12 +00:00
if (piso.finalNonOrthogonalIter())
2013-08-16 08:28:04 +00:00
{
2015-08-23 14:26:27 +00:00
phi += pEqn.flux();
2013-08-16 08:28:04 +00:00
}
}
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
U -= rUA*fvc::grad(p);
U.correctBoundaryConditions();
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);