pub struct MuscleModel {
pub f_max: f64,
pub l_opt: f64,
pub v_max: f64,
pub pennation_angle: f64,
}Expand description
Muscle model using Hill’s three-element (active + passive + series) model.
Fields§
§f_max: f64Maximum isometric force [N].
l_opt: f64Optimal fiber length [m].
v_max: f64Maximum shortening velocity [m/s].
pennation_angle: f64Pennation angle at optimal length [radians].
Implementations§
Source§impl MuscleModel
impl MuscleModel
Sourcepub fn new(f_max: f64, l_opt: f64, v_max: f64, pennation_angle: f64) -> Self
pub fn new(f_max: f64, l_opt: f64, v_max: f64, pennation_angle: f64) -> Self
Create a new muscle model.
Sourcepub fn tibialis_anterior() -> Self
pub fn tibialis_anterior() -> Self
Typical human tibialis anterior muscle.
Sourcepub fn quadriceps() -> Self
pub fn quadriceps() -> Self
Typical human quadriceps (rectus femoris).
Sourcepub fn active_force_length(&self, l_normalized: f64) -> f64
pub fn active_force_length(&self, l_normalized: f64) -> f64
Active force-length relationship f_l(l̃) where l̃ = l/l_opt.
Gaussian: f_l = exp(-((l̃ - 1)/ω)^2), ω ≈ 0.45
Sourcepub fn passive_force_length(&self, l_normalized: f64) -> f64
pub fn passive_force_length(&self, l_normalized: f64) -> f64
Passive force-length relationship f_p(l̃).
Exponential rise for l̃ > 1: f_p = (exp(k_p*(l̃-1)/ε_0) - 1) / (exp(k_p) - 1)
Sourcepub fn force_velocity(&self, v_normalized: f64) -> f64
pub fn force_velocity(&self, v_normalized: f64) -> f64
Force-velocity relationship f_v(ṽ) where ṽ = v/v_max (Hill’s equation).
Concentric: f_v = (1 - ṽ)/(1 + ṽ/a_v), a_v ≈ 0.25 Eccentric: f_v = (1.8 - 0.8*(1+ṽ)/(1-7.56*ṽ))
Trait Implementations§
Source§impl Clone for MuscleModel
impl Clone for MuscleModel
Source§fn clone(&self) -> MuscleModel
fn clone(&self) -> MuscleModel
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 MuscleModel
impl RefUnwindSafe for MuscleModel
impl Send for MuscleModel
impl Sync for MuscleModel
impl Unpin for MuscleModel
impl UnsafeUnpin for MuscleModel
impl UnwindSafe for MuscleModel
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