Reaction#
module wntr.msx.elements
- class Reaction[source]#
Bases:
ReactionBase
Water quality reaction dynamics definition for a specific species.
- Parameters:
species_name – Species (object or name) this reaction is applicable to.
reaction_type – Reaction type (location), from {PIPE, TANK}
expression_type – Expression type (left-hand-side) of the equation, from {RATE, EQUIL, FORMULA}
expression – Mathematical expression for the right-hand-side of the reaction equation.
note (str | dict | wntr.epanet.util.ENcomment) – Supplementary information regarding this variable, by default None
_vars – Reaction system this species is a part of, by default None
- __init__(species_name, reaction_type, expression_type, expression, *, note=None, _vars=None)[source]#
Reaction ABC init method.
Make sure you call this method from your concrete subclass
__init__
method:super().__init__(species_name, note=note)
- property expression_type: ExpressionType#
Expression type (left-hand-side), either
RATE
,EQUIL
, orFORMULA
- property reaction_type: ReactionType#