• No results found

Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT

In document Fluent Tutorials Cornell University (Page 100-194)

Forced Convection over a Flat Plate

3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT

5. Solve!

6. Analyze Results 7. Refine Mesh Problem 1

Step 3: Specify Boundary Types in GAMBIT

Recall that we created the following boundary types for the 100x5 mesh in the Laminar Pipe Flow tutorial:

These boundary types are still retained even if the edges are remeshed since the edges themselves were not deleted. To verify this:

Operation Toolpad > Zones Command Button > Specify Boundary Types Check that the following is in the Name/Type list:

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step3.htm (1 of 2)11/7/2005 6:48:53 PM

Additionally, click on show labels. You should now be able to see each of the boundary names on the respective edges in the Graphics Window. Verify that the boundary types specification is correct.

Save and Export

As in the previous tutorial, we will now save and export the mesh.

Main Menu > File > Save

Main Menu > File > Export > Mesh...

Type in pipe100x30.msh for the File Name:. Select Export 2d Mesh since this is a two-dimensional mesh. Click Accept.

Check that pipe100x30.msh has been created in your working directory.

Exit GAMBIT: Main Menu > File > Exit and save the session.

Go to Step 4: Set Up Problem in Fluent

Copyright 2002.

Cornell University

Sibley School of Mechanical and Aerospace Engineering.

Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step3.htm (2 of 2)11/7/2005 6:48:53 PM

Turbulent Pipe Flow

Problem Specification

1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT

3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT

5. Solve!

6. Analyze Results 7. Refine Mesh Problem 1

Step 4: Set Up Problem in FLUENT

Launch FLUENT

Start > Programs > Fluent Inc > FLUENT 6.0

Select 2ddp (2D, double-precision version) from the list of options and click Run.

Import File

Main Menu > File > Read > Case...

Navigate to your working directory and select the pipe100x30.msh file. Click OK.

The following should appear in the FLUENT window:

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step4.htm (1 of 6)11/7/2005 6:49:33 PM

Check the number of nodes, faces (of different types) and cells. There are 3000 quadrilateral cells in this case. This is what we'd expect since we used 30

divisions in the radial direction and 100 divisions in the axial direction while generating the grid. So the total number of cells is 30*100 = 3000.

Also, take a look under zones. We can see the four zones inlet, outlet, wall, and centerline that we defined in GAMBIT.

Grid

First, we check the grid to make sure that there are no errors.

Main Menu > Grid > Check

Any errors in the grid would be reported at this time. Check the output and make sure that there are no errors reported. Then select:

Main Menu > Grid > Info > Size

The following summary about the grid should appear:

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step4.htm (2 of 6)11/7/2005 6:49:33 PM

Let's look at the grid:

Main Menu > Display > Grid...

Make sure all 5 items under Surfaces are selected. Then click Display.

Remember that we can zoom in using the middle mouse button. Zoom in and admire the grid. How many divisions are there in the radial direction?

(Click picture for larger image)

Recall that you can look at specific components of the grid by choosing the entities you wish to view under Surfaces (click to select and click again to

deselect a specific boundary). Click Display again when you have selected your boundaries. Use this feature and make sure that the boundary labels correspond to the correct geometric entities.

Close the Grid Display Window when you are done.

Define Solver Properties

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step4.htm (3 of 6)11/7/2005 6:49:33 PM

Main Menu > Define > Models > Solver

Choose Axisymmetric under Space. As in the laminar pipe flow tutorial, we'll use the defaults of segregated solver, implicit formulation, steady flow and absolute velocity formulation. Click OK.

Main Menu > Define > Models > Viscous...

Choose k-epsilon (2eqn). Notice that the window expands and additional options are displayed on choosing the k-epsilon turbulence model. Under Near-Wall Treatment, pick Enhanced Near-Wall Treatment so that we may get a more accurate result.

Click OK.

Main Menu > Define > Models > Energy...

The energy equation can be turned off since this is an incompressible flow and we are not interested in the temperature. Make sure no tick mark appears next to Energy Equation.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step4.htm (4 of 6)11/7/2005 6:49:33 PM

Main Menu > Define > Materials...

Change Density to 1.0 and Viscosity to 2e-5. These are the values in the Problem Specification. We'll take both as constant.

Click Change/Create.

Define Operating Conditions

Main Menu > Define > Operating Conditions...

Recall that for all flows, FLUENT uses the gauge pressure internally. Any time an absolute pressure is needed, it is generated by adding the operating pressure to the gauge pressure. We'll use the default value of 1 atm (101,325 Pa) as the Operating Pressure.

Click Cancel to leave the default in place.

Define Boundary Conditions

We'll now set the value of the velocity at the inlet and pressure at the outlet.

Main Menu > Define > Boundary Conditions...

The four types of boundaries we defined are specified as zones on the left side of the Boundary Conditions Window. Recall that we don't need to set any

parameters for the centerline and wall zones. Verify this by selecting each of these two zones and clicking on Set....

Choose inlet and click on Set.... Enter 1 for Velocity Magnitude. This indicates that the fluid is coming in normal to the inlet at the rate of 1 meter per second.

Select Intensity and Hydraulic Diameter next to the Turbulence

Specification Method. Then enter 1 for Turbulence Intensity and 0.2 for

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step4.htm (5 of 6)11/7/2005 6:49:33 PM

The (absolute) pressure at the outlet is 1 atm. Since the operating pressure is set to 1 atm, the outlet gauge pressure = outlet absolute pressure - operating pressure = 0. Choose outlet under Zone. The Type of this boundary is

pressure-outlet. Click on Set.... The default value of the Gauge Pressure is 0.

Click Cancel to leave the defaults in place.

Note: Backflow in the Pressure Outlet menu refers to flow entering through an outlet boundary. This is not likely to happen in this case. So we don't have to set the backflow parameters.

This completes the boundary condition specification. Close the Boundary Conditions menu.

Go to Step 5: Solve!

Copyright 2002.

Cornell University

Sibley School of Mechanical and Aerospace Engineering.

Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step4.htm (6 of 6)11/7/2005 6:49:33 PM

Turbulent Pipe Flow

Problem Specification

1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT

3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT

5. Solve!

6. Analyze Results 7. Refine Mesh Problem 1

Step 5: Solve!

We'll use second-order discretization for the momentum equation, as in the laminar pipe flow tutorial, and also for the turbulence kinetic energy equation which is part of the k-epsilon turbulence model.

Main Menu > Solve > Controls > Solution...

Change Discretization for Momentum, Turbulence Kinetic Energy and Turbulence Dissipation Rate (scroll down to see it) equations to Second Order Upwind.

Click OK.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step5.htm (1 of 5)11/7/2005 6:49:57 PM

The order of discretization that we just set refers to the convective terms in the equations; the discretization of the viscous terms is always second-order accurate in FLUENT. Second-order discretization generally yields better

accuracy while first-order discretization yields more robust convergence. If the second-order scheme doesn't converge, you can try starting the iterations with the first-order scheme and switching to the second-order scheme after some iterations.

Set Initial Guess

We'll use an initial guess that is constant over the entire flow domain and equal to the values at the inlet:

Main Menu > Solve > Initialize > Initialize...

In the Solution Initialization menu that comes up, choose inlet under Compute From. The Axial Velocity for all cells will be set to 1 m/s, the Radial Velocity to 0 m/s and the Gauge Pressure to 0 Pa. The Turbulence Kinetic Energy and Dissipation Rate (scroll down to see it) values are set from the prescribed values for the Turbulence Intensity and Hydraulic Diameter at the inlet.

Click Init. Close the Solution Initialization window.

Set Convergence Criteria

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step5.htm (2 of 5)11/7/2005 6:49:57 PM

Recall that FLUENT reports a residual for each governing equation being solved.

The residual is a measure of how well the current solution satisfies the discrete form of each governing equation. We'll iterate the solution until the residual for each equation falls below 1e-6.

Main Menu > Solve > Monitors > Residual...

Notice that Convergence Criterion has to be set for the k and epsilon equations in addition to the three equations in the last tutorial. Set the Convergence Criterion to be 1e-06 for all five equations being solved.

Select Print and Plot under Options. This will print as well plot the residuals as they are calculated which you will use to monitor convergence.

Click OK.

This completes the problem specification. Save your work:

Main Menu > File > Write > Case...

Type in pipe100x30.cas for Case File. Click OK. Check that the file has been

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step5.htm (3 of 5)11/7/2005 6:49:57 PM

Iterate Until Convergence

Solve for 100 iterations first.

Main Menu > Solve > Iterate...

In the Iterate menu that comes up, change the Number of Iterations to 100.

Click Iterate.

You'll find that not all residuals have fallen below 1e-6 in 100 iterations. Solve for 200 more iterations. The solution converges in a total of 229 iterations.

(Click picture for larger image)

We need a larger number of iterations for convergence than in the laminar case since we have a finer mesh and are also solving additional equations from the turbulence model.

Save the solution to a data file:

Main Menu > File > Write > Data...

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step5.htm (4 of 5)11/7/2005 6:49:57 PM

Enter pipe100x30.dat for Data File and click OK. Check that the file has been created in your working directory.

Go to Step 6: Analyze Results

Copyright 2002.

Cornell University

Sibley School of Mechanical and Aerospace Engineering.

Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step5.htm (5 of 5)11/7/2005 6:49:57 PM

Turbulent Pipe Flow

Problem Specification

1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT

3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT

5. Solve!

Turbulent flows are significantly affected by the presence of walls. The k-epsilon turbulence model is primarily valid away from walls and special treatment is required to make it valid near walls. The near-wall model is sensitive to the grid resolution which is assessed in the wall unit y+ (defined in section 10.9.1 of the FLUENT user manual). We'll gloss over the details for now and use the following rule of thumb: select the near-wall resolution such that y+ > 30 or < 5 for the wall-adjacent cell. Look at section 10.9, Grid Considerations for Turbulent Flow Simulations, for details.

First, we need to set the reference values needed to calculate y+.

Main Menu > Report > Reference Values...

Select inlet under Compute From to tell FLUENT to use values at the pipe inlet for the reference values. Check that the reference value for density is 1 kg/m3, velocity is 1 m/s, and coefficient of viscosity is 2e-5 kg/m-s as given in the

Problem Specification. These reference values will be used to non-dimensionalize the distance of the cell center from the wall to obtain the corresponding y+

values. Click OK.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (1 of 7)11/7/2005 6:50:43 PM

Let's plot y+ values for wall-adjacent cells to check how it compares with the recommendation mentioned above.

Main Menu > Plot > XY Plot...

Make sure that Position on X Axis is set under Options, that 1 is the value next to X, and 0 is the value next to Y and Z under Plot Direction. Recall that this tells FLUENT to plot the x-coordinate value on the abscissa of the graph. Pick Turbulence... under Y Axis Function and select Wall Yplus from the drop

down list under that. Since we want the y+ value for cells adjacent to the wall of the pipe, choose wall under Surfaces.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (2 of 7)11/7/2005 6:50:43 PM

Click Plot.

(Click picture for larger image)

As we can see, the wall y+ value is between 1.6 and 1.9 (ignoring the

anamolous at the inlet). Since this is less than 5, the near-wall grid resolution is

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (3 of 7)11/7/2005 6:50:43 PM

acceptable.

Save Plot

In the Solution XY Plot Window, check the Write to File box under Options. The Plot button should have changed to the Write... button. Click on Write.... Enter yplus.xy as the filename and click OK. Check that this file has been created in your FLUENT working directory.

Centerline Velocity

Under Y Axis Function, pick Velocity... and then in the box under that, pick Axial Velocity. Finally, select centerline under Surfaces since we are plotting the axial velocity along the centerline. De-select wall under Surfaces.

Click on Curves... in the Solution XY Plot window. Select the solid line option under Pattern as shown below. Change Weight to 2. Select the blank option under Symbol. Click Apply and Close.

s

Turn on grid lines: In the Solution XY Plot window, click on Axes.... Turn on the grid by checking the boxes Major Rules and Minor Rules under Options. Click Apply. Select Y under Axis and repeat. Click Apply and Close.

Uncheck Write to File. Click Plot.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (4 of 7)11/7/2005 6:50:43 PM

(Click picture for larger image)

We can see that the fully developed region starts around x=5m with the

centerline velocity becoming constant at a value of 1.195 m/s. This is quite a bit lower than the value of 2 m/s for the laminar case. Can you explain the

difference based on the physical characteristics of laminar and turbulent flows?

Save the data for this plot as vel.xy.

Coefficient of Skin Friction

The definition of the skin friction coefficient was discussed in the laminar pipe flow tutorial. The required reference values of density and velocity have already been set when plotting y+.

Go back to the Solution XY Plot Window. Under the Y Axis Function, pick Wall Fluxes..., and then Skin Friction Coefficient in the box under that. Under Surfaces, we are plotting the friction coefficient along the wall. Uncheck centerline surface.

Uncheck Write to File. Click Plot.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (5 of 7)11/7/2005 6:50:43 PM

(Click picture for larger image)

We can see that the fully-developed value is 0.0085. Compare this with what you'd expect from the Moody chart.

Save the data for this plot as cf.xy.

Velocity Profile

We'll plot the axial velocity at the outlet as a function of the distance from the center of the pipe.

Change the plot settings so that the radial distance from the axis is plotted as the ordinate: In the Solution XY Plot window, uncheck Position on X Axis under Options and choose Position on Y Axis instead. Under Plot Direction, change X to 0 and Y to 1. For the X Axis Function i.e. the abscissa, pick Velocity...

and Axial Velocity under that.

Since we want to plot this at the outlet boundary, pick only outlet under Surfaces.

Uncheck Write to File. Click Plot.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (6 of 7)11/7/2005 6:50:43 PM

(Click picture for larger image)

The axial velocity is maximum at the centerline and zero at the wall to satisfy the no-slip boundary condition for viscous flow. Compare qualitatively the near-wall velocity gradient normal to the wall with the laminar case. Which is larger? From this, what can you say about the relative stregths of near-wall mixing in the laminar and turbulent cases?

Save this plot as profile.xy.

Go to Step 7: Refine Mesh

Copyright 2002.

Cornell University

Sibley School of Mechanical and Aerospace Engineering.

Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (7 of 7)11/7/2005 6:50:43 PM

Turbulent Pipe Flow

Problem Specification

1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT

3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT

5. Solve!

6. Analyze Results 7. Refine Mesh Problem 1

Step 7: Refine Mesh

In order to assess the numerical accuracy of the results obtained, it is necessary to compare results on different meshes. We'll re-do the calculation on a 100x60 mesh which has twice the number of nodes in the radial direction as the 100x30 mesh. You can download the 100x60 mesh here.

File > Read > Case...

Navigate to your working directory elect the pipe100x60.msh file you have created. Click OK. Display the grid. Check its size.

Finer Mesh Analysis

Repeat steps 4, 5, and 6 of this tutorial with the finer mesh.

When you get to step 6 of the tutorial, plot each of the graphs as described.

However, for each of the plots, overlay the corresponding result for the coarser mesh so that we may compare them. To do this, after the plotting the finer mesh result, in the Solution XY Plot Window, click on Load File.... Navigate to your working folder, click on the appropriate filename for the previous result, eg. vel.

xy for centerline velocity, and click OK. Click Plot. You'll see both results plotted in the same the graphics window.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step7.htm (1 of 4)11/7/2005 6:50:56 PM

(Click picture for larger image)

In the centerline velocity plot above, the white line represents the centerline velocity of the finer mesh, while the red line represents the velocity of the coarser mesh from before. As we can see, there isn't too much of a difference between the two plots. Save this plot as velt2.xy.

Now, let's take a look at the coefficient of skin friction. This time, load the cft.

xy file to compare against the plot. This is the coefficient of skin friction plot:

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step7.htm (2 of 4)11/7/2005 6:50:56 PM

(Click picture for larger image)

Once again, we can see that due to the fine degree of each mesh, there isn't much difference between the two plots. Save this plot as cf2.xy. Now, study the velocity of the outlet by plotting and comparing to the graph in outt.xy.

(Click picture for larger image)

Once again, the finer mesh in this case doesn't offer much more precision than

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step7.htm (3 of 4)11/7/2005 6:50:56 PM

plot.

(Click picture for larger image)

As we can see, there is a significant increase in the accuracy of the plot from the finer mesh. Save this plot as yplus2.xy.

You may want to experiment with meshes of other granularities and compare

You may want to experiment with meshes of other granularities and compare

In document Fluent Tutorials Cornell University (Page 100-194)

Related documents