Chemical reaction invariants and variants and their use in reactor modeling, simulation, and control