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  combustion->correct();
14  Qdot = combustion->Qdot();
15  volScalarField Yt(0.0*Y[0]);
16 
17  forAll(Y, i)
18  {
19  if (i != inertIndex && composition.active(i))
20  {
21  volScalarField& Yi = Y[i];
22 
23  fvScalarMatrix YEqn
24  (
25  fvm::ddt(rho, Yi)
26  + mvConvection->fvmDiv(phi, Yi)
27  - fvm::laplacian(turbulence->muEff(), Yi)
28  ==
29  parcels.SYi(i, Yi)
30  + combustion->R(Yi)
31  + fvOptions(rho, Yi)
32  );
33 
34  YEqn.relax();
35 
36  fvOptions.constrain(YEqn);
37 
38  YEqn.solve(mesh.solver("Yi"));
39 
40  fvOptions.correct(Yi);
41 
42  Yi.max(0.0);
43  Yt += Yi;
44  }
45  }
46 
47  Y[inertIndex] = scalar(1) - Yt;
48  Y[inertIndex].max(0.0);
49 }
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
fv::options & fvOptions
surfaceScalarField & phi
basicSpecieMixture & composition
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:97
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
label inertIndex
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
dynamicFvMesh & mesh
Y[inertIndex]
Definition: YEqn.H:46
Qdot
Definition: YEqn.H:14
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
Info<< "Creating combustion model\"<< endl;autoPtr< CombustionModel< psiReactionThermo > > combustion(CombustionModel< psiReactionThermo >::New(thermo, turbulence()))
forAll(Y, i)
Definition: YEqn.H:17
tmp< fv::convectionScheme< scalar > > mvConvection(fv::convectionScheme< scalar >::New(mesh, fields, phi, mesh.divScheme("div(phi,Yi_h)")))
volScalarField Yt(0.0 *Y[0])