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/coupled/MRFPorousFoam/pEqn.H

26 lines
419 B
C
Raw Normal View History

2015-04-27 14:34:02 +00:00
// Pressure parts of the continuity equation
surfaceScalarField rUAf
(
"rUAf",
2015-10-29 15:29:08 +00:00
fvc::interpolate(1.0/UEqn().A())
2015-04-27 14:34:02 +00:00
);
2015-10-29 15:29:08 +00:00
UEqn.clear();
2015-04-27 14:34:02 +00:00
surfaceScalarField presSource
(
"presSource",
rUAf*(fvc::interpolate(fvc::grad(p, "grad(pSource)")) & mesh.Sf())
);
fvScalarMatrix pEqn
(
- fvm::laplacian(rUAf, p)
==
- fvc::div(presSource)
);
pEqn.setReference(pRefCell, pRefValue);
UpEqn.insertEquation(3, pEqn);