Unstructured Mesh Generation
We now open the NURBS from the STEP file in Gmsh and generate an unstructured surface mesh with refinement along the leading edge of the wing.
NOTE: the
CurveList
s described below are valid for the filezeroebwb.STEP
and Gmsh v4.8.4
Import STEP file
File > Merge
Create physical group with all NURBS surfaces
- Make sure that geometric surfaces are visible:
Tools > Options > Geometry > Visibility > Surfaces
- Click the
Y
button in the bottom left corner to get a top view - Create physical group:
Modules > Geometry > Physical Groups > Add > Surface
- Press
CTRL + Right Click
to box-select only half of the airframe (we will export half the mesh and will later mirror it to obtain a mesh that is exactly symmetric)
- Make sure that geometric surfaces are visible:
Create criterion for refinement at LE
Modules > Mesh > Define > Size fields
- Define leading edge lines:
Distance
withCurvesList
set to33, 25, 53, 45
and1000
forNumPointsPercurve
- Define transition lines:
Distance
withCurvesList
set to18, 19, 56, 54
and1000
forNumPointsPercurve
- Define upper-bound lines of leading edge:
Distance
withCurvesList
set to30, 22, 55, 47
and1000
forNumPointsPercurve
- Define lower-bound lines of leading edge:
Distance
withCurvesList
set to35, 28, 51, 43
and1000
forNumPointsPercurve
- Define cell size based on distance to leading edge:
MathEval
with the formula1.5*(F1^1.2 + 500/F2^0.5)/2 + 30
- Define cell size based on thickness of leading edge:
MathEval
with the formula3*((5*F1+F3+F4)/7)^1.5 + 5
- Mix both cell sizes:
Min
withFieldsList
set to5, 6
select "Set as background field" and click Apply. Defined this way, it refines the mesh in the proximity of the LE lines based on LE thickness, while transitioning the refinement close to the transition lines.
Set mesher settings
- Set size factor:
Tools > Options > Mesh > General > Element size factor
and set to0.1
- Select
MeshAdapt
for the 2D algorithm
- Set size factor:
Mesh the NURBS surface
- Discretize 1D curves:
Modules > Mesh > 1D
- Discretize 2D surfaces:
Modules > Mesh > 2D
- Smooth out the discretization by clicking
Modules > Mesh > Smooth 2D
a few times
- Discretize 1D curves:
Export mesh as
.msh
in ASCII format v4:File > Export
and selectMesh - Gmsh MSH (*.msh)
in the dropdown menu
The resulting .msh
file is available here: LINK (right click → save as...
).