EEqns.H
Go to the documentation of this file.
1{
2 volScalarField& he1 = thermo1.he();
3 volScalarField& he2 = thermo2.he();
4
5 volScalarField Cpv1("Cpv1", thermo1.Cpv());
6 volScalarField Cpv2("Cpv2", thermo2.Cpv());
7
8 volScalarField Kh(fluid.Kh());
9
10 fvScalarMatrix E1Eqn
11 (
12 fvm::ddt(alpha1, rho1, he1) + fvm::div(alphaRhoPhi1, he1)
13 - fvm::Sp(contErr1, he1)
14
15 + fvc::ddt(alpha1, rho1, K1) + fvc::div(alphaRhoPhi1, K1)
16 - contErr1*K1
17 + (
18 he1.name() == thermo1.phasePropertyName("e")
19 ? fvc::div(fvc::absolute(alphaPhi1, alpha1, U1), p)
20 + p*fvc::ddt(alpha1)
21 : -alpha1*dpdt
22 )
23
24 - fvm::laplacian
25 (
26 fvc::interpolate(alpha1)
27 *fvc::interpolate(thermo1.alphaEff(phase1.turbulence().mut())),
28 he1
29 )
30 );
31
32 E1Eqn.relax();
33
35 (
36 Kh*(thermo2.T() - thermo1.T())
37 + Kh*he1/Cpv1
38 - fvm::Sp(Kh/Cpv1, he1)
39 + alpha1*rho1*(U1&g)
40 + fvOptions(alpha1, rho1, he1)
41 );
42
43 fvScalarMatrix E2Eqn
44 (
45 fvm::ddt(alpha2, rho2, he2) + fvm::div(alphaRhoPhi2, he2)
46 - fvm::Sp(contErr2, he2)
47
48 + fvc::ddt(alpha2, rho2, K2) + fvc::div(alphaRhoPhi2, K2)
49 - contErr2*K2
50 + (
51 he2.name() == thermo2.phasePropertyName("e")
52 ? fvc::div(fvc::absolute(alphaPhi2, alpha2, U2), p)
53 + p*fvc::ddt(alpha1)
54 : -alpha2*dpdt
55 )
56
57 - fvm::laplacian
58 (
59 fvc::interpolate(alpha2)
60 *fvc::interpolate(thermo2.alphaEff(phase2.turbulence().mut())),
61 he2
62 )
63 );
64
65 E2Eqn.relax();
66
68 (
69 Kh*(thermo1.T() - thermo2.T())
70 + Kh*he2/Cpv2
71 - fvm::Sp(Kh/Cpv2, he2)
72 + alpha2*rho2*(U2&g)
74 );
75
76 fvOptions.constrain(E1Eqn);
77 E1Eqn.solve();
78 fvOptions.correct(he1);
79
80 fvOptions.constrain(E2Eqn);
81 E2Eqn.solve();
82 fvOptions.correct(he2);
83
84 thermo1.correct();
85 Info<< "min " << thermo1.T().name()
86 << " " << min(thermo1.T()).value() << endl;
87
88 thermo2.correct();
89 Info<< "min " << thermo2.T().name()
90 << " " << min(thermo2.T()).value() << endl;
91}
#define K1
Definition: SHA1.C:144
#define K2
Definition: SHA1.C:145
const uniformDimensionedVectorField & g
fv::options & fvOptions
rhoThermo & thermo2
const volScalarField & alpha1
rhoThermo & thermo1
twoPhaseSystem & fluid
phaseModel & phase1
volScalarField & rho2
const volScalarField & alpha2
const surfaceScalarField & alphaPhi1
phaseModel & phase2
volVectorField & U1
volScalarField & rho1
volVectorField & U2
const surfaceScalarField & alphaPhi2
volScalarField & p
contErr2
contErr1
volScalarField & dpdt
surfaceScalarField & alphaRhoPhi2
surfaceScalarField & alphaRhoPhi1
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
E1Eqn
Definition: EEqns.H:34
volScalarField Cpv2("Cpv2", thermo2.Cpv())
volScalarField Cpv1("Cpv1", thermo1.Cpv())
volScalarField Kh(fluid.Kh())
volScalarField & he2
Definition: EEqns.H:3
E2Eqn
Definition: EEqns.H:67