Skip to main content

A direct Python interface for Mark Drela and Harold Youngren's famous AVL code.

Project description

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}'
    )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyavl_wrapper-1.6.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pyavl_wrapper-1.6.4-cp311-cp311-macosx_12_0_arm64.whl (8.8 MB view details)

Uploaded CPython 3.11macOS 12.0+ ARM64

pyavl_wrapper-1.6.4-cp311-cp311-macosx_10_9_x86_64.whl (14.1 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

pyavl_wrapper-1.6.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pyavl_wrapper-1.6.4-cp310-cp310-macosx_12_0_arm64.whl (8.8 MB view details)

Uploaded CPython 3.10macOS 12.0+ ARM64

pyavl_wrapper-1.6.4-cp310-cp310-macosx_10_9_x86_64.whl (14.1 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

pyavl_wrapper-1.6.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pyavl_wrapper-1.6.4-cp39-cp39-macosx_12_0_arm64.whl (8.7 MB view details)

Uploaded CPython 3.9macOS 12.0+ ARM64

pyavl_wrapper-1.6.4-cp39-cp39-macosx_10_9_x86_64.whl (14.1 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file pyavl_wrapper-1.6.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bdf2ff95429c7ee882ca7bc973d4549e819272ef927f70fc90cd5a19b19f4ce8
MD5 f6d34dd1b33a5611e82ba4e0dce2411c
BLAKE2b-256 073e42d941d205269460630970589fffeb7a3f9e9ab0501aaa1f364ff657acd4

See more details on using hashes here.

File details

Details for the file pyavl_wrapper-1.6.4-cp311-cp311-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.4-cp311-cp311-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 eb8f39180d0437d6de36b35b92e528c57e6a589372001f5ac0ccb8e028ed1b9b
MD5 347f9d9e5833b55370d5c890b4bfb77e
BLAKE2b-256 3051ed5de10088020e17f3208f0b3296fea125f82c31977ce318b0e79145320d

See more details on using hashes here.

File details

Details for the file pyavl_wrapper-1.6.4-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 be86838631a2b1cc80bc54542cd742e3e593d917945be990461dacf824bb04db
MD5 d9b853c8483895fb36efaef3e4c4a964
BLAKE2b-256 b2edca662e257cf123216cec2b912acf4f388b25075414c9e509f7c30e63bb53

See more details on using hashes here.

File details

Details for the file pyavl_wrapper-1.6.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b404ab822103a051c5d8a808c14dddb2cd855f3fc210517f4c75c22870fb383
MD5 755eb54afd157465ba6562bdd3f2e391
BLAKE2b-256 545261b1b7cd0630aec32d7f68375e30dff53d3d76ac8b0c87ae6ac1d40edb5c

See more details on using hashes here.

File details

Details for the file pyavl_wrapper-1.6.4-cp310-cp310-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.4-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 7d7d2e3af48d7e37e8159570e691c34cc48fef1bc97a053ae4c31e6781994e8b
MD5 446c1309be5cc49e76d712504d46a40a
BLAKE2b-256 bd5d58dea19088b34420e9c79731f037b4aca7fee370de5e35c02f5d37ad4c50

See more details on using hashes here.

File details

Details for the file pyavl_wrapper-1.6.4-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3e097783f0869953a459ab27d93b82c7d7475e557244409e422f48fcf8673020
MD5 41667ee8cc7318472430069fae55dcce
BLAKE2b-256 7be2d64c51bbf46887105789953a1612847efab769d47ef2c677867d4933677f

See more details on using hashes here.

File details

Details for the file pyavl_wrapper-1.6.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa579bb01212f032f05edad05af6218d2f237e4cf6bf3c154bc235979f90c5fc
MD5 46e16930767f109226c00f009dd1e701
BLAKE2b-256 5662d7cf186d11ee3010eb91bbc293f383ec75b9d641c2df63f32d21dd99ed5d

See more details on using hashes here.

File details

Details for the file pyavl_wrapper-1.6.4-cp39-cp39-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.4-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 53553c4dfcccf6e39a1870ac48315cef02cff6bef5f84b67277ef8c614a44ed4
MD5 64ad3d4e21c8b2d33c211451d4590af1
BLAKE2b-256 cc20772724c32540c6a97cf3d04e49c0f6b5a86bce9a6764cffc319882ad6acc

See more details on using hashes here.

File details

Details for the file pyavl_wrapper-1.6.4-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 539925ff74c500b7d2542876e9ce7f747422ebd15a1b32eca36d0a47e223a67a
MD5 ef550e56c4f600f514f04f385bb99d5b
BLAKE2b-256 b42c597b3e1727649f98a6aa2f6b98127648c61eabab0dcd94dfc5ac88c3d768

See more details on using hashes here.

Supported by

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