Calculate standard air properties given altitude input in specific units!
Project description
py_atmosphere
The International Standard Atmosphere (ISA) is an atmospheric model of how pressure, temperature, density of the Earth's atmosphere change over a wide range of altitudes. It is published by the International Organization for Standardization (ISO) as an International Standard ISO 2533:1975.
The International Civil Aviation Organization (ICAO) uses this atmospheric models as baseline in its own standard enforcing. This standard is extensively used in the Aerospace industry for aircraft and engine design tasks considering operational envelopes.
A simplified, but useful version of the ICAO standard atmospheric model was created by NASA's Glenn Research Center for academic purposes.
This package contains the simplified NASA's GRC Earth Atmospheric model and calculates atmospheric air properties for an altitude of interest, as well as supports Mach number calculation for a moving object in space at the same altitude.
Having a notion of how the air's properties change across different levels of the atmosphere are incredibly important in the Aerospace industry, as these properties have a direct impact in aircraft operation throughout the flight envelope of an aircraft, for example. To help aircraft designers, it is useful to have a Standard Atmosphere model of the variation of properties throughout the atmosphere.
Package Functions
The package includes the following Functions included in package:
py_atmosphere.py- Function calculates the NASA's GRC ambient temperature, pressure and density of the air at a given altitude (from 0 to 25,000 meters).temp_conversion.py- Function does temperature unit conversion to a variety of units for ambient conditions that describe the atmospheric model.mach_number.py- Given an altitude, function calculates the speed of sound in the ambient conditions and calculates the Mach number for the speed of an object moving in the same environment.
py_atmosphere in the Python Ecosystem
There are multiple Python packages in the ecosystem that have the similar characteristics particularly when it comes to characterization of the standards atmospheres. Existing packages with similar functionalities, particularly for ICAO standard calculations:
- atmos - programming utilities for atmospheric sciences.
- metpy - reading, visualization and performing calculations with weather data.
- pyatmos - archive of routines that estimate the vertical structure of atmosphere with various density models.
Unique features of py_atmosphere
Use of the standard model on practical aerospace applications is quite limited. This package stands out given its unique blend of reference standards on practical design calculations, tailored for individuals with little to no technical expertise of the Aerospace industry and aircraft design. Here is what sets py_atmosphere apart:
- Package avoids complexity by performing simple, transparent calculations of high value on aircraft design parameters, applying a simple interpretable atmospheric model (NASA's GRC).
- Makes use of the standard for calculation on simple physical parameters such as speed of sound and Mach number for a moving object.
Installation
pip install py_atmosphere_mach
Dependencies
- python=3.11
- pandas=2.1.2
- pytest=7.4.3
- ipykernel=6.26.0
- poetry
- cookiecutter
Usage
from py_atmosphere.py_atmosphere import py_atmosphere
from py_atmosphere.mach_number import mach_number
from py_atmosphere.temp_conversion import temp_conversion
- py_atmosphere(altitude, alt_units)
- altitude : A numeric value that represents the altitude of interest. This value is the reference to extract air properties, specifically, temperature and pressure.
- alt_units : The unit of the input altitude. Valid units are: m (meters), km (kilometers), ft (feet), miles (miles)
- mach_number(altitude, alt_units, speed)
- altitude: A numeric value that represents the altitude of interest. This value is the reference to extract air properties, specifically, temperature, pressure and density.
- alt_units : Units of the altitude input to function. Valid units are: m (meters), km (kilometers), ft (feet), miles (miles).
- speed: Speed of the object in m/s.
- temp_conversion(properties, property_to_change, desired_unit)
- properties : A three-element list that describes the inputed altitude (km), along with the temperature (Celsius) and pressure (KiloPascal) of the air. This is typically the output of
py_atmospherefunction. - property_to_change : Selected property for which units need to be changed. Valid inputs are: "altitude", "temperature", "pressure"
- desired_unit : The desired units for the selected property.
Run the tests
- Run the following command in terminal to execute the tests:
pytest tests/
- Run the following command in terminal to execute the coverage of the tests:
pytest --cov=py_atmosphere --cov-branch
Contributing
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
License
py_atmosphere was created by Tianjiao Jiang, Zhengling Jiang, Francisco Ramirez. It is licensed under the terms of the MIT license.
Credits
py_atmosphere was created with cookiecutter and the py-pkgs-cookiecutter template.
Contributors
- Francisco Ramirez fraramfra@gmail.com
- Zhengling Jiang cjiang1280@gmail.com
- Tianjiao Jiang jiangtj000@gmail.com
Reference
International Organization for Standardization. (1975). ISO 2533:1975 - International Standard Atmosphere (ISA). Retrieved from https://www.iso.org/standard/7472.html
International Civil Aviation Organization (ICAO). (n.d.). ICAO Homepage. Retrieved from https://www.icao.int/Pages/default.aspx
NASA's Glenn Research Center. (n.d.). Atmospheric Model for the Earth's Atmosphere. Retrieved from https://www.grc.nasa.gov/www/k-12/airplane/atmosmet.html
PyPI. (n.d.). atmos. Retrieved from https://pypi.org/project/atmos/
PyPI. (n.d.). MetPy. Retrieved from https://pypi.org/project/MetPy/
PyPI. (n.d.). pyatmos. Retrieved from https://pypi.org/project/pyatmos/
Cookiecutter. (n.d.). Cookiecutter Documentation. Retrieved from https://cookiecutter.readthedocs.io/en/latest/
GitHub. (n.d.). py-pkgs-cookiecutter Template. Retrieved from https://github.com/py-pkgs/py-pkgs-cookiecutter
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_atmosphere_mach-0.3.7.tar.gz.
File metadata
- Download URL: py_atmosphere_mach-0.3.7.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
452defc9e124b0c34b6faf7c37104678754658af154b88341d312cf499adc2cb
|
|
| MD5 |
9a1550140e472e001eaf5e78bed02639
|
|
| BLAKE2b-256 |
faa5adebc6f8540792f8bb65f9c5dc0450dd486156ce79904333220bdd8b14e4
|
File details
Details for the file py_atmosphere_mach-0.3.7-py3-none-any.whl.
File metadata
- Download URL: py_atmosphere_mach-0.3.7-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7330ed21ba255135b37323d6753d7ebf704b8f52306ef2cd7279a53cff06e2dc
|
|
| MD5 |
9224994f7ed0660ba2c3840fa9fd85bc
|
|
| BLAKE2b-256 |
1777f17c1a3858b9b75d130aa5fef3169c2e7577c413d066f24463251548c8e1
|