UEqn.H
Go to the documentation of this file.
1 // Construct the Momentum equation
2
3 MRF.correctBoundaryVelocity(U);
4
5 tmp<fvVectorMatrix> tUEqn
6 (
7 fvm::div(phi, U)
8 + MRF.DDt(U)
9 + turbulence->divDevReff(U)
10 ==
12 );
13 fvVectorMatrix& UEqn = tUEqn.ref();
14
15 UEqn.relax();
16
17 // Include the porous media resistance and solve the momentum equation
18 // either implicit in the tensorial resistance or transport using by
19 // including the spherical part of the resistance in the momentum diagonal
20
21 tmp<volScalarField> trAU;
22 tmp<volTensorField> trTU;
23
25 {
26 tmp<volTensorField> tTU = tensor(I)*UEqn.A();
27 pZones.addResistance(UEqn, tTU.ref());
28 trTU = inv(tTU());
29 trTU.ref().rename("rAU");
30
31 fvOptions.constrain(UEqn);
32
33 volVectorField gradp(fvc::grad(p));
34
35 for (int UCorr=0; UCorr<nUCorr; UCorr++)
36 {
37 U = trTU() & (UEqn.H() - gradp);
38 }
39 U.correctBoundaryConditions();
40
41 fvOptions.correct(U);
42 }
43 else
44 {
45 pZones.addResistance(UEqn);
46
47 fvOptions.constrain(UEqn);
48
49 solve(UEqn == -fvc::grad(p));
50
51 fvOptions.correct(U);
52
53 trAU = 1.0/UEqn.A();
54 trAU.ref().rename("rAU");
55 }
fv::options & fvOptions
surfaceScalarField & phi
IOMRFZoneList & MRF
Tensor of scalars, i.e. Tensor<scalar>.
U
Definition: pEqn.H:72
volScalarField & p
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
fvVectorMatrix & UEqn
Definition: UEqn.H:13
tmp< volTensorField > trTU
Definition: UEqn.H:22
tmp< volScalarField > trAU
Definition: UEqn.H:21
int nUCorr
Definition: createZones.H:5
IOporosityModelList pZones(mesh)
bool pressureImplicitPorosity(false)
compressible::turbulenceModel & turbulence
CEqn solve()