UEqns.H
Go to the documentation of this file.
1#include "MRFCorrectBCs.H"
2
3PtrList<fvVectorMatrix> UEqns(fluid.phases().size());
4autoPtr<multiphaseSystem::dragCoeffFields> dragCoeffs(fluid.dragCoeffs());
5
6label phasei = 0;
7for (phaseModel& phase : fluid.phases())
8{
9 const volScalarField& alpha = phase;
10 volVectorField& U = phase.U();
11
12 volScalarField nuEff(turbulence->nut() + phase.nu());
13
14 UEqns.set
15 (
16 phasei,
17 new fvVectorMatrix
18 (
19 fvm::ddt(alpha, U)
20 + fvm::div(phase.alphaPhi(), U)
21
22 + (alpha/phase.rho())*fluid.Cvm(phase)*
23 (
24 fvm::ddt(U)
25 + fvm::div(phase.phi(), U)
26 - fvm::Sp(fvc::div(phase.phi()), U)
27 )
28
29 - fvm::laplacian(alpha*nuEff, U)
30 - fvc::div
31 (
32 alpha*(nuEff*dev(T(fvc::grad(U))) /*- ((2.0/3.0)*I)*k*/),
33 "div(Rc)"
34 )
35 ==
36 //- fvm::Sp(fluid.dragCoeff(phase, dragCoeffs())/phase.rho(), U)
37 //- (alpha*phase.rho())*fluid.lift(phase)
38 //+
39 (alpha/phase.rho())*fluid.Svm(phase)
40 - fvm::Sp
41 (
42 slamDampCoeff
43 *max
44 (
45 mag(U()) - maxSlamVelocity,
46 dimensionedScalar("U0", dimVelocity, Zero)
47 )
48 /cbrt(mesh.V()),
49 U
50 )
51 )
52 );
53 MRF.addAcceleration
54 (
55 alpha*(1 + (1/phase.rho())*fluid.Cvm(phase)),
57 );
58 //UEqns[phasei].relax();
59
60 ++phasei;
61}
Y[inertIndex] max(0.0)
IOMRFZoneList & MRF
twoPhaseSystem & fluid
U
Definition: pEqn.H:72
const volScalarField & T
dynamicFvMesh & mesh
compressible::turbulenceModel & turbulence
autoPtr< multiphaseSystem::dragCoeffFields > dragCoeffs(fluid.dragCoeffs())
label phasei
Definition: UEqns.H:6
PtrList< fvVectorMatrix > UEqns(fluid.phases().size())
volScalarField & alpha