UEqns.H
Go to the documentation of this file.
1 Info<< "Constructing face momentum equations" << endl;
2 
3 MRF.correctBoundaryVelocity(U1);
4 MRF.correctBoundaryVelocity(U2);
5 MRF.correctBoundaryVelocity(U);
6 Info<< "Constructing face momentum equations" << endl;
7 
8 fvVectorMatrix U1Eqn(U1, rho1.dimensions()*U1.dimensions()*dimVolume/dimTime);
9 fvVectorMatrix U2Eqn(U2, rho2.dimensions()*U2.dimensions()*dimVolume/dimTime);
10 
11 {
12  volScalarField Vm(fluid.Vm());
13 
14  fvVectorMatrix UgradU1
15  (
17  + MRF.DDt(U1)
18  );
19 
20  fvVectorMatrix UgradU2
21  (
23  + MRF.DDt(U2)
24  );
25 
26  {
27  U1Eqn =
28  (
30  + MRF.DDt(alpha1*rho1, U1)
31  + phase1.turbulence().divDevRhoReff(U1)
32  + Vm*(UgradU1 - (UgradU2 & U2))
33  - fvOptions(alpha1, rho1, U1)
34  );
35  U1Eqn.relax();
36  fvOptions.constrain(U1Eqn);
37  U1.correctBoundaryConditions();
38  fvOptions.correct(U1);
39  }
40 
41  {
42  U2Eqn =
43  (
45  + MRF.DDt(alpha2*rho2, U2)
46  + phase2.turbulence().divDevRhoReff(U2)
47  + Vm*(UgradU2 - (UgradU1 & U1))
48  - fvOptions(alpha2, rho2, U2)
49  );
50  U2Eqn.relax();
51  fvOptions.constrain(U2Eqn);
52  U2.correctBoundaryConditions();
53  fvOptions.correct(U2);
54  }
55 }
alphaRhoPhi1
surfaceScalarField & alphaRhoPhi1
Definition: createFieldRefs.H:5
U1
volVectorField & U1
Definition: setRegionFluidFields.H:11
alpha2
const volScalarField & alpha2
Definition: setRegionFluidFields.H:9
phi1
surfaceScalarField & phi1
Definition: setRegionFluidFields.H:12
Sp
zeroField Sp
Definition: alphaSuSp.H:2
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
fluid
twoPhaseSystem & fluid
Definition: setRegionFluidFields.H:3
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:50
phi2
surfaceScalarField & phi2
Definition: setRegionFluidFields.H:16
MRF
IOMRFZoneList & MRF
Definition: setRegionFluidFields.H:22
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:53
Foam::fvVectorMatrix
fvMatrix< vector > fvVectorMatrix
Definition: fvMatricesFwd.H:47
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:23
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
rho2
volScalarField & rho2
Definition: setRegionFluidFields.H:30
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
rho1
volScalarField & rho1
Definition: setRegionFluidFields.H:27
U2
volVectorField & U2
Definition: setRegionFluidFields.H:15
phase2
phaseModel & phase2
Definition: setRegionFluidFields.H:6
U
U
Definition: pEqn.H:72
alphaRhoPhi2
surfaceScalarField & alphaRhoPhi2
Definition: createFieldRefs.H:9
phase1
phaseModel & phase1
Definition: setRegionFluidFields.H:5
Foam::dimVolume
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:60