Aerodynamic Panel Method in Python
Project description
pyapm
An Aerodynamic Panel Method implemented in Python for use from Python scripts. Examples in the "./scripts" folder.
JSON Definition File:
{
"name": "Prandtl-D2",
"mach": 0.0,
"sref": 0.94064328,
"cref": 0.2686,
"bref": 3.749,
"xref": 0.3270,
"yref": 0.0,
"zref": 0.0,
"surfaces": [
{
"name": "Wing",
"twist": 0.0,
"mirror": true,
"cnum": 16,
"sections": [
{
"xpos": 0.0,
"ypos": 0.0,
"zpos": 0.0,
"chord": 0.40005,
"bnum": 50,
"bspc": "full-cosine",
"airfoil": "prandtl_root.dat",
"xoc": 0.0,
"zoc": 0.0
},
{
"xpos": 0.83459,
"ypos": 1.87452,
"zpos": 0.08177,
"chord": 0.10008,
"airfoil": "prandtl_tip.dat",
"xoc": 0.0,
"zoc": 0.0
}
],
"functions": [
{
"variable": "twist",
"spacing": "equal",
"interp": "cubic",
"values": [
8.3274,
8.5524,
8.7259,
8.8441,
8.9030,
8.8984,
8.8257,
8.6801,
8.4565,
8.1492,
7.7522,
7.2592,
6.6634,
5.9579,
5.1362,
4.1927,
3.1253,
1.9394,
0.6589,
-0.6417,
-1.6726
]
}
]
}
],
"cases": [
{
"name": "Design Point",
"alpha": 0.0,
"speed": 13.0,
"density": 1.145
}
]
}
Typical Python Script File "test_prandtl-d2.py":
#%%
# Import Dependencies
from IPython.display import display_markdown
from pyapm.classes import PanelResult, PanelSystem
from pyapm.output.msh import panelresult_to_msh
#%%
# Create Panel Mesh
jsonfilepath = r'../files/Prandtl-D2.json'
psys = PanelSystem.from_json(jsonfilepath)
psys.assemble_panels()
psys.assemble_horseshoes()
psys.solve_system()
#%%
# Solve Panel Result
alpha = 0.0
speed = 13.0
rho = 1.145
pres = PanelResult('Design Point', psys)
pres.set_density(rho=rho)
pres.set_state(alpha=alpha, speed=speed)
display_markdown(pres)
display_markdown(pres.surface_loads)
mshfilepath = '../results/' + psys.name + '.msh'
panelresult_to_msh(pres, mshfilepath)
Mesh File Output:
You can generate a Gmsh mesh file (*.msh) directly from a Python script using the following code snippet.
mshfilepath = '../results/' + psys.name + '.msh'
panelresult_to_msh(pres, mshfilepath)
This will output a mesh file to the specified location, which can then be viewed in Gmsh. The latest version of Gmsh can be downloaded at:
Use File > Open in Gmsh to open the mesh file with the pressure results.
A sample of the aircraft shown in Gmsh is captured below. Consult Gmsh help to operate Gmsh.
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 Distribution
Built Distribution
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 pyapm-0.0.3.tar.gz.
File metadata
- Download URL: pyapm-0.0.3.tar.gz
- Upload date:
- Size: 69.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f349d045ccd53f9f17974b34375ad211423bd6de1789d30b4131f961feb81ae7
|
|
| MD5 |
b0399869b420d6be84e838d012c08811
|
|
| BLAKE2b-256 |
0a7b3c4c3d1526c333d1db54cbbf9f23d608c88c1ef3cab9a50c9ef7ae24676f
|
Provenance
The following attestation bundles were made for pyapm-0.0.3.tar.gz:
Publisher:
publish-to-pypi.yml on Xero64/pyapm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyapm-0.0.3.tar.gz -
Subject digest:
f349d045ccd53f9f17974b34375ad211423bd6de1789d30b4131f961feb81ae7 - Sigstore transparency entry: 345718078
- Sigstore integration time:
-
Permalink:
Xero64/pyapm@aeea41ee36bb599e964e10d82a56985f47ceb752 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/Xero64
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@aeea41ee36bb599e964e10d82a56985f47ceb752 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyapm-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pyapm-0.0.3-py3-none-any.whl
- Upload date:
- Size: 81.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dddfc465e32c11501ec3355f9266b586627a7c8a62ba3749da02688658dd8c6
|
|
| MD5 |
df8d648b391e85d93c5626db9eeb8795
|
|
| BLAKE2b-256 |
5790e26febf2504f0a8381357af76eff9044b6cda05bac1c9f3c5937a3d50aae
|
Provenance
The following attestation bundles were made for pyapm-0.0.3-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on Xero64/pyapm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyapm-0.0.3-py3-none-any.whl -
Subject digest:
1dddfc465e32c11501ec3355f9266b586627a7c8a62ba3749da02688658dd8c6 - Sigstore transparency entry: 345718083
- Sigstore integration time:
-
Permalink:
Xero64/pyapm@aeea41ee36bb599e964e10d82a56985f47ceb752 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/Xero64
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@aeea41ee36bb599e964e10d82a56985f47ceb752 -
Trigger Event:
push
-
Statement type: