UEqns.H
Go to the documentation of this file.
1 Info<< "Constructing momentum equations" << endl;
2 
3 MRF.correctBoundaryVelocity(U1);
4 MRF.correctBoundaryVelocity(U2);
5 MRF.correctBoundaryVelocity(U);
6 
7 fvVectorMatrix U1Eqn(U1, rho1.dimensions()*U1.dimensions()*dimVol/dimTime);
8 fvVectorMatrix U2Eqn(U2, rho2.dimensions()*U2.dimensions()*dimVol/dimTime);
9 
10 volScalarField Kd(fluid.Kd());
11 
12 {
13  volScalarField Vm(fluid.Vm());
14 
15  {
16  U1Eqn =
17  (
19  - fvm::Sp(contErr1, U1)
20  + MRF.DDt(alpha1*rho1 + Vm, U1)
21  + phase1.turbulence().divDevRhoReff(U1)
22  ==
23  - Vm
24  *(
25  fvm::ddt(U1)
26  + fvm::div(phi1, U1)
27  - fvm::Sp(fvc::div(phi1), U1)
28  - DDtU2
29  )
30  + fvOptions(alpha1, rho1, U1)
31  );
32  U1Eqn.relax();
33  U1Eqn += fvm::Sp(Kd, U1);
34  fvOptions.constrain(U1Eqn);
35  U1.correctBoundaryConditions();
36  fvOptions.correct(U1);
37  }
38 
39  {
40  U2Eqn =
41  (
43  - fvm::Sp(contErr2, U2)
44  + MRF.DDt(alpha2*rho2 + Vm, U2)
45  + phase2.turbulence().divDevRhoReff(U2)
46  ==
47  - Vm
48  *(
49  fvm::ddt(U2)
50  + fvm::div(phi2, U2)
51  - fvm::Sp(fvc::div(phi2), U2)
52  - DDtU1
53  )
54  + fvOptions(alpha2, rho2, U2)
55  );
56  U2Eqn.relax();
57  U2Eqn += fvm::Sp(Kd, U2);
58  fvOptions.constrain(U2Eqn);
59  U2.correctBoundaryConditions();
60  fvOptions.correct(U2);
61  }
62 }
DDtU2
Definition: DDtU.H:8
contErr1
fv::options & fvOptions
surfaceScalarField & phi2
multiphaseSystem & fluid
Definition: createFields.H:11
IOMRFZoneList & MRF
contErr2
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:256
const dimensionSet dimVol(dimVolume)
Definition: dimensionSets.H:59
surfaceScalarField & phi1
const volScalarField Kd(fluid.Kd())
surfaceScalarField & alphaRhoPhi2
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
const volScalarField & alpha1
volVectorField & U1
alpha2
Definition: alphaEqn.H:115
phaseModel & phase1
U
Definition: pEqn.H:72
void relax(const scalar alpha)
Relax field (for steady-state solution).
fvMatrix< vector > fvVectorMatrix
Definition: fvMatricesFwd.H:45
volVectorField & U2
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
messageStream Info
const dimensionedScalar & rho2
Definition: createFields.H:40
phaseModel & phase2
const dimensionedScalar & rho1
Definition: createFields.H:39
surfaceScalarField & alphaRhoPhi1
zeroField Sp
Definition: alphaSuSp.H:2