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 
11  (
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")
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 
34  E1Eqn -=
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 
44  (
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")
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 
67  E2Eqn -=
68  (
69  Kh*(thermo1.T() - thermo2.T())
70  + Kh*he2/Cpv2
71  - fvm::Sp(Kh/Cpv2, he2)
72  + alpha2*rho2*(U2&g)
73  + fvOptions(alpha2, rho2, he2)
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 }
rhoThermo & thermo2
contErr1
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
const surfaceScalarField & alphaPhi2
fv::options & fvOptions
multiphaseSystem & fluid
Definition: createFields.H:11
#define K1
Definition: SHA1.C:167
E1Eqn
Definition: EEqns.H:34
contErr2
#define K2
Definition: SHA1.C:168
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
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
E2Eqn
Definition: EEqns.H:67
const surfaceScalarField & alphaPhi1
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
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
volScalarField & dpdt
rhoThermo & thermo1
volScalarField Kh(fluid.Kh())
const volScalarField & alpha1
volVectorField & U1
alpha2
Definition: alphaEqn.H:115
phaseModel & phase1
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
volScalarField Cpv2("Cpv2", thermo2.Cpv())
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
Definition: fvcMeshPhi.C:188
volVectorField & U2
messageStream Info
const dimensionedScalar & rho2
Definition: createFields.H:44
phaseModel & phase2
volScalarField & p
const dimensionedVector & g
const dimensionedScalar & rho1
Definition: createFields.H:43
volScalarField Cpv1("Cpv1", thermo1.Cpv())
surfaceScalarField & alphaRhoPhi1
zeroField Sp
Definition: alphaSuSp.H:2