Metadata-Version: 2.4
Name: airmesh
Version: 0.1.0
Summary: 3D atmospheric mesh generator for urban CFD and digital wind tunnels
Author-email: Alexis Sauvageon <alexis.sauvageon@arep.fr>
License:  MIT License
        
        Copyright (c) 2025 Alexis Sauvageon
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pybmesh>=1.0.4
Dynamic: license-file

#  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:

    ``` python
    mesh.write(path=".")
    ```

-   Built on top of **pybmesh**, **scikit-spatial**, and **gmsh**

------------------------------------------------------------------------

##  Installation

``` bash
pip install airmesh
```

or when developing locally:

``` bash
pip install -e .
```

------------------------------------------------------------------------

##  Usage Example

``` python
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
