YEqn.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 
13 {
14  combustion->correct();
15  dQ = combustion->dQ();
17  volScalarField Yt(0.0*Y[0]);
18 
19  forAll(Y, i)
20  {
21  if (Y[i].name() != inertSpecie)
22  {
23  volScalarField& Yi = Y[i];
24 
25  fvScalarMatrix YiEqn
26  (
27  fvm::ddt(rho, Yi)
28  + mvConvection->fvmDiv(phi, Yi)
29  - fvm::laplacian(turbulence->muEff(), Yi)
30  ==
31  coalParcels.SYi(i, Yi)
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 }
mvConvection
tmp< fv::convectionScheme< scalar > > mvConvection(fv::convectionScheme< scalar >::New(mesh, fields, phi, mesh.divScheme("div(phi,Yi_h)")))
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
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: YEqn.H:14
inertSpecie
const word inertSpecie(thermo.lookup("inertSpecie"))
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
Y
Y[inertIndex]
Definition: YEqn.H:51
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
rho
rho
Definition: pEqn.H:3
inertIndex
label inertIndex
Definition: YEqn.H:15
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
forAll
forAll(Y, i)
Definition: YEqn.H:18
Yt
volScalarField Yt(0.0 *Y[0])
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:16