applications/solvers/combustion: Moved the inertSpecie functionality into basicSpecieMixture

and renamed defaultSpecie as its mass fraction is derived from the sum of the
mass fractions of all other species and it need not be inert but must be present
everywhere, e.g. N2 in air/fuel combustion which can be involved in the
production of NOx.

The previous name inertSpecie in thermophysicalProperties is supported for
backward compatibility.
This commit is contained in:
Henry Weller
2020-10-26 20:57:01 +00:00
parent 5e3c5a9698
commit 095054d82e
69 changed files with 204 additions and 278 deletions

View File

@ -11,11 +11,10 @@ tmp<fv::convectionScheme<scalar>> mvConvection
{
radiation->correct();
combustion->correct();
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{
if (i != inertIndex && composition.active(i))
if (composition.solve(i))
{
volScalarField& Yi = Y[i];
@ -38,14 +37,10 @@ tmp<fv::convectionScheme<scalar>> mvConvection
YiEqn.solve("Yi");
fvOptions.correct(Yi);
Yi.max(0.0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
composition.normalise();
volScalarField& he = thermo.he();

View File

@ -1,4 +1,3 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
regionModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm();
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -8,15 +8,6 @@ SLGThermo slgThermo(mesh, thermo);
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.properties().lookup("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo.properties())
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
Info<< "Creating field rho\n" << endl;
volScalarField rho
(

View File

@ -11,11 +11,10 @@ tmp<fv::convectionScheme<scalar>> mvConvection
{
reaction->correct();
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{
if (i != inertIndex && composition.active(i))
if (composition.solve(i))
{
volScalarField& Yi = Y[i];
@ -36,12 +35,8 @@ tmp<fv::convectionScheme<scalar>> mvConvection
YiEqn.solve("Yi");
fvOptions.correct(Yi);
Yi.max(0.0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
composition.normalise();
}

View File

@ -1,3 +1,2 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -8,15 +8,6 @@ thermo.validate(args.executable(), "h", "e");
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.properties().lookup("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo.properties())
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
volScalarField rho
(
IOobject

View File

@ -1,3 +1,2 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -8,15 +8,6 @@ thermo.validate(args.executable(), "h", "e");
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.properties().lookup("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo.properties())
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
volScalarField rho
(
IOobject

View File

@ -111,7 +111,7 @@ License
forAll(Y, i)
{
if (i != inertIndex && composition.active(i))
if (composition.solve(i))
{
volScalarField& Yi = Y[i];