Skip to content

Commit

Permalink
refactor pvtpolymer, add Hartmann-Haque
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMVale committed Oct 14, 2023
1 parent 6c025e7 commit 6d16245
Show file tree
Hide file tree
Showing 5 changed files with 474 additions and 184 deletions.
2 changes: 1 addition & 1 deletion src/polykin/physprops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"""

from polykin.physprops.dippr import *
from polykin.physprops.tait import *
from polykin.physprops.pvtpolymer import *
from polykin.physprops.vapor_pressure import *
9 changes: 3 additions & 6 deletions src/polykin/physprops/property_equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@ def __init__(self,
symbol: str,
name: str
) -> None:
"""Construct `PropertyEquation` with the given inputs."""
self.unit = unit
self.symbol = symbol
self.name = name

@abstractmethod
def __call__(self, *args) -> FloatOrArray:
"""Evaluate property equation, $Y(...)$."""
pass


class PropertyEquationT(PropertyEquation):
r"""_Abstract_ temperature-dependent property equation, $p(T)$"""
Expand All @@ -52,6 +48,7 @@ def __init__(self,
symbol: str,
name: str
) -> None:
"""Construct `PropertyEquationT` with the given inputs."""

check_bounds(Trange[0], 0, np.inf, 'Tmin')
check_bounds(Trange[1], 0, np.inf, 'Tmax')
Expand Down Expand Up @@ -86,7 +83,7 @@ def __call__(self,
@staticmethod
@abstractmethod
def equation(T: FloatOrArray, *args) -> FloatOrArray:
"""Property equation, $Y(T,p)$."""
"""Property equation, $Y(T,p...)$."""
pass

def __repr__(self) -> str:
Expand Down
Loading

0 comments on commit 6d16245

Please sign in to comment.