25 lines
438 B
C
25 lines
438 B
C
|
// Solve the Momentum equation
|
||
|
|
||
|
fvVectorMatrix UEqn
|
||
|
(
|
||
|
fvm::ddt(rho, U)
|
||
|
+ fvm::div(phi, U)
|
||
|
+ turbulence->divDevRhoReff(U)
|
||
|
);
|
||
|
|
||
|
UEqn.relax();
|
||
|
|
||
|
if (momentumPredictor)
|
||
|
{
|
||
|
solve
|
||
|
(
|
||
|
UEqn
|
||
|
==
|
||
|
fvc::reconstruct
|
||
|
(
|
||
|
fvc::interpolate(rho)*(g & mesh.Sf())
|
||
|
- fvc::snGrad(p)*mesh.magSf()
|
||
|
)
|
||
|
);
|
||
|
}
|