Skip to main content

Consolidated aircraft recipes in Python.

Project description

CARPy

Consolidated Aircraft Recipes in Python

Yaseen Reza

License: GPL v3 Python Version PyPI Version

CARPy is an open source project for those interested in the methodology and approach to the conceptual-level design of fixed-wing aircraft. This library provides its users with access to a variety of design tools for conceptual analysis - CARPy is designed to complement and not substitute a comprehensive and detailed study of a vehicle concept.

Users will find:

  • Virtual (design) atmospheres
  • Hassle-free conversions between systems of units
  • Constraint Analysis Methods
  • [WorkInProgress] Propulsion models and Engine Performance Decks
  • ...and much more [WorkInProgress]

For a detailed description of the library, please consult the documentation. To get started, follow the instructions below.

Continuous Integration Status (CircleCI):
CircleCI

✔️ Getting Started

Installation

carpy is written for (and tested in) Python version 3.9.5.

On most systems you should be able to simply open an operating system terminal and at the command prompt type

$ pip install carpy

or

$ python -m pip install carpy

NOTE: pip is a Python package; if it is not available on your system, download get-pip.py and run it in Python by entering

$ python get-pip.py

at the operating system prompt.

If you already have a version of carpy installed and are simply trying to upgrade, use the --upgrade flag:

$ pip install --upgrade carpy

An alternative approach to installing carpy is to clone the GitHub repository using git, by typing

$ git clone https://github.com/yaseen157/carpy.git

at the command prompt. Following a successful clone of files to your machine, navigate to the library root (this contains the file pyproject.toml). At this point, you may enter the following:

$ python -m pip install ./

Alternatively, adventurous users who want an editable install to make any customisations in their local build should use the --editable flag:

$ python -m pip install -e ./

Should you find that your installation requires packages you do not have in your current Python environment, install them by typing this in the same prompt:

$ python -m pip install -r requirements.txt

A 'Hello world' example: Atmospheric properties

There are several options for running the examples shown here: you could copy and paste them into a .py file, save it and run it in Python, or you could enter the lines, in sequence, at the prompt of a Python terminal. You could also copy and paste them into a Jupyter notebook (.ipynb file) cell and execute the cell.

"""'Hello World' example to introduce users to CARPy atmospheres."""
from carpy.environment import ISA1975
from carpy.utility import Quantity

# Instantiate an atmosphere object:
# International Standard Atmosphere with a +10C offset
atm = ISA1975(T_offset=10)

# Query the ambient density in this model at 41,000 feet 
# noinspection PyTypeChecker
print(f"{atm} density at 41,000 feet:",
      atm.rho(altitude=Quantity(41_000, "ft")))

You should see the following output:

ISA1975(+10°C) density at 41,000 feet: 0.28740209 kg m⁻³

You can learn more about CARPy's capabilities through the exemplary notebooks.

🐍 Acknowledgements

The library was authored by:

  • Yaseen Reza

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

carpy-0.0.6.post3.tar.gz (6.6 MB view hashes)

Uploaded Source

Built Distribution

carpy-0.0.6.post3-py3-none-any.whl (4.8 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page