How dynaclim/spiroid works
Spiroid simulates the rotational and orbital evolution of a star–planet system. The user workflow is to generate JSON configuration cases, run the simulator on one case or a batch, then inspect or compare JSONL results with plotting tools. The runtime model includes stellar evolution, planetary and stellar state, orbital physics, and optional relativistic, magnetic, wind, and tidal effects. Edges reflect README statements and the supplied source index; unsampled implementation details and unverified runtime links are omitted.
Main entry points: physics.rs Orbital physics · plotter.py Plotter · universe.rs Evolution integrator · particles.rs Particle models
Components 25
User workflow
- Case generator
scripts/setup.py - Config builder
scripts/spiroid/configmaker.py - Config model
scripts/spiroid/config.py
Simulation runtime
- Simulator CLI
src/main.rs - Evolution integrator
src/universe.rs - Orbital physics
src/universe/physics.rs
System state
- Particle models
src/universe/particles.rs - Star evolution
src/universe/particles/star.rs - Planet state
src/universe/particles/planet.rs - Stellar CSV data
src/universe/particles/star/star_csv.rs
Physical effects
- General relativity
src/universe/effects/general_relativity.rs - Magnetic interaction
src/universe/effects/magnetism.rs - Stellar wind
src/universe/effects/wind.rs - Tidal models
src/universe/effects/tides.rs - Constant-time lag
src/universe/effects/tides/constant_time_lag.rs - Kaula tides
src/universe/effects/tides/kaula.rs - Love numbers
src/universe/effects/tides/kaula/love_number.rs - Kaula polynomials
src/universe/effects/tides/kaula/polynomials.rs
Result analysis
- Plotter
scripts/plotter.py - JSON flattener
scripts/flatten_json.py - Unit conversions
scripts/units.py
Other components
- User
- Case files
- JSONL results
- Plots
Connections 27
- User → Case generator: configures cases
- Case generator → Config builder: builds configs
scripts/setup.py - Config builder → Config model: uses model
scripts/spiroid/configmaker.py - Case generator → Case files: writes cases
- User → Simulator CLI: launches
- Case files → Simulator CLI: provides inputs
- Simulator CLI → Evolution integrator: runs simulation
- Evolution integrator → Orbital physics: uses physics
src/universe.rs - Evolution integrator → Particle models: holds system state
src/universe.rs - Particle models → Star evolution: models star
src/universe/particles.rs - Particle models → Planet state: models planet
src/universe/particles.rs - Star evolution → Stellar CSV data: reads evolution data
src/universe/particles/star.rs - Particle models → Tidal models: configures tides
src/universe/particles.rs - Orbital physics → Tidal models: uses tidal models
src/universe/physics.rs - Tidal models → Constant-time lag: dispatches model
src/universe/effects/tides.rs - Tidal models → Kaula tides: dispatches model
src/universe/effects/tides.rs - Kaula tides → Love numbers: uses Love numbers
src/universe/effects/tides/kaula.rs - Kaula tides → Kaula polynomials: uses polynomials
src/universe/effects/tides/kaula.rs - User → Plotter: analyses results
- JSONL results → Plotter: provides data
- Plotter → JSON flattener: flattens data
scripts/plotter.py - Plotter → Unit conversions: uses conversions
scripts/plotter.py - Plotter → Plots: writes plots
- Evolution integrator → JSONL results: writes JSONL
- Orbital physics → General relativity: includes effect
- Orbital physics → Magnetic interaction: includes effect
- Orbital physics → Stellar wind: includes effect