Gambit: Viscous grid for Onera M6 Wing

Unstructured viscous grid for Onera M6

In this tutorial we will learn how to generate a viscous unstructured grid for Onera M6 wing using Gambit.

Open the Gambit GUI by clicking on the Gambit icon in Windows or typing gambit at the Linux prompt.

Step 1: Importing geometry

Figure 1, Onera M6 geometry
1. Change the default tolerance by going to Edit/Defaults/GEOMETRY/TOLERANCE. Change the EDGE_FACET  value from 0.001 to 1.0e-10. This helps to build more accurate geometries.

2. Import the wing geometry by going to  File/Import/IGES  and pick the file oneraM6.igs  file from the computer.

Imported geometry is in millimeters as shown in the Fig. 1. Its a volume with a surface at the root.

Step 2:  Building the Computational Domain

1. Let the domain be a box of side 40c, which means the farfield distance from wing geometry is 20c. Go to Geometry/Volume/Create Real Brick. For Width(X) input 40,000 and press Apply. A box volume as shown in Fig. 2 is created.

Figure 2, Box volume
Figure 3, Splitter face introduced

2. Create a dummy rectangular surface on xy plane. Go to Geometry/Face/Create Real Rectangular Face, input 60,000 under Width and press Apply. A face as shown in Fig. 3 is created.

3. Split the volume by this plane. Go to Geometry/Volume/Split Volume. Under Volume pick the box volume. Choose Faces(Real) under Split With. Lastly pick the dummy face under Faces and press Apply. Fig. 4, shows the Box volume splitted into two. Retain the volume in which the Wing is sitting and delete the other volume as shown in Fig. 5.

Figure 4, Box volume split into 2 volumes
Figure 5, Unwanted volume deleted
Figure 6, Geometric domain after boolean subtraction

4. Use boolean operation to subtract Wing volume form this box volume. Go to Geometry/Volume/Subtract Real Volumes. Under Volume pick the box volume and under Subtract Volume pick Wing volume and press Apply. Geometric domain as shown in Fig. 6, is ready for generating the mesh.

Step 3: Surface meshing of Wing

1. We can have 6 group names for faces/edges namely Leading Edge, Tip, Trailing Edge and Wing, Symmetry and Farfield.

Under Leading Edge there are front 2 faces, Tip has 4 faces, Trailing Edge has one edge and Wing has one Upper and one Lower faces, Symmetry has one face and Farfield has 5 faces.

2. Wing Leading Edge:
We will generate ordered triangles for Leading Edge. This helps to generate stretched triangles which captures the high curvature Leading Edge with optimum cells. Go to Mesh/Edge/Mesh Edges pick Leading Edge upper curve at the root as shown in Fig. 7. Under Type pick Successive Ratio, Under Ratio input 0.9 and for Interval count input 15 and press Apply.

Figure 7, Leading Edge edge meshing in chord wise direction
Figure 8, Leading Edge edge meshing in spanwise direction
Figure 9, Leading Edge surface mesh

Copy this edge meshing parameters to lower curve at the root by going to Mesh/Edge/Link Edge Meshes and linking the upper curve with lower curve with a reverse direction for lower curve. Similarly do the linking to the 2 edges Leading Edge attached to Tip.

Edge mesh the spanwise 3 edges with 150 points with a Successive Ratio of 0.997 with a direction towards Tip.

With this all the edges of the 2 faces of Leading Edges are meshed as shown in Fig. 8.

Mesh the face by going to Mesh/Mesh Faces. Pick the 2 Leading Edge faces under Faces, let the Elements be Tri and Type be Map Split. Press Apply, face mesh as shown in Fig. 9 is generated.

3. Wing Tip
Surface Meshing of the Tip faces are done by using Sizing Function. Before we start using the sizing function we will make some modifications in the default settings. Go to Edit/Defaults/TOOLS/SFUNCTION. Change BGRID_MAX_TREE_DEPTH to 20 and BGRID_NONLINEAR_ERR_PERCENT to 15. Press modify to accept the changes. These options which control the sizing functions helps to get better and smoother grids.

Now lets start applying sizing function. Under Operation pick Tools/Size Function/Create Size Function.

Figure 10, SF 1: Source,Tip Trailing Edge vertex
Figure 11, SF 1:  Attachment, Wing Tip
Figure 12, SF 2: Source, Leading Edge Tip 2 edges
Figure 13, SF 2: Attachment, Wing Tip

Sizing function 1:
Fixed Type, Source: Tip Trailing Edge vertex [Fig. 10], Attachment: 4 faces of Tip [Fig. 11].
Start size = 3, Growth rate = 1.15, Max. size = 6.

Sizing function 2:
Figure 14, Surface mesh for Wing Tip
Meshed Type, Source: Leading Edge Tip 2 edges [Fig. 12], Attachment: 4 faces of Tip [Fig. 13].
Growth rate = 1.15, Max. size = 6
Mesh the face by going to Mesh/Mesh Faces. Pick the 4 faces of Tip under Faces, let the Elements be Tri and Type be Pave. Press Apply, mesh as shown in Fig. 14 is generated.
4. Trailing Edge
Sizing Function 3: Fixed Type, Source: Trailing Edge Tip vertex [Fig. 15], Attachment: Edge of Trailing Edge [Fig. 16].
Start Size = 1, Growth rate = 1.18, Max. size = 5.2.

Figure 15, SF 3: Source, Trailing Edge Tip vertex
Figure 16, SF 3: Attachment, Trailing Edge
Figure 17, Edge mesh for Trailing Edge

Mesh the edge by going to Mesh/Edge/Mesh Edges. Pick Trailing Edge under Edges and let rest of the options be default. Press Apply. Edge mesh as shown in Fig. 17 is created.

5. Wing Upper and Lower
Sizing Function 4: Meshed Type, Source: edges of Upper and Lower faces in connection with Leading Edge, Tip and Trailing Edge (totally 5 edges) [Fig. 18], Attachment: Upper and Lower faces of Wing [Fig. 19]. Growth rate = 1.18, Max. size = 30

Figure 18, SF 4: Source, 5 edges of Upper and Lower faces 
Figure 19, SF 4: Attachment, Upper and Lower faces
Figure 20, Surface mesh for Upper and Lower faces of Wing

Mesh the face by going to Mesh/Mesh Faces. Pick the Upper and Lower faces of Wing under Faces, let the Elements be Tri and Type be Pave. Press Apply, mesh as shown in Fig. 20 is generated.

With this all the faces of the Wing is meshed. Figs. 21-24 shows surface mesh at various regions of the Wing.
Figure 21, Leading Edge surface mesh
Figure 22, Surface mesh around Leading Edge Tip 
Figure 23, Surface mesh around Tip Trailing Edge
Figure 24, Wing surface mesh

Step 4: Viscous padding

Figure 25, Boundary layer template applied
Now we will invoke the boundary layer template options to generate viscous padding. Go to Mesh/Boundary Layer/Create Boundary Layer.
Algorithim: Aspect ratio (last), First row (a) = 0.0024, Rows = 25, Last percent (c/w) = 35. Activate the button Internal continuity and under Attachment, pick all the faces of the Wing. Press Apply to get boundary layer template as shown in Fig. 25.

Step 5: Volume meshing

As a last step we will invoke a sizing function to generate volume mesh.

Sizing Function5: Meshed TypeSource: All the faces of the Wing Leading EdgeTipWing UpperWing LowerAttachment: Domain VolumeGrowth rate = 1.18, Max. size = 20,000.

Figure 26, Skewed cells in viscous padding
Figure 27, Move node to improve skewness
Figure 28, Improved surface skewness quality

Next go to surface meshing option and pick the Symmetry face and press Apply. Surface mesh is generated. Zoom into the Leading Edge near the Symmetry plane as shown in Fig. 26. As you can see the cells in the viscous padding is distorted. To improve the cell quality go to Move Face Nodes under face meshing option. Under Face pick the Symmetry face and from the screen pick the node and move it to reduce the skewness as shown in Fig. 27. Let the button Smooth be active. Press Apply. Grid with improved quality as shown in Fig. 28 is obtained.

Figure 29, Volume mesh
To generate volume mesh, go to Mesh/Volume/Mesh Volumes. Under Volumes pick the Domain VolumeElements: Tet/Hybrid, Type: TGrid. Keep rest of the options as default. Press Apply. Volume mesh with prisms in the viscous padding and tet in the outer region as shown in Fig. 29 is generated.
Step 6: Quality check

Now lets check the grid quality. Go to Global Control/Examine Mesh. Under Display Type pick Range. Under 3D Element activate tet and prism buttons and under Quality Type choose EquiSize Skew. Click Update. Total Elements as 1,661,478 is displayed.
Activate the Show worst element button, the element with maximum skewness is visually displayed and under Transcript the skewness quality value of 0.981347 is displayed. This value is quite acceptable for this configuration. Usually for zero thickness trailing edges skewed cells in the viscous padding are bound to come all along the trailing edges. Most of the commercial codes can accept this quality.

Step 7: Apply BC and Export mesh

To apply boundary conditions go to Operation/Zones/Specify Boundary Types. Under Name type onera_wing, Type = WALL, Entity: all the faces of the Wing. Press Apply.
Next, Name: Symmetry, Type: SYMMETRY, Entity: pick the symmetry face.
Lastly, Name: farfield, Type: PRESSURE_FARFIELD, Entity: pick the 5 faces of the outer domain box.

Under Zones go to Specify Continuum Types. Here pick the Domain Volume under Entity, let the Type be FLUID and type Name as Air. Press Apply.

As a last step, lets export the grid. Go to File/Export/Mesh. Type the name oneraM6.msh and press Accept. If the meshing is done properly and the boundary conditions are applied correctly the message "Mesh was successfully written to oneraM6.msh" will be displayed under Transcript.

This completes the tutorial for viscous grid for Onera M6 Wing.

No comments:

Post a Comment