![logo image]

kalast

Thermophysical model for binary systems of asteroids


Demo

![asciicast image]

In action

Calculations of the temperature at the surface of the secondary body of a binary system of asteroids:

```rust use kalast::{BinarySystem, Properties, Time, World, ASTRONAUMICAL_UNIT, HOUR, MINUTE, V3, YEAR};

fn main() { let binarysystem = BinarySystem::new( "Two spheres", V3::new(1.0, 0.0, 0.0) * ASTRONAUMICALUNIT * 1.664, ) .withprimary( "rsc/obj/spherelight.obj", Properties::new( 1.0 * YEAR, // rotation period 2.7 * HOUR, // revolution period 0.0, // obliquity 100.0, // thermal inertia 2146.0, // density 600.0, // heat capacity 0.1, // albedo 0.9, // emissivity ), ) .withsecondary( "rsc/obj/ellipsoidlight.obj", Properties::new( 11.92 * HOUR, // rotation period 11.92 * HOUR, // revolution period 0.0, // obliquity 162.0 * TAU / 360. 500.0, // thermal inertia 2146.0, // density 600.0, // heat capacity 0.07, // albedo 0.9, // emissivity ), V3::new(-1.0, 0.0, 0.0) * 1e3, // relative position );

binary_system.complete_model(true);
binary_system.primary_mut().fixed(true);
binary_system.secondary_mut().fixed(true);

// Time
let time = Time::new(
    binary_system.secondary().properties.revolution_period() * 50.,
    30.0 * MINUTE,
);

// World
let mut world = World::new(time, binary_system);
world.start();
world.save("rsc/data/tmp.txt");

println!(
    "{} {}",
    world.environment_system.secondary().temperatures().min(),
    world.environment_system.secondary().temperatures().max()
);

} ```

Build source

```sh

build as a release

./compile.sh -r

run

./kalast ```

TODO


License

Licensed under the Apache License, Version 2.0.