Skip to content

Engine API

The src.engine module handles numerical integration of planetary state. The integration strategy is fully decoupled from the physics model — Planet knows what equations to use, TimeController knows how to integrate them.

Accuracy Modes

from src.engine import Accuracy

Accuracy.ACCURATE  # 4th-order Runge-Kutta on full ODE system
Accuracy.FAST      # Reduced-order analytic / relaxation updates

Snapshot

Each timestep produces a Snapshot record:

Field Type Description
time float Elapsed time in sols
surface_temperature float Surface temperature (K)
surface_pressure float Surface pressure (Pa)
ice_mass float Total polar ice mass (kg)
solar_flux float Instantaneous solar flux (W/m²)
orbital_angle float True anomaly (rad)
greenhouse_factor float Current greenhouse amplification

TimeController & Snapshot

engine

Engine package – single public API surface.

Usage::

from src.engine import Accuracy, TimeController, Snapshot

Accuracy = _tc_mod.Accuracy module-attribute

Snapshot = _tc_mod.Snapshot module-attribute

TimeController = _tc_mod.TimeController module-attribute

BatchedMars = _btc_mod.BatchedMars module-attribute

BatchedTimeController = _btc_mod.BatchedTimeController module-attribute