Skip to content

Scripting Structured-Unstructured Meshes for Aerospace

This is our first blog in the monthly mesh series for 2020, and we hope you enjoy the meshes this year. To start the year off we are focusing on Scripting Structured-Unstructured Meshes for Aerospace with Pointwise, as a lead up to Applied CCM’s April event in Brisbane “Pointwise for Aerospace CFD Workshop“.

Meshing Shock Regions

Computational Fluid Dynamics (CFD) is widely used for design and engineering analysis of aircraft and aerofoils. In supersonic and hypersonics flows, shock waves develop at different angles depending on the Mach number and aircraft shape. These shocks appear at different locations and angles (β) to the aircraft. For CFD modelling of these shock waves, the mesh near the shocks should be orthogonal (flow aligned) using hexahedral (hexa) elements.

Lockheed-Martin LM-1021

The Lockheed-Martin LM-1021 is a test case aircraft concept in Sonic Boom Prediction Workshops (Figure 1).

Figure 1 -   Lockheed-Martin LM-1021 is a test case aircraft concept in Sonic Boom Prediction Workshops
Figure 1 – Lockheed-Martin LM-1021 is a test case aircraft concept in Sonic Boom Prediction Workshops

LM-1021 has been meshed in Pointwise as a half model with a symmetry plane (Figure 2). Structured parts of the half cylinder mesh (in blue) are created by revolving the symmetry domains for 180 °. A planar inlet and outlet were used for easier solver implementation of boundary conditions.

Figure 2  - overview of whole mesh of the half cylinder with planar inlet and outlet
Figure 2 – overview of whole mesh of the half cylinder with planar inlet and outlet

Hexa elements have been aligned with the prescribed shock at an angle of β=20 °, to maintain the accuracy and prevent dissipation of the shock when running in a CFD solver. Figure 3 shows hybrid mesh is made up of 5 blocks of (different types):

  1. Structured block: revolved hexa elements in the shock zone,
  2. Unstructured block: Pure Tetrahedra (tets) around the aircraft: no boundary layer, suitable for hypersonic flows
  3. Structured block: revolved hexa elements upstream of the shock zone
  4. Prism block: extruded prisms off Block 2 semicircular triangular domain
  5. Unstructured block: A cone block downstream of the aircraft, using T-Rex meshing made up of tets, hexa and pyramids.
Figure 3 - types of blocks used in hybrid Pointwise mesh
Figure 3 – types of blocks used in hybrid Pointwise mesh

Scripting

This blog focuses on scripting structured-unstructured meshes by recording a base script of the unstructured base mesh, and then adjusting the base script to produce a different mesh with different angles of the structured hexa mesh region for Block 1.

Journaling to get base glf Script

To created a script, we start with a base mesh near the aircraft with pure tets (Figure 4). To get a base script that we can edit, we journaled the mesh steps using the Pointwise menu :

Script-> Begin Journaling

Figure 4 - Base mesh prior to journaling Glyph
Figure 4 – Base mesh prior to journaling Glyph

The step of copy/pasting and translating the red connector (Figure 5) a distance upwards and to the left is recorded. And this translation is recorded as a vector that can be modified later to produce different hexa block angle. The revolve of the structured domain adjacent to the red connector (above) produces a structured block. Other resultant mesh operations were also recorded, and a journal script .glf file was produced.

Figure 5  - red connector is translated by a vector, which is the journal entry line item that can be adjusted to change the angle of the shock hexa block 1
Figure 5 – red connector is translated by a vector, which is the journal entry line item that can be adjusted to change the angle of the shock hexa block 1

Editing base glf

This base glf file that can be edited by adjusting the translation vector to produce a different angle β. See Figure 6 for a snippit of the glf code relating to the translation step.

Figure 6 - journaled glf  snippet of the translation step
Figure 6 – journaled glf snippet of the translation step

Now we can generate meshes for shock angles of β=20, 38 and 67, by editing the base glf file and specifying a suitable translated vector (red connector in Figure 5). Finally, we execute each edited script in Pointwise for the required angles. Result using angle of β=20, 38 and 67 are shown in the figures below.

Script-> Execute   

The resulting mesh using an angle of 20 ° is shown in Figure 7.

Figure 7 -  mesh glf script ran with beta = 20
Figure 7 – mesh glf script ran with beta = 20

Increasing the angle to 38 ° results in the mesh shown in Figure 8.

 Figure 8 -  mesh glf script ran with beta = 38
Figure 8 – mesh glf script ran with beta = 38

Finally, Figure 9 shows the use of 67 ° angle in the resulting mesh.

 Figure 9 -  mesh glf script ran with beta = 67
Figure 9 – mesh glf script ran with beta = 67

Thanks for reading, the next edition will be in March. Until then, happy meshing!

If you would like to find out more about our Pointwise distribution go here, or for a free trial of Pointwise, go here.

Don’t forget to register for the April event “Pointwise for Aerospace CFD Workshop” in Brisbane, and the OpenFoam symposium in Melbourne.

Monthly Mesh
1. Cricket bat meshing
2. Twin box bridge deck meshing
3. Golf Driver Meshing
4. Frigate Helipad Pointwise unstructured mesh
5. Frigate Helipad – Structured O-H mesh
6. Horizontal wind turbine near a bridge
7. Meshing a Raspberry Pi
8. Scripting Pointwise Meshing
9. 2D meshing with sources in Pointwise
10. Pointwise as a Pre-processor for CFD
11. Mesh Adaption with Caelus and Pointwise
12. Meshing Santa’s Pod Racer Sled
13. Scripting Structured-Unstructured Meshes for Aerospace
14. Mesh Adaptation With Pointwise, Caelus & Python
15. Normal Extrusion Hybrid Meshes for Multi-Element Airfoils
16. Car park Ventilation CFD with Pointwise, Caelus, CFX and FDS
17. Mesh Independence for Car Park Ventilation
18. It’s all in the numbering – mesh renumbering may improve simulation speed
19. Voxel Transition Cell Recombination for OpenFOAM meshes
20. Meshing Santa’s Hat
21. 2D Sources in Meshes in Pointwise 18.4R1
Back To Top
Search