SpeciesType#

module wntr.msx.base

class SpeciesType[source]#

Bases: Enum

Enumeration for species type

Warning

These enum values are not the same as the MSX SpeciesType.

Enum Members

BULK

Bulk species

WALL

Wall species

Class Methods

get

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 decorator

  • abbrev (bool, optional) – whether to try a single-letter version of value, default False or set by decorator

  • allow_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:
B = 1#
BULK = 1#

Bulk species

W = 2#
WALL = 2#

Wall species