cantera/test/data/reaction-orders.cti
Ray Speth e4362d37e7 [Kinetics] Check for non-existent species in reaction orders
When the nonreactant_orders option was enabled, specifying reactant orders for
species which were not present in the phase previously resulted in out-of-bounds
memory access.
2018-08-28 16:40:43 -04:00

29 lines
1.1 KiB
Text

# Input file to test use of non-reactant species
units(length = "cm", time = "s", quantity = "mol", act_energy = "kJ/mol")
ideal_gas(name = "gas",
elements = " O H ",
species = """gri30: H2 O2 H2O OH """,
reactions = "all",
options=['skip_undeclared_species'],
initial_state = state(temperature = 300.0,
pressure = OneAtm) )
#-------------------------------------------------------------------------------
# Reactions data
#-------------------------------------------------------------------------------
# This reaction should be skipped due to the non-existent species 'HO2'
reaction("H2 + O2 => 2 OH", [1e13, 0.0, 0.0],
order="HO2:-0.25",
options=['negative_orders', 'nonreactant_orders'])
#test negative orders and non-reactant orders
reaction("2 H2 + O2 => 2 H2O", [1e13, 0.0, 0.0],
order="H2:-0.25 OH:0.15",
options=['negative_orders', 'nonreactant_orders'])
#if uncomment, should throw an error
#reaction("2 H2 + O2 => 2 H2O", [1e13, 0.0, 0.0],
# order="OH:0.15")