Spring
このコンテンツはまだ日本語訳がありません。
Defined in: coupled.rs:80
pub struct Spring { pub stiffness: f64, pub rest_length: f64,}Equal-mass spring force for testing coupled dynamics.
Assumes equal mass: a_j = -a_i holds only when m_i = m_j.
For unequal masses, use a separate force/mass formulation.
This is intentionally simplified for analytical solution testing:
relative motion is simple harmonic with period 2π/√(2k).
For |r| < 1e-10 km, returns zero accelerations (singularity guard).
Fields
Section titled “Fields”stiffness
Section titled “stiffness”stiffness: f64
rest_length
Section titled “rest_length”rest_length: f64