Coder Social home page Coder Social logo

danielmatz / coesa.jl Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 4.0 49 KB

The U.S. Committee on Extension to the Standard Atmosphere (COESA) atmosphere model, also known as the U.S. Standard Atmosphere, 1976.

License: Other

Julia 100.00%
atmosphere julia

coesa.jl's Introduction

COESA

CI codecov

The U.S. Committee on Extension to the Standard Atmosphere (COESA) atmosphere model, also known as the U.S. Standard Atmosphere, 1976.

Usage

The main function is atmosphere(z), which returns the atmospheric state at geometric altitude z, where z has units of m.

The atmospheric state object that is returned has the following accessors:

  • altitude, which returns the altitude in m
  • density, which returns the density in units of kg/m³
  • pressure, which returns the pressure in units of Pa
  • temperature, which returns the temperature in units of K
  • speed_of_sound, which returns the speed of sound in units of m/s
  • mean_molecular_weight, which returns the mean molecular weight in units of kg/kmol
  • dynamic_viscosity, which returns the dynamic viscosity in units of N*s/m^2; only available up to an altitude of 86km
using COESA
atmos = atmosphere(123.0)
rho = density(atmos)
T = temperature(atmos)
P = pressure(atmos)
c = speed_of_sound(atmos)
M = mean_molecular_weight(atmos)

Extensions

Integration with Unitful is provided by a package extension. If the altitude passed to atmosphere is a Quantity, then the accessors for the atmospheric state will also return Quantitys.

Implementation

For altitudes below 86km, the equations from the original report are used. The published tables have a discontinuity in the mean molecular weight and temperature at 86km. The report outlines how to blend out the discontinuity. We implement this blending here. In this region, the model output matches the published tables nearly perfectly. Only a few of the tested altitudes show differences. It is only in the pressure values, and in these cases we only miss the least significant digit.

For the region above 86km, the temperature is computed using the equations from the original report, but the equations for the mean molecular weight and pressure are much more complex. Instead, we adapt the method from Regan's Re-Entry Vehicle Dynamics to interpolate the tabulated mean molecular weight and pressure. We use a quadratic interpolation on the mean molecular weight and the natural log of the pressure. Because we are using interpolation, the computed pressure and density occasionally don't match the published values. The values are very small, and we still have at least 2 significant digits.

The density is computed as outlined by the original report.

The speed of sound is computed as outlined by the original report for altitudes below 86km. For altitudes above 86km, the speed of sound at 86km is used.

References

  1. U.S. Standard Atmosphere, 1976. Stock No. 003-017-00323-0. http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19770009539.pdf.
  2. Regan, F.J., Re-Entry Vehicle Dynamics, AIAA Press, New York, 1984.

coesa.jl's People

Contributors

danielmatz avatar dependabot[bot] avatar staticfloat avatar tkelman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

coesa.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

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.