Step 7: Refine Mesh

It is very important to assess the dependence of your results on the mesh used by repeating the same calculation on different meshes and comparing the results. We will re-do the previous calculation on a 100x10 mesh and compare the results with the 100x5 mesh used previously. If you prefer to skip the GAMBIT steps for modifying the mesh, download the 100x10 mesh (by right-clicking on the link) and go directly to the FLUENT analysis discussed below.

Modify Mesh in GAMBIT

The 100x5 mesh is saved as pipe.dbs in your working folder. Copy and paste the file in the same folder. Rename Copy of pipe.dbs to pipe2.dbs. We will work with pipe2.dbs in order to retain pipe.dbs as is. Launch GAMBIT and browse to where pipe2.dbs is saved. Notice that under Session ID, pipe2 is now listed. Select this and click Run. Note in the main menu bar that pipe2 is the ID of this job. Files created during this session will have that prefix.

We will delete the face mesh, modify the edge meshes for the vertical edges and remesh the face. To delete the original face mesh, choose

Operation Toolpad > Mesh Command Button > Face Command Button > Delete Face Meshes

In the Delete Face Meshes Window that comes up, uncheck the Remove unused lower mesh box. This tells GAMBIT to remove the face mesh only and keep the edge meshes associated with the face mesh. Since we will be changing the mesh on only two edges of the rectangle, there is no need to redo the meshes for all four edges.

Select the only face of the rectangle by shift-clicking on it and then click Apply.

Modify Edge Meshes

To change the number of divisions on the vertical edges from 5 to 10, choose:

Operation Toolpad > Mesh Command Button > Edge Command Button > Mesh Edges

Select the two vertical edges by holding down the Shift button, clicking on each in turn, and then releasing the Shift button. Select Interval count from the box under Spacing that says Interval size. Change the number in the box next to the Interval count box from 5 to 10.

Make sure that the Remove old mesh box is checked under Options. This will make sure that the old edge meshes are erased before the new edge meshes are created.

Click Apply.

Remember that you can zoom in by holding down Ctrl, dragging a box across the area you want to zoom in on, and then releasing Ctrl. Do this now and make sure that the vertical edges have 10 divisions.

(Click image for larger picture)

Recreate Face Mesh

Operation Toolpad > Mesh Command Button > Face Command Button > Mesh Faces

Shift-click on the face in the Graphics Window to select it. Click Apply.

(Click here for larger picture)

Save & Export

Main Menu > File > Save

Main Menu > File > Export > Mesh...

Type in pipe2.msh for the File Name:. Select Export 2d Mesh option. Click Accept.

Finer Mesh Analysis

Repeat steps 4 and 5 of this tutorial with the 100x10 mesh (a tad on the repetitious side but consider it good practice).

One you obtain the solution, plot the variation of the centerline velocity along the x-direction as described in step 6. Compare this result with that obtained on the previous mesh which is stored in the vel.xy file created earlier. To do this, after centerline velocity has been plotted, click on Load File... in the Solution XY Plot window. Navigate to your working folder if necessary and click on vel.xy and OK. Click Plot.

In the graphics window, we can see both of the lines plotted in the same window. Adjust the axes so that you can zoom in on the beginning of the fully developed region.

(Click image for larger picture)
In the centerline velocity plot above, the white and red symbols represent the results on the 100x10 mesh and 100x5 meshes, respectively. The centerline velocity in the fully-developed region for the finer mesh is 1.98 m/s. This value agrees better with the analytical value of 2 m/s that the value of 1.93 m/s obtained on the coarser mesh. Save the data for this plot as vel2.xy. The velocity result gets more accurate on refining the mesh as expected.

Plot the skin friction coefficient as described in step 6. Compare the result with that obtained on the 100x5 mesh by loading it from cf.xy.

(Click here for larger image)

The finer mesh provides a skin friction coefficient of 0.159 in the fully-developed region, which is much closer to the theoretical value of 0.16 than the corresponding coarser mesh value of 0.154. Save the data for this plot as cf2.xy.

Similarly, plot the velcoity profile at the outlet and compare with the coarser grid result in out.xy. The two results compare well with the greatest deviation occurring near the centerline. Save the data for this plot as out2.xy.

(Click picture for larger image)

If you repeat the calculation on a 100x20 mesh, you'll see that the results on the two finest meshes are grid-independent to a high level of accuracy. In the plots below, the white, red and green symbols correspond to the 100x20, 100x10 and 100x5 meshes, respectively.

Velocity along centerline:

(Click picture for larger image)

Skin Coefficient:

(Click picture for larger image)

Outlet Velocity:

(Click picture for larger image)

  • No labels