polykin.kinetics¤
Arrhenius ¤
Arrhenius kinetic rate coefficient.
This class implements the following temperature dependence:
where \(T_0\) is a reference temperature, \(E_a\) is the activation energy, and \(k_0=k(T_0)\). In the limit \(T\rightarrow+\infty\), the usual form of the Arrhenius equation with \(k_0=A\) is recovered.
PARAMETER | DESCRIPTION |
---|---|
k0
|
Coefficient value at the reference temperature, \(k_0=k(T_0)\).
Unit =
TYPE:
|
EaR
|
Energy of activation, \(E_a/R\). Unit = K.
TYPE:
|
T0
|
Reference temperature, \(T_0\). Unit = K.
TYPE:
|
Tmin
|
Lower temperature bound. Unit = K.
TYPE:
|
Tmax
|
Upper temperature bound. Unit = K.
TYPE:
|
unit
|
Unit of coefficient.
TYPE:
|
symbol
|
Symbol of coefficient \(k\).
TYPE:
|
name
|
Name.
TYPE:
|
See also
Eyring
: alternative method.
Examples:
Define and evaluate the propagation rate coefficient of styrene.
>>> from polykin.kinetics import Arrhenius
>>> kp = Arrhenius(
... 10**7.63, # pre-exponential factor
... 32.5e3/8.314, # Ea/R, K
... Tmin=261., Tmax=366.,
... symbol='k_p',
... unit='L/mol/s',
... name='kp of styrene')
>>> kp(25.,'C')
86.28385101961442
Source code in src/polykin/kinetics/arrhenius.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 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
|
__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 |
|
__mul__ ¤
__mul__(other: Union[int, float, Arrhenius]) -> Arrhenius
Multipy Arrhenius coefficient(s).
Create a new Arrhenius coefficient from a product of two Arrhenius coefficients with identical shapes or a product of an Arrhenius coefficient and a numerical constant.
PARAMETER | DESCRIPTION |
---|---|
other
|
Another Arrhenius coefficient or number.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Arrhenius
|
Product coefficient. |
Source code in src/polykin/kinetics/arrhenius.py
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 |
|
__pow__ ¤
__pow__(other: Union[int, float]) -> Arrhenius
Power of an Arrhenius coefficient.
Create a new Arrhenius coefficient from the exponentiation of an Arrhenius coefficient.
PARAMETER | DESCRIPTION |
---|---|
other
|
Exponent.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Arrhenius
|
Power coefficient. |
Source code in src/polykin/kinetics/arrhenius.py
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 |
|
__truediv__ ¤
__truediv__(
other: Union[int, float, Arrhenius]
) -> Arrhenius
Divide Arrhenius coefficient(s).
Create a new Arrhenius coefficient from a division of two Arrhenius coefficients with identical shapes or a division involving an Arrhenius coefficient and a numerical constant.
PARAMETER | DESCRIPTION |
---|---|
other
|
Another Arrhenius coefficient or number.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Arrhenius
|
Quotient coefficient. |
Source code in src/polykin/kinetics/arrhenius.py
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 |
|
equation
staticmethod
¤
equation(
T: Union[float, FloatArray],
k0: Union[float, FloatArray],
EaR: Union[float, FloatArray],
T0: Union[float, FloatArray],
) -> Union[float, FloatArray]
Arrhenius equation.
PARAMETER | DESCRIPTION |
---|---|
T
|
Temperature. Unit = K.
TYPE:
|
k0
|
Coefficient value at the reference temperature, \(k_0=k(T_0)\). Unit = Any.
TYPE:
|
EaR
|
Energy of activation, \(E_a/R\). Unit = K.
TYPE:
|
T0
|
Reference temperature, \(T_0\). Unit = K.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float | FloatArray
|
Coefficient value. Unit = [k0]. |
Source code in src/polykin/kinetics/arrhenius.py
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 |
|
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 |
|