diff --git a/etc/caseDicts/solvers/chemistry/TDAC/chemistryProperties.cfg b/etc/caseDicts/solvers/chemistry/TDAC/chemistryProperties.cfg index a781416695..9478f00aa3 100644 --- a/etc/caseDicts/solvers/chemistry/TDAC/chemistryProperties.cfg +++ b/etc/caseDicts/solvers/chemistry/TDAC/chemistryProperties.cfg @@ -22,11 +22,11 @@ reduction // Search initiating set (SIS) of species, needed for most methods initialSet - { - CO; - CH4; - HO2; - } + ( + CO + CH4 + HO2 + ); // For DAC, option to automatically change the SIS switch from HO2 to H2O // and CO to CO2, + disable fuel @@ -34,9 +34,9 @@ reduction // When automaticSIS, the method needs to know the fuel fuelSpecies - { - CH4 1; - } + ( + (CH4 1) + ); } tabulation diff --git a/etc/caseDicts/solvers/chemistry/TDAC/chemistryPropertiesFlame.cfg b/etc/caseDicts/solvers/chemistry/TDAC/chemistryPropertiesFlame.cfg index fffab2c068..597f33031d 100644 --- a/etc/caseDicts/solvers/chemistry/TDAC/chemistryPropertiesFlame.cfg +++ b/etc/caseDicts/solvers/chemistry/TDAC/chemistryPropertiesFlame.cfg @@ -22,11 +22,11 @@ reduction // Search initiating set (SIS) of species, needed for most methods initialSet - { - CO; - CH4; - HO2; - } + ( + CO + CH4 + HO2 + ); // For DAC, option to automatically change the SIS switch from HO2 to H2O // and CO to CO2, + disable fuel @@ -34,9 +34,9 @@ reduction // When automaticSIS, the method needs to know the fuel fuelSpecies - { - CH4 1; - } + ( + (CH4 1) + ); } tabulation diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C index d20d9f3805..68f179e2c3 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C @@ -35,7 +35,7 @@ Foam::chemistryReductionMethods::DAC::DAC ) : chemistryReductionMethod(dict, chemistry), - searchInitSet_(this->coeffsDict_.subDict("initialSet").size()), + searchInitSet_(), zprime_(0), nbCLarge_(3), sC_(this->nSpecie_,0), @@ -87,22 +87,10 @@ Foam::chemistryReductionMethods::DAC::DAC ), forceFuelInclusion_(false) { - label j=0; - dictionary initSet = this->coeffsDict_.subDict("initialSet"); - for (label i=0; icoeffsDict_.lookup("initialSet")); + forAllConstIter(wordHashSet, initSet, iter) { - if (initSet.found(chemistry.Y()[i].member())) - { - searchInitSet_[j++] = i; - } - } - if (jcoeffsDict_.found("automaticSIS")) @@ -195,52 +183,29 @@ Foam::chemistryReductionMethods::DAC::DAC // According to the given mass fraction, an equivalent O/C ratio is computed if (automaticSIS_) { - dictionary fuelDict; - if (this->coeffsDict_.found("fuelSpecies")) - { - fuelDict = this->coeffsDict_.subDict("fuelSpecies"); - fuelSpecies_ = fuelDict.toc(); - if (fuelSpecies_.size() == 0) - { - FatalErrorInFunction - << "With automatic SIS, the fuel species should be " - << "specified in the fuelSpecies subDict" - << exit(FatalError); - } - } - else - { - FatalErrorInFunction - << "With automatic SIS, the fuel species should be " - << "specified in the fuelSpecies subDict" - << exit(FatalError); - } + List> fuelSpeciesEntry + ( + this->coeffsDict_.lookup("fuelSpecies") + ); - if (this->coeffsDict_.found("nbCLarge")) - { - nbCLarge_ = fuelDict.lookup