FreeFOAM The Cross-Platform CFD Toolkit
UEqn.H
Go to the documentation of this file.
1 // Solve the Momentum equation
2 
3 tmp<fvVectorMatrix> UEqn
4 (
5  fvm::ddt(U)
6  + fvm::div(phi, U)
7  + turbulence->divDevReff(U)
8 );
9 
10 if (oCorr == nOuterCorr-1)
11 {
12  UEqn().relax(1);
13 }
14 else
15 {
16  UEqn().relax();
17 }
18 
19 volScalarField rUA = 1.0/UEqn().A();
20 
22 {
23  if (oCorr == nOuterCorr-1)
24  {
25  solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal"));
26  }
27  else
28  {
29  solve(UEqn() == -fvc::grad(p));
30  }
31 }
32 else
33 {
34  U = rUA*(UEqn().H() - fvc::grad(p));
35  U.correctBoundaryConditions();
36 }