Closed trevilo closed 2 years ago
With the changes in bf615d8, the case from above gives the following output:
name, input index, mixture index: E, 0, 1
name, input index, mixture index: Ar, 1, 2
name, input index, mixture index: Ar.+1, 2, 0
Inlet mass fraction of background species will not be used.
Inlet mass fraction of electron will not be used.
number of elements on rank 0 = 80
min elements/partition = 80
max elements/partition = 80
Instantiating Arrhenius rxn with A = 7.279635e+08, b = 0.000000e+00, E = 1.101111e+06
Instantiating Arrhenius rxn with A = 7.279635e+08, b = 0.000000e+00, E = 1.101111e+06
which are the correct values.
The 1 and 3 Arrhenius rxn cases also work. To complete, need to test using a mixture of types of reactions (e.g., Arrhenius plus tabulated).
To check with tabulated reactions in the mix, I changed the reaction block from the input above to the following:
[reactions]
number_of_reactions = 3
[reactions/reaction3]
equation = 'Ar.+1 + 2 E <=> Ar + 2 E'
reaction_energy = -1.521e4
reactant_stoichiometry = '2 0 1'
product_stoichiometry = '1 1 0'
model = arrhenius
arrhenius/A = 7.279635e+08
arrhenius/b = 0.0
arrhenius/E = 1.101111e+06
detailed_balance = False
# a fictitious reaction only to check the tabulated value.
[reactions/reaction2]
equation = 'Ar + E <=> Ar.+1 + 2 E'
reaction_energy = 1.521e4
reactant_stoichiometry = '1 1 0'
product_stoichiometry = '2 0 1'
model = tabulated
tabulated/filename = 'ref_solns/reaction/excitation.3000K.ion1e-4.h5'
tabulated/x_log = True
tabulated/f_log = True
tabulated/order = 1
detailed_balance = False
[reactions/reaction1]
equation = 'Ar + E <=> Ar + E'
reaction_energy = 0
reactant_stoichiometry = '1 1 0'
product_stoichiometry = '1 1 0'
model = arrhenius
arrhenius/A = 42.0
arrhenius/b = 3.14159
arrhenius/E = 1.414
detailed_balance = False
This leads to the following output:
name, input index, mixture index: E, 0, 1
name, input index, mixture index: Ar, 1, 2
name, input index, mixture index: Ar.+1, 2, 0
Inlet mass fraction of background species will not be used.
Inlet mass fraction of electron will not be used.
number of elements on rank 0 = 80
min elements/partition = 80
max elements/partition = 80
Instantiating Arrhenius rxn with A = 4.200000e+01, b = 3.141590e+00, E = 1.414000e+00
Instantiating Arrhenius rxn with A = 7.279635e+08, b = 0.000000e+00, E = 1.101111e+06
which has the correct Arrhenius parameters.
When using multiple Arrhenius reactions, it appears that only the final reaction gets its correct parameter values. To show this, a new branch called
chem-read-bug
has been created where, for Arrhenius rxns, the parameters are dumped to the screen from theChemistry
class constructor (see here).A sample input file to recreate the issue is as follows:
Really the only important thing here is that there is more than 1 reaction. Anything else can be changed as long as the input is valid so that the
Chemistry
class is constructed.When running this input using e8bda30ca53ea5ac1d4ed37edf9fdad826a04883, I get the following output to the screen:
Only the second reaction is getting the correct parameter values.
Note that with 1 rxn, the parameters are correct. With 3 rxns, the first and third reactions get the correct parameters but the second are wrong. So, something is clearly going wrong with the pipeline that parses the inputs and passes them along to the
Chemistry
class.