YEqn.H
Go to the documentation of this file.
1 if (Y.size())
2 {
3  mvConvection = tmp<fv::convectionScheme<scalar>>
4  (
6  (
7  mesh,
8  fields,
9  phi,
10  mesh.schemes().div("div(phi,Yi_h)")
11  )
12  );
13 }
14 
15 reaction.correct();
16 
17 forAll(Y, i)
18 {
19  if (composition.solve(i))
20  {
21  volScalarField& Yi = Y[i];
22 
23  fvScalarMatrix YiEqn
24  (
25  fvm::ddt(rho, Yi) + mvConvection->fvmDiv(phi, Yi)
26  + thermophysicalTransport.divj(Yi)
27  ==
28  reaction.R(Yi)
29  + fvModels.source(rho, Yi)
30  );
31 
32  YiEqn.relax();
33 
34  fvConstraints.constrain(YiEqn);
35 
36  YiEqn.solve("Yi");
37 
39  }
40 }
41 
42 composition.normalise();
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
basicSpecieMixture & composition
combustionModel & reaction
fvMesh & mesh
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:58
Foam::fvConstraints & fvConstraints
phi
Definition: correctPhi.H:3
fluidReactionThermophysicalTransportModel & thermophysicalTransport
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
Foam::fvModels & fvModels
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);pressureReference pressureReference(p, p_rgh, pimple.dict(), thermo.incompressible());mesh.schemes().setFluxRequired(p_rgh.name());hydrostaticInitialisation(p_rgh, p, rho, U, gh, ghf, pRef, thermo, pimple.dict());Info<< "Creating field dpdt\"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar(p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\"<< endl;volScalarField K("K", 0.5 *magSqr(U));dimensionedScalar initialMass=fvc::domainIntegrate(rho);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:131
tmp< fv::convectionScheme< scalar > > mvConvection(fv::convectionScheme< scalar >::New(mesh, fields, phi, mesh.schemes().div("div(phi,Yi_h)")))
PtrList< volScalarField > & Y
forAll(Y, i)
Definition: YEqn.H:14