uw-comphys / openccm

OpenCCM is a CFD-based compartment modelling software package. It is primarily intended for convection dominated reactive flows which feature a weak or one-way coupling between the reactive species and the carrier fluid, i.e. the reaction does not substantially influence the fluid flow over the course of the simulation.
https://uw-comphys.github.io/openccm/
GNU Lesser General Public License v2.1
0 stars 4 forks source link

Support for alphanumeric species and improved readability in reactions.py #24

Closed mptino closed 6 months ago

mptino commented 6 months ago

Two major changes to reactions are introduced:

  1. Alphanumeric chemical species with certain special characters (i.e. '_' allowed, but '+' and '-' not allowed) are now supported by the reactions configuration parser. While previously only alphabetic specie names were allowed (i.e. a, ab, bc), an expanded range of specie names is newly supported (i.e. Na2SO4 or Na_2SO_4).
  2. The main parser function parse_reactions() has been split into 2 functions to improve readability. A new function was created, organize_reactions_input(), which digests the initial reactions file and groups together reactions and the associated rates, while also employing many checks to ensure the user provided an acceptable reactions config.