ReactionType#
module wntr.msx.base
- class ReactionType[source]#
Bases:
Enum
Reaction type which specifies the location where the reaction occurs
The following types are defined, and aliases of just the first character are also defined.
Enum Members
Class Methods
Get the proper enum based on the name or value of the argument.
- classmethod get(value, *, prefix='', abbrev=True, allow_none=True)#
Get the proper enum based on the name or value of the argument.
See
add_get()
for details on how this function works.- Parameters:
value (Union[str, int, Enum]) – the value to be checked, if it is an Enum, then the name will be used
prefix (str, optional) – a prefix to strip from the beginning of
value
, default blank or set by decoratorabbrev (bool, optional) – whether to try a single-letter version of
value
, default False or set by decoratorallow_none (bool, optional) – passing None will return None, otherwise will raise TypeError, default True or set by decorator
- Returns:
the enum member that corresponds to the name or value passed in
- Return type:
Enum
- Raises:
TypeError – if
value
is an invalid typeValueError – if
value
is invalid
- P = 1#
- PIPE = 1#
Expression describes a reaction in pipes
- T = 2#
- TANK = 2#
Expression describes a reaction in tanks