Mass Transfer¶
Particula Index / Particula / Dynamics / Condensation / Mass Transfer
Auto-generated documentation for particula.dynamics.condensation.mass_transfer module.
get_first_order_mass_transport_k¶
Show source in mass_transfer.py:35
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].
Arguments¶
- 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¶
- 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
Signature¶
@validate_inputs({"particle_radius": "nonnegative"})
def get_first_order_mass_transport_k(
particle_radius: Union[float, NDArray[np.float64]],
vapor_transition: Union[float, NDArray[np.float64]],
diffusion_coefficient: Union[float, NDArray[np.float64]] = 2e-05,
) -> Union[float, NDArray[np.float64]]: ...
get_mass_transfer¶
Show source in mass_transfer.py:236
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
Arguments¶
- 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¶
- 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])
)
Signature¶
@validate_inputs(
{
"mass_rate": "finite",
"time_step": "positive",
"gas_mass": "nonnegative",
"particle_mass": "nonnegative",
"particle_concentration": "nonnegative",
}
)
def get_mass_transfer(
mass_rate: NDArray[np.float64],
time_step: float,
gas_mass: NDArray[np.float64],
particle_mass: NDArray[np.float64],
particle_concentration: NDArray[np.float64],
) -> NDArray[np.float64]: ...
get_mass_transfer_of_multiple_species¶
Show source in mass_transfer.py:388
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.
Arguments¶
- 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¶
- 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([...])
Signature¶
@validate_inputs(
{
"mass_rate": "finite",
"time_step": "positive",
"gas_mass": "nonnegative",
"particle_mass": "nonnegative",
"particle_concentration": "nonnegative",
}
)
def get_mass_transfer_of_multiple_species(
mass_rate: NDArray[np.float64],
time_step: float,
gas_mass: NDArray[np.float64],
particle_mass: NDArray[np.float64],
particle_concentration: NDArray[np.float64],
) -> NDArray[np.float64]: ...
get_mass_transfer_of_single_species¶
Show source in mass_transfer.py:313
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.
Arguments¶
- 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¶
- 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([...])
Signature¶
@validate_inputs(
{
"mass_rate": "finite",
"time_step": "positive",
"gas_mass": "nonnegative",
"particle_mass": "nonnegative",
"particle_concentration": "nonnegative",
}
)
def get_mass_transfer_of_single_species(
mass_rate: NDArray[np.float64],
time_step: float,
gas_mass: NDArray[np.float64],
particle_mass: NDArray[np.float64],
particle_concentration: NDArray[np.float64],
) -> NDArray[np.float64]: ...
get_mass_transfer_rate¶
Show source in mass_transfer.py:103
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].
Arguments¶
- 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¶
- 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
Signature¶
@validate_inputs(
{
"pressure_delta": "finite",
"first_order_mass_transport": "finite",
"temperature": "positive",
"molar_mass": "positive",
}
)
def get_mass_transfer_rate(
pressure_delta: Union[float, NDArray[np.float64]],
first_order_mass_transport: Union[float, NDArray[np.float64]],
temperature: Union[float, NDArray[np.float64]],
molar_mass: Union[float, NDArray[np.float64]],
) -> Union[float, NDArray[np.float64]]: ...
get_radius_transfer_rate¶
Show source in mass_transfer.py:178
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].
Arguments¶
- 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¶
- 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])
Signature¶
@validate_inputs(
{"mass_rate": "finite", "particle_radius": "nonnegative", "density": "positive"}
)
def get_radius_transfer_rate(
mass_rate: Union[float, NDArray[np.float64]],
particle_radius: Union[float, NDArray[np.float64]],
density: Union[float, NDArray[np.float64]],
) -> Union[float, NDArray[np.float64]]: ...