pub struct FoamingKinetics {
pub c0_gas: f64,
pub surface_tension: f64,
pub viscosity: f64,
pub temperature: f64,
pub gas_constant: f64,
pub activation_energy: f64,
}Expand description
Foaming kinetics model.
Describes the nucleation, growth, and stabilization of bubbles during foam processing.
Fields§
§c0_gas: f64Initial gas concentration [mol/m³].
surface_tension: f64Surface tension of the foaming liquid [N/m].
viscosity: f64Viscosity of the foaming liquid [Pa·s].
temperature: f64Temperature [K].
gas_constant: f64Gas constant R = 8.314 J/(mol·K).
activation_energy: f64Activation energy for nucleation [J/mol].
Implementations§
Source§impl FoamingKinetics
impl FoamingKinetics
Sourcepub fn new(
c0_gas: f64,
surface_tension: f64,
viscosity: f64,
temperature: f64,
activation_energy: f64,
) -> Self
pub fn new( c0_gas: f64, surface_tension: f64, viscosity: f64, temperature: f64, activation_energy: f64, ) -> Self
Create a new foaming kinetics model.
Sourcepub fn critical_radius(&self, pressure_drop: f64) -> f64
pub fn critical_radius(&self, pressure_drop: f64) -> f64
Classical nucleation theory: critical bubble radius.
R_crit = 2 * gamma / delta_P
Sourcepub fn nucleation_barrier(&self, pressure_drop: f64) -> f64
pub fn nucleation_barrier(&self, pressure_drop: f64) -> f64
Nucleation energy barrier.
W_crit = (16 * pi * gamma^3) / (3 * delta_P^2)
Sourcepub fn nucleation_rate(&self, pressure_drop: f64, prefactor: f64) -> f64
pub fn nucleation_rate(&self, pressure_drop: f64, prefactor: f64) -> f64
Nucleation rate (classical nucleation theory).
J = J0 * exp(-W_crit / (k_B * T)) Using k_B = R/N_A, simplified here with prefactor.
Sourcepub fn bubble_radius_diffusion(
&self,
r0: f64,
diffusivity: f64,
supersaturation: f64,
gas_density: f64,
time: f64,
) -> f64
pub fn bubble_radius_diffusion( &self, r0: f64, diffusivity: f64, supersaturation: f64, gas_density: f64, time: f64, ) -> f64
Bubble growth by diffusion (Epstein-Plesset model, simplified).
R(t) = sqrt(R0^2 + 2 * D * c * t / rho_g) D is diffusivity, c is supersaturation, rho_g is gas density.
Sourcepub fn growth_rate_viscous(&self, radius: f64, pressure_excess: f64) -> f64
pub fn growth_rate_viscous(&self, radius: f64, pressure_excess: f64) -> f64
Viscous limitation on bubble growth rate.
dR/dt = R * delta_P / (4 * mu) where mu is viscosity and delta_P is the internal pressure excess.
Sourcepub fn avrami_fraction(&self, k: f64, n: f64, time: f64) -> f64
pub fn avrami_fraction(&self, k: f64, n: f64, time: f64) -> f64
Avrami equation for volume fraction of foam as function of time.
X(t) = 1 - exp(-k * t^n)
Sourcepub fn expansion_ratio(&self, atmospheric_pressure: f64) -> f64
pub fn expansion_ratio(&self, atmospheric_pressure: f64) -> f64
Foam expansion ratio at equilibrium.
phi = V_foam / V_liquid ≈ 1 + (c0 * R * T) / P_atm
Trait Implementations§
Source§impl Clone for FoamingKinetics
impl Clone for FoamingKinetics
Source§fn clone(&self) -> FoamingKinetics
fn clone(&self) -> FoamingKinetics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FoamingKinetics
impl Debug for FoamingKinetics
Source§impl PartialEq for FoamingKinetics
impl PartialEq for FoamingKinetics
Source§fn eq(&self, other: &FoamingKinetics) -> bool
fn eq(&self, other: &FoamingKinetics) -> bool
self and other values to be equal, and is used by ==.