State-vector formulation
The documented second-order force balances are represented as a first-order derivative function f(x,t) for the ordered state [z_s, dot z_s, z_u, dot z_u]. Prescribed road displacement is evaluated at every RK4 stage time.
Classical fourth-order stages
For state x_n, time t_n, and requested step h:
Time-base behavior
- Samples begin exactly at 0 s and advance by the requested fixed step.
- If duration is not divisible by the step, one shorter final step lands exactly on the requested duration.
- The final step is never longer than the requested step.
- All Float64 output channels share the same strictly increasing time base.
The default 5 s study with a 0.001 s requested step produces 5,001 aligned samples. Identical valid input produces exact deterministic equality in the canonical test.
Browser execution and data transfer
The simulation loop does not run on the React main thread. The Worker validates every request, stale results are ignored through request IDs, and channel ArrayBuffers are transferred rather than copied.
Input and workload validation
Zod rejects non-finite or non-positive physical values, invalid event timing, unsupported shapes, and workloads above 100,001 samples before integration. Errors return as structured Worker responses and remain visible in the Studio.
Published benchmark numerical checks
The Zhao et al. passive bump benchmark runs the unchanged production RK4 implementation at a 0.001 s step for 5.125 s. A 0.0005 s production convergence run protects the selected step for the forced response.
A validation-only consistency path constructs the quarter-car state-space matrices directly and integrates the raised-cosine forcing with explicit midpoint steps no larger than 0.00005 s. It imports neither the production derivative nor production RK4. This independent check supports implementation consistency; the digitized published response remains the central external evidence.
Review the benchmark evidence →Numerical limitations
Fixed-step RK4 is accurate here, not unconditionally stable.
Classical explicit RK4 has a finite stability region. Accuracy and stability depend on the selected step relative to model frequencies and input time scales. The accepted step range and canonical convergence case provide guardrails, not a universal guarantee.
RK4 is used because it is deterministic, transparent, testable, and appropriate for this small non-stiff model. Adaptive and implicit solvers remain deliberately deferred.