LSPRNG

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:

dFdt=k(va−vb)\frac{dF}{dt} = k (v_a - v_b)

Where:

  • k is the spring stiffness in Newtons per meter (N/m\text{N/m}).
  • v_a is the linear velocity of flange A in meters per second (m/s\text{m/s}).
  • v_b is the linear velocity of flange B in meters per second (m/s\text{m/s}).
  • F is the tension/compression force transmitted through the spring in Newtons (N\text{N}).

The potential elastic strain energy stored in the spring is:

Ep=12F2k=12k(Δx)2E_p = \frac{1}{2} \frac{F^2}{k} = \frac{1}{2} k (\Delta x)^2

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 f0=12πk/mf_0 = \frac{1}{2\pi}\sqrt{k/m}:

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) -> TranslationalReference

Remarks & 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