OLD: pEqn.solve(mesh.solver(p.select(piso.finalInnerIter()))); pEqn.solve(mesh.solver("Yi")); NEW: pEqn.solve(p.select(piso.finalInnerIter())); pEqn.solve("Yi");
37 lines
668 B
C
37 lines
668 B
C
// Solve the Momentum equation
|
|
|
|
MRF.correctBoundaryVelocity(U);
|
|
|
|
UEqn =
|
|
(
|
|
fvm::ddt(rho, U) + fvm::div(phi, U)
|
|
+ MRF.DDt(rho, U)
|
|
+ turbulence.divDevRhoReff(U)
|
|
==
|
|
fvOptions(rho, U)
|
|
);
|
|
|
|
UEqn.relax();
|
|
|
|
fvOptions.constrain(UEqn);
|
|
|
|
if (momentumPredictor)
|
|
{
|
|
solve
|
|
(
|
|
UEqn
|
|
==
|
|
fvc::reconstruct
|
|
(
|
|
(
|
|
- ghf*fvc::snGrad(rho)
|
|
- fvc::snGrad(p_rgh)
|
|
)*mesh.magSf()
|
|
),
|
|
U.select(finalIter)
|
|
);
|
|
|
|
fvOptions.correct(U);
|
|
K = 0.5*magSqr(U);
|
|
}
|