gmshairfoil2d 0.1.3__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.
@@ -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
+ [![Pytest](https://github.com/cfsengineering/GMSH-Airfoil-2D/actions/workflows/pytest.yml/badge.svg?branch=main)](https://github.com/cfsengineering/GMSH-Airfoil-2D/actions/workflows/pytest.yml)
35
+ [![PyPi version](https://img.shields.io/pypi/v/gmshairfoil2d.svg)](https://pypi.python.org/pypi/gmshairfoil2d)
36
+ [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://github.com/cfsengineering/GMSH-Airfoil-2D/blob/main/LICENSE)
37
+ [![Black code style](https://img.shields.io/badge/code%20style-black-000000.svg)](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
+ ![GMSH user interface with the 2D mesh](images/example_mesh.png)
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
+ ![GMSH user interface with the 2D mesh, rectangular box](images/example_mesh_box.png)
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
+ ![GMSH result with 2D mesh with boundary layer, rectangular box](images/example_ch10sm_bl.png)
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
+ ![GMSH result with 2D structural mesh](images/example_structural_naca4220.png)
@@ -0,0 +1,108 @@
1
+ [![Pytest](https://github.com/cfsengineering/GMSH-Airfoil-2D/actions/workflows/pytest.yml/badge.svg?branch=main)](https://github.com/cfsengineering/GMSH-Airfoil-2D/actions/workflows/pytest.yml)
2
+ [![PyPi version](https://img.shields.io/pypi/v/gmshairfoil2d.svg)](https://pypi.python.org/pypi/gmshairfoil2d)
3
+ [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://github.com/cfsengineering/GMSH-Airfoil-2D/blob/main/LICENSE)
4
+ [![Black code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
5
+
6
+ # GMSH-Airfoil-2D
7
+
8
+ Python tool to genreate 2D unstructured, hybrid and structured mesh around an airfoil with [GMSH](https://gmsh.info/) in one command line.
9
+
10
+ ## Installation
11
+
12
+ You can install this package from PyPi:
13
+
14
+ ```bash
15
+ pip install gmshairfoil2d
16
+ ```
17
+
18
+ Or you can clone and install this repository with the following commands:
19
+
20
+ ```bash
21
+ git clone https://github.com/cfsengineering/GMSH-Airfoil-2D.git
22
+ cd GMSH-Airfoil-2D
23
+ pip install -e .
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ ```text
29
+ gmshairfoil2d -h
30
+
31
+ optional arguments:
32
+ -h, --help Show this help message and exit
33
+ --list Display all airfoil available in the database :
34
+ https://m-selig.ae.illinois.edu/ads/coord_database.html
35
+ --naca [4DIGITS] NACA airfoil 4 digit
36
+ --airfoil [NAME] Name of an airfoil profile in the database (database available with
37
+ the --list argument)
38
+ --aoa [AOA] Angle of attack [deg] (default: 0 [deg])
39
+ --farfield [RADIUS] Create a circular farfield mesh of given radius [m] (default 10m)
40
+ --box [LENGTHxWIDTH] Create a box mesh of dimensions [length]x[height] [m]
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,
50
+ dat (default su2)
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)
55
+ --ui Open GMSH user interface to see the mesh
56
+
57
+ ```
58
+
59
+ ## Examples of use
60
+
61
+ To check all airfoil available in the [database](https://m-selig.ae.illinois.edu/ads/coord_database.html):
62
+
63
+ ```bash
64
+ gmshairfoil2d --list
65
+ ```
66
+
67
+ For all the following examples, the defauld chord lenght is 1 meter.
68
+
69
+ To create a circular farfield mesh around a NACA0012 of 10m of radius and see the result with GMSH user interface:
70
+
71
+ ```bash
72
+ gmshairfoil2d --naca 0012 --farfield 10 --ui --no_bl
73
+ ```
74
+
75
+ ![GMSH user interface with the 2D mesh](images/example_mesh.png)
76
+
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):
78
+
79
+ ```bash
80
+ gmshairfoil2d --airfoil dae11 --farfield 4 --airfoil_mesh_size 0.005
81
+ ```
82
+
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:
84
+
85
+ ```bash
86
+ gmshairfoil2d --airfoil e211 --aoa 8 --box 12x4 --format vtk --ui --no_bl
87
+ ```
88
+
89
+ ![GMSH user interface with the 2D mesh, rectangular box](images/example_mesh_box.png)
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
+ ![GMSH result with 2D mesh with boundary layer, rectangular box](images/example_ch10sm_bl.png)
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
+ ![GMSH result with 2D structural mesh](images/example_structural_naca4220.png)