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.2-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.2-cp311-cp311-macosx_12_0_arm64.whl (8.8 MB view details)

Uploaded CPython 3.11macOS 12.0+ ARM64

pyavl_wrapper-1.6.2-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.2-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.2-cp310-cp310-macosx_12_0_arm64.whl (8.8 MB view details)

Uploaded CPython 3.10macOS 12.0+ ARM64

pyavl_wrapper-1.6.2-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.2-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.2-cp39-cp39-macosx_12_0_arm64.whl (8.7 MB view details)

Uploaded CPython 3.9macOS 12.0+ ARM64

pyavl_wrapper-1.6.2-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.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 985c081a371095334dafe969c299c44e42bfb2234814f2e246aab6e24c284489
MD5 ecb11ac21d9c1f5f1d3948bf0a8c36f7
BLAKE2b-256 29219ed8266e1f155b0c0ae5dc24952fd27c82b7239e1c3610b5f7fbefe4a87f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.2-cp311-cp311-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 424866a2da1ab7193ccfc46b17253d8d67e2b6889b9495535fc9ed781c99a655
MD5 c21fb787d998e96e5ea58e83c6c723ed
BLAKE2b-256 de95a70bcac1b032516d438f8fcc0a445cb45d66fb59c52e5fda87db03db01c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f0db44d214add6da4091776947fd6aacf636bcaf4c46324625b6fd10e73ed517
MD5 14757078f636653586ea2356933d0e21
BLAKE2b-256 e57d749b55a6114dc85d50b889c5ef2969b58cb9b85c675259600356179329ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 42a2fe3e93190db0b37964936ce63e07d331dcebc91f85334e0f97f8e2be4fa0
MD5 380f4b6e780cea3dcbb646bea2a5d0ea
BLAKE2b-256 3d821e3b9263453be6a9cd011f40c39f0c97b74eac6607a551ca8fd67f547307

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.2-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 3cefc2ae8eb9a5ad67af07f95c2af46a604beb5094cb8f20579f9d4cc137b465
MD5 993924e6e69443081e76b1c74fd9f974
BLAKE2b-256 3faa7b6cce6cb1805f1000449afc246caf71e6edc7e32a86b3e4ba98b44d40aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 78940eff305c6faa5b5d9decf321681076abaffafd109e53d71eb4d28c57a816
MD5 02a999ef579dddc4a5bc443f03f5fce0
BLAKE2b-256 93fe0172be0e93d065ff8f63ceb500e98dcec723529cc60383b3273d82998f61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 98059f9c028658c5e618047a4d2f30e01f99d283bf17e1ae6fbade72e5feef84
MD5 71fd276e5796e4a44451b4e89b8deb8a
BLAKE2b-256 8930593311ddefb54fa23df82657e7b1908cf3ebb565f884947fc66056c01343

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.2-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 785885168b769d60f24ca70ee273ec9b4a0dea4e3a543235ecac52fb36c70eb3
MD5 9bdfd2453592f990e3c3274f8c3a76d7
BLAKE2b-256 ef482e72d5a3b0aaf10d60299356b5e16d781cb2685b1013d16eecc317058c43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyavl_wrapper-1.6.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 22f11fe28cfb38d22bb615a45221a57a35f6cea9684b029610a35beb78b6f3de
MD5 4c660a2e390e0187e67109327554db37
BLAKE2b-256 ff9e11ed0a8773a3870f55b1d373d03c7eef7bcff0a035d83a3395bce22db1bf

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