mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
23 lines
332 B
C
23 lines
332 B
C
// Solve the Momentum equation
|
|
|
|
tmp<fvVectorMatrix> UEqn
|
|
(
|
|
fvm::ddt(U)
|
|
+ fvm::div(phi, U)
|
|
+ turbulence->divDevReff(U)
|
|
);
|
|
|
|
UEqn().relax();
|
|
|
|
volScalarField rAU(1.0/UEqn().A());
|
|
|
|
if (momentumPredictor)
|
|
{
|
|
solve(UEqn() == -fvc::grad(p));
|
|
}
|
|
else
|
|
{
|
|
U = rAU*(UEqn().H() - fvc::grad(p));
|
|
U.correctBoundaryConditions();
|
|
}
|