gmshairfoil2d 0.1.4__tar.gz → 0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gmshairfoil2d-0.2/PKG-INFO +141 -0
- gmshairfoil2d-0.1.4/PKG-INFO → gmshairfoil2d-0.2/README.md +40 -34
- gmshairfoil2d-0.2/gmshairfoil2d/geometry_def.py +1189 -0
- gmshairfoil2d-0.2/gmshairfoil2d/gmshairfoil2d.py +310 -0
- gmshairfoil2d-0.2/gmshairfoil2d.egg-info/PKG-INFO +141 -0
- {gmshairfoil2d-0.1.4 → gmshairfoil2d-0.2}/gmshairfoil2d.egg-info/SOURCES.txt +7 -1
- {gmshairfoil2d-0.1.4 → gmshairfoil2d-0.2}/gmshairfoil2d.egg-info/requires.txt +1 -1
- {gmshairfoil2d-0.1.4 → gmshairfoil2d-0.2}/setup.py +6 -11
- gmshairfoil2d-0.2/tests/test_airfoil_func.py +73 -0
- gmshairfoil2d-0.2/tests/test_geometry_def.py +41 -0
- gmshairfoil2d-0.1.4/README.md +0 -80
- gmshairfoil2d-0.1.4/gmshairfoil2d/geometry_def.py +0 -687
- gmshairfoil2d-0.1.4/gmshairfoil2d/gmshairfoil2d.py +0 -176
- gmshairfoil2d-0.1.4/gmshairfoil2d.egg-info/PKG-INFO +0 -102
- {gmshairfoil2d-0.1.4 → gmshairfoil2d-0.2}/LICENSE +0 -0
- {gmshairfoil2d-0.1.4 → gmshairfoil2d-0.2}/gmshairfoil2d/__init__.py +0 -0
- {gmshairfoil2d-0.1.4 → gmshairfoil2d-0.2}/gmshairfoil2d/airfoil_func.py +0 -0
- {gmshairfoil2d-0.1.4 → gmshairfoil2d-0.2}/gmshairfoil2d.egg-info/dependency_links.txt +0 -0
- {gmshairfoil2d-0.1.4 → gmshairfoil2d-0.2}/gmshairfoil2d.egg-info/entry_points.txt +0 -0
- {gmshairfoil2d-0.1.4 → gmshairfoil2d-0.2}/gmshairfoil2d.egg-info/top_level.txt +0 -0
- {gmshairfoil2d-0.1.4 → gmshairfoil2d-0.2}/setup.cfg +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gmshairfoil2d
|
|
3
|
+
Version: 0.2
|
|
4
|
+
Summary: Python tool to generate 2D mesh around an airfoil
|
|
5
|
+
Home-page: https://github.com/cfsengineering/GMSH-Airfoil-2D
|
|
6
|
+
Author: Giacomo Benedetti
|
|
7
|
+
Author-email: giacomo.benedetti@cfse.ch
|
|
8
|
+
License: Apache License 2.0
|
|
9
|
+
Keywords: airfoil,2D,mesh,cfd,gmsh
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Requires-Python: >=3.11.0
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: gmsh>=4.14
|
|
18
|
+
Requires-Dist: numpy>=1.20.3
|
|
19
|
+
Requires-Dist: pytest==7.1.3
|
|
20
|
+
Requires-Dist: requests==2.26.0
|
|
21
|
+
Dynamic: author
|
|
22
|
+
Dynamic: author-email
|
|
23
|
+
Dynamic: classifier
|
|
24
|
+
Dynamic: description
|
|
25
|
+
Dynamic: description-content-type
|
|
26
|
+
Dynamic: home-page
|
|
27
|
+
Dynamic: keywords
|
|
28
|
+
Dynamic: license
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
Dynamic: requires-dist
|
|
31
|
+
Dynamic: requires-python
|
|
32
|
+
Dynamic: summary
|
|
33
|
+
|
|
34
|
+
[](https://github.com/cfsengineering/GMSH-Airfoil-2D/actions/workflows/pytest.yml)
|
|
35
|
+
[](https://pypi.python.org/pypi/gmshairfoil2d)
|
|
36
|
+
[](https://github.com/cfsengineering/GMSH-Airfoil-2D/blob/main/LICENSE)
|
|
37
|
+
[](https://github.com/psf/black)
|
|
38
|
+
|
|
39
|
+
# GMSH-Airfoil-2D
|
|
40
|
+
|
|
41
|
+
Python tool to genreate 2D unstructured, hybrid and structured mesh around an airfoil with [GMSH](https://gmsh.info/) in one command line.
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
You can install this package from PyPi:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install gmshairfoil2d
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Or you can clone and install this repository with the following commands:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
git clone https://github.com/cfsengineering/GMSH-Airfoil-2D.git
|
|
55
|
+
cd GMSH-Airfoil-2D
|
|
56
|
+
pip install -e .
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
gmshairfoil2d -h
|
|
63
|
+
|
|
64
|
+
optional arguments:
|
|
65
|
+
-h, --help Show this help message and exit
|
|
66
|
+
--list Display all airfoil available in the database :
|
|
67
|
+
https://m-selig.ae.illinois.edu/ads/coord_database.html
|
|
68
|
+
--naca [4DIGITS] NACA airfoil 4 digit
|
|
69
|
+
--airfoil [NAME] Name of an airfoil profile in the database (database available with
|
|
70
|
+
the --list argument)
|
|
71
|
+
--aoa [AOA] Angle of attack [deg] (default: 0 [deg])
|
|
72
|
+
--farfield [RADIUS] Create a circular farfield mesh of given radius [m] (default 10m)
|
|
73
|
+
--box [LENGTHxWIDTH] Create a box mesh of dimensions [length]x[height] [m]
|
|
74
|
+
--airfoil_mesh_size [SIZE] Mesh size of the airfoil contour [m] (default 0.01m)
|
|
75
|
+
--ext_mesh_size [SIZE] Mesh size of the external domain [m] (default 0.2m) (for normal, bl
|
|
76
|
+
and structural)
|
|
77
|
+
--no_bl Do the unstructured meshing (with triangles), without a boundary
|
|
78
|
+
layer
|
|
79
|
+
--first_layer [HEIGHT] Height of the first layer [m] (default 3e-5m) (for bl and structural)
|
|
80
|
+
--ratio [RATIO] Growth ratio of layers (default 1.2) (for bl and structural)
|
|
81
|
+
--nb_layers [INT] Total number of layers in the boundary layer (default 35)
|
|
82
|
+
--format [FORMAT] Format of the mesh file, e.g: msh, vtk, wrl, stl, mesh, cgns, su2,
|
|
83
|
+
dat (default su2)
|
|
84
|
+
--structural Generate a structural mesh
|
|
85
|
+
--arg_struc [LxLxL] Parameters for the structural mesh [leading (axis x)]x[wake (axis
|
|
86
|
+
x)]x[total height (axis y)] [m] (default 1x10x10)
|
|
87
|
+
--output [PATH] Output path for the mesh file (default : current dir)
|
|
88
|
+
--ui Open GMSH user interface to see the mesh
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Examples of use
|
|
93
|
+
|
|
94
|
+
To check all airfoil available in the [database](https://m-selig.ae.illinois.edu/ads/coord_database.html):
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
gmshairfoil2d --list
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
For all the following examples, the defauld chord lenght is 1 meter.
|
|
101
|
+
|
|
102
|
+
To create a circular farfield mesh around a NACA0012 of 10m of radius and see the result with GMSH user interface:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
gmshairfoil2d --naca 0012 --farfield 10 --ui --no_bl
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+

|
|
109
|
+
|
|
110
|
+
To create a circular farfield mesh with boudary layer around a Drela DAE11 airfoil (the name in the database is "dae11") of 4m or radius with a mesh size of 0.005m on the airfoil (but to not open on the interface):
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
gmshairfoil2d --airfoil dae11 --farfield 4 --airfoil_mesh_size 0.005
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
To create mesh around a Eppler E220 airfoil (the name in the database is "e211") with an angle of attack of 8 degree in a box of 12x4m (lenght x height) and save it as a vtk mesh and see the result with GMSH user interface:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
gmshairfoil2d --airfoil e211 --aoa 8 --box 12x4 --format vtk --ui --no_bl
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+

|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
To create a boxed mesh around a Chuch Hollinger CH 10-48-13 smoothed airfoil (the name in the database is "ch10sm"), using the boundary layer with default parameters (first layer of height 3e-5, 35 layers and growth ratio of 1.2) :
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
gmshairfoil2d --airfoil ch10sm --ui --box 2x1.4
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+

|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
To create a structural mesh around a Naca 4220 airfoil (the 4 digits code is obviously "4220"), with first layer height of 0.01, mesh_size of 0.08 wake length of 6, height of 7, and angle of attack of 6 degrees :
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
gmshairfoil2d --naca 4220 --airfoil_mesh_size 0.08 --ui --structural --first_layer 0.01 --arg_struc 6x7 --aoa 6
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+

|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: gmshairfoil2d
|
|
3
|
-
Version: 0.1.4
|
|
4
|
-
Summary: Python tool to genreate 2D mesh around an airfoil
|
|
5
|
-
Home-page: https://github.com/cfsengineering/GMSH-Airfoil-2D
|
|
6
|
-
Author: Aidan Jungo
|
|
7
|
-
Author-email: aidan.jungo@cfse.ch
|
|
8
|
-
License: Apache License 2.0
|
|
9
|
-
Keywords: airfoil,2D,mesh,cfd,gmsh
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
-
Classifier: Operating System :: OS Independent
|
|
18
|
-
Classifier: Intended Audience :: Developers
|
|
19
|
-
Requires-Python: >=3.6.0
|
|
20
|
-
Description-Content-Type: text/markdown
|
|
21
|
-
License-File: LICENSE
|
|
22
|
-
|
|
23
1
|
[](https://github.com/cfsengineering/GMSH-Airfoil-2D/actions/workflows/pytest.yml)
|
|
24
2
|
[](https://pypi.python.org/pypi/gmshairfoil2d)
|
|
25
3
|
[](https://github.com/cfsengineering/GMSH-Airfoil-2D/blob/main/LICENSE)
|
|
@@ -27,7 +5,7 @@ License-File: LICENSE
|
|
|
27
5
|
|
|
28
6
|
# GMSH-Airfoil-2D
|
|
29
7
|
|
|
30
|
-
Python tool to genreate 2D unstructured mesh around an airfoil with [GMSH](https://gmsh.info/) in one command line.
|
|
8
|
+
Python tool to genreate 2D unstructured, hybrid and structured mesh around an airfoil with [GMSH](https://gmsh.info/) in one command line.
|
|
31
9
|
|
|
32
10
|
## Installation
|
|
33
11
|
|
|
@@ -51,20 +29,29 @@ pip install -e .
|
|
|
51
29
|
gmshairfoil2d -h
|
|
52
30
|
|
|
53
31
|
optional arguments:
|
|
54
|
-
-h, --help
|
|
32
|
+
-h, --help Show this help message and exit
|
|
55
33
|
--list Display all airfoil available in the database :
|
|
56
34
|
https://m-selig.ae.illinois.edu/ads/coord_database.html
|
|
57
|
-
--naca [4DIGITS] NACA airfoil 4 digit
|
|
35
|
+
--naca [4DIGITS] NACA airfoil 4 digit
|
|
58
36
|
--airfoil [NAME] Name of an airfoil profile in the database (database available with
|
|
59
37
|
the --list argument)
|
|
60
38
|
--aoa [AOA] Angle of attack [deg] (default: 0 [deg])
|
|
61
39
|
--farfield [RADIUS] Create a circular farfield mesh of given radius [m] (default 10m)
|
|
62
40
|
--box [LENGTHxWIDTH] Create a box mesh of dimensions [length]x[height] [m]
|
|
63
|
-
--airfoil_mesh_size [SIZE] Mesh size of the airfoil
|
|
64
|
-
--ext_mesh_size [SIZE] Mesh size of the external domain [m] (default 0.2m)
|
|
65
|
-
|
|
41
|
+
--airfoil_mesh_size [SIZE] Mesh size of the airfoil contour [m] (default 0.01m)
|
|
42
|
+
--ext_mesh_size [SIZE] Mesh size of the external domain [m] (default 0.2m) (for normal, bl
|
|
43
|
+
and structural)
|
|
44
|
+
--no_bl Do the unstructured meshing (with triangles), without a boundary
|
|
45
|
+
layer
|
|
46
|
+
--first_layer [HEIGHT] Height of the first layer [m] (default 3e-5m) (for bl and structural)
|
|
47
|
+
--ratio [RATIO] Growth ratio of layers (default 1.2) (for bl and structural)
|
|
48
|
+
--nb_layers [INT] Total number of layers in the boundary layer (default 35)
|
|
49
|
+
--format [FORMAT] Format of the mesh file, e.g: msh, vtk, wrl, stl, mesh, cgns, su2,
|
|
66
50
|
dat (default su2)
|
|
67
|
-
--
|
|
51
|
+
--structural Generate a structural mesh
|
|
52
|
+
--arg_struc [LxLxL] Parameters for the structural mesh [leading (axis x)]x[wake (axis
|
|
53
|
+
x)]x[total height (axis y)] [m] (default 1x10x10)
|
|
54
|
+
--output [PATH] Output path for the mesh file (default : current dir)
|
|
68
55
|
--ui Open GMSH user interface to see the mesh
|
|
69
56
|
|
|
70
57
|
```
|
|
@@ -82,21 +69,40 @@ For all the following examples, the defauld chord lenght is 1 meter.
|
|
|
82
69
|
To create a circular farfield mesh around a NACA0012 of 10m of radius and see the result with GMSH user interface:
|
|
83
70
|
|
|
84
71
|
```bash
|
|
85
|
-
gmshairfoil2d --naca 0012 --farfield 10 --ui
|
|
72
|
+
gmshairfoil2d --naca 0012 --farfield 10 --ui --no_bl
|
|
86
73
|
```
|
|
87
74
|
|
|
88
75
|

|
|
89
76
|
|
|
90
|
-
To create a circular farfield mesh around a Drela DAE11 airfoil (the name in the database is "dae11") of
|
|
77
|
+
To create a circular farfield mesh with boudary layer around a Drela DAE11 airfoil (the name in the database is "dae11") of 4m or radius with a mesh size of 0.005m on the airfoil (but to not open on the interface):
|
|
91
78
|
|
|
92
79
|
```bash
|
|
93
|
-
gmshairfoil2d --airfoil dae11 --farfield
|
|
80
|
+
gmshairfoil2d --airfoil dae11 --farfield 4 --airfoil_mesh_size 0.005
|
|
94
81
|
```
|
|
95
82
|
|
|
96
|
-
To create mesh around a Eppler E220 airfoil (the name in the database is "e211") with an angle of attack of 8 degree in a box of 12x4m (lenght x
|
|
83
|
+
To create mesh around a Eppler E220 airfoil (the name in the database is "e211") with an angle of attack of 8 degree in a box of 12x4m (lenght x height) and save it as a vtk mesh and see the result with GMSH user interface:
|
|
97
84
|
|
|
98
85
|
```bash
|
|
99
|
-
gmshairfoil2d --airfoil e211 --aoa 8 --box 12x4 --format vtk --ui
|
|
86
|
+
gmshairfoil2d --airfoil e211 --aoa 8 --box 12x4 --format vtk --ui --no_bl
|
|
100
87
|
```
|
|
101
88
|
|
|
102
89
|

|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
To create a boxed mesh around a Chuch Hollinger CH 10-48-13 smoothed airfoil (the name in the database is "ch10sm"), using the boundary layer with default parameters (first layer of height 3e-5, 35 layers and growth ratio of 1.2) :
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
gmshairfoil2d --airfoil ch10sm --ui --box 2x1.4
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+

|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
To create a structural mesh around a Naca 4220 airfoil (the 4 digits code is obviously "4220"), with first layer height of 0.01, mesh_size of 0.08 wake length of 6, height of 7, and angle of attack of 6 degrees :
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
gmshairfoil2d --naca 4220 --airfoil_mesh_size 0.08 --ui --structural --first_layer 0.01 --arg_struc 6x7 --aoa 6
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+

|