Skip to content
SimuLabs

Engineering / Experiment reports

Force Lab: engineering report

Status
Validated
Validated
Model version
1.0.0
Release
V0.1

Every result in this report is a simulation output compared against an analytical solution. None of it is a measurement from a physical instrument.

Problem statement

Learners often mix up force, velocity and acceleration, for example by expecting a constant force to produce a constant speed. The lab must show, with a physically correct model, how net force and mass together set the acceleration, and how a constant acceleration changes velocity and position over time.

Scientific background

Newton’s second law: the acceleration of a body is proportional to the net external force on it and inversely proportional to its mass, a = F_net / m, in the direction of the net force. With a constant force and mass, the acceleration is constant, which gives v = v₀ + a·t and x = x₀ + v₀·t + ½·a·t².

Learning objectives

  • Acceleration is proportional to net force for a fixed mass.
  • Acceleration is inversely proportional to mass for a fixed net force.
  • Force and acceleration point in the same direction.

Mathematical model

The same engine and update as the Inertia Lab (physics-core 1.0.0), now with a nonzero net force. Each fixed step of length dt:

a      = F_net / m
v(t+dt) = v(t) + a·dt
x(t+dt) = x(t) + v(t)·dt + ½·a·dt²
t      = steps × dt

For constant acceleration these updates are exact over each step, so the step size does not affect accuracy (tested with dt from 1 ms to 100 ms). In this lab x₀ = 0 and v₀ = 0.

Assumptions

  • One-dimensional horizontal motion; constant mass; point-mass body.
  • The slider sets the net force directly; it is constant for the whole run.
  • No friction, air resistance or collisions.
  • Gravity and the normal force balance vertically and are not modelled.
  • The track is an inertial reference frame. The cart starts at rest at 0 m.

Implementation approach

  • No new physics code. The Force Lab uses packages/physics-core unchanged, as update 1.1 §4 requires.
  • Shared lab layer. Phase 2 generalised the Inertia Lab’s controller, canvas, controls, graphs and challenges into apps/web/src/labs/motion and components/labs/motion. Each lab supplies a definition: sliders, initial conditions, graph axes, arrow scales and challenges. The Force Lab definition is apps/web/src/labs/force/definition.ts.
  • Fixed time step dt = 10 ms; graph samples every 5 steps, copied directly from the engine state.
  • Graph axes are fixed for each trial and computed from the settings: velocity up to the speed at the edge of the view, √(2·|a|·20 m), and acceleration up to |F/m|, both rounded up to 1, 2 or 5 × 10ⁿ. The line never rescales mid-run, so its shape is honest.
  • Force arrow: drawn from the side of the cart in the direction of the net force, with length proportional to |F| (full length at 100 N).

Verification tests

Mapping from the master specification’s test cases (§18) to automated tests. All passed on 2026-11-04 against model version 1.0.0.

CaseRequirementChecked byResult
1m = 2 kg, F = 10 N → a = 5 m/s²motion.test.ts › Cases 1–4; force-lab.test.ts › Cases 1–4 (through the lab)✓ Pass
2m = 4 kg, F = 10 N → a = 2.5 m/s²motion.test.ts › Cases 1–4; force-lab.test.ts › Cases 1–4✓ Pass
3m = 5 kg, F = 0 N → a = 0 m/s²motion.test.ts › Cases 1–4; force-lab.test.ts › zero force leaves a cart at rest✓ Pass
4m = 5 kg, F = −20 N → a = −4 m/s²motion.test.ts › Cases 1–4; force-lab.test.ts › negative force✓ Pass
5v₀ = 3 m/s, F = 0 → v = 3 m/s after 2 smotion.test.ts › Case 5✓ Pass
6m = 2 kg, F = 8 N from rest → a = 4 m/s², v = 8 m/s, x = 8 m after 2 smotion.test.ts › Case 6 (engine). Through the lab: 2 kg, 10 N → v = 10 m/s, x = 10 m (8 N is not on the 5 N slider step)✓ Pass
+Analytical comparison for several step sizes, negative force and velocitymotion.test.ts › matches the analytical solution … independent of dt✓ Pass
+Changing mass between trialsforce-lab.test.ts › changing mass between trials; controller.test.ts › locks settings✓ Pass
+Pause and resume; different refresh ratessimulation.test.ts › Tests E and F (shared engine)✓ Pass
+Chart data equals engine statecontroller.test.ts › chart samples are exactly the engine's states (Force Lab)✓ Pass
+Input boundaries; edge of view reached at t = √(2L/a)controller.test.ts › snaps settings; force-lab.test.ts › 100 N on 1 kg, edge timing✓ Pass

Test suites: packages/physics-core/src/motion.test.ts, packages/physics-core/src/simulation.test.ts, apps/web/src/labs/motion/controller.test.ts, apps/web/src/labs/force/force-lab.test.ts, packages/physics-core/src/slide.test.ts, apps/web/src/labs/force/levels.test.ts.

Known limitations

  • The force is constant during a run and is set directly as the net force; individual forces are not modelled.
  • The force slider steps by 5 N, so spec Case 6 (8 N) is checked in the engine but cannot be set in the UI.
  • The view is ±20 m, so large forces reach the edge in under a second (100 N on 1 kg: about 0.63 s). Runs are capped at 30 s.
  • Initial position and velocity are fixed at zero; comparison of two carts is planned for Phase 4.
  • Tests run locally; there is no continuous integration yet. Browser behaviour was checked by hand at desktop and mobile widths.

Screenshots

The Force Lab paused at 2 seconds: a 5 kilogram cart pushed by a 20 newton force, at 8 metres moving at 8 metres per second.
Desktop layout, paused at t = 2.00 s with m = 5 kg and F = 20 N. The readouts show a = 4.00 m/s², v = 8.00 m/s and x = 8.00 m, matching v = a·t and x = ½·a·t² (simulation output).

Source code

  • Engine: packages/physics-core/src/motion.ts, simulation.ts
  • Lab definition: apps/web/src/labs/force/; shared lab logic: apps/web/src/labs/motion/
  • UI: apps/web/src/components/labs/motion/

The repository is not public yet; these paths are relative to its root.

Future improvements

  • Comparison mode: two carts with independent mass, force, position and velocity on one clock (Phase 4).
  • Show individual forces (applied force, friction) that add up to the net force, once friction is modelled.
  • Save and compare trials in the notebook (Phase 5).
  • Automated end-to-end tests in a real browser, run in continuous integration.