mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Corrected constructor initialisation error introduced in last commit; code tidying
This commit is contained in:
@ -37,11 +37,11 @@ Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::DAC
|
|||||||
chemistryReductionMethod<CompType, ThermoType>(dict, chemistry),
|
chemistryReductionMethod<CompType, ThermoType>(dict, chemistry),
|
||||||
searchInitSet_(this->coeffsDict_.subDict("initialSet").size()),
|
searchInitSet_(this->coeffsDict_.subDict("initialSet").size()),
|
||||||
zprime_(0),
|
zprime_(0),
|
||||||
nbCLarge_(3),
|
nbCLarge_(this->coeffsDict_.template lookupOrDefault<label>("nbCLarge", 3)),
|
||||||
sC_(this->nSpecie_,0),
|
sC_(this->nSpecie_, 0),
|
||||||
sH_(this->nSpecie_,0),
|
sH_(this->nSpecie_, 0),
|
||||||
sO_(this->nSpecie_,0),
|
sO_(this->nSpecie_, 0),
|
||||||
sN_(this->nSpecie_,0),
|
sN_(this->nSpecie_, 0),
|
||||||
CO2Id_(-1),
|
CO2Id_(-1),
|
||||||
COId_(-1),
|
COId_(-1),
|
||||||
HO2Id_(-1),
|
HO2Id_(-1),
|
||||||
@ -49,24 +49,39 @@ Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::DAC
|
|||||||
NOId_(-1),
|
NOId_(-1),
|
||||||
automaticSIS_
|
automaticSIS_
|
||||||
(
|
(
|
||||||
this->coeffsDict_.lookupOrDefault<Switch>("automaticSIS", true)
|
this->coeffsDict_.template lookupOrDefault<Switch>
|
||||||
|
(
|
||||||
|
"automaticSIS",
|
||||||
|
true
|
||||||
|
)
|
||||||
),
|
),
|
||||||
phiTol_
|
phiTol_
|
||||||
(
|
(
|
||||||
this->coeffsDict_.lookupOrDefault<scalar>("phiTol", this->tolerance())
|
this->coeffsDict_.template lookupOrDefault<scalar>
|
||||||
|
(
|
||||||
|
"phiTol", this->tolerance()
|
||||||
|
)
|
||||||
),
|
),
|
||||||
NOxThreshold_
|
NOxThreshold_
|
||||||
(
|
(
|
||||||
this->coeffsDict_.lookupOrDefault<scalar>("NOxThreshold", 1800)
|
this->coeffsDict_.template lookupOrDefault<scalar>
|
||||||
|
(
|
||||||
|
"NOxThreshold",
|
||||||
|
1800
|
||||||
|
)
|
||||||
),
|
),
|
||||||
CO2Name_(dict.subDict("reduction").lookupOrDefault<word>("CO2","CO2")),
|
CO2Name_(this->coeffsDict_.template lookupOrDefault<word>("CO2", "CO2")),
|
||||||
COName_(dict.subDict("reduction").lookupOrDefault<word>("CO","CO")),
|
COName_(this->coeffsDict_.template lookupOrDefault<word>("CO", "CO")),
|
||||||
HO2Name_(dict.subDict("reduction").lookupOrDefault<word>("HO2","HO2")),
|
HO2Name_(this->coeffsDict_.template lookupOrDefault<word>("HO2", "HO2")),
|
||||||
H2OName_(dict.subDict("reduction").lookupOrDefault<word>("H2O","H2O")),
|
H2OName_(this->coeffsDict_.template lookupOrDefault<word>("H2O", "H2O")),
|
||||||
NOName_(dict.subDict("reduction").lookupOrDefault<word>("NO","NO")),
|
NOName_(this->coeffsDict_.template lookupOrDefault<word>("NO", "NO")),
|
||||||
forceFuelInclusion_
|
forceFuelInclusion_
|
||||||
(
|
(
|
||||||
this->coeffsDict_.lookupOrDefault<Switch>("forceFuelInclusion", false)
|
this->coeffsDict_.template lookupOrDefault<Switch>
|
||||||
|
(
|
||||||
|
"forceFuelInclusion",
|
||||||
|
false
|
||||||
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
label j = 0;
|
label j = 0;
|
||||||
@ -121,7 +136,8 @@ Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::DAC
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< "element not considered" <<endl;
|
Info<< " element " << curElement.name() << " not considered"
|
||||||
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this->chemistry_.Y()[i].name() == CO2Name_)
|
if (this->chemistry_.Y()[i].name() == CO2Name_)
|
||||||
@ -180,10 +196,6 @@ Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::DAC
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->coeffsDict_.found("nbCLarge"))
|
|
||||||
{
|
|
||||||
nbCLarge_ = readLabel(fuelDict.lookup("nbCLarge"));
|
|
||||||
}
|
|
||||||
|
|
||||||
fuelSpeciesID_.setSize(fuelSpecies_.size());
|
fuelSpeciesID_.setSize(fuelSpecies_.size());
|
||||||
fuelSpeciesProp_.setSize(fuelSpecies_.size());
|
fuelSpeciesProp_.setSize(fuelSpecies_.size());
|
||||||
@ -251,9 +263,9 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
|
|||||||
c1[this->nSpecie_+1] = p;
|
c1[this->nSpecie_+1] = p;
|
||||||
|
|
||||||
// Compute the rAB matrix
|
// Compute the rAB matrix
|
||||||
RectangularMatrix<scalar> rABNum(this->nSpecie_, this->nSpecie_,0.0);
|
RectangularMatrix<scalar> rABNum(this->nSpecie_, this->nSpecie_, 0.0);
|
||||||
scalarField PA(this->nSpecie_,0.0);
|
scalarField PA(this->nSpecie_, 0.0);
|
||||||
scalarField CA(this->nSpecie_,0.0);
|
scalarField CA(this->nSpecie_, 0.0);
|
||||||
|
|
||||||
// Number of initialized rAB for each lines
|
// Number of initialized rAB for each lines
|
||||||
Field<label> NbrABInit(this->nSpecie_,0);
|
Field<label> NbrABInit(this->nSpecie_,0);
|
||||||
@ -372,7 +384,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
|
|||||||
// Disable for self reference (by definition rAA=0)
|
// Disable for self reference (by definition rAA=0)
|
||||||
deltaBi[ss] = false;
|
deltaBi[ss] = false;
|
||||||
|
|
||||||
while(!usedIndex.empty())
|
while (!usedIndex.empty())
|
||||||
{
|
{
|
||||||
label curIndex = usedIndex.pop();
|
label curIndex = usedIndex.pop();
|
||||||
if (deltaBi[curIndex])
|
if (deltaBi[curIndex])
|
||||||
@ -583,7 +595,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (T>NOxThreshold_ && NOId_!=-1)
|
if (T > NOxThreshold_ && NOId_ != -1)
|
||||||
{
|
{
|
||||||
Q.push(NOId_);
|
Q.push(NOId_);
|
||||||
speciesNumber++;
|
speciesNumber++;
|
||||||
|
|||||||
Reference in New Issue
Block a user