Translational Spring
Mechanics
Run the live example
Free · no sign-up · runs in your browser
The TranslationalSpring block models a linear elastic mechanical spring operating in 1D translational networks. It represents coil springs, suspension springs, structural stiffness, and compliant rods storing potential strain energy.
It features two conserving translational flanges (flange_a and flange_b) transmitting restoring force proportional to relative displacement.
Real-World Analog: Represents a mechanical coil spring, elastomeric bumper, or suspension spring exerting restoring force proportional to displacement.
Mathematical Model
The rate of change of transmitted spring force is governed by Hooke's Law differentiated with respect to time:
Where:
kis the spring stiffness in Newtons per meter ().v_ais the linear velocity of flange A in meters per second ().v_bis the linear velocity of flange B in meters per second ().Fis the tension/compression force transmitted through the spring in Newtons ().
The potential elastic strain energy stored in the spring is:
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | flange_a |
A | number | Required |
| → In | flange_b |
B | number | Required |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
spring_rate |
Spring Rate (k) | number | 100 |
Linear spring stiffness k in N/m |
initial_force |
Initial Force (F0) | number | 0 |
Initial preload force at t=0 in N |
stiffness_cubic |
Nonlinear Duffing stiffness (k3) | number | 0 |
Cubic hardening stiffness k3 in F = k1·x + k3·x³ (0 = linear spring) |
Usage Examples
Harmonic Oscillator Resonance
A mass suspended by a spring oscillates indefinitely at natural frequency :
Mass(m=1.0) -> TranslationalSpring(k=100.0, F0=50.0) -> TranslationalReference
Quarter-Car Suspension Model
Connecting a chassis mass through spring and damper to unsprung axle mass:
Mass(m=250.0) -> TranslationalSpring(k=25000.0) -> Mass(m=35.0) -> TranslationalReferenceRemarks & Best Practices
- Acausal Bidirectional Coupling: Force and velocity propagate symmetrically in both directions.
- Bond Graph Equivalence: Represents an ideal Generalized Capacitance (C-element) or inductor in MNA force-current analogy.
- Symplectic Solver Precision: Solved via implicit TR-BDF2 or RK4 guaranteeing long-term energy conservation without numerical artificial damping.
Related Components
- Mass: 1D translational inertia element
- TranslationalDamper: Viscous friction and shock absorber
- ForceSource: Applied mechanical force actuator
- TranslationalReference: Fixed stationary mechanical ground