How dynaclim/posidonius works
Posidonius is a planetary N-body simulator with a Python case-definition package and a Rust simulation executable. The main workflow is to define a system, serialize it as JSON, run or resume an integration, save recovery and history snapshots, then inspect orbital history and resonances. The runtime includes particle/universe state, numerical integrators, and configurable physical effects. The README documents the user workflow; sampled Rust excerpts show effect initialization and integration calls, but several internal links are supported only by imports listed in the source index.
Main entry points: universe.rs Effect Dispatch · __init__.py Python Case API · output.rs Snapshot I/O · main.rs Simulator CLI
Components 24
Case Definition
- Python Case API
posidonius/__init__.py - Case Universe
posidonius/particles/universe.py - Particle Models
posidonius/particles/particle.py - Evolution Models
posidonius/effects/evolution.py - Simulation JSON
Simulation Runtime
- Simulator CLI
src/main.rs - Simulation Universe
src/particles/universe.rs - Particle State
src/particles/particle.rs - IAS15 Integrator
src/integrator/ias15.rs - WHFast Integrator
src/integrator/whfast.rs - Leapfrog Integrator
src/integrator/leapfrog.rs - Snapshot I/O
src/integrator/output.rs
Physical Models
- Effect Dispatch
src/particles/universe.rs - Disk Forces
src/effects/disk.rs - Body Evolution
src/effects/evolution.rs - Relativity
src/effects/general_relativity.rs - Rotational Flattening
src/effects/rotational_flattening.rs - Tidal Forces
src/effects/tides.rs - Stellar Wind
src/effects/wind.rs
History Analysis
- Raw History Export
scripts/raw_history.py - Orbital History
scripts/explore_history.py - Resonance Analysis
posidonius/analysis/resonances.py - History Snapshot
Other components
- Researcher
Connections 29
- Researcher → Python Case API: defines system
- Python Case API → Case Universe: configures
posidonius/__init__.py - Python Case API → Particle Models: creates particles
posidonius/__init__.py - Python Case API → Evolution Models: selects models
posidonius/__init__.py - Case Universe → Simulation JSON: writes case
- Researcher → Simulator CLI: starts or resumes
- Simulation JSON → Simulator CLI: loads case
- Simulator CLI → Simulation Universe: runs simulation
- Simulation Universe → Particle State: holds state
- Simulation Universe → Effect Dispatch: calculates effects
src/particles/universe.rs - Effect Dispatch → Disk Forces: initializes
src/particles/universe.rs - Effect Dispatch → Body Evolution: initializes
src/particles/universe.rs - Effect Dispatch → Relativity: initializes
src/particles/universe.rs - Effect Dispatch → Rotational Flattening: initializes
src/particles/universe.rs - Effect Dispatch → Tidal Forces: initializes
src/particles/universe.rs - Effect Dispatch → Stellar Wind: initializes
src/particles/universe.rs - Simulation Universe → IAS15 Integrator: integrates
- Simulation Universe → WHFast Integrator: integrates
- Simulation Universe → Leapfrog Integrator: integrates
- IAS15 Integrator → Snapshot I/O: writes snapshots
src/integrator/ias15.rs - WHFast Integrator → Snapshot I/O: uses snapshot I/O
src/integrator/whfast.rs - Snapshot I/O → History Snapshot: stores history
- Snapshot I/O → History Snapshot: stores recovery
- Researcher → Raw History Export: exports history
- Researcher → Orbital History: explores history
- Researcher → Resonance Analysis: studies resonances
- History Snapshot → Raw History Export: reads snapshots
- History Snapshot → Orbital History: reads snapshots
- History Snapshot → Resonance Analysis: reads snapshots