25 lines
460 B
C
25 lines
460 B
C
|
// Solve the momentum equation
|
||
|
|
||
|
tmp<fvVectorMatrix> UEqn
|
||
|
(
|
||
|
fvm::div(phi, U)
|
||
|
+ turbulence->divDevReff(U)
|
||
|
);
|
||
|
|
||
|
UEqn().relax();
|
||
|
|
||
|
eqnResidual = solve
|
||
|
(
|
||
|
UEqn()
|
||
|
==
|
||
|
fvc::reconstruct
|
||
|
(
|
||
|
(
|
||
|
fvc::interpolate(rhok)*(g & mesh.Sf())
|
||
|
- fvc::snGrad(p)*mesh.magSf()
|
||
|
)
|
||
|
)
|
||
|
).initialResidual();
|
||
|
|
||
|
maxResidual = max(eqnResidual, maxResidual);
|