A Python module with random tools that are useful for Hexed simulations.
More...
|
| naca (desig, n_points=1000, closure="warp") |
| Constructs a NACA 4-digit airfoil geometry.
|
|
| joukowsky (thickness, camber=0., n_points=1000, scale=True) |
| constructs a Joukowsky airfoil
|
|
|
| zhukovsky = joukowsky |
| alternative transliteration
|
|
A Python module with random tools that are useful for Hexed simulations.
◆ joukowsky()
hexedpy.utils.joukowsky |
( |
| thickness, |
|
|
| camber = 0., |
|
|
| n_points = 1000, |
|
|
| scale = True ) |
constructs a Joukowsky airfoil
This is a family of airfoils with a cusped trailing edge which have analytic solutions for the incompressible flow around them.
- Parameters
-
thickness | approximate thickness-to-chord ratio |
camber | (radian) angle between the trailing edge and the chord line |
n_points | Number of points on the airfoil surface |
scale | If True , scale the airfoil so that the leading edge is at (0, 0) and the trailing edge is at (0, 1). Otherwise, the airfoil is left at the size and position dictated by the Joukowsky transform. |
◆ naca()
hexedpy.utils.naca |
( |
| desig, |
|
|
| n_points = 1000, |
|
|
| closure = "warp" ) |
Constructs a NACA 4-digit airfoil geometry.
Returns an n by 2 numpy array representing the coordinates of the airfoil at discrete points. This array can then be passed to Solver.generate_mesh
as a geometry. Points are clustered near the leading edge but not the trailing (see implementation for details). This function is the recommended way to generate NACA airfoil geometry for Hexed simulations, as importing airfoils from coordinate files requires some special care.
- Parameters
-
desig | String representing the airfoil designation (e.g., "0012" for the NACA0012). In general, we cannot accept this parameter as an int because of possible leading zeros. |
n_points | Number of points on the airfoil surface. Don't be stingy, since DG is finnicky with discrete geometry representations—1000 is actually on the lower end of what I normally use. |
closure | If and how to close the trailing edge. There are 3 options:
"warp" : Close the trailing edge by adding a 4th-degree polyomial of \( x_0 \) to \( x_1 \).
"segment" : Close the trailing edge by adding a line segment connecting the last point to the first point, causing the array to be (n_points + 1)*2 instead of n_points*2 .
"none" , None , or False : Don't close the trailing edge.
|