mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
32 lines
561 B
C
32 lines
561 B
C
// Solve the Momentum equation
|
|
|
|
tmp<fvVectorMatrix> UEqn
|
|
(
|
|
fvm::div(phi, U)
|
|
+ turbulence->divDevRhoReff(U)
|
|
==
|
|
fvOptions(rho, U)
|
|
);
|
|
|
|
UEqn().relax();
|
|
|
|
fvOptions.constrain(UEqn());
|
|
|
|
if (simple.momentumPredictor())
|
|
{
|
|
solve
|
|
(
|
|
UEqn()
|
|
==
|
|
fvc::reconstruct
|
|
(
|
|
(
|
|
- ghf*fvc::snGrad(rho)
|
|
- fvc::snGrad(p_rgh)
|
|
)*mesh.magSf()
|
|
)
|
|
);
|
|
|
|
fvOptions.correct(U);
|
|
}
|