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)
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)
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 
79  fvOptions.constrain(E2Eqn);
80  E2Eqn.solve();
81 
82  thermo1.correct();
83  Info<< "min " << thermo1.T().name()
84  << " " << min(thermo1.T()).value() << endl;
85 
86  thermo2.correct();
87  Info<< "min " << thermo2.T().name()
88  << " " << min(thermo2.T()).value() << endl;
89 }
rhoThermo & thermo2
contErr1
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
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
surfaceScalarField & alphaPhi2
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
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 & alphaRhoPhi1
fv::options & fvOptions
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
rhoThermo & thermo1
volScalarField Kh(fluid.Kh())
surfaceScalarField & alphaRhoPhi2
volScalarField & dpdt
volVectorField & U1
alpha2
Definition: alphaEqn.H:112
phaseModel & phase1
const dimensionedVector & g
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("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", 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
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
volScalarField & alpha1
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:40
volScalarField alphaEff("alphaEff", turbulence->nu()/Pr+alphat)
phaseModel & phase2
volScalarField & p
const dimensionedScalar & rho1
Definition: createFields.H:39
volScalarField Cpv1("Cpv1", thermo1.Cpv())
zeroField Sp
Definition: alphaSuSp.H:2