airmesh
airmesh is a Python package that generates 3D wind-tunnel or
wind-domain meshes using pybmesh.
It provides a simple, high-level API (Airmesh) that wraps your
internal mesh generators (WindTunnel, WindDomainPolygon) and exports
meshes directly to OpenFOAM format.
Features
-
Simple high-level interface to build wind-tunnel domains\
-
Two mesh generation modes: classical
Uses the WindTunnel model: a digital wind tunnel made of two parts
(central fixed core + rotating outer domain).advanced
Uses WindDomainPolygon: a single-block polygonal wind tunnel,
designed to remain consistent for all wind directions. -
Supports refinement levels, core region settings, domain extrusion, multiple wind directions, etc.
-
Direct export to OpenFOAM:
mesh.write(path=".")
-
Built on top of pybmesh, scikit-spatial, and gmsh
Installation
pip install airmesh
or when developing locally:
pip install -e .
Usage Example
from airmesh import Airmesh
mesh = Airmesh(
D=1200, # diameter of area of interest
hc=150, # max height
hd=600, # domain height
dx=2, # element size in core
Lc=400, # core length
nwdir=16, # number of wind directions
vt=[0, 0, 0], # translation vector
refLvls=[2, 2], # refinement schedule: two levels, each coarsening by a factor of 2
optc=0, # 0=diamond, 1=square, 2=circle
optm=1, # 0=simple extrude, 1=advanced
type="classical",
)
mesh.compute()
mesh.write(path="output/")
This will generate the OpenFOAM blockMeshDict and mesh files inside:
output/Mesh/
Project Layout
airmesh/
src/airmesh/
api.py
blockmesh.py
fmesh.py
...
Requirements
Installed automatically:
pybmesh
License
MIT License
Copyright © 2024
Release files for airmesh 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| airmesh-0.1.0.tar.gz | 38.8 kB | Details |
Release files / airmesh-0.1.0.tar.gz
| Download URL | airmesh-0.1.0.tar.gz |
|---|---|
| Size | 38.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1b48a9ec98007da5433fbd7239fd009f5e4373e66d193f005b6b0a12b939448
|
|
BLAKE2b-256 checksum How to use checksums |
18bbe5bc4e801e523a00f68fa7da3641c3ebbf760eabc22f36c033460812e0bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|