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  reaction->correct();
14  volScalarField Yt(0.0*Y[0]);
15 
16  forAll(Y, i)
17  {
18  if (i != inertIndex && composition.active(i))
19  {
20  volScalarField& Yi = Y[i];
21 
22  fvScalarMatrix YiEqn
23  (
24  fvm::ddt(rho, Yi)
25  + mvConvection->fvmDiv(phi, Yi)
26  + thermophysicalTransport->divj(Yi)
27  ==
28  reaction->R(Yi)
29  + fvOptions(rho, Yi)
30  );
31 
32  YiEqn.relax();
33 
34  fvOptions.constrain(YiEqn);
35 
36  YiEqn.solve("Yi");
37 
38  fvOptions.correct(Yi);
39 
40  Yi.max(0.0);
41  Yt += Yi;
42  }
43  }
44 
45  Y[inertIndex] = scalar(1) - Yt;
46  Y[inertIndex].max(0.0);
47 }
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
fv::options & fvOptions
basicSpecieMixture & composition
phi
Definition: pEqn.H:104
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:103
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:57
dynamicFvMesh & mesh
rhoReactionThermophysicalTransportModel & thermophysicalTransport
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
Y[inertIndex]
Definition: YEqn.H:45
CombustionModel< rhoReactionThermo > & reaction
forAll(Y, i)
Definition: YEqn.H:16
tmp< fv::convectionScheme< scalar > > mvConvection(fv::convectionScheme< scalar >::New(mesh, fields, phi, mesh.divScheme("div(phi,Yi_h)")))
volScalarField Yt(0.0 *Y[0])