Skip to main content

MaxwellModel

Struct MaxwellModel 

Source
pub struct MaxwellModel {
    pub elastic_modulus: f64,
    pub viscosity: f64,
}
Expand description

Maxwell element (spring + dashpot in series) – new API.

Uses field names elastic_modulus and viscosity to distinguish from the legacy Maxwell struct.

Fields§

§elastic_modulus: f64

Young’s modulus E (Pa)

§viscosity: f64

Dynamic viscosity eta (Pa*s)

Implementations§

Source§

impl MaxwellModel

Source

pub fn new(e: f64, eta: f64) -> Self

Create a new Maxwell model with elastic modulus e and viscosity eta.

Source

pub fn relaxation_time(&self) -> f64

Relaxation time tau = eta / E.

Source

pub fn relaxation_modulus(&self, t: f64) -> f64

Relaxation modulus E(t) = E * exp(-t / tau).

Source

pub fn creep_compliance(&self, t: f64) -> f64

Creep compliance J(t) = 1/E + t/eta.

Source

pub fn stress_update( &self, _epsilon: f64, epsilon_dot: f64, sigma_old: f64, dt: f64, ) -> f64

Stress update using exact integration of the Maxwell ODE.

Given old stress sigma_old, strain rate epsilon_dot, and time step dt:

sigma_new = sigma_old * exp(-dt/tau) + E * epsilon_dot * tau * (1 - exp(-dt/tau))

Source

pub fn storage_modulus(&self, omega: f64) -> f64

Storage modulus E’(omega) = E * (omegatau)^2 / (1 + (omegatau)^2).

Source

pub fn loss_modulus(&self, omega: f64) -> f64

Loss modulus E’’(omega) = E * omegatau / (1 + (omegatau)^2).

Source

pub fn loss_tangent(&self, omega: f64) -> f64

Loss tangent tan(delta) = E’’ / E’ = 1 / (omega * tau).

Source

pub fn complex_modulus_magnitude(&self, omega: f64) -> f64

Complex modulus magnitude |E*| = sqrt(E’^2 + E’’^2).

Source

pub fn compute_dynamic_modulus(&self, omega: f64) -> (f64, f64)

Compute the dynamic (complex) modulus components (G’, G’’) for a Maxwell element.

For a single Maxwell element in shear:

G’(ω) = G · (ωτ)² / (1 + (ωτ)²) [storage / elastic part] G’’(ω) = G · ωτ / (1 + (ωτ)²) [loss / viscous part]

§Arguments
  • omega - Angular frequency ω [rad/s]
§Returns

(G_prime, G_double_prime) — storage and loss moduli [Pa]

Trait Implementations§

Source§

impl Clone for MaxwellModel

Source§

fn clone(&self) -> MaxwellModel

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 MaxwellModel

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.