Giter Site home page Giter Site logo

amyinorbit / reentry.py Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 0.0 8 KB

Spacecraft atmospheric entry simulations using Python

Home Page: https://amyparent.com/post/crew-dragon-reentry/

License: MIT License

Python 100.00%
reentry atmospheres space spacecraft-trajectories

reentry.py's Introduction

Python Reentry Simulations

This is the python codes I use to simulate spacecraft reentries. Requires Python 3 & Matplotlib.

Usage

The script is very basic at the moment. Run data are defined in a .json file. At the moment, only Earth and Mars are valid planets, but more could be added fairly easily in the script.

{
    "craft": {
        "name": "MSL",
        "ballistic_coef": 146,
        "lift_drag": 0.24
    },
    "planet": "Mars",
    "sim": {
        "max_it": 1000000,
        "delta_t": 0.1,
        "entry_interface": 135e3,
        "fpa": -15.5,
        "velocity": 5.6e3,
        "stop_alt": 0
    }
}

Once you have a run file, just call the script on it and it'll generate your plots

$ ./reentry.py msl.json
$ ls

    MSL-dtg.png
    MSL-load_alt.png
    MSL-load_time.png
    MSL-traj.png
    MSL-vel.png

Method

The program solves the newtonian equations of motion and computes the trajectory of the reentering spacecraft using the forces applied to it (gravity, aerodynamic drag & lift) using a very basic Euler integrator. You can read more about that on the blog post.

The atmospheres are modelled using the scale height method. It's simplistic and could benefit from better models (NASA Standard Atmosphere, maybe even Mars GRAM and co.) but the gains are likely to be dwarfed by errors induced by the simple assumptions made everywhere (constant lift-drag ratio, constant drag coefficient…)

reentry.py's People

Contributors

amyinorbit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.