Python#
Python wrapper of the (Modern Fortran) iapws library.
- Kw(T: ndarray, rhow: ndarray)#
Compute the ionization constant of water Kw. Validity range 273.13 K <= T <= 1273.15 K and 0 <= p <= 1000 MPa.
- Parameters:
- T: int, float or 1d-array.
Temperature in K.
- rhow: int, float or 1d-array.
Mass density in g.cm-3.
- Returns:
- k: float or 1d-array
Ionization constant.
- Tsat(ps)#
Compute the saturation temperature at pressure ps. Validity range 611.213 Pa <= ps <= 22.064 MPa.
- Parameters:
- ps: int, float or 1d-array.
Saturation pressure in MPa.
- Returns:
- Ts: float or 1d-array
Saturation temperatur in K. Is NaN if Ts is out of range of validity.
- gases(heavywater: bool = False) List[str] #
Get the list of available gases.
- Parameters:
- heavywater: bool, optional.
Flag for indicating if solvent is heavywater (True) or water (False). Default to False.
- Returns:
- gases: list of str
List of available gases.
- gases2(heavywater: bool = False) str #
Get the available gases as a string.
- Parameters:
- heavywater: bool, optional.
Flag for indicating if solvent is heavywater (True) or water (False). Default to False.
- Returns:
- gases: str
Available gases as comma separated string.
- kd(T: ndarray, gas: str, heavywater: bool = False) ndarray | float #
Get the vapor-liquid constant for gas in H2O or D2O at T. If gas not found returns NaNs.
- Parameters:
- T: int, float, or 1d-array.
Temperature in K.
- gas: str
Gas.
- heavywater: bool, optional.
Flag for indicating if solvent is heavywater (True) or water (False). Default to False.
- Returns:
- kd: float or 1d-array
Adimensional liquid-vapor constant.
- kh(T: ndarray, gas: str, heavywater: bool = False) ndarray | float #
Get the Henry constant for gas in H2O or D2O at T. If gas not found returns NaNs.
- Parameters:
- T: int, float or 1d-array.
Temperature in K.
- gas: str
Gas.
- heavywater: bool, optional.
Flag for indicating if solvent is heavywater (True) or water (False). Default to False.
- Returns:
- kh: float or 1d-array
Henry constant in MPa.
- ngases(heavywater: bool = False) int #
Get the number of available gases.
- Parameters:
- heavywater: bool, optional.
Flag for indicating if solvent is heavywater (True) or water (False). Default to False.
- Returns:
- n: int
Number of available gases in water or heavywater.
- psat(Ts)#
Compute the saturation pressure at temperature Ts. Validity range 273.13 K <= Ts <= 647.096 K.
- Parameters:
- Ts: int, float or 1d-array.
Saturation temperature in K.
- Returns:
- ps: float or 1d-array
Saturation pressure in MPa. Is NaN if Ts is out of range of validity.