A modified version of Mark Drela and Harold Youngren's famous AVL code with a direct Python interface and gradient based optimization support.
Project description
AVL + python + optimization = OptVL
OptVL is a modified version of Mark Drela and Harold Youngren's famous AVL code with a python-wrapper and AD derivative routines for gradient-based optimization. The python wrapper allows one to easily conduct large parameter sweeps with a vortex lattice method or to include a vortex lattice method into a larger model. Together with the additional derivative routines, OptVL can be added to an optimzation loop for design refinement by a gradient-free or gradient-based optimizer. On top of this OptVL also has the ability to view the geometry and pressure distribution in python, Paraview, or Tecplot, which provides portable post-processing.
key features
- specify and modify the geometry from python
- compute derivatives of total forces with respect to geometric variables
- derivatives of stability derivatives
- needed for neutral point constraint
Installation
The best way to get OptVL is to install it through pip
pip install optvl
Windows, macOS, and Linux are all supported!
Building locally
If you want to make OptVL 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 OptVL 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 OVLSolver class.
To use this wrapper, first one must initialize the OVLSolver 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 optvl import OVLSolver
import numpy as np
ovl = OVLSolver(geo_file="aircraft.avl")
ovl.set_constraint("alpha", 0.00)
# control surface names from geometry file
ovl.set_constraint("Elevator", 0.00, con_var="Cm pitch moment")
ovl.set_constraint("Rudder", 0.00, con_var="Cn yaw moment")
ovl.set_parameter("Mach", 0.3)
# This is the method that acutally runs the analysis
ovl.execute_run()
print("----------------- alpha sweep ----------------")
print(" Angle Cl Cd Cdi Cdv Cm")
for alpha in range(10):
ovl.set_constraint("alpha", alpha)
ovl.execute_run()
run_data = ovl.get_total_forces()
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):
ovl.set_trim_condition("CL", cl)
ovl.execute_run()
run_data = ovl.get_total_forces()
alpha = ovl.get_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}'
)
Parameter sweep example
taper ratio sweep
Optimization example
optimize twist distribution
License
As stated, OptVL includes a modified version of the source code of AVL. AVL is distributed under the GLP version 2 license. As a consequence, OptVL is also distributed under a GLP license via the copyleft principle of the original license. Although, here we update the GLP license to version 3 as allowed by the original license.
This software includes portions of NetLib's LAPACK library. LAPACK is a software package provided by University of Tennessee, University of California Berkeley, University of Colorado Denver and NAG Ltd under the modified BSD license. See the license file in src/lapack/LICENSE.txt for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 optvl-1.0.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: optvl-1.0.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 769.9 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8473acfc11421fe39f68e4ed2ddb9855050ae52c8967bf366e3f527f264aec18
|
|
| MD5 |
44ce0b9d9f985741f96cfdafe317afa4
|
|
| BLAKE2b-256 |
2e0637890e29d4e560f23f3b2f878a3f992e366511a6f183eca59f09c446f5dc
|
File details
Details for the file optvl-1.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: optvl-1.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7eecafc896d6f666fede1a41dde44c3df2910b754c8553602dae3cddbb20b521
|
|
| MD5 |
4eadf6f248fc6304f15ff3b4ec6f311c
|
|
| BLAKE2b-256 |
d001a1f0998d1f9f25260621e35f411658c6596c0c2e6dcaebe06a9e30e14710
|
File details
Details for the file optvl-1.0.0-cp313-cp313-macosx_12_0_arm64.whl.
File metadata
- Download URL: optvl-1.0.0-cp313-cp313-macosx_12_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.13, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd8fd1378594a352a96e7143fc652e846bb8aaa6121105eb7c2b79cb202a868a
|
|
| MD5 |
5bf1f3e7c22a230f20028abfc9450369
|
|
| BLAKE2b-256 |
6ecfcacb4059aa1c697461f7f959f6a5285f2cf359b97686926675978397f029
|
File details
Details for the file optvl-1.0.0-cp313-cp313-macosx_10_13_x86_64.whl.
File metadata
- Download URL: optvl-1.0.0-cp313-cp313-macosx_10_13_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26fa107116ca4ccbe3f1608a34c83df9186dc1ef49782fe43ab1b0194a555e0e
|
|
| MD5 |
c7cf1b67980c79141c811e64d8806382
|
|
| BLAKE2b-256 |
c69ce692604704b0450fde69854df8f88c894658db9d35d6430d47c6ac9daac6
|
File details
Details for the file optvl-1.0.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: optvl-1.0.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 769.9 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edb2c764e42ad415050ff02bea00604ae318c0e8ed6ab89b25ef1d4bc0e77843
|
|
| MD5 |
879b56d72f42d709adfa10c9ddcf0d0a
|
|
| BLAKE2b-256 |
2f484f004e18038744a630d4532367b840666b518207a9ad6c8f8bf82efc2d0a
|
File details
Details for the file optvl-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: optvl-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dca014e5e7d6bdc9d2ed32a91b4a80854f97f58fcc085602a25e2ead8a725f38
|
|
| MD5 |
f306029697df7fc28ecfa265b01ed2e1
|
|
| BLAKE2b-256 |
c528ac8d69046e5de1fd3f8bdf05058ce131a76ac57cb7381e65a14f8d0786f3
|
File details
Details for the file optvl-1.0.0-cp312-cp312-macosx_12_0_arm64.whl.
File metadata
- Download URL: optvl-1.0.0-cp312-cp312-macosx_12_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.12, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47aaf95e632a4b0e200849090cc2d7cd154011935d3995e5b1d1948601809cf7
|
|
| MD5 |
6d09ef6fa00debc9fdfa9470293eec96
|
|
| BLAKE2b-256 |
e7470b3c4f42e5a44c4cf83606f26b9831e3a5abf3ec1071ce82b860a4f37e62
|
File details
Details for the file optvl-1.0.0-cp312-cp312-macosx_10_13_x86_64.whl.
File metadata
- Download URL: optvl-1.0.0-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96fc12b181650ca6d079e62cb5d1a5bb1ae4e8d79b3d5909cf491d26f67779d4
|
|
| MD5 |
127a0b8033ad13b4abedc9df43b680f5
|
|
| BLAKE2b-256 |
cd84cef194ca85cac4474e0df91a667240105659c1f995ba7aee995a9ef9e064
|
File details
Details for the file optvl-1.0.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: optvl-1.0.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 769.6 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e05d4e76be660ded7d99cdb0697cd5f91cc014aede585d93b78e371678ce04ae
|
|
| MD5 |
2db5972bfa1ee6b45824927cf642804e
|
|
| BLAKE2b-256 |
151ce3a37cf4ff76cfb3e5137660dc8f640751fcfaf340507cbde92744c88914
|
File details
Details for the file optvl-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: optvl-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad23bbdc6a38a43183e61fbedc1a341e6979ce1b575565872b25740256100ff2
|
|
| MD5 |
365828687861446841a4298ad4a84e72
|
|
| BLAKE2b-256 |
803d652b442eef1129a5e0d8b1e2f0c93ca96ec966132edbbcedf77ed3bccfdf
|
File details
Details for the file optvl-1.0.0-cp311-cp311-macosx_12_0_arm64.whl.
File metadata
- Download URL: optvl-1.0.0-cp311-cp311-macosx_12_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.11, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c34c7b3b24300d938a3828b34cefe4d1d065830a37a4165077ae6d2e4081390
|
|
| MD5 |
6aa1a23af7b292bee702a0a2ebf803a9
|
|
| BLAKE2b-256 |
286ac9d508106b57ff4c659b058567486c6b4a7d23bc2aaf72c0af70d9247262
|
File details
Details for the file optvl-1.0.0-cp311-cp311-macosx_10_13_x86_64.whl.
File metadata
- Download URL: optvl-1.0.0-cp311-cp311-macosx_10_13_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.11, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
898447ddb220b6f81322e7e2cac5998258f7de8428384e0e6e8bab2d89b63ee2
|
|
| MD5 |
973a91187e1700c51021536d569628e1
|
|
| BLAKE2b-256 |
ab6a0d28a8fac4ff7a80c23ef1b77fe940e203deefcaf8548a932fac0bea853c
|
File details
Details for the file optvl-1.0.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: optvl-1.0.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 769.7 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a8cddeeff239f0260ce911b80a3003046283aa1c6a37c6476c4bf08e547a2c5
|
|
| MD5 |
fbc1f9a5b1f96eee013727130ce152f5
|
|
| BLAKE2b-256 |
a639703a284b5f766c2c544d30f3c918916de8cb06fa75c296f88dc6d72576e4
|
File details
Details for the file optvl-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: optvl-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8276d897200ecfd03548d92f5c329036413368cfb541acb1e24c7951254870a
|
|
| MD5 |
ba7a92799d518f1d34baf3de5b12a860
|
|
| BLAKE2b-256 |
c0f36bf860ed9d72b4419702c6b7b27935c5a95efd3be8230af9fc18385d6eb7
|
File details
Details for the file optvl-1.0.0-cp310-cp310-macosx_12_0_arm64.whl.
File metadata
- Download URL: optvl-1.0.0-cp310-cp310-macosx_12_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94b2012fe91bacba2aad58927447a53883d51ca8c04efff921a11bfbd4130a79
|
|
| MD5 |
80bb7041ca07c4f462c77aa6b24a41b6
|
|
| BLAKE2b-256 |
dadbe495ea570ae8b5e3f4c47cbc79f1d4779d83c07546b6ec0f7efa5ca183e1
|
File details
Details for the file optvl-1.0.0-cp310-cp310-macosx_10_13_x86_64.whl.
File metadata
- Download URL: optvl-1.0.0-cp310-cp310-macosx_10_13_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.10, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5a2be1c6cadac46c04cde85160963fe1870c60154880d5e78da2efd57cfab9a
|
|
| MD5 |
3a3e763e98560d67df06da94652f84ea
|
|
| BLAKE2b-256 |
641e4238806cd7d424592df03beefbf2474bd19e6e55a15310d1bc99404fa55d
|
File details
Details for the file optvl-1.0.0-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: optvl-1.0.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 769.6 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4a68fdd88d9e40d431f8fe7d4273e5f4f916f70c541b6dafa853c89978c10cc
|
|
| MD5 |
5e164162d7e2150e26f207cf52f08ce7
|
|
| BLAKE2b-256 |
fd8c3eacb14c3d2ee95bcab35946721466fe952f6ef62b7fb95aa3dfd6701325
|
File details
Details for the file optvl-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: optvl-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30df3db79bb146144fa32f135ce1e55f8045cd212ac9836afd6fb4cc60403b86
|
|
| MD5 |
1c93e46cfc06a41131ca58698c23353f
|
|
| BLAKE2b-256 |
a2110c787ba04e401f48f2b953503077c98b580a56c713200076d9481e6b6a49
|
File details
Details for the file optvl-1.0.0-cp39-cp39-macosx_12_0_arm64.whl.
File metadata
- Download URL: optvl-1.0.0-cp39-cp39-macosx_12_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.9, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ec1f01787a7c76eb083cfa701c74804bb1e09b94f4f13eb43af6c572b08950c
|
|
| MD5 |
de2426d5fa6f36bead61e91f5fd4b00e
|
|
| BLAKE2b-256 |
c283fc35d25af6080493c9472ca3ebf05d849390b96c0053fbf62b6f11c67c07
|
File details
Details for the file optvl-1.0.0-cp39-cp39-macosx_10_13_x86_64.whl.
File metadata
- Download URL: optvl-1.0.0-cp39-cp39-macosx_10_13_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.9, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b06018bfbeaeb64fb711dd3d184a583eacf9af3f35ae981c1a103069a7f9f0ba
|
|
| MD5 |
dafbe7b6f0c8b75666face7fba034b8e
|
|
| BLAKE2b-256 |
e158f385115ca21420482e85c16faa6951198fad56f6fb2681b5f158a27067a8
|