VariableType#
module wntr.msx.base
- class VariableType[source]#
Bases:
Enum
Type of reaction variable.
The following types are defined, and aliases of just the first character are also defined.
Enum Members
Chemical or biological water quality species
Constant coefficient for use in reaction expressions
Reaction expression coefficient that is parameterized by tank or pipe
Functional term, or named expression, for use in reaction expressions
Variable that is either a hydraulic variable or other reserved word
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
- C = 6#
- CONST = 6#
- CONSTANT = 6#
Constant coefficient for use in reaction expressions
- P = 5#
- PARAM = 5#
- PARAMETER = 5#
Reaction expression coefficient that is parameterized by tank or pipe
- R = 9#
- RES = 9#
- RESERVED = 9#
Variable that is either a hydraulic variable or other reserved word
- S = 3#
- SPEC = 3#
- SPECIES = 3#
Chemical or biological water quality species
- T = 4#
- TERM = 4#
Functional term, or named expression, for use in reaction expressions