YEEqn.H
Go to the documentation of this file.
1 tmp<fv::convectionScheme<scalar> > mvConvection
2 (
4  (
5  mesh,
6  fields,
7  phi,
8  mesh.divScheme("div(phi,Yi_h)")
9  )
10 );
11 {
12  radiation->correct();
13  combustion->correct();
14  dQ = combustion->dQ();
16  volScalarField Yt(0.0*Y[0]);
17 
18  forAll(Y, i)
19  {
20  if (Y[i].name() != inertSpecie)
21  {
22  volScalarField& Yi = Y[i];
23 
24  fvScalarMatrix YiEqn
25  (
26  fvm::ddt(rho, Yi)
27  + mvConvection->fvmDiv(phi, Yi)
28  - fvm::laplacian(turbulence->alphaEff(), Yi)
29  ==
30  parcels.SYi(i, Yi)
31  + surfaceFilm.Srho(i)
32  + combustion->R(Yi)
33  + fvOptions(rho, Yi)
34  );
35 
36  YiEqn.relax();
37 
38  fvOptions.constrain(YiEqn);
39 
40  YiEqn.solve(mesh.solver("Yi"));
41 
42  fvOptions.correct(Yi);
43 
44  Yi.max(0.0);
45  Yt += Yi;
46  }
47  else
48  {
49  inertIndex = i;
50  }
51  }
52 
53  Y[inertIndex] = scalar(1) - Yt;
54  Y[inertIndex].max(0.0);
55 
57 
59  (
60  fvm::ddt(rho, he) + mvConvection->fvmDiv(phi, he)
61  + fvc::ddt(rho, K) + fvc::div(phi, K)
62  + (
63  he.name() == "e"
64  ? fvc::div
65  (
67  p,
68  "div(phiv,p)"
69  )
70  : -dpdt
71  )
72  - fvm::laplacian(turbulence->alphaEff(), he)
73  ==
74  combustion->Sh()
75  + radiation->Sh(thermo)
76  + parcels.Sh(he)
77  + surfaceFilm.Sh()
78  + fvOptions(rho, he)
79  );
80 
81  EEqn.relax();
82 
83  fvOptions.constrain(EEqn);
84 
85  EEqn.solve();
86 
87  fvOptions.correct(he);
88 
89  thermo.correct();
90 
91  Info<< "min/max(T) = "
92  << min(T).value() << ", " << max(T).value() << endl;
93 }
p
p
Definition: pEqn.H:62
Foam::compressible::New
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Definition: turbulentFluidThermoModel.C:36
inertIndex
label inertIndex
Definition: YEEqn.H:15
forAll
forAll(Y, i)
Definition: YEEqn.H:18
fields
Info<< "Creating field dpdt\n"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar("dpdt", p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\n"<< endl;volScalarField K("K", 0.5 *magSqr(U));volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);p_rgh=p - rho *gh;mesh.setFluxRequired(p_rgh.name());multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:127
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
dQ
dQ
Definition: YEEqn.H:14
inertSpecie
const word inertSpecie(thermo.lookup("inertSpecie"))
Foam::MULES::interpolate
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Definition: IMULESTemplates.C:40
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::dimensioned::value
const Type & value() const
Return const reference to value.
Definition: dimensionedType.C:261
dpdt
volScalarField & dpdt
Definition: setRegionFluidFields.H:12
U
U
Definition: pEqn.H:46
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:56
Foam::fvc::laplacian
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::fvScalarMatrix
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Yt
volScalarField Yt(0.0 *Y[0])
Foam::Info
messageStream Info
mvConvection
tmp< fv::convectionScheme< scalar > > mvConvection(fv::convectionScheme< scalar >::New(mesh, fields, phi, mesh.divScheme("div(phi,Yi_h)")))
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Y
Y[inertIndex]
Definition: YEEqn.H:53
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
rho
rho
Definition: pEqn.H:3
max
Y[inertIndex] max(0.0)
T
const volScalarField & T
Definition: createFields.H:25
he
volScalarField & he
Definition: YEEqn.H:56
surfaceFilm
filmModelType & surfaceFilm
Definition: createSurfaceFilmModel.H:6
combustion
Info<< "Creating combustion model\n"<< endl;autoPtr< combustionModels::psiCombustionModel > combustion(combustionModels::psiCombustionModel::New(mesh))
Foam::fvc::ddt
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
Foam::min
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
Foam::fvc::absolute
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
Definition: fvcMeshPhi.C:187
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:16
EEqn
fvScalarMatrix EEqn(fvm::ddt(rho, he)+mvConvection->fvmDiv(phi, he)+fvc::ddt(rho, K)+fvc::div(phi, K)+(he.name()=="e" ? fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U), p, "div(phiv,p)") :-dpdt) - fvm::laplacian(turbulence->alphaEff(), he)==combustion->Sh()+radiation->Sh(thermo)+parcels.Sh(he)+surfaceFilm.Sh()+fvOptions(rho, he))