A Byte of PhysicsLogo

Orbits as numerical experiments

An orbit is not a special drawing primitive. It is the trajectory produced by repeatedly applying gravitational acceleration to a moving state. The path is an output of position, velocity, gravitational parameter, and an integration method; a trail is diagnostic data, not the source of truth.

Think like a programmer

Initialize position and velocity with units and one declared inertial frame, then let the same pure acceleration/integrator core used for other dynamics create the path. Store state at named physical times, not only drawn trail vertices. Log radius, radial/tangential velocity, specific energy, angular momentum, periapsis/apoapsis events, step size, integrator, and the force singularity policy. Keep rendering and camera transforms downstream of these values.

Model checklist

Inputs
Initial position and velocity in one inertial frame, gravitational parameter mu, central-body radius/singularity rule, start/end time, step/integrator, output schedule, and event-detection tolerance.
State
Timestamped position/velocity, acceleration, radius, radial/tangential velocity, specific energy, angular momentum, event records, trail samples, and invariant residuals.
Rule
Evaluate central inverse-square acceleration from current position, advance state under the declared integrator, detect named radial events between sampled states, and compute diagnostics at fixed physical times.
Output
Trajectory, bound/unbound classification context, radius/event history, energy/angular-momentum residuals, and refinement comparison.
Check
Circular-speed fixture has near-zero radial velocity and bounded radius under a suitable refined method; reversing tangential direction reverses angular-momentum sign; changing only display trail density does not change state; smaller time step improves selected invariant/event metrics at fixed physical times; source-near singular state is rejected or explicitly regularized.
\[\ddot{\mathbf r}=-\mu\frac{\mathbf r}{\lVert\mathbf r\rVert^3},\qquad h=\mathbf r\times\mathbf v,\qquad\varepsilon=\frac{\lVert\mathbf v\rVert^2}{2}-\frac{\mu}{\lVert\mathbf r\rVert}\]

Loading the interactive visual. The lesson text and model remain available while it starts.

Circular speed is a reference fixture at one radius, not a general guarantee that the numerical trace is correct. Begin with tangential velocity and zero radial velocity. Then perturb one component at a time: a lower tangential speed should initially move inward; a higher but still bound speed changes the conic; a radial component changes where the first turning point occurs. Record the initial values and predicted event before looking at the trail.

Events need numerical definitions. Periapsis and apoapsis occur where radial velocity changes sign; a coarse time sample can miss or misplace them. Preserve the bracket/timestamp rule and refine it. A path that looks closed can have systematic phase, energy, or angular-momentum drift, so evaluate invariants alongside geometry rather than accepting an ellipse-shaped screen trace as proof.

Try this experiment

Prediction: Tangential speed below circular speed makes the orbit fall inward first.

Start from a circular-speed fixture, then change only tangential speed below one. Predict the sign of initial radial acceleration and the first radial event. Repeat with a small radial velocity. At fixed final physical time, compare radius, specific energy, angular momentum, and event time for two steps. Change only trail sampling density and verify all state diagnostics stay unchanged.

Where this model breaks

Long-lived orbital accuracy is sensitive to integrator choice and step size. A visual ellipse alone does not prove energy or angular momentum is conserved. The ideal model omits extended-body gravity, atmosphere, thrust, relativity, tidal effects, third bodies, radiation pressure, collisions, and uncertain initial-state measurements. Near the central singularity, the point-mass model and a fixed-step integrator can both fail.

Summary

Treat orbits as initial-value problems with explicit frame, units, state, event rules, and singularity policy. Vary one input at a time and monitor energy, angular momentum, radius, phase/event diagnostics, and fixed-time refinement alongside the plotted path.

Glossary

Self-check

  1. What state must an orbit integrator store?
  2. Why is a trail not state?
  3. What test checks a circular initial condition?
  4. Why does event detection need a stated refinement/bracket rule?

Sources

Model contract

Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.

\[\text{observable output} = f(\text{inputs},\,\text{state})\]
Inputs
Quantities you set or measure, with units and useful bounds.
State
Values the program must retain to reproduce the next result.
Rule
The relationship or update that turns inputs and state into a result.
Check
A known limit, unit check, invariant, or measured result that can expose a bad model.

Implement the idea as a model

For Orbits as Numerical Experiments, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Gravitation, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.

Guided experiment

Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.

Where this model breaks

This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.

Summary

Treat Orbits as Numerical Experiments as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.

Glossary

  • Input: a measured value or chosen parameter supplied to a model.
  • State: the smallest set of values needed to continue or reproduce a model.
  • Validation: comparing an output with a known result, limit, invariant, or measurement.

Self-check

  1. Which values are inputs, and which values must remain state?
  2. What observable result would tell you the model is behaving as expected?
  3. Which assumption would you test first before applying the model to a real system?

Model review: turn Orbits as Numerical Experiments into a test

Create orbital paths by integrating a gravitational field from explicit initial state.

  1. Name the inputs and units that the gravitation model needs.
  2. Separate the state you must keep from values you can calculate when needed.
  3. Write one rule that maps the current state and inputs to an observable result.
  4. Choose a limiting case, unit check, invariant, or known result before trusting an output.
  5. State one assumption you would change before using this simplified model for a real decision.

Share to: