Skip to content

polykin.properties.pvt¤

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( 1 + \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 \(\hat{v}\) is the specific volume, \(T\) is the absolute temperature, \(P\) is the pressure, and \(A_i\) and \(B_i\) are constant parameters.

References

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

Parameter of equation [m³/kg].

TYPE: float

A1

Parameter of equation [m³/(kg·K)].

TYPE: float

A2

Parameter of equation [m³/(kg·K²)].

TYPE: float

B0

Parameter of equation [Pa].

TYPE: float

B1

Parameter of equation [K⁻¹].

TYPE: float

Tmin

Lower temperature bound [K].

TYPE: float DEFAULT: 0.0

Tmax

Upper temperature bound [K].

TYPE: float DEFAULT: inf

Pmin

Lower pressure bound [Pa].

TYPE: float DEFAULT: 0.0

Pmax

Upper pressure bound [Pa].

TYPE: float DEFAULT: inf

name

Name.

TYPE: str DEFAULT: ''

Source code in src/polykin/properties/pvt/tait.py
 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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
class Tait():
    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( 1 + \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 $\hat{v}$ is the specific volume, $T$ is the absolute temperature, 
    $P$ is the pressure, and $A_i$ and $B_i$ are constant parameters.

    **References**

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

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

    Trange: tuple[float, float]
    Prange: tuple[float, float]
    symbol = r"$\hat{V}$"
    unit = "m³/kg"

    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:

        # 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')
        check_bounds(Tmin, 0, np.inf, 'Tmin')
        check_bounds(Tmax, 0, np.inf, 'Tmax')
        check_bounds(Tmax-Tmin, eps, np.inf, 'Tmax-Tmin')
        check_bounds(Pmin, 0, np.inf, 'Pmin')
        check_bounds(Pmax, 0, np.inf, 'Pmax')
        check_bounds(Pmax-Pmin, eps, np.inf, 'Pmax-Pmin')

        self.A0 = A0
        self.A1 = A1
        self.A2 = A2
        self.B0 = B0
        self.B1 = B1
        self.Trange = (Tmin, Tmax)
        self.Prange = (Pmin, Pmax)
        self.name = 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 [K⁻¹]     : {self.B1}"
        )

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

        Parameters
        ----------
        T : float | FloatArray
            Temperature [K].
        P : float | FloatArray
            Pressure [Pa].

        Returns
        -------
        float | FloatArray
            Specific volume [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*ln(1 + P/B))
        return v

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

        Parameters
        ----------
        T : float | FloatArray
            Temperature [K].

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

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

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

        Parameters
        ----------
        T : float | FloatArray
            Temperature [K].
        P : float | FloatArray
            Pressure [Pa].

        Returns
        -------
        float | FloatArray
            Thermal expansion coefficient, $\alpha$ [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: float | FloatArray,
             P: float | FloatArray
             ) -> float | FloatArray:
        r"""Calculate the isothermal compressibility coefficient, $\beta$.

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

        Parameters
        ----------
        T : float | FloatArray
            Temperature [K].
        P : float | FloatArray
            Pressure [Pa].

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

    def vs(self,
           T: float | FloatVectorLike,
           P: float | FloatVectorLike,
           Tunit: Literal['C', 'K'] = 'K',
           Punit: Literal['bar', 'MPa', 'Pa'] = 'Pa'
           ) -> 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 [`Tunit`].
        P : float | FloatArrayLike
            Pressure [`Punit`].
        Tunit : Literal['C', 'K']
            Temperature unit.
        Punit : Literal['bar', 'MPa', 'Pa']
            Pressure unit.

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

    @classmethod
    def from_database(cls,
                      name: str
                      ) -> Tait | None:
        r"""Construct `Tait` 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()}")

    @classmethod
    def get_database(cls) -> pd.DataFrame:
        r"""Get database with parameters for the Tait equation.

        Parameters from Table 3B-1 (p. 41) of Danner and High (2010).

        **References**

        *  Danner, Ronald P., and Martin S. High. Handbook of polymer
            solution thermodynamics. John Wiley & Sons, 2010, p. 41.
        """
        return load_PVT_parameters(method=cls.__name__)

alpha ¤

alpha(
    T: float | FloatArray, P: float | FloatArray
) -> float | FloatArray

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

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

Temperature [K].

TYPE: float | FloatArray

P

Pressure [Pa].

TYPE: float | FloatArray

RETURNS DESCRIPTION
float | FloatArray

Thermal expansion coefficient, \(\alpha\) [K⁻¹].

Source code in src/polykin/properties/pvt/tait.py
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
def alpha(self,
          T: float | FloatArray,
          P: float | FloatArray
          ) -> float | FloatArray:
    r"""Calculate the thermal expansion coefficient, $\alpha$.

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

    Parameters
    ----------
    T : float | FloatArray
        Temperature [K].
    P : float | FloatArray
        Pressure [Pa].

    Returns
    -------
    float | FloatArray
        Thermal expansion coefficient, $\alpha$ [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: float | FloatArray, P: float | FloatArray
) -> float | FloatArray

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

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

Temperature [K].

TYPE: float | FloatArray

P

Pressure [Pa].

TYPE: float | FloatArray

RETURNS DESCRIPTION
float | FloatArray

Isothermal compressibility coefficient, \(\beta\) [Pa⁻¹].

Source code in src/polykin/properties/pvt/tait.py
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: float | FloatArray,
         P: float | FloatArray
         ) -> float | FloatArray:
    r"""Calculate the isothermal compressibility coefficient, $\beta$.

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

    Parameters
    ----------
    T : float | FloatArray
        Temperature [K].
    P : float | FloatArray
        Pressure [Pa].

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

eval ¤

eval(
    T: float | FloatArray, P: float | FloatArray
) -> float | FloatArray

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

PARAMETER DESCRIPTION
T

Temperature [K].

TYPE: float | FloatArray

P

Pressure [Pa].

TYPE: float | FloatArray

RETURNS DESCRIPTION
float | FloatArray

Specific volume [m³/kg].

Source code in src/polykin/properties/pvt/tait.py
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
def eval(self,
         T: float | FloatArray,
         P: float | FloatArray
         ) -> float | FloatArray:
    r"""Evaluate the specific volume, $\hat{v}$, at given SI conditions
    without unit conversions or checks.

    Parameters
    ----------
    T : float | FloatArray
        Temperature [K].
    P : float | FloatArray
        Pressure [Pa].

    Returns
    -------
    float | FloatArray
        Specific volume [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*ln(1 + P/B))
    return v

from_database classmethod ¤

from_database(name: str) -> Tait | None

Construct Tait with parameters from the database.

PARAMETER DESCRIPTION
name

Polymer code name.

TYPE: str

Source code in src/polykin/properties/pvt/tait.py
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
@classmethod
def from_database(cls,
                  name: str
                  ) -> Tait | None:
    r"""Construct `Tait` 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 Tait equation.

Parameters from Table 3B-1 (p. 41) of Danner and High (2010).

References

  • Danner, Ronald P., and Martin S. High. Handbook of polymer solution thermodynamics. John Wiley & Sons, 2010, p. 41.
Source code in src/polykin/properties/pvt/tait.py
276
277
278
279
280
281
282
283
284
285
286
287
@classmethod
def get_database(cls) -> pd.DataFrame:
    r"""Get database with parameters for the Tait equation.

    Parameters from Table 3B-1 (p. 41) of Danner and High (2010).

    **References**

    *  Danner, Ronald P., and Martin S. High. Handbook of polymer
        solution thermodynamics. John Wiley & Sons, 2010, p. 41.
    """
    return load_PVT_parameters(method=cls.__name__)

vs ¤

vs(
    T: float | FloatVectorLike,
    P: float | FloatVectorLike,
    Tunit: Literal["C", "K"] = "K",
    Punit: Literal["bar", "MPa", "Pa"] = "Pa",
) -> float | FloatArray

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

PARAMETER DESCRIPTION
T

Temperature [Tunit].

TYPE: float | FloatArrayLike

P

Pressure [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 [m³/kg].

Source code in src/polykin/properties/pvt/tait.py
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
def vs(self,
       T: float | FloatVectorLike,
       P: float | FloatVectorLike,
       Tunit: Literal['C', 'K'] = 'K',
       Punit: Literal['bar', 'MPa', 'Pa'] = 'Pa'
       ) -> 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 [`Tunit`].
    P : float | FloatArrayLike
        Pressure [`Punit`].
    Tunit : Literal['C', 'K']
        Temperature unit.
    Punit : Literal['bar', 'MPa', 'Pa']
        Pressure unit.

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

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 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.vs(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 import Tait

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

print(m.vs(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