Beruflich Dokumente
Kultur Dokumente
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
Problem 2
Problem Specification
where A is in square meters and x is in meters. The stagnation pressure po at the inlet is
101,325 Pa. The stagnation temperature To at the inlet is 300 K. The static pressure p at
the exit is 3,738.9 Pa. We will calculate the Mach number, pressure and temperature
distribution in the nozzle using FLUENT and compare the solution to quasi-1D nozzle
flow results. The Reynolds number for this high-speed flow is large. So we expect
viscous effects to be confined to a small region close to the wall. So it is reasonable to
model the flow as inviscid.
Start GAMBIT
Create a new folder called nozzle and select this as the working directory. Add -id nozzle
to the startup options.
We'll create the bottom edge corresponding to the nozzle axis by creating vertices A and
B shown in the problem specification and joining them by a straight line.
Operation Toolpad > Geometry Command Button > Vertex Command Button >
Create Vertex
Vertex 1: (-0.5,0,0)
Vertex 2: (0.5,0,0)
Operation Toolpad > Geometry Command Button > Edge Command Button >
Create Edge
Select vertex 1 by holding down the Shift button and clicking on it. Next, select vertex 2.
Click Apply in the Create Straight Edge window.
We'll next create the bottom edge corresponding to the nozzle wall. This edge is curved.
Since
A=pi r2
A = 0.1 + x2
This is the equation of the curved wall. Life would have been easier if GAMBIT allowed
for this equation to be entered directly to create the curved edge. Instead, one has to
create a file containing the coordinates of a series of points along the curved line and read
in the file. The more number of points used along the curved edge, the smoother the
resultant edge.
The file vert.dat contains the point definitions for the nozzle wall. Take a look at this file.
The first line is
21 1
which says that there are 21 points along the edge and we are defining only 1 edge. This
is followed by x,r and z coordinates for each point along the edge. The r-value for each x
was generated from the above equation for r(x). The z-coordinate is 0 for all points since
we have a 2D geometry.
Right-click on vert.dat and select Save As... to download the file to your working
directory.
Main Menu > File > Import > ICEM Input ...
Next to File Name:, enter the path to the vert.dat file that you downloaded or browse to it
by clicking on the Browse button.
Then, check the Verticesand Edges boxes under Geometry to Create as we want to create
the vertices as well as the curved edge.
Click Accept.
This should create the curved edge. Here it is in relation to the vertices we created above:
Operation Toolpad > Geometry Command Button > Edge Command Button >
Create Edge
Shift-click on vertex 1 and then the vertex above it to create the inlet edge.
Create Face
Operation Toolpad > Geometry Command Button > Face Command Button >
Form Face
Recall that we have to shift-click on each of the edges enclosing the face and then click
Apply to create the face.
This will create the nozzle.dbs file in your working directory. Check that it has been
created so that you will able to resume from here if necessary.
Mesh Edges
Operation Toolpad > Mesh Command Button > Edge Command Button > Mesh
Edges
Like the Laminar Pipe Flow Tutorial, we are going to use even spacing between each of
the mesh points. We won't be using the Grading this time, so deselect the box next to
Grading that says Apply.
Then, change Interval Count to 20 for the side edges and Interval Count to 50 for the top
and bottom edges.
(Click picture for larger image)
Mesh Face
Now that we have the edges meshed, we need to mesh the face.
Operation Toolpad > Mesh Command Button > Face Command Button > Mesh
Faces
Now that we have the mesh, we would like to specify the boundary conditions here in
GAMBIT.
Operation Toolpad > Zones Command Button > Specify Boundary Types Command
Button
This will bring up the Specify Boundary Types window on the Operation Panel. We will
first specify that the left edge is the inlet. Under Entity:, pick Edges so that GAMBIT
knows we want to pick an edge (face is default).
Now select the left edge by Shift-clicking on it. The selected edge should appear in the
yellow box next to the Edges box you just worked with as well as the Label/Type list
right under the Edges box.
Click Apply. You should see the new entry appear under Name/Type box near the top of
the window.
You should have the following edges in the Name/Type list when finished:
Save and Export
Type in nozzle.msh for the File Name:. Select Export 2d Mesh since this is a 2
dimensional mesh. Click Accept.
Import File
Navigate to your working directory and select the nozzle.msh file. Click OK.
Check that the displayed information is consistent with our expectations of the nozzle
grid.
Analyze Grid
How many nodes are there in the radial direction? Are the nodes clustered towards the
wall? Why?
Define Properties
Define > Models > Solver...
Under the Solver box, select Coupled. Under Space, choose Axisymmetric.
Click OK.
Click OK.
The energy equation needs to be turned on since this is a compressible flow where the
energy equation is coupled to the continuity and momentum equations.
Make sure there is a check box next to Energy Equation and click OK.
Select air under Fluid materials. Under Properties, choose Ideal Gas next to Density. You
should see the window expand. This means FLUENT uses the ideal gas equation of state
to relate density to the static pressure and temperature.
We'll work in terms of absolute rather than gauge pressures in this example. So set
Operating Pressure in the Pressure box to 0.
Click OK.
It is important that you set the operating pressure correctly in compressible flow
calculations since FLUENT uses it to compute absolute pressure to use in the ideal gas
law.
Set boundary conditions for the following surfaces: centerline, inlet, outlet, wall.
Select inlet under Zone and pick pressure-inlet under Type as its boundary condition.
Click Set.... The Pressure Inlet window should come up.
Set the total (i.e. stagnation) pressure (noted as Gauge Total Pressure in FLUENT) and
temperature at the inlet. For a subsonic inlet, Supersonic/Initial Gauge Pressure is the
initial guess value for the static pressure. Calculate this initial guess value from the 1D
solution. After you have entered the values, click OK to close the window.
Under the Thermal tab, the Total Temperature should be 300.
Using the same steps as above, pick pressure-outlet as the boundary condition for the
outlet surface. Then, when the Pressure Outlet window comes up, set the total pressure to
3738.9 as specified in the problem statement. Click OK.
Make sure that wall zone is set to wall type and the centerline zone is set to axis type.
Go to Step 5: Solve!
Copyright 2002.
Cornell University
Sibley School of Mechanical and Aerospace Engineering.
Step 5: Solve!
Now we will set the solve settings for this problem and then iterate through and actually
solve it.
Take a look at the options available. We want Second Order Upwind for the Flow (under
the Discretization box).
Make sure that is selected and click OK.
As you may recall from the previous tutorials, this is where we set the initial guess values
(the base case) for the iterative solution. Once again, we'll set these values to be the ones
at the inlet. Select inlet under Compute From.
Click Init.
Now we will set the residual values (the criteria for a good enough solution). Once again,
we'll set this value to 1e-06. Select the Plot option to see graphically whether the solution
is converging.
Click OK.
Save case and data after you have obtained a converged solution.
As in the previous tutorials, we are going to plot the velocity along the centerline.
However, this time, we are going to use the dimensionless Mach quantity.
We are going plot the variation of the Mach number in the axial direction at the axis and
wall. In addition, we will plot the corresponding variation from 1D theory. You can
download the file here: mach_1D.xy.
Also, since we are going to plot this number at both the wall and axis, select centerline
and wall under Surfaces.
Click Plot.
(Click picture for large image)
Is the comparison better at the wall or at the axis? Can you explain this?
Save this plot as machplot.xy by checking Write to File and clicking Write....
Sometimes, it is very useful to see how the pressure and temperature changes throughout
the object. This can be done via contour plots.
First, we are going to plot the pressure contours of the nozzle. Therefore, make sure that
under Contours Of, Pressure... and Static Pressure is selected.
We want this at a fine enough granularity so that we can see the pressure changes clearly.
Under Levels, change the default 20 to 40. This increases the number of lines in the
contour plot so that we can get a more accurate result.
Click Display.
Notice that the pressure on the fluid gets smaller as it flows to the right, as is consistent
with fluid going through a nozzle.
Back in the Contours window, under Contours Of, select Temperature... and Static
Temperature.
Click Display.
As we can see, the temperature decreases towards the right side of the nozzle, indicating
a change of internal energy to kinetic energy as the fluid speeds up.
(a) Plot the variation of Mach number at the axis and the wall as a function of the axial
distance x. Also, plot the corresponding results obtained on the 50x20 grid used in class
and from the quasi-1D assumption. Recall that the quasi-1D result for the Mach number
variation was given to you in the M_1D.xy file. Note all five curves should be plotted on
the same graph so that you can compare them. You can make the plots in FLUENT,
MATLAB or EXCEL.
(b) Plot the variation of static pressure at the axis and the wall as a function of the axial
distance x. Also, plot the corresponding results obtained on the 50x20 grid used in class
and from the quasi-1D assumption. Calculate the static pressure variation for the quasi-
1D case from the Mach number variation given in M_1D.xy.
(c) Plot the variation of static temperature at the axis and the wall as a function of the
axial distance x. Also, plot the corresponding results obtained on the 50x20 grid used in
class and from the quasi-1D assumption. Calculate the static temperature variation for the
quasi-1D case from the Mach number variation given in M_1D.xy.
Comment very briefly on the grid dependence of your results and the comparison with
the quasi-1D results.
Go to Problem 1
Copyright 2002.
Cornell University
Sibley School of Mechanical and Aerospace Engineering.
Problem 1
Consider the nozzle flow problem solved using FLUENT in the tutorial. Recall that the
nozzle has a circular cross-sectional area, A, that varies with axial distance from the
throat, x, according to the formula:
A = 0.1 + x2
where A is in square meters and x is in meters. The stagnation pressure poand stagnation
temperature To at the inlet are 101,325 Pa and 300 K, respectively.
Using the quasi-1D flow assumption, determine the static pressure at the nozzle inlet and
outlet for the following conditions:
(a) Sonic flow at the throat, and supersonic, isentropic flow in the diverging section.
(b) Sonic flow at the throat, and subsonic, isentropic flow in the diverging section.
(c) Sonic flow at the throat and normal shock at the exit.
Go to Problem 2
Copyright 2002.
Cornell University
Sibley School of Mechanical and Aerospace Engineering.
(a) Plot contours of the Mach number and static pressure for this case. Is the flow regime
as predicted by quasi-1D theory? Explain briefly the possible causes for any similarities
or disparities.
(b) Plot the static and stagnation pressures at the axis as a function of the axial distance.
Also, plot the corresponding values from the case where the exit pressure is 3,738.9 Pa.
(These four curves should be on the same graph.) Explain briefly the salient features of
this plot.
(c) Plot the static and stagnation temperatures at the axis as a function of the axial
distance. Again provide a brief explanation for the salient features.