Niemeyer-Research-Group / pyMARS

Python-based (chemical kinetic) Model Automatic Reduction Software
https://niemeyer-research-group.github.io/pyMARS/
MIT License
58 stars 45 forks source link

Automatically retain fuel and oxidizer species #12

Open xMestas opened 5 years ago

xMestas commented 5 years ago

Currently, the species listed as fuels and oxidizers in the initial conditions are not automatically retained. If one is removed, the auto ignition simulation is unable to run, This can lead to some unfriendly error messages for the user when trying to perform a reduction without specifying that the fuels and oxidizers should be retained. Fuels and oxidizers from all initial conditions should automatically be added to the retained species list if they are not already in it before the reduction occurs.

kyleniemeyer commented 3 years ago

This should probably happen early on, after parsing the input file. This could be done pretty easily by looking over all the simulation initial conditions, and seeing if the reactant species are in the retained list—if not, then add them, making sure to avoid duplicates.