dwarfplanetsfactory 0.0.1

Dwarf planet factory — classify, build and catalogue dwarf planets of any type: Kuiper belt, scattered disk, plutino, cold classical, detached, binary, Ceres-type, and sednoid.
Documentation
use dwarfplanetsfactory::physics::gravity;
use dwarfplanetsfactory::physics::thermal;

// ── Gravity ─────────────────────────────────────────────────────────
#[test]
fn binding_energy_positive() {
    let e_bind = gravity::binding_energy(1.0e22, 5.0e5);
    assert!(e_bind > 0.0);
}

#[test]
fn solar_tidal_at_pluto_distance() {
    let accel = gravity::solar_tidal_acceleration(6.0e5, 39.5);
    assert!(accel > 0.0);
}

#[test]
fn neptune_tidal_near_encounter() {
    let accel = gravity::neptune_tidal_acceleration(6.0e5, 1.0);
    assert!(accel > 0.0);
}

#[test]
fn hill_radius_pluto() {
    let rh = gravity::hill_radius(39.5, 1.303e22);
    assert!(rh > 0.0);
}

#[test]
fn roche_limit_positive() {
    let rl = gravity::roche_limit(6.96e8, 1408.0, 1800.0);
    assert!(rl > 0.0);
}

#[test]
fn specific_orbital_energy_negative() {
    let energy = gravity::specific_orbital_energy(39.5);
    assert!(energy < 0.0); // bound orbit
}

#[test]
fn orbital_velocity_at_perihelion() {
    let v = gravity::orbital_velocity(30.0, 39.5);
    assert!(v > 0.0);
}

#[test]
fn specific_angular_momentum_positive() {
    let h = gravity::specific_angular_momentum(39.5, 0.25);
    assert!(h > 0.0);
}

// ── Thermal ─────────────────────────────────────────────────────────
#[test]
fn equilibrium_temp_at_40au() {
    let t = thermal::equilibrium_temp(40.0, 0.1);
    assert!(t > 30.0 && t < 80.0);
}

#[test]
fn temp_perihelion_warmer_than_aphelion() {
    let tp = thermal::temp_at_perihelion(39.5, 0.25, 0.1);
    let ta = thermal::temp_at_aphelion(39.5, 0.25, 0.1);
    assert!(tp > ta);
}

#[test]
fn n2_sublimation_rate_at_low_temp() {
    let rate = thermal::n2_sublimation_rate(40.0);
    assert!(rate >= 0.0);
}

#[test]
fn co_sublimation_rate_positive() {
    let rate = thermal::co_sublimation_rate(50.0);
    assert!(rate >= 0.0);
}

#[test]
fn surface_recession_positive() {
    let rate = thermal::surface_recession(1.0e-8, 1000.0);
    assert!(rate >= 0.0);
}

#[test]
fn thermal_parameter_defined() {
    let tp = thermal::thermal_parameter(5.0e5, 10.0, 0.1, 40.0);
    assert!(tp >= 0.0);
}