Skip to main content

Friction

Struct Friction 

Source
pub struct Friction {
    pub normal_dof: usize,
    pub shear_dof: usize,
    pub mu: f64,
    pub k0: f64,
    pub b: f64,
    /* private fields */
}
Expand description

Couples one “shear” DOF to a different DOF’s own material — the normal direction’s current force — via a bilinear-kinematic-hardening Coulomb return map: sticks (stiffness k0) until |V| reaches mu * yield-eligible normal force, then slides with post-slip tangent b*k0 (see the b field doc comment for why b is required, not optional).

This is deliberately not a Material variant: Material::evaluate is a pure function of one scalar strain (every call site — Truss, ZeroLength, Fiber, the Parallel/Series/MinMax composites — depends on that signature), and friction’s yield force needs a second DOF’s current force, which a single Material has no way to see. So the coupling lives here, in the element, not the material catalog.

Sign convention: this codebase is compression-negative (see Material::Ent/Gap — strain <= 0.0 is the compression/engaged branch). Friction is mobilized only when the normal direction is in compression: yield force is mu * (-normal_force).max(0.0).

The return map: trial = k0*(shear_relative - slip) is the elastic predictor (same shape as ElasticPP’s trial_stress = e*(strain - ep), elastic_like.rs). Inside the yield surface, force = trial. Past it, this is standard 1D linear-kinematic-hardening plasticity with (fixed, for one call) yield force yield_force and hardening modulus chosen so the post-yield tangent is exactly b*k0: force = b*trial + (1-b)*yield_force*sign(trial), which by construction satisfies k0*(shear_relative - next_slip) == force — so, exactly like ElasticPP’s next_ep = strain - stress/e, next_slip = shear_relative - force/k0.

Fields§

§normal_dof: usize§shear_dof: usize§mu: f64§k0: f64§b: f64

Post-slip hardening ratio (fraction of k0) — required at construction, not defaulted, so callers make an active choice. A small nonzero value (recommended starting range 1e-3-1e-4) keeps the post-slip tangent away from exactly zero: while sliding, this DOF is commonly the only stiffness path on its shear direction, so an exactly-zero tangent risks a structurally singular row/column in the global system (AnalysisError::SingularSystem) — the same reasoning behind Material::MinMax’s nonzero failed-state tangent floor, except here b is part of the actual force law (rounding the stick/slip corner, reducing Newton bouncing at the transition), not a tangent-only fudge. Set to 0.0 for an exact textbook Coulomb comparison and accept the singularity risk that comes back with it.

Implementations§

Source§

impl Friction

Source

pub fn new( normal_dof: usize, shear_dof: usize, mu: f64, k0: f64, b: f64, ) -> Self

Trait Implementations§

Source§

impl Clone for Friction

Source§

fn clone(&self) -> Friction

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 Copy for Friction

Source§

impl Debug for Friction

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
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

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.

§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

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> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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.