zephyrus.diffusion
diffusion
diffusion.py
Binary diffusion parameters b = n D with provenance, and mixture rules.
Authors: Mara Attia, Viesturs Strelcs
Row(i, j, b1000, exponent, provenance, uncertainty, source)
One unordered species pair of the library, b(T) = b1000 (T/1000 K)^s.
Source code in src/zephyrus/diffusion.py
336 337 338 339 340 341 342 | |
b(T)
The pair's b = n D at temperature T, in cm^-1 s^-1.
Source code in src/zephyrus/diffusion.py
348 349 350 | |
diameters()
Kinetic diameters in pm: printed values plus the van der Waals rule.
Source code in src/zephyrus/diffusion.py
63 64 65 66 67 68 69 | |
b_from_sn88(f_value, T_of_table)
Convert a Sasaki & Nakazawa (1988) Table 1 entry to b = n D in cm^-1 s^-1.
Source code in src/zephyrus/diffusion.py
140 141 142 | |
sn88_fit(species, partner, t_lo=1000, t_hi=10000)
Fit b = A T^s to two Sasaki & Nakazawa temperature points.
Defaults to the 1000 and 10000 K points, both above the 242 K validity
floor their footnote attaches to the coldest column. Returns (A, s).
Source code in src/zephyrus/diffusion.py
145 146 147 148 149 150 151 152 153 154 155 | |
b_zk86(species, partner, T)
Zahnle & Kasting (1986) Table I fit b = A T^s, in cm^-1 s^-1.
Source code in src/zephyrus/diffusion.py
191 192 193 194 | |
eq10(b_anchor, target, anchor, mass, diam)
Zahnle & Kasting (2023) Eq. (10): scale b between pairs.
b_ij = b_kl sqrt((1/m_i + 1/m_j) / (1/m_k + 1/m_l))
((d_k + d_l) / (d_i + d_j))^2, the reduced-mass and hard-sphere
diameter scaling their own estimated rows are built with. Masses in amu
and diameters in pm (the units cancel).
Source code in src/zephyrus/diffusion.py
243 244 245 246 247 248 249 250 251 252 253 254 255 | |
build_rows(species)
Assemble one Row per unordered pair of species.
Source order: the Zahnle & Kasting (2023) Table 2 row where one is
printed (measured or estimated, at its printed value); the Sasaki &
Nakazawa (1988) noble-gas rows; otherwise the Eq. (10) scaling from the
measured Table 2 anchors, with the provenance class recording that the
row is scaled and whether it rests on an estimated diameter. A species
with no kinetic diameter (Al, P, Cl, K, Ca, Ti) takes the row of its
nearest-mass covered substitute, in the substituted class.
Source code in src/zephyrus/diffusion.py
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 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 | |
bmatrix(species, T, rows=None)
Symmetric b matrix in cm^-1 s^-1, with np.inf on the diagonal.
The infinite diagonal is the convention the fractionation closure expects (a species does not diffuse against itself).
Source code in src/zephyrus/diffusion.py
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | |
masses_g(species)
Particle masses in g for the closure, from the shared mass table.
Source code in src/zephyrus/diffusion.py
442 443 444 445 446 447 | |
b_pair(sp_i, sp_j, T)
Binary diffusion parameter b = n D for one pair, in SI [m^-1 s^-1].
The fallback order, most trusted source first: a measured Zahnle & Kasting (2023) Table 2 row; the molecular-background table; the rest of the atomic library (estimated Table 2 rows, the Sasaki & Nakazawa rows, then the Eq. 10 scaling); as a last resort, the library value of the nearest-mass covered species, with the substitution recorded in the provenance string. Trailing state annotations in species names are stripped.
Returns (b [m^-1 s^-1], provenance string).
Source code in src/zephyrus/diffusion.py
456 457 458 459 460 461 462 463 464 465 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 | |
b_mixture(sp, comp, T)
Blanc's-law mixture diffusion parameter for one species, SI [m^-1 s^-1].
b_mix = (1 - X_sp) / sum_j (X_j / b_sp,j) over the other species of
the mixture comp (mole fractions). Returns (b_mix, provenance
dict per pair); a species alone in its mixture has nothing to diffuse
against and returns infinity.
Source code in src/zephyrus/diffusion.py
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 | |