#physics #mechanics #newtonian

initial_conditions

A helpful physics lib: mechanics, useful constants, and more

6 releases (3 breaking)

Uses old Rust 2015

0.4.0 Mar 8, 2018
0.3.2 Feb 24, 2018
0.2.0 Feb 23, 2018
0.1.0 Feb 23, 2018

#791 in Science

Download history 2/week @ 2023-12-06 10/week @ 2023-12-13 50/week @ 2023-12-20 20/week @ 2023-12-27 16/week @ 2024-01-03 24/week @ 2024-01-10 16/week @ 2024-01-17 4/week @ 2024-01-24 5/week @ 2024-01-31 30/week @ 2024-02-07 23/week @ 2024-02-14 36/week @ 2024-02-21 38/week @ 2024-02-28 30/week @ 2024-03-06 37/week @ 2024-03-13 27/week @ 2024-03-20

140 downloads per month

MIT/Apache

21KB
452 lines

Initial Conditions (a physics library in Rust)

Build Status Coverage Status

Read the docs

How to use:

Add initial_conditions to your Cargo.toml file:

[dependencies]
initial_conditions = "0.3.0"

Check the crates.io badge above to see which version is the latest

And now use it in your project...

extern crate initial_conditions;

use initial_conditions::kinematics::*;

let w = work::work(/* args */);

Be sure to read the documentation to see what the lib has to offer.

Units

All arguments and return values are implicitly returned in SI units (i.e. radians. Specific units are noted in the documentation)

Project structure

  • Constants are exported directly from src/lib.rs

  • Generalized modules are exported in the main src/lib.rs file

"Generalized", here, means general physics topics: kinematics, electromagnetism, astro, etc.

  • Specific topics are exported from the more general, e.g.:
    // Example structure only
    lib.rs
         |
         | kinematics/
                     |
                     | linear_motion.rs
                     | circular_motion.rs

         | electromag/
                     | magnetism.rs

Capabilities right now (and still being added):

  • Useful constants
  • Kinematics functions

Planned capabilities:

  • Electromagnetism
  • Quantum Mechanics
  • Astro

This is still, very much, a work in progress. The goal of this project is to hold simple (Physics 101) equations, but also more detailed work (n-dimensional physics, integration approximations, etc.). Expect most work to come incrementally, starting from the more simple topics to the more advanced.

Please reach out if something is off or there is any confusion

Dependencies

~245KB