Physical Properties (polykin.properties)¤
This module implements methods to evaluate physical property equations and estimate physical properties.
Antoine ¤
Antoine equation for vapor pressure.
This equation implements the following temperature dependence:
where \(A\), \(B\) and \(C\) are component-specific constants, \(P^*\) is the vapor pressure and \(T\) is the temperature. When \(C=0\), this equation reverts to the Clapeyron equation.
Note
There is no consensus on the value of \(base\), the unit of temperature, or the unit of pressure. The function is flexible enough to accomodate most cases, but care should be taken to ensure the parameters match the intended use.
PARAMETER | DESCRIPTION |
---|---|
A
|
Parameter of equation.
TYPE:
|
B
|
Parameter of equation. Unit = K.
TYPE:
|
C
|
Parameter of equation. Unit = K.
TYPE:
|
base10
|
If
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
unit
|
Unit of vapor pressure.
TYPE:
|
symbol
|
Symbol of vapor pressure.
TYPE:
|
name
|
Name.
TYPE:
|
See also
Source code in src/polykin/properties/equations/vapor_pressure.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 |
|
__call__ ¤
__call__(
T: Union[float, FloatArrayLike],
Tunit: Literal["C", "K"] = "K",
) -> Union[float, FloatArray]
Evaluate property equation at given temperature, including unit conversion and range check.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Correlation value. |
Source code in src/polykin/properties/equations/base.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
equation
staticmethod
¤
equation(
T: Union[float, FloatArray],
A: float,
B: float,
C: float,
base10: bool,
) -> Union[float, FloatArray]
Antoine equation.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
A
|
Parameter of equation.
TYPE:
|
B
|
Parameter of equation.
TYPE:
|
C
|
Parameter of equation.
TYPE:
|
base10
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Vapor pressure. Unit = Any. |
Source code in src/polykin/properties/equations/vapor_pressure.py
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 |
|
fit ¤
fit(
T: FloatVectorLike,
Y: FloatVectorLike,
sigmaY: Optional[FloatVectorLike] = None,
fit_only: Optional[list[str]] = None,
logY: bool = False,
plot: bool = True,
) -> dict
Fit equation to data using non-linear regression.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
Y
|
Property to be fitted. Unit = Any.
TYPE:
|
sigmaY
|
Standard deviation of Y. Unit = [Y].
TYPE:
|
fit_only
|
List with name of parameters to be fitted.
TYPE:
|
logY
|
If
TYPE:
|
plot
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict
|
A dictionary of results with the following keys: 'success', 'parameters', 'covariance', and 'plot'. |
Source code in src/polykin/properties/equations/base.py
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 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
plot ¤
plot(
kind: Literal[
"linear", "semilogy", "Arrhenius"
] = "linear",
Trange: Optional[tuple[float, float]] = None,
Tunit: Literal["C", "K"] = "K",
title: Optional[str] = None,
axes: Optional[Axes] = None,
return_objects: bool = False,
) -> Optional[tuple[Optional[Figure], Axes]]
Plot quantity as a function of temperature.
PARAMETER | DESCRIPTION |
---|---|
kind
|
Kind of plot to be generated.
TYPE:
|
Trange
|
Temperature range for x-axis. If
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
title
|
Title of plot. If
TYPE:
|
axes
|
Matplotlib Axes object.
TYPE:
|
return_objects
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Figure | None, Axes] | None
|
Figure and Axes objects if return_objects is |
Source code in src/polykin/properties/equations/base.py
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 |
|
DIPPR100 ¤
DIPPR-100 equation.
This equation implements the following temperature dependence:
where \(A\) to \(E\) are component-specific constants and \(T\) is the absolute temperature.
PARAMETER | DESCRIPTION |
---|---|
A
|
Parameter of equation.
TYPE:
|
B
|
Parameter of equation.
TYPE:
|
C
|
Parameter of equation.
TYPE:
|
D
|
Parameter of equation.
TYPE:
|
E
|
Parameter of equation.
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
unit
|
Unit of output variable \(Y\).
TYPE:
|
symbol
|
Symbol of output variable \(Y\).
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/properties/equations/dippr.py
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 |
|
__call__ ¤
__call__(
T: Union[float, FloatArrayLike],
Tunit: Literal["C", "K"] = "K",
) -> Union[float, FloatArray]
Evaluate property equation at given temperature, including unit conversion and range check.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Correlation value. |
Source code in src/polykin/properties/equations/base.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
equation
staticmethod
¤
equation(
T: Union[float, FloatArray],
A: float,
B: float,
C: float,
D: float,
E: float,
) -> Union[float, FloatArray]
DIPPR-100 equation.
Source code in src/polykin/properties/equations/dippr.py
125 126 127 128 129 130 131 132 133 134 |
|
fit ¤
fit(
T: FloatVectorLike,
Y: FloatVectorLike,
sigmaY: Optional[FloatVectorLike] = None,
fit_only: Optional[list[str]] = None,
logY: bool = False,
plot: bool = True,
) -> dict
Fit equation to data using non-linear regression.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
Y
|
Property to be fitted. Unit = Any.
TYPE:
|
sigmaY
|
Standard deviation of Y. Unit = [Y].
TYPE:
|
fit_only
|
List with name of parameters to be fitted.
TYPE:
|
logY
|
If
TYPE:
|
plot
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict
|
A dictionary of results with the following keys: 'success', 'parameters', 'covariance', and 'plot'. |
Source code in src/polykin/properties/equations/base.py
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 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
plot ¤
plot(
kind: Literal[
"linear", "semilogy", "Arrhenius"
] = "linear",
Trange: Optional[tuple[float, float]] = None,
Tunit: Literal["C", "K"] = "K",
title: Optional[str] = None,
axes: Optional[Axes] = None,
return_objects: bool = False,
) -> Optional[tuple[Optional[Figure], Axes]]
Plot quantity as a function of temperature.
PARAMETER | DESCRIPTION |
---|---|
kind
|
Kind of plot to be generated.
TYPE:
|
Trange
|
Temperature range for x-axis. If
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
title
|
Title of plot. If
TYPE:
|
axes
|
Matplotlib Axes object.
TYPE:
|
return_objects
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Figure | None, Axes] | None
|
Figure and Axes objects if return_objects is |
Source code in src/polykin/properties/equations/base.py
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 |
|
DIPPR101 ¤
DIPPR-101 equation.
This equation implements the following temperature dependence:
where \(A\) to \(E\) are component-specific constants and \(T\) is the absolute temperature.
PARAMETER | DESCRIPTION |
---|---|
A
|
Parameter of equation.
TYPE:
|
B
|
Parameter of equation.
TYPE:
|
C
|
Parameter of equation.
TYPE:
|
D
|
Parameter of equation.
TYPE:
|
E
|
Parameter of equation.
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
unit
|
Unit of output variable \(Y\).
TYPE:
|
symbol
|
Symbol of output variable \(Y\).
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/properties/equations/dippr.py
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 |
|
__call__ ¤
__call__(
T: Union[float, FloatArrayLike],
Tunit: Literal["C", "K"] = "K",
) -> Union[float, FloatArray]
Evaluate property equation at given temperature, including unit conversion and range check.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Correlation value. |
Source code in src/polykin/properties/equations/base.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
equation
staticmethod
¤
equation(
T: Union[float, FloatArray],
A: float,
B: float,
C: float,
D: float,
E: float,
) -> Union[float, FloatArray]
DIPPR-101 equation.
Source code in src/polykin/properties/equations/dippr.py
190 191 192 193 194 195 196 197 198 199 |
|
fit ¤
fit(
T: FloatVectorLike,
Y: FloatVectorLike,
sigmaY: Optional[FloatVectorLike] = None,
fit_only: Optional[list[str]] = None,
logY: bool = False,
plot: bool = True,
) -> dict
Fit equation to data using non-linear regression.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
Y
|
Property to be fitted. Unit = Any.
TYPE:
|
sigmaY
|
Standard deviation of Y. Unit = [Y].
TYPE:
|
fit_only
|
List with name of parameters to be fitted.
TYPE:
|
logY
|
If
TYPE:
|
plot
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict
|
A dictionary of results with the following keys: 'success', 'parameters', 'covariance', and 'plot'. |
Source code in src/polykin/properties/equations/base.py
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 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
plot ¤
plot(
kind: Literal[
"linear", "semilogy", "Arrhenius"
] = "linear",
Trange: Optional[tuple[float, float]] = None,
Tunit: Literal["C", "K"] = "K",
title: Optional[str] = None,
axes: Optional[Axes] = None,
return_objects: bool = False,
) -> Optional[tuple[Optional[Figure], Axes]]
Plot quantity as a function of temperature.
PARAMETER | DESCRIPTION |
---|---|
kind
|
Kind of plot to be generated.
TYPE:
|
Trange
|
Temperature range for x-axis. If
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
title
|
Title of plot. If
TYPE:
|
axes
|
Matplotlib Axes object.
TYPE:
|
return_objects
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Figure | None, Axes] | None
|
Figure and Axes objects if return_objects is |
Source code in src/polykin/properties/equations/base.py
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 |
|
DIPPR102 ¤
DIPPR-102 equation.
This equation implements the following temperature dependence:
where \(A\) to \(D\) are component-specific constants and \(T\) is the absolute temperature.
PARAMETER | DESCRIPTION |
---|---|
A
|
Parameter of equation.
TYPE:
|
B
|
Parameter of equation.
TYPE:
|
C
|
Parameter of equation.
TYPE:
|
D
|
Parameter of equation.
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
unit
|
Unit of output variable \(Y\).
TYPE:
|
symbol
|
Symbol of output variable \(Y\).
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/properties/equations/dippr.py
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 |
|
__call__ ¤
__call__(
T: Union[float, FloatArrayLike],
Tunit: Literal["C", "K"] = "K",
) -> Union[float, FloatArray]
Evaluate property equation at given temperature, including unit conversion and range check.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Correlation value. |
Source code in src/polykin/properties/equations/base.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
equation
staticmethod
¤
equation(
T: Union[float, FloatArray],
A: float,
B: float,
C: float,
D: float,
) -> Union[float, FloatArray]
DIPPR-102 equation.
Source code in src/polykin/properties/equations/dippr.py
253 254 255 256 257 258 259 260 261 |
|
fit ¤
fit(
T: FloatVectorLike,
Y: FloatVectorLike,
sigmaY: Optional[FloatVectorLike] = None,
fit_only: Optional[list[str]] = None,
logY: bool = False,
plot: bool = True,
) -> dict
Fit equation to data using non-linear regression.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
Y
|
Property to be fitted. Unit = Any.
TYPE:
|
sigmaY
|
Standard deviation of Y. Unit = [Y].
TYPE:
|
fit_only
|
List with name of parameters to be fitted.
TYPE:
|
logY
|
If
TYPE:
|
plot
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict
|
A dictionary of results with the following keys: 'success', 'parameters', 'covariance', and 'plot'. |
Source code in src/polykin/properties/equations/base.py
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 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
plot ¤
plot(
kind: Literal[
"linear", "semilogy", "Arrhenius"
] = "linear",
Trange: Optional[tuple[float, float]] = None,
Tunit: Literal["C", "K"] = "K",
title: Optional[str] = None,
axes: Optional[Axes] = None,
return_objects: bool = False,
) -> Optional[tuple[Optional[Figure], Axes]]
Plot quantity as a function of temperature.
PARAMETER | DESCRIPTION |
---|---|
kind
|
Kind of plot to be generated.
TYPE:
|
Trange
|
Temperature range for x-axis. If
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
title
|
Title of plot. If
TYPE:
|
axes
|
Matplotlib Axes object.
TYPE:
|
return_objects
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Figure | None, Axes] | None
|
Figure and Axes objects if return_objects is |
Source code in src/polykin/properties/equations/base.py
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 |
|
DIPPR104 ¤
DIPPR-104 equation.
This equation implements the following temperature dependence:
where \(A\) to \(E\) are component-specific constants and \(T\) is the absolute temperature.
PARAMETER | DESCRIPTION |
---|---|
A
|
Parameter of equation.
TYPE:
|
B
|
Parameter of equation.
TYPE:
|
C
|
Parameter of equation.
TYPE:
|
D
|
Parameter of equation.
TYPE:
|
E
|
Parameter of equation.
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
unit
|
Unit of output variable \(Y\).
TYPE:
|
symbol
|
Symbol of output variable \(Y\).
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/properties/equations/dippr.py
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
|
__call__ ¤
__call__(
T: Union[float, FloatArrayLike],
Tunit: Literal["C", "K"] = "K",
) -> Union[float, FloatArray]
Evaluate property equation at given temperature, including unit conversion and range check.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Correlation value. |
Source code in src/polykin/properties/equations/base.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
equation
staticmethod
¤
equation(
T: Union[float, FloatArray],
A: float,
B: float,
C: float,
D: float,
E: float,
) -> Union[float, FloatArray]
DIPPR-104 equation.
Source code in src/polykin/properties/equations/dippr.py
318 319 320 321 322 323 324 325 326 327 |
|
fit ¤
fit(
T: FloatVectorLike,
Y: FloatVectorLike,
sigmaY: Optional[FloatVectorLike] = None,
fit_only: Optional[list[str]] = None,
logY: bool = False,
plot: bool = True,
) -> dict
Fit equation to data using non-linear regression.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
Y
|
Property to be fitted. Unit = Any.
TYPE:
|
sigmaY
|
Standard deviation of Y. Unit = [Y].
TYPE:
|
fit_only
|
List with name of parameters to be fitted.
TYPE:
|
logY
|
If
TYPE:
|
plot
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict
|
A dictionary of results with the following keys: 'success', 'parameters', 'covariance', and 'plot'. |
Source code in src/polykin/properties/equations/base.py
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 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
plot ¤
plot(
kind: Literal[
"linear", "semilogy", "Arrhenius"
] = "linear",
Trange: Optional[tuple[float, float]] = None,
Tunit: Literal["C", "K"] = "K",
title: Optional[str] = None,
axes: Optional[Axes] = None,
return_objects: bool = False,
) -> Optional[tuple[Optional[Figure], Axes]]
Plot quantity as a function of temperature.
PARAMETER | DESCRIPTION |
---|---|
kind
|
Kind of plot to be generated.
TYPE:
|
Trange
|
Temperature range for x-axis. If
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
title
|
Title of plot. If
TYPE:
|
axes
|
Matplotlib Axes object.
TYPE:
|
return_objects
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Figure | None, Axes] | None
|
Figure and Axes objects if return_objects is |
Source code in src/polykin/properties/equations/base.py
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 |
|
DIPPR105 ¤
DIPPR-105 equation.
This equation implements the following temperature dependence:
where \(A\) to \(D\) are component-specific constants and \(T\) is the absolute temperature.
PARAMETER | DESCRIPTION |
---|---|
A
|
Parameter of equation.
TYPE:
|
B
|
Parameter of equation.
TYPE:
|
C
|
Parameter of equation.
TYPE:
|
D
|
Parameter of equation.
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
unit
|
Unit of output variable \(Y\).
TYPE:
|
symbol
|
Symbol of output variable \(Y\).
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/properties/equations/dippr.py
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 |
|
__call__ ¤
__call__(
T: Union[float, FloatArrayLike],
Tunit: Literal["C", "K"] = "K",
) -> Union[float, FloatArray]
Evaluate property equation at given temperature, including unit conversion and range check.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Correlation value. |
Source code in src/polykin/properties/equations/base.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
equation
staticmethod
¤
equation(
T: Union[float, FloatArray],
A: float,
B: float,
C: float,
D: float,
) -> Union[float, FloatArray]
DIPPR-105 equation.
Source code in src/polykin/properties/equations/dippr.py
381 382 383 384 385 386 387 388 389 |
|
fit ¤
fit(
T: FloatVectorLike,
Y: FloatVectorLike,
sigmaY: Optional[FloatVectorLike] = None,
fit_only: Optional[list[str]] = None,
logY: bool = False,
plot: bool = True,
) -> dict
Fit equation to data using non-linear regression.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
Y
|
Property to be fitted. Unit = Any.
TYPE:
|
sigmaY
|
Standard deviation of Y. Unit = [Y].
TYPE:
|
fit_only
|
List with name of parameters to be fitted.
TYPE:
|
logY
|
If
TYPE:
|
plot
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict
|
A dictionary of results with the following keys: 'success', 'parameters', 'covariance', and 'plot'. |
Source code in src/polykin/properties/equations/base.py
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 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
plot ¤
plot(
kind: Literal[
"linear", "semilogy", "Arrhenius"
] = "linear",
Trange: Optional[tuple[float, float]] = None,
Tunit: Literal["C", "K"] = "K",
title: Optional[str] = None,
axes: Optional[Axes] = None,
return_objects: bool = False,
) -> Optional[tuple[Optional[Figure], Axes]]
Plot quantity as a function of temperature.
PARAMETER | DESCRIPTION |
---|---|
kind
|
Kind of plot to be generated.
TYPE:
|
Trange
|
Temperature range for x-axis. If
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
title
|
Title of plot. If
TYPE:
|
axes
|
Matplotlib Axes object.
TYPE:
|
return_objects
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Figure | None, Axes] | None
|
Figure and Axes objects if return_objects is |
Source code in src/polykin/properties/equations/base.py
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 |
|
DIPPR106 ¤
DIPPR-106 equation.
This equation implements the following temperature dependence:
where \(A\) to \(E\) are component-specific constants, \(T\) is the absolute temperature, \(T_c\) is the critical temperature and \(T_r = T/T_c\) is the reduced temperature.
PARAMETER | DESCRIPTION |
---|---|
Tc
|
Critical temperature. Unit = K.
TYPE:
|
A
|
Parameter of equation.
TYPE:
|
B
|
Parameter of equation.
TYPE:
|
C
|
Parameter of equation.
TYPE:
|
D
|
Parameter of equation.
TYPE:
|
E
|
Parameter of equation.
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
unit
|
Unit of output variable \(Y\).
TYPE:
|
symbol
|
Symbol of output variable \(Y\).
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/properties/equations/dippr.py
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
|
__call__ ¤
__call__(
T: Union[float, FloatArrayLike],
Tunit: Literal["C", "K"] = "K",
) -> Union[float, FloatArray]
Evaluate property equation at given temperature, including unit conversion and range check.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Correlation value. |
Source code in src/polykin/properties/equations/base.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
equation
staticmethod
¤
equation(
T: Union[float, FloatArray],
A: float,
B: float,
C: float,
D: float,
E: float,
Tc: float,
) -> Union[float, FloatArray]
DIPPR-106 equation.
Source code in src/polykin/properties/equations/dippr.py
452 453 454 455 456 457 458 459 460 461 462 463 |
|
fit ¤
fit(
T: FloatVectorLike,
Y: FloatVectorLike,
sigmaY: Optional[FloatVectorLike] = None,
fit_only: Optional[list[str]] = None,
logY: bool = False,
plot: bool = True,
) -> dict
Fit equation to data using non-linear regression.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
Y
|
Property to be fitted. Unit = Any.
TYPE:
|
sigmaY
|
Standard deviation of Y. Unit = [Y].
TYPE:
|
fit_only
|
List with name of parameters to be fitted.
TYPE:
|
logY
|
If
TYPE:
|
plot
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict
|
A dictionary of results with the following keys: 'success', 'parameters', 'covariance', and 'plot'. |
Source code in src/polykin/properties/equations/base.py
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 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
plot ¤
plot(
kind: Literal[
"linear", "semilogy", "Arrhenius"
] = "linear",
Trange: Optional[tuple[float, float]] = None,
Tunit: Literal["C", "K"] = "K",
title: Optional[str] = None,
axes: Optional[Axes] = None,
return_objects: bool = False,
) -> Optional[tuple[Optional[Figure], Axes]]
Plot quantity as a function of temperature.
PARAMETER | DESCRIPTION |
---|---|
kind
|
Kind of plot to be generated.
TYPE:
|
Trange
|
Temperature range for x-axis. If
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
title
|
Title of plot. If
TYPE:
|
axes
|
Matplotlib Axes object.
TYPE:
|
return_objects
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Figure | None, Axes] | None
|
Figure and Axes objects if return_objects is |
Source code in src/polykin/properties/equations/base.py
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 |
|
DIPPR107 ¤
DIPPR-107 equation.
This equation implements the following temperature dependence:
where \(A\) to \(E\) are component-specific constants and \(T\) is the absolute temperature.
PARAMETER | DESCRIPTION |
---|---|
A
|
Parameter of equation.
TYPE:
|
B
|
Parameter of equation.
TYPE:
|
C
|
Parameter of equation.
TYPE:
|
D
|
Parameter of equation.
TYPE:
|
E
|
Parameter of equation.
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
unit
|
Unit of output variable \(Y\).
TYPE:
|
symbol
|
Symbol of output variable \(Y\).
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/properties/equations/dippr.py
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 |
|
__call__ ¤
__call__(
T: Union[float, FloatArrayLike],
Tunit: Literal["C", "K"] = "K",
) -> Union[float, FloatArray]
Evaluate property equation at given temperature, including unit conversion and range check.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Correlation value. |
Source code in src/polykin/properties/equations/base.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
equation
staticmethod
¤
equation(
T: Union[float, FloatArray],
A: float,
B: float,
C: float,
D: float,
E: float,
) -> Union[float, FloatArray]
DIPPR-107 equation.
Source code in src/polykin/properties/equations/dippr.py
521 522 523 524 525 526 527 528 529 530 |
|
fit ¤
fit(
T: FloatVectorLike,
Y: FloatVectorLike,
sigmaY: Optional[FloatVectorLike] = None,
fit_only: Optional[list[str]] = None,
logY: bool = False,
plot: bool = True,
) -> dict
Fit equation to data using non-linear regression.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
Y
|
Property to be fitted. Unit = Any.
TYPE:
|
sigmaY
|
Standard deviation of Y. Unit = [Y].
TYPE:
|
fit_only
|
List with name of parameters to be fitted.
TYPE:
|
logY
|
If
TYPE:
|
plot
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict
|
A dictionary of results with the following keys: 'success', 'parameters', 'covariance', and 'plot'. |
Source code in src/polykin/properties/equations/base.py
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 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
plot ¤
plot(
kind: Literal[
"linear", "semilogy", "Arrhenius"
] = "linear",
Trange: Optional[tuple[float, float]] = None,
Tunit: Literal["C", "K"] = "K",
title: Optional[str] = None,
axes: Optional[Axes] = None,
return_objects: bool = False,
) -> Optional[tuple[Optional[Figure], Axes]]
Plot quantity as a function of temperature.
PARAMETER | DESCRIPTION |
---|---|
kind
|
Kind of plot to be generated.
TYPE:
|
Trange
|
Temperature range for x-axis. If
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
title
|
Title of plot. If
TYPE:
|
axes
|
Matplotlib Axes object.
TYPE:
|
return_objects
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Figure | None, Axes] | None
|
Figure and Axes objects if return_objects is |
Source code in src/polykin/properties/equations/base.py
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 |
|
Flory ¤
Flory equation of state for the specific volume of a polymer.
This EoS implements the following implicit PVT dependence:
where \(\tilde{V}=V/V^*\), \(\tilde{P}=P/P^*\) and \(\tilde{T}=T/T^*\) are, respectively, the reduced volume, reduced pressure and reduced temperature. \(V^*\), \(P^*\) and \(T^*\) are reference quantities that are polymer dependent.
References
- Caruthers et al. Handbook of Diffusion and Thermal Properties of Polymers and Polymer Solutions. AIChE, 1998.
PARAMETER | DESCRIPTION |
---|---|
V0
|
Reference volume, \(V^*\).
TYPE:
|
T0
|
Reference temperature, \(T^*\).
TYPE:
|
P0
|
Reference pressure, \(P^*\).
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
Pmin
|
Lower pressure bound. Unit = Pa.
TYPE:
|
Pmax
|
Upper pressure bound. Unit = Pa.
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/properties/pvt_polymer/eos.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 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 |
|
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 =
TYPE:
|
P
|
Pressure.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
Punit
|
Pressure unit.
TYPE:
|
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 |
|
alpha ¤
alpha(
T: Union[float, FloatArray], P: Union[float, FloatArray]
) -> Union[float, FloatArray]
Calculate thermal expansion coefficient, \(\alpha\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
P
|
Pressure. Unit = Pa.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Thermal expansion coefficient, \(\alpha\). Unit = 1/K. |
Source code in src/polykin/properties/pvt_polymer/eos.py
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 |
|
beta ¤
beta(
T: Union[float, FloatArray], P: Union[float, FloatArray]
) -> Union[float, FloatArray]
Calculate isothermal compressibility coefficient, \(\beta\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
P
|
Pressure. Unit = Pa.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Isothermal compressibility coefficient, \(\beta\). Unit = 1/Pa. |
Source code in src/polykin/properties/pvt_polymer/eos.py
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 |
|
equation
staticmethod
¤
equation(
v: float, t: float, p: float
) -> tuple[float, float, float]
Flory equation of state and its volume derivatives.
PARAMETER | DESCRIPTION |
---|---|
v
|
Reduced volume, \(\tilde{V}\).
TYPE:
|
t
|
Reduced temperature, \(\tilde{T}\).
TYPE:
|
p
|
Reduced pressure, \(\tilde{P}\).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[float, float, float]
|
Equation of state, first derivative, second derivative. |
Source code in src/polykin/properties/pvt_polymer/eos.py
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 |
|
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:
|
P
|
Pressure. Unit = Pa.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Specific volume. Unit = m³/kg. |
Source code in src/polykin/properties/pvt_polymer/eos.py
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 |
|
from_database
classmethod
¤
from_database(name: str) -> Optional[PolymerPVTEquation]
Construct PolymerPVTEquation
with parameters from the database.
PARAMETER | DESCRIPTION |
---|---|
name
|
Polymer code name.
TYPE:
|
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 |
|
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
- Danner, Ronald P., and Martin S. High. Handbook of polymer solution thermodynamics. John Wiley & Sons, 2010.
- 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 |
|
HartmannHaque ¤
Hartmann-Haque equation of state for the specific volume of a polymer.
This EoS implements the following implicit PVT dependence:
where \(\tilde{V}=V/V^*\), \(\tilde{P}=P/P^*\) and \(\tilde{T}=T/T^*\) are, respectively, the reduced volume, reduced pressure and reduced temperature. \(V^*\), \(P^*\) and \(T^*\) are reference quantities that are polymer dependent.
References
- Caruthers et al. Handbook of Diffusion and Thermal Properties of Polymers and Polymer Solutions. AIChE, 1998.
PARAMETER | DESCRIPTION |
---|---|
V0
|
Reference volume, \(V^*\).
TYPE:
|
T0
|
Reference temperature, \(T^*\).
TYPE:
|
P0
|
Reference pressure, \(P^*\).
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
Pmin
|
Lower pressure bound. Unit = Pa.
TYPE:
|
Pmax
|
Upper pressure bound. Unit = Pa.
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/properties/pvt_polymer/eos.py
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 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
|
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 =
TYPE:
|
P
|
Pressure.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
Punit
|
Pressure unit.
TYPE:
|
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 |
|
alpha ¤
alpha(
T: Union[float, FloatArray], P: Union[float, FloatArray]
) -> Union[float, FloatArray]
Calculate thermal expansion coefficient, \(\alpha\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
P
|
Pressure. Unit = Pa.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Thermal expansion coefficient, \(\alpha\). Unit = 1/K. |
Source code in src/polykin/properties/pvt_polymer/eos.py
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 |
|
beta ¤
beta(
T: Union[float, FloatArray], P: Union[float, FloatArray]
) -> Union[float, FloatArray]
Calculate isothermal compressibility coefficient, \(\beta\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
P
|
Pressure. Unit = Pa.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Isothermal compressibility coefficient, \(\beta\). Unit = 1/Pa. |
Source code in src/polykin/properties/pvt_polymer/eos.py
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 |
|
equation
staticmethod
¤
equation(
v: float, t: float, p: float
) -> tuple[float, float, float]
Hartmann-Haque equation of state and its volume derivatives.
PARAMETER | DESCRIPTION |
---|---|
v
|
Reduced volume.
TYPE:
|
t
|
Reduced temperature.
TYPE:
|
p
|
Reduced pressure.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[float, float, float]
|
Equation of state, first derivative, second derivative. |
Source code in src/polykin/properties/pvt_polymer/eos.py
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
|
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:
|
P
|
Pressure. Unit = Pa.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Specific volume. Unit = m³/kg. |
Source code in src/polykin/properties/pvt_polymer/eos.py
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 |
|
from_database
classmethod
¤
from_database(name: str) -> Optional[PolymerPVTEquation]
Construct PolymerPVTEquation
with parameters from the database.
PARAMETER | DESCRIPTION |
---|---|
name
|
Polymer code name.
TYPE:
|
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 |
|
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
- Danner, Ronald P., and Martin S. High. Handbook of polymer solution thermodynamics. John Wiley & Sons, 2010.
- 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 |
|
SanchezLacombe ¤
Sanchez-Lacombe equation of state for the specific volume of a polymer.
This EoS implements the following implicit PVT dependence:
where \(\tilde{V}=V/V^*\), \(\tilde{P}=P/P^*\) and \(\tilde{T}=T/T^*\) are, respectively, the reduced volume, reduced pressure and reduced temperature. \(V^*\), \(P^*\) and \(T^*\) are reference quantities that are polymer dependent.
References
- Caruthers et al. Handbook of Diffusion and Thermal Properties of Polymers and Polymer Solutions. AIChE, 1998.
PARAMETER | DESCRIPTION |
---|---|
V0
|
Reference volume, \(V^*\).
TYPE:
|
T0
|
Reference temperature, \(T^*\).
TYPE:
|
P0
|
Reference pressure, \(P^*\).
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
Pmin
|
Lower pressure bound. Unit = Pa.
TYPE:
|
Pmax
|
Upper pressure bound. Unit = Pa.
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/properties/pvt_polymer/eos.py
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
|
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 =
TYPE:
|
P
|
Pressure.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
Punit
|
Pressure unit.
TYPE:
|
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 |
|
alpha ¤
alpha(
T: Union[float, FloatArray], P: Union[float, FloatArray]
) -> Union[float, FloatArray]
Calculate thermal expansion coefficient, \(\alpha\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
P
|
Pressure. Unit = Pa.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Thermal expansion coefficient, \(\alpha\). Unit = 1/K. |
Source code in src/polykin/properties/pvt_polymer/eos.py
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 |
|
beta ¤
beta(
T: Union[float, FloatArray], P: Union[float, FloatArray]
) -> Union[float, FloatArray]
Calculate isothermal compressibility coefficient, \(\beta\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
P
|
Pressure. Unit = Pa.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Isothermal compressibility coefficient, \(\beta\). Unit = 1/Pa. |
Source code in src/polykin/properties/pvt_polymer/eos.py
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 |
|
equation
staticmethod
¤
equation(
v: float, t: float, p: float
) -> tuple[float, float, float]
Sanchez-Lacombe equation of state and its volume derivatives.
PARAMETER | DESCRIPTION |
---|---|
v
|
Reduced volume.
TYPE:
|
t
|
Reduced temperature.
TYPE:
|
p
|
Reduced pressure.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[float, float, float]
|
Equation of state, first derivative, second derivative. |
Source code in src/polykin/properties/pvt_polymer/eos.py
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
|
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:
|
P
|
Pressure. Unit = Pa.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Specific volume. Unit = m³/kg. |
Source code in src/polykin/properties/pvt_polymer/eos.py
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 |
|
from_database
classmethod
¤
from_database(name: str) -> Optional[PolymerPVTEquation]
Construct PolymerPVTEquation
with parameters from the database.
PARAMETER | DESCRIPTION |
---|---|
name
|
Polymer code name.
TYPE:
|
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 |
|
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
- Danner, Ronald P., and Martin S. High. Handbook of polymer solution thermodynamics. John Wiley & Sons, 2010.
- 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 |
|
Tait ¤
Tait equation of state for the specific volume of a liquid.
This EoS implements the following explicit PVT dependence:
with:
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:
|
A1
|
Parameter of equation. Unit = m³/(kg·K).
TYPE:
|
A2
|
Parameter of equation. Unit = m³/(kg·K²).
TYPE:
|
B0
|
Parameter of equation. Unit = Pa.
TYPE:
|
B1
|
Parameter of equation. Unit = 1/K.
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
Pmin
|
Lower pressure bound. Unit = Pa.
TYPE:
|
Pmax
|
Upper pressure bound. Unit = Pa.
TYPE:
|
name
|
Name.
TYPE:
|
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 |
|
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 =
TYPE:
|
P
|
Pressure.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
Punit
|
Pressure unit.
TYPE:
|
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 |
|
__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 |
|
alpha ¤
alpha(
T: Union[float, FloatArray], P: Union[float, FloatArray]
) -> Union[float, FloatArray]
Calculate thermal expansion coefficient, \(\alpha\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
P
|
Pressure. Unit = Pa.
TYPE:
|
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 |
|
beta ¤
beta(
T: Union[float, FloatArray], P: Union[float, FloatArray]
) -> Union[float, FloatArray]
Calculate isothermal compressibility coefficient, \(\beta\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
P
|
Pressure. Unit = Pa.
TYPE:
|
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 |
|
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:
|
P
|
Pressure. Unit = Pa.
TYPE:
|
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 |
|
from_database
classmethod
¤
from_database(name: str) -> Optional[PolymerPVTEquation]
Construct PolymerPVTEquation
with parameters from the database.
PARAMETER | DESCRIPTION |
---|---|
name
|
Polymer code name.
TYPE:
|
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 |
|
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
- Danner, Ronald P., and Martin S. High. Handbook of polymer solution thermodynamics. John Wiley & Sons, 2010.
- 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 |
|
Wagner ¤
Wagner equation for vapor pressure.
This equation implements the following temperature dependence:
with:
where \(a\) to \(d\) are component-specific constants, \(P^*\) is the vapor pressure, \(P_c\) is the critical pressure, \(T\) is the absolute temperature, \(T_c\) is the critical temperature, and \(T_r=T/T_c\) is the reduced temperature.
Note
There are several versions of the Wagner equation with different exponents. This is the so-called 25 version also used in the ThermoData Engine.
PARAMETER | DESCRIPTION |
---|---|
Tc
|
Critical temperature. Unit = K.
TYPE:
|
Pc
|
Critical pressure. Unit = Any.
TYPE:
|
a
|
Parameter of equation.
TYPE:
|
b
|
Parameter of equation.
TYPE:
|
c
|
Parameter of equation.
TYPE:
|
d
|
Parameter of equation.
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
unit
|
Unit of vapor pressure.
TYPE:
|
symbol
|
Symbol of vapor pressure.
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/properties/equations/vapor_pressure.py
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 |
|
__call__ ¤
__call__(
T: Union[float, FloatArrayLike],
Tunit: Literal["C", "K"] = "K",
) -> Union[float, FloatArray]
Evaluate property equation at given temperature, including unit conversion and range check.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Correlation value. |
Source code in src/polykin/properties/equations/base.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
equation
staticmethod
¤
equation(
T: Union[float, FloatArray],
a: float,
b: float,
c: float,
d: float,
Pc: float,
Tc: float,
) -> Union[float, FloatArray]
Wagner equation.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
a
|
Parameter of equation.
TYPE:
|
b
|
Parameter of equation.
TYPE:
|
c
|
Parameter of equation.
TYPE:
|
d
|
Parameter of equation.
TYPE:
|
Pc
|
Critical pressure. Unit = Any.
TYPE:
|
Tc
|
Critical temperature. Unit = K.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Vapor pressure. Unit = [Pc]. |
Source code in src/polykin/properties/equations/vapor_pressure.py
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 |
|
fit ¤
fit(
T: FloatVectorLike,
Y: FloatVectorLike,
sigmaY: Optional[FloatVectorLike] = None,
fit_only: Optional[list[str]] = None,
logY: bool = False,
plot: bool = True,
) -> dict
Fit equation to data using non-linear regression.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
Y
|
Property to be fitted. Unit = Any.
TYPE:
|
sigmaY
|
Standard deviation of Y. Unit = [Y].
TYPE:
|
fit_only
|
List with name of parameters to be fitted.
TYPE:
|
logY
|
If
TYPE:
|
plot
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict
|
A dictionary of results with the following keys: 'success', 'parameters', 'covariance', and 'plot'. |
Source code in src/polykin/properties/equations/base.py
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 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
plot ¤
plot(
kind: Literal[
"linear", "semilogy", "Arrhenius"
] = "linear",
Trange: Optional[tuple[float, float]] = None,
Tunit: Literal["C", "K"] = "K",
title: Optional[str] = None,
axes: Optional[Axes] = None,
return_objects: bool = False,
) -> Optional[tuple[Optional[Figure], Axes]]
Plot quantity as a function of temperature.
PARAMETER | DESCRIPTION |
---|---|
kind
|
Kind of plot to be generated.
TYPE:
|
Trange
|
Temperature range for x-axis. If
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
title
|
Title of plot. If
TYPE:
|
axes
|
Matplotlib Axes object.
TYPE:
|
return_objects
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Figure | None, Axes] | None
|
Figure and Axes objects if return_objects is |
Source code in src/polykin/properties/equations/base.py
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 |
|
Yaws ¤
Yaws equation for saturated liquid viscosity.
This equation implements the following temperature dependence:
where \(A\) to \(D\) are component-specific constants, \(\mu\) is the liquid viscosity, and \(T\) is the temperature. When \(C=D=0\), this equation reverts to the Andrade equation.
PARAMETER | DESCRIPTION |
---|---|
A
|
Parameter of equation.
TYPE:
|
B
|
Parameter of equation. Unit = K.
TYPE:
|
C
|
Parameter of equation. Unit = K⁻¹.
TYPE:
|
D
|
Parameter of equation. Unit = K⁻².
TYPE:
|
base10
|
If
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
unit
|
Unit of viscosity.
TYPE:
|
symbol
|
Symbol of viscosity.
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/properties/equations/viscosity.py
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 |
|
__call__ ¤
__call__(
T: Union[float, FloatArrayLike],
Tunit: Literal["C", "K"] = "K",
) -> Union[float, FloatArray]
Evaluate property equation at given temperature, including unit conversion and range check.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature.
Unit =
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Correlation value. |
Source code in src/polykin/properties/equations/base.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
__init__ ¤
__init__(
A: float,
B: float,
C: float = 0.0,
D: float = 0.0,
base10: bool = True,
Tmin: float = 0.0,
Tmax: float = np.inf,
unit: str = "Pa·s",
symbol: str = "\\mu",
name: str = "",
) -> None
Construct Yaws
with the given parameters.
Source code in src/polykin/properties/equations/viscosity.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
equation
staticmethod
¤
equation(
T: Union[float, FloatArray],
A: float,
B: float,
C: float,
D: float,
base10: bool,
) -> Union[float, FloatArray]
Yaws equation.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
A
|
Parameter of equation.
TYPE:
|
B
|
Parameter of equation. Unit = K.
TYPE:
|
C
|
Parameter of equation. Unit = K⁻¹.
TYPE:
|
D
|
Parameter of equation. Unit = K⁻².
TYPE:
|
base10
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Viscosity. Unit = Any. |
Source code in src/polykin/properties/equations/viscosity.py
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 |
|
fit ¤
fit(
T: FloatVectorLike,
Y: FloatVectorLike,
sigmaY: Optional[FloatVectorLike] = None,
fit_only: Optional[list[str]] = None,
logY: bool = False,
plot: bool = True,
) -> dict
Fit equation to data using non-linear regression.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
Y
|
Property to be fitted. Unit = Any.
TYPE:
|
sigmaY
|
Standard deviation of Y. Unit = [Y].
TYPE:
|
fit_only
|
List with name of parameters to be fitted.
TYPE:
|
logY
|
If
TYPE:
|
plot
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict
|
A dictionary of results with the following keys: 'success', 'parameters', 'covariance', and 'plot'. |
Source code in src/polykin/properties/equations/base.py
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 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
plot ¤
plot(
kind: Literal[
"linear", "semilogy", "Arrhenius"
] = "linear",
Trange: Optional[tuple[float, float]] = None,
Tunit: Literal["C", "K"] = "K",
title: Optional[str] = None,
axes: Optional[Axes] = None,
return_objects: bool = False,
) -> Optional[tuple[Optional[Figure], Axes]]
Plot quantity as a function of temperature.
PARAMETER | DESCRIPTION |
---|---|
kind
|
Kind of plot to be generated.
TYPE:
|
Trange
|
Temperature range for x-axis. If
TYPE:
|
Tunit
|
Temperature unit.
TYPE:
|
title
|
Title of plot. If
TYPE:
|
axes
|
Matplotlib Axes object.
TYPE:
|
return_objects
|
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Figure | None, Axes] | None
|
Figure and Axes objects if return_objects is |
Source code in src/polykin/properties/equations/base.py
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 |
|
geometric_interaction_mixing ¤
geometric_interaction_mixing(
y: FloatVector,
Q: FloatVector,
k: FloatSquareMatrix | None = None,
) -> float
Calculate a mixture parameter using a geometric average with interaction.
with \(k_{ii}=0\) and \(k_{i,j}=k_{j,i}\).
Note
Only the entries above the main diagonal of \(k_{i,j}\) are used.
References
- RC Reid, JM Prausniz, and BE Poling. The properties of gases & liquids 4th edition, 1986, p. 75.
PARAMETER | DESCRIPTION |
---|---|
y
|
Composition, usually molar or mass fractions.
TYPE:
|
Q
|
Pure component property.
TYPE:
|
k
|
Binary interaction parameter matrix.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Mixture parameter, \(Q_m\). Unit = [Q]. |
Source code in src/polykin/properties/mixing_rules.py
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 |
|
plotequations ¤
plotequations(
eqs: list[PropertyEquationT],
kind: Literal[
"linear", "semilogy", "Arrhenius"
] = "linear",
title: Optional[str] = None,
**kwargs
) -> Figure
Plot a list of temperature-dependent property equations in a combined plot.
PARAMETER | DESCRIPTION |
---|---|
eqs
|
List of property equations to be ploted together.
TYPE:
|
kind
|
Kind of plot to be generated.
TYPE:
|
title
|
Title of plot.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Figure
|
Matplotlib Figure object holding the combined plot. |
Source code in src/polykin/properties/equations/base.py
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
|
pseudocritical_properties ¤
pseudocritical_properties(
y: FloatVector,
Tc: FloatVector,
Pc: FloatVector,
Zc: FloatVector,
w: FloatVector | None = None,
) -> tuple[float, float, float, float, float]
Calculate the pseudocritial properties of a mixture to use in corresponding states correlations.
where the meaning of the parameters is as defined below.
References
- RC Reid, JM Prausniz, and BE Poling. The properties of gases & liquids 4th edition, 1986, p. 76-77.
PARAMETER | DESCRIPTION |
---|---|
y
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
Tc
|
Critical temperatures of all components. Unit = K.
TYPE:
|
Pc
|
Critical pressures of all components. Unit = Pa.
TYPE:
|
Zc
|
Critical compressibility factors of all components.
TYPE:
|
w
|
Acentric factors of all components.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[float, float, float, float, float]
|
Tuple of pseudocritial properties, \((T_{cm}, P_{cm}, v_{cm}, Z_{cm}, \omega_{cm})\). |
Source code in src/polykin/properties/mixing_rules.py
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 |
|
quadratic_mixing ¤
quadratic_mixing(
y: FloatVector, Q: FloatSquareMatrix
) -> float
Calculate a mixture parameter using a quadratic mixing rule.
Note
For the sake of generality, no assumptions are made regarding the symmetry of \(Q_{ij}\). The full matrix must be supplied and will be used as given.
References
- RC Reid, JM Prausniz, and BE Poling. The properties of gases & liquids 4th edition, 1986, p. 75.
PARAMETER | DESCRIPTION |
---|---|
y
|
Composition, usually molar or mass fractions.
TYPE:
|
Q
|
Matrix of pure component and interaction parameters.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Mixture parameter, \(Q_m\). Unit = [Q]. |
Source code in src/polykin/properties/mixing_rules.py
17 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 |
|