planetsfactory 0.0.3

Planet factory — classify, build and catalogue planets for any star system: Solar System, TRAPPIST-1, Kepler-90, Proxima Centauri, or fully custom worlds.
Documentation
  • Coverage
  • 0%
    0 out of 480 items documented0 out of 282 items with examples
  • Size
  • Source code size: 124.08 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 15.05 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 43s Average build duration of successful builds.
  • all releases: 2m Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • celestial4498-prog

PlanetsFactory

Part of the Celestial project.

A Rust planet factory — classify, build, and catalogue planets for any star system. From terrestrial worlds and gas giants to lava worlds, ocean worlds, rogue planets, sub-Neptunes, and super-Earths, with full orbital mechanics, atmospheric physics, interior models, formation scenarios, evolution, observables, and procedural system generation. Pure procedural — no hardcoded presets, all parameters explicit.

Features

  • Type system — 8 planet types with class-specific physics and builder pattern constructors
  • Terrestrial planets — Iron core fraction, magnetic moment, tidal locking time, plate tectonics model
  • Gas giants — Ring Roche limits, metallic hydrogen pressure, Kelvin-Helmholtz timescale, envelope opacity
  • Ice giants — Ice/rock mantle partitioning, magnetic dipole offset, wind speed estimates
  • Lava worlds — Dayside temperature, magma ocean depth, tidal lock factor, thermal emission
  • Ocean worlds — Water mass fraction, ice layer depth, ocean pH model, habitability index
  • Rogue planets — Unbound interstellar velocity, no orbital elements, internal heat budget
  • Sub-Neptunes — Envelope fraction, core mass fraction, atmospheric escape rate, transit radius
  • Super-Earths — Iron core fraction, volatile fraction, plate tectonics flag, surface pressure
  • Gravitation — Surface acceleration, escape velocity, Hill sphere, Roche limit, Tisserand parameter, Laplace radius
  • Atmospheres — Barometric law, Jeans escape rate, greenhouse effect, effective temperature, scale height
  • Interior models — Core/mantle structure, central pressure, moment of inertia factor, Adams-Williamson density
  • Orbital mechanics — Kepler solver, elements ↔ Cartesian, vis-viva, period, mean anomaly propagation
  • Formation — Core accretion, disk instability, pebble accretion, snow line, isolation mass, MMSN density
  • Evolution — Cooling luminosity, radius contraction, photo-evaporation, tidal migration, habitable zone boundaries
  • System generator — Procedural systems via Titius-Bode spacing for solar-type and M-dwarf stars
  • Photometry — Albedo conversion, flux ratios, equilibrium temperature, day-night contrast, bolometric magnitude
  • Transits — Depth, duration, ingress/egress, impact parameter, limb darkening correction, TTV
  • Radial velocity — Semi-amplitude K, minimum mass, Rossiter-McLaughlin effect, activity jitter

Quick Start

cargo build
cargo test

Examples

cargo run --example solar_system_demo      # Solar System planets, physical properties, orbital elements
cargo run --example validation             # Cross-module validation with sanity checks
cargo run --example exoplanet_generation   # Procedural exoplanet system generation

Testing

cargo test --all-targets

94 integration tests across types, physics, and engine modules.

Project Structure

src/
├── config/          # Physical constants, unit conversions, planetary mass/radius constants
├── types/           # Terrestrial, gas giant, ice giant, lava world, ocean world, rogue, sub-Neptune, super-Earth
├── physics/         # Gravitation, atmospheres, interior structure models
├── engine/          # Orbital mechanics, formation, evolution, system generator
├── observables/     # Photometry, transits, radial velocity
└── utils/           # Math helpers (lerp, RK4, Simpson), I/O

Dependencies

  • sciforge — Physical constants, astronomical utilities

License

MIT — see LICENSE.