UEqns.H
Go to the documentation of this file.
1Info<< "Constructing momentum equations" << endl;
2
3MRF.correctBoundaryVelocity(U1);
4MRF.correctBoundaryVelocity(U2);
5MRF.correctBoundaryVelocity(U);
6
7fvVectorMatrix U1Eqn(U1, rho1.dimensions()*U1.dimensions()*dimVolume/dimTime);
8fvVectorMatrix U2Eqn(U2, rho2.dimensions()*U2.dimensions()*dimVolume/dimTime);
9
11
12{
13 volScalarField Vm(fluid.Vm());
14
15 {
16 U1Eqn =
17 (
18 fvm::ddt(alpha1, rho1, U1) + fvm::div(alphaRhoPhi1, U1)
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 )
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 (
42 fvm::ddt(alpha2, rho2, U2) + fvm::div(alphaRhoPhi2, U2)
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 )
55 );
56 U2Eqn.relax();
57 U2Eqn += fvm::Sp(Kd, U2);
58 fvOptions.constrain(U2Eqn);
59 U2.correctBoundaryConditions();
60 fvOptions.correct(U2);
61 }
62}
fv::options & fvOptions
IOMRFZoneList & MRF
const volScalarField & alpha1
surfaceScalarField & phi2
twoPhaseSystem & fluid
phaseModel & phase1
volScalarField & rho2
const volScalarField & alpha2
surfaceScalarField & phi1
phaseModel & phase2
volVectorField & U1
volScalarField & rho1
volVectorField & U2
U
Definition: pEqn.H:72
contErr2
contErr1
const volScalarField Kd(fluid.Kd())
surfaceScalarField & alphaRhoPhi2
surfaceScalarField & alphaRhoPhi1
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
fvMatrix< vector > fvVectorMatrix
Definition: fvMatricesFwd.H:46
DDtU2
Definition: DDtU.H:8