Skip to content

polykin.properties.pvt_polymer¤

This module implements methods to evaluate the PVT behavior of pure polymers.

Tait ¤

Tait equation of state for the specific volume of a liquid.

This EoS implements the following explicit PVT dependence:

\[\hat{V}(T,P)=\hat{V}(T,0)\left[1-C\ln\left(\frac{P}{B(T)}\right)\right]\]

with:

\[ \begin{gather*} \hat{V}(T,0) = A_0 + A_1(T - 273.15) + A_2(T - 273.15)^2 \\ B(T) = B_0\exp\left [-B_1(T - 273.15)\right] \end{gather*} \]

where \(A_i\) and \(B_i\) are constant parameters, \(T\) is the absolute temperature, and \(P\) is the pressure.

References

  • Danner, Ronald P., and Martin S. High. Handbook of polymer solution thermodynamics. John Wiley & Sons, 2010.
PARAMETER DESCRIPTION
A0

Parameter of equation. Unit = m³/kg.

TYPE: float

A1

Parameter of equation. Unit = m³/(kg·K).

TYPE: float

A2

Parameter of equation. Unit = m³/(kg·K²).

TYPE: float

B0

Parameter of equation. Unit = Pa.

TYPE: float

B1

Parameter of equation. Unit = 1/K.

TYPE: float

Tmin

Lower temperature bound. Unit = K.

TYPE: float DEFAULT: 0.0

Tmax

Upper temperature bound. Unit = K.

TYPE: float DEFAULT: inf

Pmin

Lower pressure bound. Unit = Pa.

TYPE: float DEFAULT: 0.0

Pmax

Upper pressure bound. Unit = Pa.

TYPE: float DEFAULT: inf

name

Name.

TYPE: str DEFAULT: ''

Source code in src/polykin/properties/pvt_polymer/tait.py
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
class Tait(PolymerPVTEquation):
    r"""Tait equation of state for the specific volume of a liquid.

    This EoS implements the following explicit PVT dependence:

    $$\hat{V}(T,P)=\hat{V}(T,0)\left[1-C\ln\left(\frac{P}{B(T)}\right)\right]$$

    with:

    $$ \begin{gather*}
    \hat{V}(T,0) = A_0 + A_1(T - 273.15) + A_2(T - 273.15)^2 \\
    B(T) = B_0\exp\left [-B_1(T - 273.15)\right]
    \end{gather*} $$

    where $A_i$ and $B_i$ are constant parameters, $T$ is the absolute
    temperature, and $P$ is the pressure.

    **References**

    *   Danner, Ronald P., and Martin S. High. Handbook of polymer
        solution thermodynamics. John Wiley & Sons, 2010.

    Parameters
    ----------
    A0 : float
        Parameter of equation.
        Unit = m³/kg.
    A1 : float
        Parameter of equation.
        Unit = m³/(kg·K).
    A2 : float
        Parameter of equation.
        Unit = m³/(kg·K²).
    B0 : float
        Parameter of equation.
        Unit = Pa.
    B1 : float
        Parameter of equation.
        Unit = 1/K.
    Tmin : float
        Lower temperature bound.
        Unit = K.
    Tmax : float
        Upper temperature bound.
        Unit = K.
    Pmin : float
        Lower pressure bound.
        Unit = Pa.
    Pmax : float
        Upper pressure bound.
        Unit = Pa.
    name : str
        Name.
    """

    A0: float
    A1: float
    A2: float
    B0: float
    B1: float

    _C = 0.0894

    def __init__(self,
                 A0: float,
                 A1: float,
                 A2: float,
                 B0: float,
                 B1: float,
                 Tmin: float = 0.0,
                 Tmax: float = np.inf,
                 Pmin: float = 0.0,
                 Pmax: float = np.inf,
                 name: str = ''
                 ) -> None:
        """Construct `Tait` with the given parameters."""

        # Check bounds
        check_bounds(A0, 1e-4, 2e-3, 'A0')
        check_bounds(A1, 1e-7, 2e-6, 'A1')
        check_bounds(A2, -2e-9, 1e-8, 'A2')
        check_bounds(B0, 1e7, 1e9, 'B0')
        check_bounds(B1, 1e-3, 2e-2, 'B1')

        self.A0 = A0
        self.A1 = A1
        self.A2 = A2
        self.B0 = B0
        self.B1 = B1
        super().__init__(Tmin, Tmax, Pmin, Pmax, name)

    def __repr__(self) -> str:
        return (
            f"name:          {self.name}\n"
            f"symbol:        {self.symbol}\n"
            f"unit:          {self.unit}\n"
            f"Trange [K]:    {self.Trange}\n"
            f"Prange [Pa]:   {self.Prange}\n"
            f"A0 [m³/kg]:    {self.A0}\n"
            f"A1 [m³/kg.K]:  {self.A1}\n"
            f"A2 [m³/kg.K²]: {self.A2}\n"
            f"B0 [Pa]:       {self.B0}\n"
            f"B1 [1/K]:      {self.B1}"
        )

    def eval(self,
             T: Union[float, FloatArray],
             P: Union[float, FloatArray]
             ) -> Union[float, FloatArray]:
        r"""Evaluate specific volume, $\hat{V}$, at given SI conditions without
        unit conversions or checks.

        Parameters
        ----------
        T : float | FloatArray
            Temperature.
            Unit = K.
        P : float | FloatArray
            Pressure.
            Unit = Pa.

        Returns
        -------
        float | FloatArray
            Specific volume.
            Unit = m³/kg.
        """
        TC = T - 273.15
        V0 = self.A0 + self.A1*TC + self.A2*TC**2
        B = self._B(T)
        V = V0*(1 - self._C*log(1 + P/B))
        return V

    def _B(self,
           T: Union[float, FloatArray]
           ) -> Union[float, FloatArray]:
        r"""Parameter B(T).

        Parameters
        ----------
        T : float | FloatArray
            Temperature.
            Unit = K.

        Returns
        -------
        float | FloatArray
            B(T).
            Unit = Pa.
        """
        return self.B0*exp(-self.B1*(T - 273.15))

    def alpha(self,
              T: Union[float, FloatArray],
              P: Union[float, FloatArray]
              ) -> Union[float, FloatArray]:
        r"""Calculate thermal expansion coefficient, $\alpha$.

        $$\alpha=\frac{1}{V}\left(\frac{\partial V}{\partial T}\right)_{P}$$

        Parameters
        ----------
        T : float | FloatArray
            Temperature.
            Unit = K.
        P : float | FloatArray
            Pressure.
            Unit = Pa.

        Returns
        -------
        float | FloatArray
            Thermal expansion coefficient, $\alpha$.
            Unit = 1/K.
        """
        A0 = self.A0
        A1 = self.A1
        A2 = self.A2
        TC = T - 273.15
        alpha0 = (A1 + 2*A2*TC)/(A0 + A1*TC + A2*TC**2)
        return alpha0 - P*self.B1*self.beta(T, P)

    def beta(self,
             T: Union[float, FloatArray],
             P: Union[float, FloatArray]
             ) -> Union[float, FloatArray]:
        r"""Calculate isothermal compressibility coefficient, $\beta$.

        $$\beta=-\frac{1}{V}\left(\frac{\partial V}{\partial P}\right)_{T}$$

        Parameters
        ----------
        T : float | FloatArray
            Temperature.
            Unit = K.
        P : float | FloatArray
            Pressure.
            Unit = Pa.

        Returns
        -------
        float | FloatArray
            Isothermal compressibility coefficient, $\beta$.
            Unit = 1/Pa.
        """
        B = self._B(T)
        return (self._C/(P + B))/(1 - self._C*log(1 + P/B))

V ¤

V(
    T: Union[float, FloatArrayLike],
    P: Union[float, FloatArrayLike],
    Tunit: Literal["C", "K"] = "K",
    Punit: Literal["bar", "MPa", "Pa"] = "Pa",
) -> Union[float, FloatArray]

Evaluate the specific volume, \(\hat{V}\), at given temperature and pressure, including unit conversion and range check.

PARAMETER DESCRIPTION
T

Temperature. Unit = Tunit.

TYPE: float | FloatArrayLike

P

Pressure. Unit = Punit.

TYPE: float | FloatArrayLike

Tunit

Temperature unit.

TYPE: Literal['C', 'K'] DEFAULT: 'K'

Punit

Pressure unit.

TYPE: Literal['bar', 'MPa', 'Pa'] DEFAULT: 'Pa'

RETURNS DESCRIPTION
float | FloatArray

Specific volume. Unit = m³/kg.

Source code in src/polykin/properties/pvt_polymer/base.py
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
def V(self,
      T: Union[float, FloatArrayLike],
      P: Union[float, FloatArrayLike],
      Tunit: Literal['C', 'K'] = 'K',
      Punit: Literal['bar', 'MPa', 'Pa'] = 'Pa'
      ) -> Union[float, FloatArray]:
    r"""Evaluate the specific volume, $\hat{V}$, at given temperature and
    pressure, including unit conversion and range check.

    Parameters
    ----------
    T : float | FloatArrayLike
        Temperature.
        Unit = `Tunit`.
    P : float | FloatArrayLike
        Pressure.
        Unit = `Punit`.
    Tunit : Literal['C', 'K']
        Temperature unit.
    Punit : Literal['bar', 'MPa', 'Pa']
        Pressure unit.

    Returns
    -------
    float | FloatArray
        Specific volume.
        Unit = m³/kg.
    """
    TK = convert_check_temperature(T, Tunit, self.Trange)
    Pa = convert_check_pressure(P, Punit, self.Prange)
    return self.eval(TK, Pa)

__init__ ¤

__init__(
    A0: float,
    A1: float,
    A2: float,
    B0: float,
    B1: float,
    Tmin: float = 0.0,
    Tmax: float = np.inf,
    Pmin: float = 0.0,
    Pmax: float = np.inf,
    name: str = "",
) -> None

Construct Tait with the given parameters.

Source code in src/polykin/properties/pvt_polymer/tait.py
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
def __init__(self,
             A0: float,
             A1: float,
             A2: float,
             B0: float,
             B1: float,
             Tmin: float = 0.0,
             Tmax: float = np.inf,
             Pmin: float = 0.0,
             Pmax: float = np.inf,
             name: str = ''
             ) -> None:
    """Construct `Tait` with the given parameters."""

    # Check bounds
    check_bounds(A0, 1e-4, 2e-3, 'A0')
    check_bounds(A1, 1e-7, 2e-6, 'A1')
    check_bounds(A2, -2e-9, 1e-8, 'A2')
    check_bounds(B0, 1e7, 1e9, 'B0')
    check_bounds(B1, 1e-3, 2e-2, 'B1')

    self.A0 = A0
    self.A1 = A1
    self.A2 = A2
    self.B0 = B0
    self.B1 = B1
    super().__init__(Tmin, Tmax, Pmin, Pmax, name)

alpha ¤

alpha(
    T: Union[float, FloatArray], P: Union[float, FloatArray]
) -> Union[float, FloatArray]

Calculate thermal expansion coefficient, \(\alpha\).

\[\alpha=\frac{1}{V}\left(\frac{\partial V}{\partial T}\right)_{P}\]
PARAMETER DESCRIPTION
T

Temperature. Unit = K.

TYPE: float | FloatArray

P

Pressure. Unit = Pa.

TYPE: float | FloatArray

RETURNS DESCRIPTION
float | FloatArray

Thermal expansion coefficient, \(\alpha\). Unit = 1/K.

Source code in src/polykin/properties/pvt_polymer/tait.py
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
def alpha(self,
          T: Union[float, FloatArray],
          P: Union[float, FloatArray]
          ) -> Union[float, FloatArray]:
    r"""Calculate thermal expansion coefficient, $\alpha$.

    $$\alpha=\frac{1}{V}\left(\frac{\partial V}{\partial T}\right)_{P}$$

    Parameters
    ----------
    T : float | FloatArray
        Temperature.
        Unit = K.
    P : float | FloatArray
        Pressure.
        Unit = Pa.

    Returns
    -------
    float | FloatArray
        Thermal expansion coefficient, $\alpha$.
        Unit = 1/K.
    """
    A0 = self.A0
    A1 = self.A1
    A2 = self.A2
    TC = T - 273.15
    alpha0 = (A1 + 2*A2*TC)/(A0 + A1*TC + A2*TC**2)
    return alpha0 - P*self.B1*self.beta(T, P)

beta ¤

beta(
    T: Union[float, FloatArray], P: Union[float, FloatArray]
) -> Union[float, FloatArray]

Calculate isothermal compressibility coefficient, \(\beta\).

\[\beta=-\frac{1}{V}\left(\frac{\partial V}{\partial P}\right)_{T}\]
PARAMETER DESCRIPTION
T

Temperature. Unit = K.

TYPE: float | FloatArray

P

Pressure. Unit = Pa.

TYPE: float | FloatArray

RETURNS DESCRIPTION
float | FloatArray

Isothermal compressibility coefficient, \(\beta\). Unit = 1/Pa.

Source code in src/polykin/properties/pvt_polymer/tait.py
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
def beta(self,
         T: Union[float, FloatArray],
         P: Union[float, FloatArray]
         ) -> Union[float, FloatArray]:
    r"""Calculate isothermal compressibility coefficient, $\beta$.

    $$\beta=-\frac{1}{V}\left(\frac{\partial V}{\partial P}\right)_{T}$$

    Parameters
    ----------
    T : float | FloatArray
        Temperature.
        Unit = K.
    P : float | FloatArray
        Pressure.
        Unit = Pa.

    Returns
    -------
    float | FloatArray
        Isothermal compressibility coefficient, $\beta$.
        Unit = 1/Pa.
    """
    B = self._B(T)
    return (self._C/(P + B))/(1 - self._C*log(1 + P/B))

eval ¤

eval(
    T: Union[float, FloatArray], P: Union[float, FloatArray]
) -> Union[float, FloatArray]

Evaluate specific volume, \(\hat{V}\), at given SI conditions without unit conversions or checks.

PARAMETER DESCRIPTION
T

Temperature. Unit = K.

TYPE: float | FloatArray

P

Pressure. Unit = Pa.

TYPE: float | FloatArray

RETURNS DESCRIPTION
float | FloatArray

Specific volume. Unit = m³/kg.

Source code in src/polykin/properties/pvt_polymer/tait.py
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
def eval(self,
         T: Union[float, FloatArray],
         P: Union[float, FloatArray]
         ) -> Union[float, FloatArray]:
    r"""Evaluate specific volume, $\hat{V}$, at given SI conditions without
    unit conversions or checks.

    Parameters
    ----------
    T : float | FloatArray
        Temperature.
        Unit = K.
    P : float | FloatArray
        Pressure.
        Unit = Pa.

    Returns
    -------
    float | FloatArray
        Specific volume.
        Unit = m³/kg.
    """
    TC = T - 273.15
    V0 = self.A0 + self.A1*TC + self.A2*TC**2
    B = self._B(T)
    V = V0*(1 - self._C*log(1 + P/B))
    return V

from_database classmethod ¤

from_database(name: str) -> Optional[PolymerPVTEquation]

Construct PolymerPVTEquation with parameters from the database.

PARAMETER DESCRIPTION
name

Polymer code name.

TYPE: str

Source code in src/polykin/properties/pvt_polymer/base.py
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
@classmethod
def from_database(cls,
                  name: str
                  ) -> Optional[PolymerPVTEquation]:
    r"""Construct `PolymerPVTEquation` with parameters from the database.

    Parameters
    ----------
    name : str
        Polymer code name.
    """
    table = load_PVT_parameters(method=cls.__name__)
    try:
        mask = table.index == name
        parameters = table[mask].iloc[0, :].to_dict()
        return cls(**parameters, name=name)
    except IndexError:
        print(
            f"Error: '{name}' does not exist in polymer database.\n"
            f"Valid names are: {table.index.to_list()}")

get_database classmethod ¤

get_database() -> pd.DataFrame

Get database with parameters for the respective PVT equation.

Method Reference
Flory [2] Table 4.1.7 (p. 72-73)
Hartmann-Haque [2] Table 4.1.11 (p. 85-86)
Sanchez-Lacombe [2] Table 4.1.9 (p. 78-79)
Tait [1] Table 3B-1 (p. 41)

References

  1. Danner, Ronald P., and Martin S. High. Handbook of polymer solution thermodynamics. John Wiley & Sons, 2010.
  2. Caruthers et al. Handbook of Diffusion and Thermal Properties of Polymers and Polymer Solutions. AIChE, 1998.
Source code in src/polykin/properties/pvt_polymer/base.py
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
@classmethod
def get_database(cls) -> pd.DataFrame:
    r"""Get database with parameters for the respective PVT equation.

    | Method          | Reference                            |
    | :-----------    | ------------------------------------ |
    | Flory           | [2] Table 4.1.7  (p. 72-73)          |
    | Hartmann-Haque  | [2] Table 4.1.11 (p. 85-86)          |
    | Sanchez-Lacombe | [2] Table 4.1.9  (p. 78-79)          |
    | Tait            | [1] Table 3B-1 (p. 41)               |

    **References**

    1.  Danner, Ronald P., and Martin S. High. Handbook of polymer
        solution thermodynamics. John Wiley & Sons, 2010.
    2.  Caruthers et al. Handbook of Diffusion and Thermal Properties of
        Polymers and Polymer Solutions. AIChE, 1998.
    """
    return load_PVT_parameters(method=cls.__name__)

Parameter databank¤

Polymer A0 A1 A2 B0 B1 Tmin Tmax Pmin Pmax
BR 0.0010969 7.6789e-07 -2.2216e-10 1.7596e+08 0.0043355 277 328 100000 2.83e+08
HDPE 0.0011567 6.2888e-07 1.1268e-09 1.7867e+08 0.0047254 415 472 100000 2e+08
HMDS 0.0012727 1.6849e-06 4.3376e-09 5.891e+07 0.011203 298 343 0 9e+08
i-PB 0.0011561 6.1015e-07 8.3234e-10 1.8382e+08 0.0047833 407 514 0 1.96e+08
i-PMMA 0.0007977 5.5274e-07 -1.4503e-10 2.921e+08 0.004196 328 463 100000 2e+08
i-PP 0.0012033 4.8182e-07 7.7589e-10 1.4236e+08 0.0040184 447 571 0 1.96e+08
LDPE 0.0011004 1.4557e-06 -1.5749e-09 1.7598e+08 0.0046677 398 471 100000 2e+08
LLDPE 0.0011105 1.2489e-06 -4.0642e-10 1.7255e+08 0.0044256 420 473 100000 2e+08
PA 0.00078153 3.6134e-07 2.7519e-10 3.4019e+08 0.0038021 455 588 0 1.77e+08
PBMA 0.00093282 5.7856e-07 5.7343e-10 2.2569e+08 0.0053116 295 473 100000 2e+08
PC 0.00079165 4.4201e-07 2.8583e-10 3.1268e+08 0.0039728 430 610 0 1.77e+08
PCHMA 0.0008741 4.9035e-07 3.2707e-10 3.0545e+08 0.005503 383 472 100000 2e+08
PDMS 0.0010122 7.7266e-07 1.9944e-09 8.7746e+07 0.006256 298 343 0 1e+08
PDMS3 0.0010736 1.2837e-06 1.4565e-10 7.3947e+07 0.0080773 298 343 0 9e+08
PDMS10 0.0010536 1.1041e-06 4.6289e-10 8.1208e+07 0.0071257 298 343 0 9e+08
PDMS20 0.0010271 1.1054e-06 -2.7259e-10 8.5511e+07 0.0067944 298 343 0 9e+08
PDMS100 0.0010095 1.0662e-06 -3.6476e-10 8.8352e+07 0.0063228 298 343 0 9e+08
PDMS350 0.0010056 1.0003e-06 1.2039e-11 9.0488e+07 0.0064221 298 343 0 9e+08
PDMS1000 0.0010076 9.1603e-07 8.2159e-10 8.9137e+07 0.0063938 298 343 0 9e+08
PHENOXY 0.00083796 3.6449e-07 5.2933e-10 3.5434e+08 0.0043649 349 574 0 1.77e+08
PIB 0.001089 2.5554e-07 2.2682e-09 1.941e+08 0.0039995 326 383 0 1e+08
PMMA 0.00082396 3.049e-07 7.0201e-10 2.9803e+08 0.0043789 387 432 100000 2e+08
PMP 0.0012078 5.1461e-07 9.7366e-10 1.4978e+08 0.0046302 514 592 0 1.96e+08
POM 0.00083198 2.755e-07 2.2e-09 3.103e+08 0.0044652 462 492 0 1.96e+08
PoMS 0.00093905 5.1288e-07 5.9157e-11 2.469e+08 0.0036633 413 471 100000 1.8e+08
PS 0.00093805 3.3086e-07 6.691e-10 2.5001e+08 0.0041815 389 469 100000 2e+08
PTFE 0.00046867 1.1542e-07 1.1931e-09 4.091e+08 0.0092556 604 646 0 3.92e+08
PVAC 0.00082832 4.7205e-07 1.1364e-09 1.8825e+08 0.0038774 337 393 0 1e+08

Examples¤

Estimate the PVT properties of PMMA.

from polykin.properties.pvt_polymer import Tait

# Parameters from Handbook Polymer Solution Thermodynamics, p.39 
m = Tait(
    A0=8.2396e-4,
    A1=3.0490e-7,
    A2=7.0201e-10,
    B0=2.9803e8,
    B1=4.3789e-3,
    Tmin=387.15,
    Tmax=432.15,
    Pmin=0.1e6,
    Pmax=200e6,
    name="PMMA"
    )

print(m.V(127., 1500, Tunit='C', Punit='bar'))
print(m.alpha(400., 1.5e8))
print(m.beta(400., 1.5e8))
0.0008247751539051464
0.00035883613484047545
2.95109155017507e-10
from polykin.properties.pvt_polymer import Tait

# Parameters retrieved from internal databank 
m = Tait.from_database("PMMA")

print(m.V(127., 1500, Tunit='C', Punit='bar'))
print(m.alpha(400., 1.5e8))
print(m.beta(400., 1.5e8))
0.0008247751539051464
0.00035883613484047545
2.95109155017507e-10