Activity Coefficient Models (polykin.thermo.acm)¤
This module implements activity models often used in polymer reactor models.
FloryHuggins ¤
Flory-Huggings multicomponent activity coefficient model.
This model is based on the following Gibbs energy of mixing per mole of sites:
where \(\phi_i\) are the volume, mass or segment fractions of the components, \(\chi_{ij}\) are the interaction parameters, and \(m_i\) is the characteristic size of the components.
In this particular implementation, the interaction parameters are allowed to depend on temperature according to the following empirical relationship (as used in Aspen Plus):
Moreover, \(\chi_{ij}=\chi_{ji}\) and \(\chi_{ii}=0\).
References
- P.J. Flory, Principles of polymer chemistry, 1953.
PARAMETER | DESCRIPTION |
---|---|
N
|
Number of components.
TYPE:
|
a
|
Matrix (N,N) of parameters, by default 0. Only the upper triangle must be supplied.
TYPE:
|
b
|
Matrix (N,N) of parameters, by default 0. Only the upper triangle must be supplied.
TYPE:
|
c
|
Matrix (N,N) of parameters, by default 0. Only the upper triangle must be supplied.
TYPE:
|
d
|
Matrix (N,N) of parameters, by default 0. Only the upper triangle must be supplied.
TYPE:
|
e
|
Matrix (N,N) of parameters, by default 0. Only the upper triangle must be supplied.
TYPE:
|
Source code in src/polykin/thermo/acm/floryhuggins.py
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 |
|
Dgmix ¤
Dgmix(
T: Number, phi: FloatVector, m: FloatVector
) -> Number
Gibbs energy of mixing per mole of sites, \(\Delta g_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
phi
|
Volume, mass or segment fractions of all components.
TYPE:
|
m
|
Characteristic size of all components, typically equal to 1 for small molecules and equal to the average degree of polymerization for polymers.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Gibbs energy of mixing per mole of sites. Unit = J/mol. |
Source code in src/polykin/thermo/acm/floryhuggins.py
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 |
|
Dhmix ¤
Dhmix(T: float, phi: FloatVector, m: FloatVector) -> float
Enthalpy of mixing per mole of sites, \(\Delta h_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
phi
|
Volume, mass or segment fractions of all components.
TYPE:
|
m
|
Characteristic size of all components, typically equal to 1 for small molecules and equal to the average degree of polymerization for polymers.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Enthalpy of mixing per mole of sites. Unit = J/mol. |
Source code in src/polykin/thermo/acm/floryhuggins.py
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 |
|
Dsmix ¤
Dsmix(T: float, phi: FloatVector, m: FloatVector) -> float
Entropy of mixing per mole of sites, \(\Delta s_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
phi
|
Volume, mass or segment fractions of all components.
TYPE:
|
m
|
Characteristic size of all components, typically equal to 1 for small molecules and equal to the average degree of polymerization for polymers.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Entropy of mixing per mole of sites. Unit = J/(mol·K). |
Source code in src/polykin/thermo/acm/floryhuggins.py
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 |
|
__init__ ¤
__init__(
N: int,
a: Optional[FloatSquareMatrix] = None,
b: Optional[FloatSquareMatrix] = None,
c: Optional[FloatSquareMatrix] = None,
d: Optional[FloatSquareMatrix] = None,
e: Optional[FloatSquareMatrix] = None,
) -> None
Construct FloryHuggins
with the given parameters.
Source code in src/polykin/thermo/acm/floryhuggins.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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
|
a ¤
a(
T: float, phi: FloatVector, m: FloatVector
) -> FloatVector
Activities, \(a_i\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
phi
|
Volume, mass or segment fractions of all components.
TYPE:
|
m
|
Characteristic size of all components, typically equal to 1 for small molecules and equal to the average degree of polymerization for polymers.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector
|
Activities of all components. |
Source code in src/polykin/thermo/acm/floryhuggins.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
|
chi
cached
¤
chi(T: float) -> FloatSquareMatrix
Compute the matrix of interaction parameters.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatSquareMatrix
|
Matrix of interaction parameters. |
Source code in src/polykin/thermo/acm/floryhuggins.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
|
FloryHuggins2_activity ¤
FloryHuggins2_activity(
phi1: Union[float, FloatArray],
m: Union[float, FloatArray],
chi: Union[float, FloatArray],
) -> Union[float, FloatArray]
Calculate the solvent activity of a binary polymer solution according to the Flory-Huggins model.
where \(\phi_1\) is the volume, mass or segment fraction of the solvent in the solution, \(\chi\) is the solvent-polymer interaction parameter, and \(m\) is the ratio of the molar volume of the polymer to the solvent, often approximated as the degree of polymerization.
Note
The Flory-Huggins model was originally formulated using the volume fraction as primary composition variable, but many authors prefer mass fractions in order to skip issues with densities, etc. This equation can be used in all cases, as long as \(\phi_1\) is taken to be the same variable used to estimate \(\chi\). For example, if a given publication reports values of \(\chi\) estimated with the mass fraction version of the Flory-Huggins model, then \(\phi_1\) should be the mass fraction of solvent.
References
- P.J. Flory, Principles of polymer chemistry, 1953.
PARAMETER | DESCRIPTION |
---|---|
phi1
|
Volume, mass, or segment fraction of solvent in the solution, \(\phi_1\). The composition variable must match the one used in the determination of \(\chi\).
TYPE:
|
m
|
Ratio of the molar volume of the polymer chain to the solvent, often approximated as the degree of polymerization.
TYPE:
|
chi
|
Solvent-polymer interaction parameter, \(\chi\).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector
|
Activity of the solvent. |
See also
FloryHuggins_activity
: equivalent method for multicomponent systems.
Examples:
Calculate the activity of ethylbenzene in a ethylbenzene-polybutadiene solution with 25 wt% solvent content. Assume \(\chi=0.29\).
>>> from polykin.thermo.acm import FloryHuggins2_gamma
>>> gamma = FloryHuggins2_gamma(phi1=0.25, m=1e6, chi=0.29)
>>> print(f"{gamma:.2f}")
0.62
Source code in src/polykin/thermo/acm/floryhuggins.py
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 381 |
|
FloryHuggins_activity ¤
FloryHuggins_activity(
phi: FloatVector, m: FloatVector, chi: FloatSquareMatrix
) -> FloatVector
Calculate the activities of a multicomponent mixture according to the Flory-Huggins model.
where \(\phi_i\) are the volume, mass or segment fractions of the components, \(\chi_{ij}\) are the interaction parameters, and \(m_i\) is the characteristic size of the components.
Note
The Flory-Huggins model was originally formulated using the volume fraction as primary composition variable, but many authors prefer mass fractions in order to skip issues with densities, etc. This equation can be used in all cases, as long as \(\phi\) is taken to be the same variable used to estimate \(\chi\). In this particular implementation, the matrix of interaction parameters is independent of molecular size and, thus, symmetric.
References
- P.J. Flory, Principles of polymer chemistry, 1953.
- Lindvig, Thomas, et al. "Modeling of multicomponent vapor-liquid equilibria for polymer-solvent systems." Fluid phase equilibria 220.1 (2004): 11-20.
PARAMETER | DESCRIPTION |
---|---|
phi
|
Volume, mass or segment fractions of all components, \(\phi_i\). The composition variable must match the one used in the determination of \(\chi_{ij}\).
TYPE:
|
m
|
Characteristic size of all components, typically equal to 1 for small molecules and equal to the average degree of polymerization for polymers.
TYPE:
|
chi
|
Matrix (N,N) of interaction parameters, \(\chi_{ij}\). It is expected (but not checked) that \(\chi_{ij}=\chi_{ji}\) and \(\chi_{ii}=0\).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector
|
Activities of all components. |
See also
FloryHuggins2_activity
: equivalent method for binary solvent-polymer systems.
Source code in src/polykin/thermo/acm/floryhuggins.py
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 310 311 312 313 314 315 |
|
IdealSolution ¤
Ideal solution model.
This model is based on the following trivial molar excess Gibbs energy expression:
PARAMETER | DESCRIPTION |
---|---|
N
|
Number of components.
TYPE:
|
name
|
Name.
TYPE:
|
Source code in src/polykin/thermo/acm/ideal.py
14 15 16 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 |
|
Dgmix ¤
Dgmix(T: float, x: FloatVector) -> float
Molar Gibbs energy of mixing, \(\Delta g_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar Gibbs energy of mixing. Unit = J/mol. |
Source code in src/polykin/thermo/acm/base.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
Dhmix ¤
Dhmix(T: float, x: FloatVector) -> float
Molar enthalpy of mixing, \(\Delta h_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar enthalpy of mixing. Unit = J/mol. |
Source code in src/polykin/thermo/acm/base.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
Dsmix ¤
Dsmix(T: float, x: FloatVector) -> float
Molar entropy of mixing, \(\Delta s_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar entropy of mixing. Unit = J/(mol·K). |
Source code in src/polykin/thermo/acm/base.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
activity ¤
activity(T: float, x: FloatVector) -> FloatVector
Activities, \(a_i\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector(N)
|
Activities of all components. |
Source code in src/polykin/thermo/acm/base.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
gE ¤
gE(T: float, x: FloatVector) -> float
Molar excess Gibbs energy, \(g^{E}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar excess Gibbs energy. Unit = J/mol. |
Source code in src/polykin/thermo/acm/ideal.py
37 38 |
|
gamma ¤
gamma(T: float, x: FloatVector) -> FloatVector
Activity coefficients based on mole fraction, \(\gamma_i\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector(N)
|
Activity coefficients of all components. |
Source code in src/polykin/thermo/acm/ideal.py
40 41 |
|
hE ¤
hE(T: float, x: FloatVector) -> float
Molar excess enthalpy, \(h^{E}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar excess enthalpy. Unit = J/mol. |
Source code in src/polykin/thermo/acm/base.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
sE ¤
sE(T: float, x: FloatVector) -> float
Molar excess entropy, \(s^{E}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar excess entropy. Unit = J/(mol·K). |
Source code in src/polykin/thermo/acm/base.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
|
NRTL ¤
NRTL multicomponent activity coefficient model.
This model is based on the following molar excess Gibbs energy expression:
where \(x_i\) are the mole fractions, \(\tau_{ij}\) are the interaction parameters, \(\alpha_{ij}\) are the non-randomness parameters, and \(G_{ij}=\exp(-\alpha_{ij} \tau_{ij})\).
In this particular implementation, the model parameters are allowed to depend on temperature according to the following empirical relationship (as done in Aspen Plus):
Moreover, \(\tau_{ij}\neq\tau_{ji}\), \(\tau_{ii}=0\), and \(\alpha_{ij}=\alpha_{ji}\).
References
- Renon, H. and Prausnitz, J.M. (1968), Local compositions in thermodynamic excess functions for liquid mixtures. AIChE J., 14: 135-144.
PARAMETER | DESCRIPTION |
---|---|
N
|
Number of components.
TYPE:
|
a
|
Matrix of interaction parameters, by default 0.
TYPE:
|
b
|
Matrix of interaction parameters, by default 0. Unit = K.
TYPE:
|
c
|
Matrix of interaction parameters, by default 0.3. Only the upper triangle must be supplied.
TYPE:
|
d
|
Matrix of interaction parameters, by default 0. Only the upper triangle must be supplied. Unit = 1/K.
TYPE:
|
e
|
Matrix of interaction parameters, by default 0.
TYPE:
|
f
|
Matrix of interaction parameters, by default 0.
TYPE:
|
name
|
Name.
TYPE:
|
See also
NRTL_gamma
: related activity coefficient method.
Source code in src/polykin/thermo/acm/nrtl.py
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 |
|
Dgmix ¤
Dgmix(T: float, x: FloatVector) -> float
Molar Gibbs energy of mixing, \(\Delta g_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar Gibbs energy of mixing. Unit = J/mol. |
Source code in src/polykin/thermo/acm/base.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
Dhmix ¤
Dhmix(T: float, x: FloatVector) -> float
Molar enthalpy of mixing, \(\Delta h_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar enthalpy of mixing. Unit = J/mol. |
Source code in src/polykin/thermo/acm/base.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
Dsmix ¤
Dsmix(T: float, x: FloatVector) -> float
Molar entropy of mixing, \(\Delta s_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar entropy of mixing. Unit = J/(mol·K). |
Source code in src/polykin/thermo/acm/base.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
activity ¤
activity(T: float, x: FloatVector) -> FloatVector
Activities, \(a_i\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector(N)
|
Activities of all components. |
Source code in src/polykin/thermo/acm/base.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
alpha
cached
¤
alpha(T: float) -> FloatSquareMatrix
Compute matrix of non-randomness parameters.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatSquareMatrix(N, N)
|
Non-randomness parameters. |
Source code in src/polykin/thermo/acm/nrtl.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
|
gE ¤
gE(T: float, x: FloatVector) -> float
Molar excess Gibbs energy, \(g^{E}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar excess Gibbs energy. Unit = J/mol. |
Source code in src/polykin/thermo/acm/nrtl.py
183 184 185 186 187 188 189 |
|
gamma ¤
gamma(T: float, x: FloatVector) -> FloatVector
Activity coefficients based on mole fraction, \(\gamma_i\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector(N)
|
Activity coefficients of all components. |
Source code in src/polykin/thermo/acm/nrtl.py
191 192 |
|
hE ¤
hE(T: float, x: FloatVector) -> float
Molar excess enthalpy, \(h^{E}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar excess enthalpy. Unit = J/mol. |
Source code in src/polykin/thermo/acm/base.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
sE ¤
sE(T: float, x: FloatVector) -> float
Molar excess entropy, \(s^{E}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar excess entropy. Unit = J/(mol·K). |
Source code in src/polykin/thermo/acm/base.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
|
tau
cached
¤
tau(T: float) -> FloatSquareMatrix
Compute the matrix of interaction parameters.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatSquareMatrix(N, N)
|
Interaction parameters. |
Source code in src/polykin/thermo/acm/nrtl.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
|
NRTL_gamma ¤
NRTL_gamma(
x: FloatVector,
tau: FloatSquareMatrix,
alpha: FloatSquareMatrix,
) -> FloatVector
Calculate the activity coefficients of a multicomponent mixture according to the NRTL model.
where \(x_i\) are the mole fractions, \(\tau_{ij}\) are the interaction parameters, \(\alpha_{ij}\) are the non-randomness parameters, and \(G_{ij}=\exp(-\alpha_{ij} \tau_{ij})\).
References
- Renon, H. and Prausnitz, J.M. (1968), Local compositions in thermodynamic excess functions for liquid mixtures. AIChE J., 14: 135-144.
PARAMETER | DESCRIPTION |
---|---|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
tau
|
Interaction parameters, \(\tau_{ij}\). It is expected (but not checked) that \(\tau_{ii}=0\).
TYPE:
|
alpha
|
Non-randomness parameters, \(\alpha_{ij}\). It is expected (but not checked) that \(\alpha_{ij}=\alpha_{ji}\).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector(N)
|
Activity coefficients of all components. |
See also
NRTL
: related class.
Source code in src/polykin/thermo/acm/nrtl.py
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 |
|
UNIQUAC ¤
UNIQUAC multicomponent activity coefficient model.
This model is based on the following molar excess Gibbs energy expression:
with:
where \(x_i\) are the mole fractions, \(q_i\) (a relative surface) and \(r_i\) (a relative volume) denote the pure-component parameters, and \(\tau_{ij}\) are the interaction parameters.
In this particular implementation, the interaction parameters are allowed to depend on temperature according to the following empirical relationship (as done in Aspen Plus):
Moreover, \(\tau_{ij} \neq \tau_{ji}\) and \(\tau_{ii}=1\).
References
- Abrams, D.S. and Prausnitz, J.M. (1975), Statistical thermodynamics of liquid mixtures: A new expression for the excess Gibbs energy of partly or completely miscible systems. AIChE J., 21: 116-128.
PARAMETER | DESCRIPTION |
---|---|
N
|
Number of components.
TYPE:
|
q
|
Relative surface areas of all components.
TYPE:
|
r
|
Relative volumes of all components.
TYPE:
|
a
|
Matrix of interaction parameters, by default 0.
TYPE:
|
b
|
Matrix of interaction parameters, by default 0. Unit = K.
TYPE:
|
c
|
Matrix of interaction parameters, by default 0.
TYPE:
|
d
|
Matrix of interaction parameters, by default 0.
TYPE:
|
name
|
Name.
TYPE:
|
See also
UNIQUAC_gamma
: related activity coefficient method.
Source code in src/polykin/thermo/acm/uniquac.py
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 |
|
Dgmix ¤
Dgmix(T: float, x: FloatVector) -> float
Molar Gibbs energy of mixing, \(\Delta g_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar Gibbs energy of mixing. Unit = J/mol. |
Source code in src/polykin/thermo/acm/base.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
Dhmix ¤
Dhmix(T: float, x: FloatVector) -> float
Molar enthalpy of mixing, \(\Delta h_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar enthalpy of mixing. Unit = J/mol. |
Source code in src/polykin/thermo/acm/base.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
Dsmix ¤
Dsmix(T: float, x: FloatVector) -> float
Molar entropy of mixing, \(\Delta s_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar entropy of mixing. Unit = J/(mol·K). |
Source code in src/polykin/thermo/acm/base.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
activity ¤
activity(T: float, x: FloatVector) -> FloatVector
Activities, \(a_i\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector(N)
|
Activities of all components. |
Source code in src/polykin/thermo/acm/base.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
gE ¤
gE(T: float, x: FloatVector) -> float
Molar excess Gibbs energy, \(g^{E}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar excess Gibbs energy. Unit = J/mol. |
Source code in src/polykin/thermo/acm/uniquac.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
|
gamma ¤
gamma(T: float, x: FloatVector) -> FloatVector
Activity coefficients based on mole fraction, \(\gamma_i\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector(N)
|
Activity coefficients of all components. |
Source code in src/polykin/thermo/acm/uniquac.py
178 179 180 181 182 |
|
hE ¤
hE(T: float, x: FloatVector) -> float
Molar excess enthalpy, \(h^{E}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar excess enthalpy. Unit = J/mol. |
Source code in src/polykin/thermo/acm/base.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
sE ¤
sE(T: float, x: FloatVector) -> float
Molar excess entropy, \(s^{E}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar excess entropy. Unit = J/(mol·K). |
Source code in src/polykin/thermo/acm/base.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
|
tau
cached
¤
tau(T: float) -> FloatSquareMatrix
Compute the matrix of interaction parameters.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatSquareMatrix(N, N)
|
Interaction parameters. |
Source code in src/polykin/thermo/acm/uniquac.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
UNIQUAC_gamma ¤
UNIQUAC_gamma(
x: FloatVector,
q: FloatVector,
r: FloatVector,
tau: FloatSquareMatrix,
) -> FloatVector
Calculate the activity coefficients of a multicomponent mixture according to the UNIQUAC model.
with:
where \(x_i\) are the mole fractions, \(q_i\) and \(r_i\) denote the pure-component parameters, and \(\tau_{ij}\) are the interaction parameters.
References
- Abrams, D.S. and Prausnitz, J.M. (1975), Statistical thermodynamics of liquid mixtures: A new expression for the excess Gibbs energy of partly or completely miscible systems. AIChE J., 21: 116-128.
- JM Smith, HC Van Ness, MM Abbott. Introduction to chemical engineering thermodynamics, 5th edition, 1996, p. 740-741.
PARAMETER | DESCRIPTION |
---|---|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
q
|
Relative surface areas of all components.
TYPE:
|
r
|
Relative volumes of all components.
TYPE:
|
tau
|
Interaction parameters, \(\tau_{ij}\). It is expected (but not checked) that \(\tau_{ii}=1\).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector(N)
|
Activity coefficients of all components. |
See also
UNIQUAC
: related class.
Source code in src/polykin/thermo/acm/uniquac.py
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 |
|
Wilson ¤
Wilson multicomponent activity coefficient model.
This model is based on the following molar excess Gibbs energy expression:
where \(x_i\) are the mole fractions and \(\Lambda_{ij}\) are the interaction parameters.
In this particular implementation, the interaction parameters are allowed to depend on temperature according to the following empirical relationship (as done in Aspen Plus):
Moreover, \(\Lambda_{ij} \neq \Lambda_{ji}\) and \(\Lambda_{ii}=1\).
References
- G.M. Wilson, J. Am. Chem. Soc., 1964, 86, 127.
PARAMETER | DESCRIPTION |
---|---|
N
|
Number of components.
TYPE:
|
a
|
Matrix of interaction parameters, by default 0.
TYPE:
|
b
|
Matrix of interaction parameters, by default 0. Unit = K.
TYPE:
|
c
|
Matrix of interaction parameters, by default 0.
TYPE:
|
d
|
Matrix of interaction parameters, by default 0.
TYPE:
|
name
|
Name.
TYPE:
|
See also
Wilson_gamma
: related activity coefficient method.
Source code in src/polykin/thermo/acm/wilson.py
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 |
|
Dgmix ¤
Dgmix(T: float, x: FloatVector) -> float
Molar Gibbs energy of mixing, \(\Delta g_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar Gibbs energy of mixing. Unit = J/mol. |
Source code in src/polykin/thermo/acm/base.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
Dhmix ¤
Dhmix(T: float, x: FloatVector) -> float
Molar enthalpy of mixing, \(\Delta h_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar enthalpy of mixing. Unit = J/mol. |
Source code in src/polykin/thermo/acm/base.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
Dsmix ¤
Dsmix(T: float, x: FloatVector) -> float
Molar entropy of mixing, \(\Delta s_{mix}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar entropy of mixing. Unit = J/(mol·K). |
Source code in src/polykin/thermo/acm/base.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
Lambda
cached
¤
Lambda(T: float) -> FloatSquareMatrix
Compute the matrix of interaction parameters.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatSquareMatrix(N, N)
|
Interaction parameters. |
Source code in src/polykin/thermo/acm/wilson.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
|
activity ¤
activity(T: float, x: FloatVector) -> FloatVector
Activities, \(a_i\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector(N)
|
Activities of all components. |
Source code in src/polykin/thermo/acm/base.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
gE ¤
gE(T: float, x: FloatVector) -> float
Molar excess Gibbs energy, \(g^{E}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar excess Gibbs energy. Unit = J/mol. |
Source code in src/polykin/thermo/acm/wilson.py
131 132 |
|
gamma ¤
gamma(T: float, x: FloatVector) -> FloatVector
Activity coefficients based on mole fraction, \(\gamma_i\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector(N)
|
Activity coefficients of all components. |
Source code in src/polykin/thermo/acm/wilson.py
134 135 |
|
hE ¤
hE(T: float, x: FloatVector) -> float
Molar excess enthalpy, \(h^{E}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar excess enthalpy. Unit = J/mol. |
Source code in src/polykin/thermo/acm/base.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
sE ¤
sE(T: float, x: FloatVector) -> float
Molar excess entropy, \(s^{E}\).
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Molar excess entropy. Unit = J/(mol·K). |
Source code in src/polykin/thermo/acm/base.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
|
Wilson_gamma ¤
Wilson_gamma(
x: FloatVector, Lambda: FloatSquareMatrix
) -> FloatVector
Calculate the activity coefficients of a multicomponent mixture according to the Wilson model.
where \(x_i\) are the mole fractions and \(\Lambda_{ij}\) are the interaction parameters.
References
- G.M. Wilson, J. Am. Chem. Soc., 1964, 86, 127.
PARAMETER | DESCRIPTION |
---|---|
x
|
Mole fractions of all components. Unit = mol/mol.
TYPE:
|
Lambda
|
Interaction parameters, \(\Lambda_{ij}\). It is expected (but not checked) that \(\Lambda_{ii}=1\).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatVector(N)
|
Activity coefficients of all components. |
See also
Wilson
: related class.
Source code in src/polykin/thermo/acm/wilson.py
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 |
|