This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/incompressible/pimpleFoam/UEqn.H
2017-01-05 09:37:11 +01:00

21 lines
435 B
C

// Time derivative matrix
fvVectorMatrix ddtUEqn(fvm::ddt(U));
// Convection-diffusion matrix
fvVectorMatrix HUEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff()
);
if (pimple.momentumPredictor())
{
// Solve momentum predictor
solve(relax(ddtUEqn + HUEqn) == -fvc::grad(p));
}
else
{
// Explicit update
U = (ddtUEqn.H() + HUEqn.H() - fvc::grad(p))/(HUEqn.A() + ddtUEqn.A());
U.correctBoundaryConditions();
}