25 lines
413 B
C
25 lines
413 B
C
// Solve the Momentum equation
|
|
|
|
MRF.correctBoundaryVelocity(U);
|
|
|
|
tmp<fvVectorMatrix> tUEqn
|
|
(
|
|
fvm::ddt(rho, U) + fvm::div(phi, U)
|
|
+ MRF.DDt(rho, U)
|
|
+ turbulence->divDevRhoReff(U)
|
|
==
|
|
fvOptions(rho, U)
|
|
);
|
|
fvVectorMatrix& UEqn = tUEqn.ref();
|
|
|
|
UEqn.relax();
|
|
|
|
fvOptions.constrain(UEqn);
|
|
|
|
if (piso.momentumPredictor())
|
|
{
|
|
solve(UEqn == -fvc::grad(p));
|
|
|
|
fvOptions.correct(U);
|
|
K = 0.5*magSqr(U);
|
|
}
|