Skip to main content

FoamingKinetics

Struct FoamingKinetics 

Source
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: f64

Initial gas concentration [mol/m³].

§surface_tension: f64

Surface tension of the foaming liquid [N/m].

§viscosity: f64

Viscosity of the foaming liquid [Pa·s].

§temperature: f64

Temperature [K].

§gas_constant: f64

Gas constant R = 8.314 J/(mol·K).

§activation_energy: f64

Activation energy for nucleation [J/mol].

Implementations§

Source§

impl FoamingKinetics

Source

pub fn new( c0_gas: f64, surface_tension: f64, viscosity: f64, temperature: f64, activation_energy: f64, ) -> Self

Create a new foaming kinetics model.

Source

pub fn critical_radius(&self, pressure_drop: f64) -> f64

Classical nucleation theory: critical bubble radius.

R_crit = 2 * gamma / delta_P

Source

pub fn nucleation_barrier(&self, pressure_drop: f64) -> f64

Nucleation energy barrier.

W_crit = (16 * pi * gamma^3) / (3 * delta_P^2)

Source

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.

Source

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.

Source

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.

Source

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)

Source

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

Source§

fn clone(&self) -> FoamingKinetics

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FoamingKinetics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for FoamingKinetics

Source§

fn eq(&self, other: &FoamingKinetics) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for FoamingKinetics

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.