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  pZones.ddt(rho, U)
6  + fvm::div(phi, U)
7  + turbulence->divDevRhoReff(U)
8 );
9 
10 if (oCorr == nOuterCorr-1)
11 {
12  UEqn().relax(1);
13 }
14 else
15 {
16  UEqn().relax();
17 }
18 
19 mrfZones.addCoriolis(rho, UEqn());
20 pZones.addResistance(UEqn());
21 
22 volScalarField rUA = 1.0/UEqn().A();
23 
25 {
26  if (oCorr == nOuterCorr-1)
27  {
28  solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal"));
29  }
30  else
31  {
32  solve(UEqn() == -fvc::grad(p));
33  }
34 }
35 else
36 {
37  U = rUA*(UEqn().H() - fvc::grad(p));
38  U.correctBoundaryConditions();
39 }