Skip to content

Commit

Permalink
[186_LBE_contamination], issue #186, Implementation of Cadmium Henry …
Browse files Browse the repository at this point in the history
…constant by Landolt, 1991.
  • Loading branch information
Sami Amestas committed Jul 19, 2024
1 parent ccc6677 commit 68bab3d
Showing 1 changed file with 74 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,77 @@ def range(self) -> List[float]:
correlation function
"""
return [625.0, 1927.0]


class LBECadmiumHenryConstantInterfaceLandolt1991(PropertyInterface):
"""
Liquid LBE *Cadmium compounds Henry constant* property class
implementing the correlation by *landolt1991*.
"""
@range_warning
def correlation(self, T: float, p: float = atm,
verbose: bool = False) -> float:
"""
Returns the value of the *Cadmium compounds Henry constant* by
applying the property correlation.
Parameters
----------
T : float
Temperature in :math:`[K]`
p : float, optional
Pressure in :math:`[Pa]`, by default the atmospheric pressure
value, i.e., :math:`101325.0 Pa`
verbose : bool, optional
`True` to tell the decorator to print a warning message in case of
range check failing, `False` otherwise. By default, `False`
Returns
-------
float:
Henry constant in :math:`[Pa]`
"""
return 10**((- 5711 / T) + 14.38 - 1.0867 * log(T))

@property
def name(self) -> str:
"""
str : Name of the property
"""
return "K_LBECd"

@property
def correlation_name(self) -> str:
"""
str : Name of the correlation
"""
return "landolt1991"

@property
def units(self) -> str:
"""
str : Henry constant unit
"""
return "[Pa]"

@property
def long_name(self) -> str:
"""
str : Cadmium Henry constant long name
"""
return "Henry constant of Cadmium in LBE"

@property
def description(self) -> str:
"""
str : Cadmium Henry constant description
"""
return f"{self.long_name} in liquid LBE"

@property
def range(self) -> List[float]:
"""
List[float] : Temperature validity range of the Cadmium Henry constant
correlation function
"""
return [398.0, 1927.0]

0 comments on commit 68bab3d

Please sign in to comment.