WEBGPU COUPLED ENGINE
RK4 INTEGRATION
WebGPU Context Active
Parameters
Block 1 Init Pos (x₁)3.0 m
Block 2 Init Pos (x₂)0.0 m
Outer Spring (k)10 N/m
Coupling Spring (k_c)2 N/m
Block Mass (m)2 kg
Damping (b)0.00
Pos 1 (x₁)
0.00 m
Pos 2 (x₂)
0.00 m
Vel 1 (v₁)
0.00 m/s
Vel 2 (v₂)
0.00 m/s
Energy Distribution
Kinetic E. 0%Total E. 0.0JPotential E. 0%
Live Equation
x¨1=−210x1+22(x2−x1)x¨2=−210x2−22(x2−x1)ω+=2.236rad/sω−=2.646rad/s
x₁ vs t
x₂ vs t
Governing Dynamics
Two identical masses are connected to fixed walls and to each other by springs. The outer springs have stiffness k, and the middle coupling spring has stiffness k_c.
mx¨1=−kx1+kc(x2−x1)mx¨2=−kx2−kc(x2−x1)
By diagonalizing this system, we find the Normal Modes of oscillation, where both masses move at the same frequency.
Symmetric Mode
ω+=mkAntisymmetric Mode
ω−=mk+2kcTry it yourself:
1. Set x₁ = 2 and x₂ = 2. They swing together.
2. Set x₁ = 2 and x₂ = -2. They swing opposite.
3. Set x₁ = 3 and x₂ = 0. Energy transfers between blocks!