Skip to main content

HydrogelModel

Struct HydrogelModel 

Source
pub struct HydrogelModel {
    pub chi: f64,
    pub n_chains: f64,
    pub nu_0: f64,
    pub molar_volume_solvent: f64,
    pub shear_modulus: f64,
}
Expand description

Flory-Rehner equilibrium swelling model for hydrogels.

Balances elastic (network) and mixing (polymer-solvent) free energies to find the equilibrium swelling ratio Q.

Fields§

§chi: f64

Flory-Huggins interaction parameter χ (dimensionless).

§n_chains: f64

Number of chain segments between cross-links N (Kuhn monomers).

§nu_0: f64

Reference polymer volume fraction ν_0 (dry state, typically 1.0).

§molar_volume_solvent: f64

Molar volume of solvent [m³/mol].

§shear_modulus: f64

Shear modulus of dry network G_0 [Pa].

Implementations§

Source§

impl HydrogelModel

Source

pub fn new(chi: f64, n_chains: f64, shear_modulus: f64) -> Self

Construct a HydrogelModel with standard parameters.

Source

pub fn mixing_chemical_potential(&self, phi: f64) -> f64

Mixing free energy (Flory-Huggins) chemical potential term [dimensionless].

Δμ_mix / (RT) = ln(1-φ) + φ + χ*φ² where φ = polymer volume fraction.

Source

pub fn elastic_chemical_potential(&self, phi: f64) -> f64

Elastic free energy chemical potential term [dimensionless].

Δμ_el / (RT) = (Vs/Vref) * N^(-1) * (φ/2 - φ^(1/3))

Source

pub fn total_chemical_potential(&self, phi: f64) -> f64

Total chemical potential (mixing + elastic) for equilibrium condition.

Source

pub fn equilibrium_swelling_ratio(&self) -> f64

Find equilibrium swelling ratio Q = V_swollen / V_dry numerically.

Solves μ_total(φ) = 0 by bisection over φ ∈ [1e-4, 1-1e-4]. Returns volumetric swelling ratio Q = 1/φ_eq.

Trait Implementations§

Source§

impl Clone for HydrogelModel

Source§

fn clone(&self) -> HydrogelModel

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 HydrogelModel

Source§

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

Formats the value using the given formatter. Read more

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.