mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
While p and pmh (pd in OpenFOAM-1.5.?) are equivalent on orthogonal meshes they are not on non-orthogonal meshes and the difference is very important for buoyancy-dominated flows such as settling. settlingFoam is now written in terms of pmh (static pressure minus hydrostatic pressure) which used to be called pd but that confused too may people.
29 lines
565 B
C
29 lines
565 B
C
// Solve the Momentum equation
|
|
|
|
fvVectorMatrix UEqn
|
|
(
|
|
fvm::ddt(rho, U)
|
|
+ fvm::div(phi, U)
|
|
+ fvc::div
|
|
(
|
|
(Alpha/(scalar(1.001) - Alpha))*(sqr(rhoc)/rho)*Vdj*Vdj,
|
|
"div(phiVdj,Vdj)"
|
|
)
|
|
- fvm::laplacian(mu, U, "laplacian(muEff,U)")
|
|
);
|
|
|
|
UEqn.relax();
|
|
|
|
if (momentumPredictor)
|
|
{
|
|
solve
|
|
(
|
|
UEqn
|
|
==
|
|
fvc::reconstruct
|
|
(
|
|
(- ghf*fvc::snGrad(rho) - fvc::snGrad(pmh))*mesh.magSf()
|
|
)
|
|
);
|
|
}
|