# Project Structure

Structure map for the Neptunes crate.

```text
Neptunes/
├── README.md                           # Project overview and usage
├── LICENSE                             # MIT license
├── ChangeLog.md                        # Version history
├── ComingSoon.md                       # Planned features
├── Contributing                        # Contribution guidelines
├── lastest_versions.sh                 # Restore wildcard dependency versions
│
├── src/
│   ├── main.rs                         # Entry point — Neptune simulation with cloud biome materials, orbital/climate loop
│   ├── lib.rs                          # Library root, NEPTUNEMASS (1.024e26), radii (24 622 km), molar masses (H₂/He/CH₄)
│   │
│   ├── atmosphere/                     # Atmospheric science (H₂/He/CH₄)
│   │   ├── mod.rs                      # Exports climate, heatwaves, layers, storms, winds
│   │   ├── climate.rs                  # Equilibrium 46.6 K, effective 59.3 K, CH₄ fraction, internal heating
│   │   ├── heatwaves.rs                # Thermal anomaly vs 1-bar reference temperature
│   │   ├── layers.rs                   # 1-bar reference, tropospheric lapse rate (0.001 K/m), barometric profile
│   │   ├── storms.rs                   # Great Dark Spot (580 m/s winds, 800 hPa)
│   │   └── winds.rs                    # Coriolis, geostrophic wind speed for Neptune's rotation rate
│   │
│   ├── biosphere/                      # Theoretical aerial biosphere
│   │   ├── mod.rs                      # Exports aerochemistry, ecosystems, fauna
│   │   ├── aerochemistry.rs            # Hypothetical chemotroph metabolic rates in deep cloud layers
│   │   ├── ecosystems.rs               # Shannon/Simpson diversity (theoretical framework)
│   │   └── fauna.rs                    # Logistic growth model
│   │
│   ├── geodata/                        # Geographic and interior data
│   │   ├── mod.rs                      # Exports bathymetry, coordinates, elevation, regions
│   │   ├── bathymetry.rs               # Interior layer depth at grid resolution
│   │   ├── coordinates.rs              # LatLon/Ecef — Neptune oblate ellipsoid coordinate conversion
│   │   ├── elevation.rs                # Global cloud-top elevation grid
│   │   └── regions.rs                  # Atmospheric bands, vortex regions
│   │
│   ├── geology/                        # Interior processes
│   │   ├── mod.rs                      # Exports earthquakes, erosion, mountains, plate_tectonics, volcanism
│   │   ├── earthquakes.rs              # Icequake — seismology in ice mantle, moment/magnitude
│   │   ├── erosion.rs                  # Wind erosion threshold for ice particles
│   │   ├── mountains.rs                # Ice mantle density (1600), rocky core (5000), Airy root in ice shell
│   │   ├── plate_tectonics.rs          # Ice shell convection, viscosity 1e18, 7000 km shell
│   │   └── volcanism.rs                # CryoMagma — H₂O/NH₃/CH₄ cryovolcanic composition
│   │
│   ├── hydrology/                      # Interior fluid layers
│   │   ├── mod.rs                      # Exports glaciers, lakes, oceans, rivers
│   │   ├── glaciers.rs                 # Ice density, Glen's flow law, water molar mass
│   │   ├── lakes.rs                    # CryoLake — mean depth, shoreline ratio, residence time
│   │   ├── oceans.rs                   # Ionic ocean at 5000 km depth, 1400 kg/m³, Clausius-Clapeyron
│   │   └── rivers.rs                   # Atmospheric flow — Manning velocity, zonal atmospheric currents
│   │
│   ├── lighting/                       # Illumination and day cycles
│   │   ├── mod.rs                      # Exports day_night, seasons, solar_position
│   │   ├── day_night.rs                # Twilight zones from solar position
│   │   ├── seasons.rs                  # Axial tilt 28.32°, orbital period 60 182 d, seasonal classification
│   │   └── solar_position.rs           # Solar azimuth/elevation/distance at 30 AU, tilt 28.32°
│   │
│   ├── physics/                        # Orbital and impact mechanics
│   │   ├── mod.rs                      # Exports collisions, orbit, rotation, tides
│   │   ├── collisions.rs               # Asteroid impact kinetics at Neptune distance
│   │   ├── orbit.rs                    # Semi-major 30.07 AU, e = 0.008678, vis-viva, Kepler period
│   │   ├── rotation.rs                 # Sidereal 57 996 s, tilt 28.32°, precession 26 kyr
│   │   └── tides.rs                    # Tidal force from Triton (retrograde orbit), tidal acceleration
│   │
│   ├── rendering/                      # Visual rendering (deep blue)
│   │   ├── mod.rs                      # Exports atmosphere_scattering, clouds, materials, ocean_rendering, shaders
│   │   ├── atmosphere_scattering.rs    # Rayleigh scattering for 80 % H₂ / 19 % He / 1.5 % CH₄ (deep blue)
│   │   ├── clouds.rs                   # MethaneIce, HydrogenSulfide, AmmoniaHydrosulfide, DeepWater, Haze
│   │   ├── materials.rs                # PBR — cloud/atmosphere materials with iron metallic scaling
│   │   ├── ocean_rendering.rs          # Interior deep-ocean rendering parameters
│   │   └── shaders.rs                  # GLSL uniform bindings
│   │
│   ├── satellites/                     # Natural and artificial satellites
│   │   ├── mod.rs                      # Exports artificial, triton
│   │   ├── artificial.rs               # Orbit types around Neptune
│   │   └── triton.rs                   # TritonState — mass (2.14e22), radius (1353 km), retrograde orbit (354 800 km), IPC
│   │
│   ├── temporal/                       # Time and calendar
│   │   ├── mod.rs                      # Exports calendar, epoch, time_scale
│   │   ├── calendar.rs                 # Neptune day (57 996 s), year (5.2e9 s), Julian date conversions
│   │   ├── epoch.rs                    # J2000, J1950, MJD offset
│   │   └── time_scale.rs               # Simulation clock with Neptune day units
│   │
│   └── terrain/                        # Cloud-top terrain generation
│       ├── mod.rs                      # Exports heightmap, lod, mesh, texturing
│       ├── heightmap.rs                # Cloud-top variation: 3 km bands, Great Dark Spot (+5 km), polar cap
│       ├── lod.rs                      # Cube-face quadtree LOD
│       ├── mesh.rs                     # Spherical mesh
│       └── texturing.rs                # CloudBiome — MethaneIceCloud, H₂SCloud, DeepCloud, ClearBand, StormRegion, PolarVortex
│
├── tests/                              # Integration tests
│   ├── atmosphere_tests.rs             # Tests layer profiles, barometric model, Great Dark Spot
│   ├── geology_tests.rs                # Tests ice mantle density, icequake scaling, cryovolcanism
│   ├── hydrology_tests.rs              # Tests ionic ocean properties, Glen's flow law
│   └── physics_tests.rs                # Tests orbital period, Triton tidal forces, rotation
│
└── examples/                           # Runnable examples
    ├── climate_sim.rs                  # Atmospheric layers, climate state, CH₄ forcing
    ├── earthquake_sim.rs               # Interior icequake modeling in ice mantle
    └── tidal_sim.rs                    # Orbital mechanics, Triton retrograde tidal interaction
```
