Crate kalast[−][src]
kalast
Thermophysical model for binary systems of asteroids.
Using kalast
You will need the last stable build of the rust compiler and the official package manager: cargo.
Simply add the following to your Cargo.toml
file:
[dependencies] kalast = "0.2.1"
Useful functionalities of kalast are grouped in the root module kalast::
.
kalast in action
use kalast::{ BinarySystem, EnvironmentSystem, Properties, Time, World, ASTRONAUMICAL_UNIT, DAY, HOUR, MINUTE, V3, YEAR, }; // Two spheres to test case the mutual heating. let mut binary_system = BinarySystem::new( "Didymos system", V3::new(0.0, 1.0, 0.0) * ASTRONAUMICAL_UNIT * 1.664, ) .with_primary( "rsc/obj/sphere.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 ), ) .with_secondary( "rsc/obj/sphere.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) * 1.5e3, // relative position ); binary_system.complete_model(true); binary_system.set_target_secondary(true); binary_system.primary_mut().fixed(true); binary_system.secondary_mut().fixed(true); // Time let time = Time::new(30.0 * DAY, 10.0 * MINUTE); // World let mut world = World::new(time, binary_system); world.start(); world.save("rsc/data/tmp.txt"); println!( "min: {:.2}, max: {:.2}", world.environment_system.body().surface_temperatures().min(), world.environment_system.body().surface_temperatures().max() );
You can also read other examples.
Features
kalast is meant for binary system of asteroids surface thermophysical modelling. The physics of this engine includes these features:
- custom shape model
- celestial body revolution
- compute surface temperatures from solar flux
- ground 1D heat transfert conduction
- celestial body mask view (example only equator)
- mutual heating from primary/moon
- self heating
- TODO: 3D conduction / FEM
- TODO: mutual occultations
- TODO: shadowing
Explore
If your want to explore the documentation, you can visite these pages:
Object3D
: parse 3D object file and compute atributes of faces (centers, normals, …)Body
: the representation for a celestial body- [
BinarySystem
]: the environment system for binary system of asteroids - [
World
]: the simulation manager Properties
: all the properties to characterise a body
Re-exports
pub use crate::core::*; |
pub use crate::matplotlib::*; |
pub use crate::toolbox::*; |
Modules
core | Core features. |
matplotlib | Bindings to matplotlib. |
toolbox | Generic functions for math, physics, matrix operations. |
Macros
add_hashmap | Binding to add var to HashMap if is some. |
add_to_args | Binding to add to existing *args. |
add_to_args_after | Binding to add to existing *args at the end. |
args | Binding to create *args. |
debug | Alias for debug logs. |
error | Alias for error logs. |
info | Alias for info logs. |
kwargs | Binding to create **kwargs. |
kwargs_auto | Binding to create **kwargs from variable without need of key. |
kwargs_filtered | Binding to create **kwargs and add var if is some. |
log_init | Macro for the function to initialize the logs for default usage. |
pyo3_hash | Create HashMap. |
trace | Alias for trace logs. |
warn | Alias for warn logs. |
Traits
SuperScalar | Trait that extends |
Type Definitions
M3 | Type alias for |
Matrix10xX | Type alias for |
MatrixSlice10x1 | Type alias for |
MatrixSliceMut10x1 | Type alias for |
V3 | Type alias for |
V3X | Type alias for |
VX | Type alias for |