pub struct PolymerChain {
pub n_segments: u32,
pub segment_length: f64,
pub persistence_length: f64,
pub temperature: f64,
}Expand description
Freely jointed chain (FJC) model for polymer elasticity.
Provides the Langevin-based force-extension relation and Flory-Huggins mixing free energy.
Fields§
§n_segments: u32Number of statistical segments N.
segment_length: f64Kuhn segment length b (m).
persistence_length: f64Persistence length l_p (m).
temperature: f64Temperature (K).
Implementations§
Source§impl PolymerChain
impl PolymerChain
Sourcepub fn new(
n_segments: u32,
segment_length: f64,
persistence_length: f64,
temperature: f64,
) -> Self
pub fn new( n_segments: u32, segment_length: f64, persistence_length: f64, temperature: f64, ) -> Self
Creates a new polymer chain model.
Sourcepub fn contour_length(&self) -> f64
pub fn contour_length(&self) -> f64
Contour length L0 = N * b.
Sourcepub fn rms_end_to_end(&self) -> f64
pub fn rms_end_to_end(&self) -> f64
Root-mean-square end-to-end distance R_rms = b * sqrt(N).
Sourcepub fn entropic_force(&self, extension: f64) -> f64
pub fn entropic_force(&self, extension: f64) -> f64
Langevin entropic force-extension relation F(r) ≈ (kT/b) * L^{-1}(r/L0).
Uses Pade approximation for inverse Langevin: L^{-1}(x) ≈ x(3-x^2)/(1-x^2).
Sourcepub fn flory_huggins_free_energy(&self, phi: f64, chi: f64) -> f64
pub fn flory_huggins_free_energy(&self, phi: f64, chi: f64) -> f64
Flory-Huggins free energy of mixing per lattice site.
ΔF_mix = kT * [φ/N * ln(φ) + (1-φ) * ln(1-φ) + χ * φ * (1-φ)].
Trait Implementations§
Source§impl Clone for PolymerChain
impl Clone for PolymerChain
Source§fn clone(&self) -> PolymerChain
fn clone(&self) -> PolymerChain
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PolymerChain
impl RefUnwindSafe for PolymerChain
impl Send for PolymerChain
impl Sync for PolymerChain
impl Unpin for PolymerChain
impl UnsafeUnpin for PolymerChain
impl UnwindSafe for PolymerChain
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more