particula.dynamics.condensation.mass_transfer¶
mass_transfer
¶
Particle Vapor Equilibrium, condensation, and evaporation based on partial pressures to calculate dm/dt or other forms of particle growth and decay.
Equation
- dm/dt = 4π × radius × Di × Mi × f(Kn, α) × delta_pi / (R × T)
- radius : The particle radius in m.
- Di : The diffusion coefficient of species i in m²/s.
- Mi : The molar mass of species i in kg/mol.
- f(Kn, α) : Transition function based on Knudsen number and accommodation coefficient.
- delta_pi : Difference in partial pressures between gas and particle phases in Pa.
- R : Gas constant in J/(mol·K).
- T : Temperature in K.
References
- Seinfeld, J. H., & Pandis, S. N. (2016). Atmospheric Chemistry and Physics: From Air Pollution to Climate Change (3rd ed.). John Wiley & Sons, Inc.
- Topping, D., & Bane, M. (2022). Introduction to Aerosol Modelling (D. Topping & M. Bane, Eds.). Wiley. https://doi.org/10.1002/9781119625728
- Aerosol Modeling: Chapter 2, Equation 2.40
get_first_order_mass_transport_k
¶
get_first_order_mass_transport_k(particle_radius: Union[float, NDArray[float64]], vapor_transition: Union[float, NDArray[float64]], diffusion_coefficient: Union[float, NDArray[float64]] = 2e-05) -> Union[float, NDArray[np.float64]]
Calculate the first-order mass transport coefficient per particle.
This function computes the coefficient K that governs how fast mass is transported to or from a particle in a vapor. The equation is:
- K = 4π × radius × D × X
- K : Mass transport coefficient [m³/s].
- radius : Particle radius [m].
- D : Diffusion coefficient of the vapor [m²/s].
- X : Vapor transition correction factor [unitless].
Parameters:
-
- particle_radius–The radius of the particle [m].
-
- vapor_transition–The vapor transition correction factor [unitless].
-
- diffusion_coefficient–The diffusion coefficient of the vapor [m²/s]. Defaults to 2e-5 (approx. air).
Returns:
-
Union[float, NDArray[float64]]–- The first-order mass transport coefficient per particle [m³/s].
Examples:
import particula as par
par.dynamics.get_first_order_mass_transport_k(
particle_radius=1e-6,
vapor_transition=0.6,
diffusion_coefficient=2e-9
)
# Output: 1.5079644737231005e-14
import particula as par
par.dynamics.get_first_order_mass_transport_k(
particle_radius=np.array([1e-6, 2e-6]),
vapor_transition=np.array([0.6, 0.6]),
diffusion_coefficient=2e-9
)
# Output: array([1.50796447e-14, 6.03185789e-14])
References
- Aerosol Modeling: Chapter 2, Equation 2.49
- Wikipedia contributors, "Mass diffusivity," https://en.wikipedia.org/wiki/Mass_diffusivity
Source code in particula/dynamics/condensation/mass_transfer.py
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 | |
get_latent_heat_energy_released
¶
get_latent_heat_energy_released(mass_transfer: Union[float, NDArray[float64]], latent_heat: Union[float, NDArray[float64]]) -> Union[float, NDArray[np.float64]]
Calculate latent heat energy released during phase change.
This diagnostic function converts the mass transferred in a time step into energy released to (or absorbed from) the gas phase:
- Q = dm × L
- Q : Latent heat energy [J].
- dm : Mass transferred per step [kg].
- L : Latent heat of vaporization [J/kg].
Positive mass transfer (condensation) yields Q > 0, while negative mass transfer (evaporation) yields Q < 0.
Parameters:
-
mass_transfer(Union[float, NDArray[float64]]) –Mass transferred per step [kg].
-
latent_heat(Union[float, NDArray[float64]]) –Latent heat of vaporization [J/kg].
Returns:
-
Union[float, NDArray[float64]]–Latent heat energy released or absorbed [J].
Examples:
import particula as par
par.dynamics.get_latent_heat_energy_released(
mass_transfer=1.0e-15,
latent_heat=2.454e6,
)
# Output: 2.454e-09
import particula as par
par.dynamics.get_latent_heat_energy_released(
mass_transfer=-1.0e-15,
latent_heat=2.454e6,
)
# Output: -2.454e-09
Raises:
-
ValueError–If mass_transfer is non-finite or latent_heat is negative.
Notes
Large magnitudes may overflow following NumPy's float64 behavior.
Source code in particula/dynamics/condensation/mass_transfer.py
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 390 391 392 393 394 395 396 397 | |
get_mass_transfer
¶
get_mass_transfer(mass_rate: NDArray[float64], time_step: float, gas_mass: NDArray[float64], particle_mass: NDArray[float64], particle_concentration: NDArray[float64]) -> NDArray[np.float64]
Route mass transfer calculation to single or multiple-species routines.
Depending on whether gas_mass represents one or multiple species, this function calls either calculate_mass_transfer_single_species or calculate_mass_transfer_multiple_species. The primary calculation involves:
- mass_to_change = mass_rate × time_step × particle_concentration
Parameters:
-
- mass_rate–The rate of mass transfer per particle [kg/s].
-
- time_step–The time step for the mass transfer calculation [s].
-
- gas_mass–The available mass of gas species [kg].
-
- particle_mass–The mass of each particle [kg].
-
- particle_concentration–The concentration of particles [#/m³].
Returns:
-
NDArray[float64]–- The mass transferred (array with the same shape as particle_mass).
Examples:
import particula as par
par.dynamics.get_mass_transfer(
mass_rate=np.array([0.1, 0.5]),
time_step=10,
gas_mass=np.array([0.5]),
particle_mass=np.array([1.0, 50]),
particle_concentration=np.array([1, 0.5])
)
import particula as par
par.dynamics.get_mass_transfer(
mass_rate=np.array([[0.1, 0.05, 0.03], [0.2, 0.15, 0.07]]),
time_step=10,
gas_mass=np.array([1.0, 0.8, 0.5]),
particle_mass=np.array([[1.0, 0.9, 0.8], [1.2, 1.0, 0.7]]),
particle_concentration=np.array([5, 4])
)
Source code in particula/dynamics/condensation/mass_transfer.py
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 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 531 532 533 | |
get_mass_transfer_of_multiple_species
¶
get_mass_transfer_of_multiple_species(mass_rate: NDArray[float64], time_step: float, gas_mass: NDArray[float64], particle_mass: NDArray[float64], particle_concentration: NDArray[float64]) -> NDArray[np.float64]
Calculate mass transfer for multiple gas species.
Here, gas_mass has multiple elements (each species). For each species, this function calculates mass_to_change for all particle bins:
- mass_to_change = mass_rate × time_step × particle_concentration
Then it limits or scales that mass based on available gas mass and particle mass in each species bin.
- Computes the mass change each particle would take during
time_step. - Scales condensation so the column sum never exceeds
gas_mass. - Scales evaporation so the column sum never exceeds the particle inventory of that species.
- Clips the result so no individual bin evaporates more mass than it owns.
Parameters:
-
- mass_rate–The mass transfer rate per particle for each gas species [kg/s].
-
- time_step–The time step [s].
-
- gas_mass–The available mass of each gas species [kg].
-
- particle_mass–The mass of each particle for each gas species [kg].
-
- particle_concentration–The concentration of particles [#/m³].
Returns:
-
NDArray[float64]–- The mass transferred for multiple gas species, matching the shape of (particle_mass).
Examples:
import particula as par
par.dynamics.get_mass_transfer_of_multiple_species(
mass_rate=np.array([[0.1, 0.05, 0.03], [0.2, 0.15, 0.07]]),
time_step=10,
gas_mass=np.array([1.0, 0.8, 0.5]),
particle_mass=np.array([[1.0, 0.9, 0.8], [1.2, 1.0, 0.7]]),
particle_concentration=np.array([5, 4])
)
# Output: array([...])
Source code in particula/dynamics/condensation/mass_transfer.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | |
get_mass_transfer_of_single_species
¶
get_mass_transfer_of_single_species(mass_rate: NDArray[float64], time_step: float, gas_mass: NDArray[float64], particle_mass: NDArray[float64], particle_concentration: NDArray[float64]) -> NDArray[np.float64]
Calculate mass transfer for a single gas species.
This function assumes gas_mass has a size of 1 (single species). It first computes the total mass_to_change per particle:
- mass_to_change = mass_rate × time_step × particle_concentration
Then it scales or limits that mass based on available gas mass and particle mass.
Parameters:
-
- mass_rate–Mass transfer rate per particle [kg/s].
-
- time_step–The time step [s].
-
- gas_mass–Total available mass of the gas species [kg].
-
- particle_mass–The mass of each particle [kg].
-
- particle_concentration–Particle concentration [#/m³].
Returns:
-
NDArray[float64]–- The amount of mass transferred for the single gas species, shaped like particle_mass.
Examples:
import particula as par
par.dynamics.get_mass_transfer_of_single_species(
mass_rate=np.array([0.1, 0.5]),
time_step=10,
gas_mass=np.array([0.5]),
particle_mass=np.array([1.0, 50]),
particle_concentration=np.array([1, 0.5])
)
# Output: array([...])
Source code in particula/dynamics/condensation/mass_transfer.py
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | |
get_mass_transfer_rate
¶
get_mass_transfer_rate(pressure_delta: Union[float, NDArray[float64]], first_order_mass_transport: Union[float, NDArray[float64]], temperature: Union[float, NDArray[float64]], molar_mass: Union[float, NDArray[float64]]) -> Union[float, NDArray[np.float64]]
Calculate the mass transfer rate for a particle.
This function calculates the mass transfer rate dm/dt, leveraging the difference in partial pressure (pressure_delta) and the first-order mass transport coefficient (K). The equation is:
- dm/dt = (K × Δp × M) / (R × T)
- dm/dt : Mass transfer rate [kg/s].
- K : First-order mass transport coefficient [m³/s].
- Δp : Partial pressure difference [Pa].
- M : Molar mass [kg/mol].
- R : Universal gas constant [J/(mol·K)].
- T : Temperature [K].
Parameters:
-
- pressure_delta–The difference in partial pressure [Pa].
-
- first_order_mass_transport–The mass transport coefficient [m³/s].
-
- temperature–The temperature [K].
-
- molar_mass–The molar mass [kg/mol].
Returns:
-
Union[float, NDArray[float64]]–- The mass transfer rate [kg/s].
Examples:
import particula as par
par.dynamics.mass_transfer_rate(
pressure_delta=10.0,
first_order_mass_transport=1e-17,
temperature=300.0,
molar_mass=0.02897
)
# Output: 1.16143004e-21
import particula as par
par.dynamics.mass_transfer_rate(
pressure_delta=np.array([10.0, 15.0]),
first_order_mass_transport=np.array([1e-17, 2e-17]),
temperature=300.0,
molar_mass=0.02897
)
# Output: array([1.16143004e-21, 3.48429013e-21])
References
- Aerosol Modeling: Chapter 2, Equation 2.41
- Seinfeld and Pandis, "Atmospheric Chemistry and Physics," Equation 13.3
Source code in particula/dynamics/condensation/mass_transfer.py
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 | |
get_mass_transfer_rate_latent_heat
¶
get_mass_transfer_rate_latent_heat(pressure_delta: Union[float, NDArray[float64]], first_order_mass_transport: Union[float, NDArray[float64]], temperature: Union[float, NDArray[float64]], molar_mass: Union[float, NDArray[float64]], latent_heat: Union[float, NDArray[float64]], thermal_conductivity: Union[float, NDArray[float64]], vapor_pressure_surface: Union[float, NDArray[float64]], diffusion_coefficient: Union[float, NDArray[float64]]) -> Union[float, NDArray[np.float64]]
Calculate non-isothermal mass transfer rate with latent heat.
Applies the thermal resistance factor to the isothermal mass transfer rate. When latent heat is zero, the correction equals unity and the result matches get_mass_transfer_rate.
Parameters:
-
- pressure_delta–Difference in partial pressure [Pa].
-
- first_order_mass_transport–Mass transport coefficient K [m³/s].
-
- temperature–Temperature T [K].
-
- molar_mass–Molar mass M [kg/mol].
-
- latent_heat–Latent heat of vaporization L [J/kg].
-
- thermal_conductivity–Gas thermal conductivity kappa [W/(m·K)].
-
- vapor_pressure_surface–Equilibrium vapor pressure at the surface [Pa].
-
- diffusion_coefficient–Vapor diffusion coefficient D [m²/s].
Returns:
-
Union[float, NDArray[float64]]–- Non-isothermal mass transfer rate [kg/s], matching the broadcasted input shape.
Raises:
-
-ValueError–If any validated inputs violate positive/nonnegative constraints.
Source code in particula/dynamics/condensation/mass_transfer.py
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 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | |
get_radius_transfer_rate
¶
get_radius_transfer_rate(mass_rate: Union[float, NDArray[float64]], particle_radius: Union[float, NDArray[float64]], density: Union[float, NDArray[float64]]) -> Union[float, NDArray[np.float64]]
Convert mass rate to radius growth/evaporation rate.
This function converts the mass transfer rate (dm/dt) into a radius change rate (dr/dt). The equation is:
- dr/dt = (1 / 4πr²ρ) × dm/dt
- dr/dt : Radius change rate [m/s].
- r : Particle radius [m].
- ρ : Particle density [kg/m³].
- dm/dt : Mass change rate [kg/s].
Parameters:
-
- mass_rate–The mass transfer rate [kg/s].
-
- particle_radius–The radius of the particle [m].
-
- density–The density of the particle [kg/m³].
Returns:
-
Union[float, NDArray[float64]]–- The radius growth (or evaporation) rate [m/s].
Examples:
import particula as par
par.dynamics.radius_transfer_rate(
mass_rate=1e-21,
particle_radius=1e-6,
density=1000
)
# Output: 7.95774715e-14
import particula as par
par.dynamics.radius_transfer_rate(
mass_rate=np.array([1e-21, 2e-21]),
particle_radius=np.array([1e-6, 2e-6]),
density=1000
)
# Output: array([7.95774715e-14, 1.98943679e-14])
Source code in particula/dynamics/condensation/mass_transfer.py
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 | |
get_thermal_resistance_factor
¶
get_thermal_resistance_factor(diffusion_coefficient: Union[float, NDArray[float64]], latent_heat: Union[float, NDArray[float64]], vapor_pressure_surface: Union[float, NDArray[float64]], thermal_conductivity: Union[float, NDArray[float64]], temperature: Union[float, NDArray[float64]], molar_mass: Union[float, NDArray[float64]]) -> Union[float, NDArray[np.float64]]
Calculate the thermal resistance factor for mass transfer.
Uses the non-isothermal correction from Topping & Bane (2022), Equation 2.36. Inputs include diffusion coefficient D [m²/s], latent heat L [J/kg], vapor pressure at the surface p_surf [Pa], thermal conductivity kappa [W/(m·K)], temperature T [K], and molar mass M [kg/mol]. When latent_heat is zero, the factor reduces to r_specific * temperature.
Parameters:
-
diffusion_coefficient(Union[float, NDArray[float64]]) –Vapor diffusion coefficient D [m²/s].
-
latent_heat(Union[float, NDArray[float64]]) –Latent heat of vaporization L [J/kg].
-
vapor_pressure_surface(Union[float, NDArray[float64]]) –Equilibrium vapor pressure at the surface [Pa].
-
thermal_conductivity(Union[float, NDArray[float64]]) –Gas thermal conductivity kappa [W/(m·K)].
-
temperature(Union[float, NDArray[float64]]) –Temperature T [K].
-
molar_mass(Union[float, NDArray[float64]]) –Molar mass M [kg/mol].
Returns:
-
Union[float, NDArray[float64]]–Thermal resistance factor for non-isothermal mass transfer [J/kg],
-
Union[float, NDArray[float64]]–matching the broadcasted input shape.
Raises:
-
ValueError–If any validated inputs violate positive/nonnegative constraints.
-
ValueError–If the thermal resistance factor is non-positive.
References
- Topping, D., & Bane, M. (2022). Introduction to Aerosol Modelling. Equation 2.36.
Source code in particula/dynamics/condensation/mass_transfer.py
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 | |