Step 1.

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

**Edit/Defaults/GEOMETRY/TOLERANCE**. Change the

**EDGE_FACET**value from

*0.001*to

*1.0e-08*. This helps to build more precise geometry.

, NHLP2D profileFig 1 |

2. Import the airfoil coordinates by going to

1. Gambit is a single precision machine, so when we are having a boundary layer with first spacing as small as

**File/Import/Vertex Data/**and pick the file*file from the computer. The file should be a simple ascii file having 3 columns of***nhlp2d.vertices****,***x***,***y***coordinates. Figure 1 shows the imported NHLP2D coordinates.***z***Creating the geometric domain:**, Slat curve segmentationFig 2 |

*1.0e-05*to*1.0e-07*m we end up having distorted cells in the boundary layer. So to avoid this, scale up the geometry by*1000*times.2. Join the vertices by box picking or individually picking each vertices by using the

**NURB**option. To do so, go to

**Geometry/EDGE COMMAND BUTTON/NURBS**. It is advised to split each element into multiple parts as shown in

*figures 2*to

*7*for

**,**

*slat***and**

*main***respectively. Segmentation of each element helps in better control during edge meshing.**

*flap*3. Create faces for

**,**

*slat***and**

*main***using the curves. Go to**

*flap***FACE/Create Face From Wireframe**.

4. Create a circular surface with a radius of 3 chord by going to

**FACE COMMAND**

**BUTTON/CREATE FACE**, right click and choose

**Create Real Circular Face**. In the

**Radius**tab put

*3,000*and press

**Apply**. You will need to translate the newly created face in the x-direction to make sure that the multi element profile is sitting in the center. Next create a bigger circular

**Face**of

*100*chord radius by inputting a radius of

*100,000*. Remember that we have scaled the geometry by

*1000*times, so the chord is not

*1*but

*1000*. So you have totally

*5*

**Faces**,

*3*belonging to the

*3*elements of the multi element airfoil and

*2*circular

**Faces.**

, Main element curve segmentationFig |

, Trailing edge segmentationFig |

**BOOLEAN OPERATIONS,**right click and choose

**Substract**. In the first

**Face**tab pick the big circular

**Face**and in the second

**Substract Faces**tab pick the inner smaller circular

**Face**. Press

**Apply**. A

**Face**extending from the inner circle to outer circle is created and the inner circular

**Face**is deleted out. Next recreate the inner circular

**Face**by going to

**FACE/Create Face From Wireframe**and picking up the edge forming the inner circle. Once this is done use once again the

**BOOLEAN OPERATIONS**to subtract each of the elements (

**,**

*slat***,**

*main***)**

*flap***Faces**from the newly created inner circular

**Face**. With this you have totally

*2*

**Faces**namely one inner circular

**Face**with the

*3*elements profile curved out and one outer circular

**Face**extending from the inner circle to outer circular

**.The geometry for generating the grid is ready.**

*farfield*,Fig 8 Inner domain |

, Complete domainFig 9 |

Step 3.

**Meshing the multi element airfoil Edges:**

**Edit/Defaults/TOOLS/SFUNCTION**. Change the default value of

**BGRID_MAX_TREE_DEPTH**from

*16*to

*25*and that of

**BGRID_NONLINEAR_ERR_PERCENT**from

*25*to

*15*.

2. The leading edge of

**and the trailing edge of the**

*slat***,**

*slat***and**

*main***elements will be meshed with**

*flap**30*elements. Go to

**MESH COMMAND BUTTON/Mesh Edges**, pick the leading and trailing edges of

**and the trailing edges of**

*slat**and*

**main****elements and enter a Mesh count of**

*flap**30*. Press

**Apply**. Mesh as shown in

*figure 11*is created.

1. Two sizing functions will be used to mesh the airfoil. One to capture the curvature of the airfoil and the other to put small cells at the trailing edge. Go to

**TOOL COMMAND BUTTON/Create Size Function**.2.

**Sizing function 1**: Choose

**Curvature**in

**Type**, for

**Sources**and

**Attachment**pick all the edges of the airfoil except the leading edge of the

**and the trailing edges of the**

*slat***,**

*slat***and**

*main***. Input the following parameters.**

*flap***Angle**=

*3*,

**Growth rate**=

*1.125*,

**Max. size**=

*13*,

**Min. size**=

*0.01*. Press

**Apply**.

3

**. Sizing function 2**: Choose

**Fixed**in

**Type**. For

**Source**pick the leading edge vertices of

**and trailing edge vertices of**

*slat**,*

**slat***and*

**main****. For**

*flap***Attachment**pick all the edges of the

*3*elements excluding the leading edge of

**and trailing edge of**

*slat***,**

*slat***and**

*main**. Input the following parameters.*

**flap****Start size**=

*0.5*,

**Growth rate**=

*1.125*,

**Max. size**=

*13*. Press

**Apply**. This sizing function is applied to get a gradual mesh from the trailing edges.

, Trailing edge meshingFig 11 |

**MESH COMMAND BUTTON/Mesh Edges**. Pick all the edges except the leading edge of

**and trailing edge of**

*slat***,**

*slat***and**

*main***. Press**

*flap***Apply**. Edge mesh as shown in

*figure 10*is generated

*.*

**Applying boundary layer padding:**

**To resolve the boundary layer around the airfoil a viscous padding is created using the boundary layer template.**

, Boundary layer templateFig 12 |

**Edit/Defaults/MESH/BLAYER/**.

**Modify USE_FACETS_EVALS**from

*1*to

*0*and

**QUICK_N_DIRTY**from

*1*to

*0*. This helps to get more accurate boundary layer.

**MESH COMMAND BUTTON/BOUNDARY LAYER COMMAND BUTTON/Create Boundary Layer**. Pick the option of

**Aspect ratio (last)**under

**Algorithm**. Make the following inputs for,

**First row (a)**=

*1.0e-02*,

**Rows**=

*26*,

**Last percent (c/w)**=

*50*. We need a first spacing of

*1.0e-05*meters to resolve the boundary layer properly. Since we have already scaled the geometry by

*1000*times, the input we will be making under

**First row (a)**will be

*1.0e-02*. A white boundary layer template as seen in

*figure 12*is created.

Step 5.

**Creating the unstructured grid with boundary layer:**

,Fig 13 Unstructured mesh for the whole domain |

, Mesh around the NHLP2D airfoilFig 14 |

, Mesh in the cove regionFig 15 |

,Fig 16 Mesh around the slat |

**TOOLS COMMAND BUTTON /SIZING-FUNCTION COMMAND BUTTON/Create Sizing Function**.

2.

**Sizing function 3**: Pick

**Meshed**under

**Type**, pick all the 3 edges of the airfoil as

**Source**and domain surface as

**Attachment**. Let the

**Growth rate**=

*1.125*and

**Max.size**=

*20000*.

3

**. Sizing function 4**: Let

**Type**be

**Fixed**. Pick the trailing edge vertex as

**Source**and the domain surface as

**Attachment**. Input the following parameters,

**Start size**=

*0.01*,

**Growth rate**=

*1.125*,

**Max. size**=

*20000*.

4. Now to mesh the domain go to

**MESH COMMAND BUTTON/FACE COMMAND BUTTON/Mesh Faces**. Pick the domain surface, let

**Elements**be

**Tri**and

**Type**be

**Pave**. Press

**Apply**. A hybrid grid as seen in

*figures 13-18*is generated.

, BL padding around slat leading edge Fig 17 |

, BL padding around flap trailing edgeFig 18 |

Step 6.

**Quality check****:**To check the quality of the cells in the grid pick the right bottom icon under

**Global Control**called

**EXAMINE MESH**.

**Range**under

**Display Type**. Activate both quad and tria icons under

**2D Element**. Let the

**Quality Type**be

**EquiSize Skew**.

**Press**

**Update**.

**2. The color the cells in the grid changes with the skewness quality level**

**.**To check the worst cell, activate the button

**Show worst element**. Under

**Transcript**a message saying that the worst element quality value is 0.95. This needs to be corrected.

Step 7.

1. As a last step before exporting the mesh we will apply boundary conditions. Go to **Applying boundary conditions and exporting the mesh****:**

**ZONE COMMAND BUTTON/Specify Boundary Types**.

2. Pick the edges forming the slat and

**Name**it as

*.*

**slat****Apply**

**Type**as

**WALL**. Similarly pick all the edges of

**and**

*main***and give the**

*flap***Name**as

**and**

*main***respectively with**

*flap***Type**as

**WALL**.

3. Pick the outer edge and

**Name**it as

*and apply*

**farfield****PRESSURE_FAR_FIELD**under

**Type**. Press

**Apply**.

4. Now go to

**CONTINUUM TYPE**

**COMMAND BUTTON**in

**ZONE**. Here pick the two

**Faces**representing the computational domain and

**Name**it as

**with**

*fluid***FLUID**as

**Type**.

**File/Export/Mesh/**and type out the name as

**. Make sure to activate the button of**

*nhlp2d.msh***Export 2-D(X-Y) Mesh**. If all the steps are done properly one will get the message "Mesh was successfully written to nhlp2d.msh" under

**Transcript**.

This completes the tutorial on viscous grid for NHLP2D airfoil using Gambit.