Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

pyAVL is not obsolete, use OptVL

I will no longer be working on pyAVL and will be removing it soon. OptVL is a more advanced version and where developement will continue.


pyAVL

Downloads

Documentation

pyAVL is a stripped down version of Mark Drela and Harold Youngren's famous AVL code wrapped in python with f2py. This allows one to more easily conduct large parameter sweeps in AVL or to include AVL into a larger model. Additionally, this wrapper provides access to more data than is available through traditional file output. Unlike in the output files which is limit to about 4 digits, the user has access to the full double precision data.

Installation

The best way to get pyAVL is to install it through pip

pip install pyavl-wrapper

This version even comes packaged with OpenBLAS for faster analysis.

Currently, only Linux and macOS are supported. The process of building on Windows still has issues. For now Windows users will have to use pyAVL through Windows subsystem for Linux (WSL).

building locally

If you want to make pyAVL locally then you have to clone the repository and use the following process.

In the root directory run

pip install . 

Basic usage

The API of pyAVL was made to mirror the usage of AVL through its text interface. The user loads in a geometry file, adds constraints, and then executes analysis runs.

The AVL wrapper is implemented in the AVLSolver class. To use this wrapper, first one must initialize the AVLSolver object with a geometry file and optionally a mass file. After, the user can add constraints and then execute the run to generate data. Below is a basic example of this workflow.

from pyavl import AVLSolver
import numpy as np

avl_solver = AVLSolver(geo_file="aircraft.avl")
avl_solver.add_constraint("alpha", 0.00)

# control surface names from geometry file
avl_solver.add_constraint("Elevator", 0.00, con_var="Cm pitch moment")
avl_solver.add_constraint("Rudder", 0.00, con_var="Cn yaw moment")

avl_solver.set_case_parameter("Mach", 0.3)

# This is the method that acutally runs the analysis
avl_solver.execute_run()

print("----------------- alpha sweep ----------------")
print("   Angle        Cl           Cd          Cdi          Cdv          Cm")
for alpha in range(10):
    avl_solver.add_constraint("alpha", alpha)
    avl_solver.execute_run()
    run_data = avl_solver.get_case_total_data()
    print(
        f' {alpha:10.6f}   {run_data["CL"]:10.6f}   {run_data["CD"]:10.6f}   {run_data["CDi"]:10.6f}   {run_data["CDv"]:10.6f}   {run_data["CM"]:10.6f}'
    )

print("----------------- CL sweep ----------------")
print("   Angle        Cl           Cd          Cdff          Cdv          Cm")
for cl in np.arange(0.6,1.6,0.1):
    avl_solver.add_trim_condition("CL", cl)
    avl_solver.execute_run()
    run_data = avl_solver.get_case_total_data()
    alpha = avl_solver.get_case_parameter("alpha")
    print(
        f' {alpha:10.6f}   {run_data["CL"]:10.6f}   {run_data["CD"]:10.6f}   {run_data["CDi"]:10.6f}   {run_data["CDv"]:10.6f}   {run_data["CM"]:10.6f}'
    )

Metadata

Release files for pyavl-wrapper 1.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pyavl-wrapper 1.8.1
File
pyavl_wrapper-1.8.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
pyavl_wrapper-1.8.1-cp311-cp311-macosx_12_0_arm64.whl CPython 3.11 CPython 3.11 macOS 12.0+ ARM64 Details
pyavl_wrapper-1.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
pyavl_wrapper-1.8.1-cp310-cp310-macosx_12_0_arm64.whl CPython 3.10 CPython 3.10 macOS 12.0+ ARM64 Details
pyavl_wrapper-1.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
pyavl_wrapper-1.8.1-cp39-cp39-macosx_12_0_arm64.whl CPython 3.9 CPython 3.9 macOS 12.0+ ARM64 Details

Total release size: 59.1 MB

Release files / pyavl_wrapper-1.8.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyavl_wrapper-1.8.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.1 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
9fde579ae507612872967b7605e9ee1c54f6926ad314a7764c666c7e4cddbc49
BLAKE2b-256 checksum
How to use checksums
78775ee748bddb204b8c737de97561603588a75f6efdbe6f0a63058fb66ae11d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / pyavl_wrapper-1.8.1-cp311-cp311-macosx_12_0_arm64.whl

Download URL pyavl_wrapper-1.8.1-cp311-cp311-macosx_12_0_arm64.whl
Size 8.6 MB
Tags CPython 3.11 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
9e543e3b1da7b5bd7e751f7d8ac95dd887a1886dbec816409cbbb8639eef9971
BLAKE2b-256 checksum
How to use checksums
c4095b651e1ae07287d074abb443075bc8571e31b7569d7d9c04b6de8710a8fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / pyavl_wrapper-1.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyavl_wrapper-1.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d1b41c87ebebb882ee9f051a22a26abba23300c5dcfad5e817bcf45f412def72
BLAKE2b-256 checksum
How to use checksums
783d6ce51d9d3466b2659407dc85d899f95eb0a482962118571a62eff8e4ce4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / pyavl_wrapper-1.8.1-cp310-cp310-macosx_12_0_arm64.whl

Download URL pyavl_wrapper-1.8.1-cp310-cp310-macosx_12_0_arm64.whl
Size 8.6 MB
Tags CPython 3.10 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
16c16a099fc75ff0d07b7c96285aa78ee428a3934fcc8c89371d9bc771fabf35
BLAKE2b-256 checksum
How to use checksums
11a33f5cc800b4169b02518ab59ca7ec789b86a4b583318cecac7ea1c7912d4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / pyavl_wrapper-1.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyavl_wrapper-1.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
5f7db0142fdcc9cb00f6357f21c84947df8b6ab63d96b597b7bd2048106d6928
BLAKE2b-256 checksum
How to use checksums
9b9ad1e6ac01f557c8adfb79b6a8b970561cc8498d89e579b49ce521a842800c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / pyavl_wrapper-1.8.1-cp39-cp39-macosx_12_0_arm64.whl

Download URL pyavl_wrapper-1.8.1-cp39-cp39-macosx_12_0_arm64.whl
Size 8.6 MB
Tags CPython 3.9 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
946b8c24c2604005bdf6fe3035f9665e4e4b1f8fa593400802543f921a00eb62
BLAKE2b-256 checksum
How to use checksums
5bc3377ac9d0d2e03cc20f763f3fbc3e36010bf2cb00219aac4edac6a33971d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page