Você está na página 1de 35

Problem Specification

1. Pre-Analysis & Start-Up


2. Geometry
3. Mesh
4. Physics Setup
5. Numerical Solution
6. Numerical Results
7. Verification & Validation
Exercises
Comments

2D Steady Convection
Created using ANSYS 13.0

Problem Specification
A fluid enters a pipe of radius 0.06 meters at a constant velocity of 0.1 m/s. The fluid
has a density of 1.2 kg/m^3, a thermal conductivity of 0.02 W/mK, a specific heat of
1000 J/kgK, and a viscosity of 1.8e-5 kg/ms. The first 5.76 meters of the pipe are
isothermal, held at 300 K. The remaining 2.88 meters of the pipe have a constant heat
flux of 37.5 W/m^2 added at the wall.

Using ANSYS FLUENT, simulate the above flow. Calculate and plot the velocity,
temperature, pressure and Nusselt number variation in the pipe.

Geometry
For users of ANSYS 15.0, please check this link for procedures for turning on the Auto
Constraint feature before creating sketches in DesignModeler.
Overview
The geometry is created in the following steps:
- Sketch: Sketch the rectangle
- Split edges: Split the horizontal edges to demarcate the unheated and heated
sections.
- Dimension edges
- Create "Surface Body": Create a "Surface Body" from the sketch. This is analogous
to, say, extruding a sketch to create a 3D body. We always go from a "sketch" to a
"body" in DesignModeler. Here the "body" is 2D and referred to idiosyncratically as
"Surface Body".

Specify Geometry as 2D
First, we need to specify that the geometry is 2-dimensional. Right click the Geometry
box and select Properties . This will open the Properties of Schematic
A2: Geometry Window. Under Advance Geometry Options change Analysis
Type from 3D to 2D .
After the analysis type has been set, you can dismiss the Properties window. We are
now ready to launch DesignModeler, the drawing tool in ANSYS. Open DesignModeler
by double-clicking the geometry box . Twiddle your thumbs until the
DesignModeler window comes up. You will be prompted to choose a standard unit of
measurement. Select Meter as the standard unit, and click OK .

Sketching
We want to sketch on the XY plane. To look at the XY plane, click the positive Z-Axis on
the compass in the Graphics window.
Look to the left and you'll see the Tree Outline window. To sketch on the XY plane,
highlight XYPlane in the Tree Outline window.To begin sketching, click on
the Sketching tab at the bottom of the Tree Outline window. To draw our domain, we
will use the Rectangle tool. Click on in the Sketching Toolboxes window.
In the blue graphics window, draw the rectangle by first clicking on the origin (make sure
the P icon is showing, meaning the cursor is coincident with a "P"oint, in this case the
origin). Then select a point in the 1st quadrant.

Because the wall has two sections, an isothermal section and a heated section, we will
need to split the upper edge. To split the edge, select the Modify tab in the Sketching
Toolboxes window, and select . Next, click any point along the upper surface
of the rectangle. This will split the line into 2 segments.
It turns out that to get a nice regular mesh, the bottom edge should also be split in the
same way. So split the bottom edge as well (don't worry about the location, we'll adjust
that next).
Now we will make the second segment of each edge to be of the same length (this will
automatically ensure that the first segments are also of the same length). Go to
the Constraints tab and select "Equal Length." Click on the top, right partition first.
Then click on the bottom right partition. This will make these segments the same length
ensuring that both the top and bottom edges are split at the same location. If you made
a mistake,there is an undo button at the top left (caveat: this undo button works only in
the sketching mode).

Dimensioning
The next step in creating the domain will be adding dimensions. In the Sketching
Toolboxes window, select Dimensions > General . First, click the left segment of the
upper edge of the rectangle, then drag the cursor to place the dimension above the line.
Repeat this process for the right segment of the upper edge. Last, dimension the left
edge as shown below.
We can set the dimension in the Details View window. In the Details View window,
change H1 to 5.76, H2 to 2.88, and V3 to .06. You can zoom in/out using the middle
mouse wheel. You can move the dimensions by selecting Dimensions > Move and
then dragging the labels by grabbing them with the mouse.

Surface from Sketches


Recall that we need to create a 2D "Surface Body" from the sketch. To accomplish this,
look to the top menu and select Concept > Surfaces From Sketches.

Next, click any edge on the sketch in the Graphics window. This will select the
corresponding sketch. In the Details View window, select Base Objects > Apply . Now
the program knows from which sketch to create the surface.

Click Generate to create the surface. The geometry of the domain, if you
have followed the tutorial successfully, should look like this:
Click here to enlarge the image

Material
In the tree outline, expand 1 Part, 1 Body and click on Surface Body. In
the Details window, next to Fluid/Solid change the material to Fluid.

Save the project by selecting File > Save Project from the main menu. Close
DesignModeler. We are ready to move on to the meshing step.

Mesh

Launch the Mesher


Now that we have completed creating the geometry of the domain, we are ready to
mesh it. The meshing step chops up the domain into little chunks called cells or
elements. The solver approximates the governing equations and/or boundary conditions
on each of these chunks. The end result is a large system of
simultaneous algebraic equations which we hand over to the computer to solve.
Return to the Project Schematic Window. In this window, double click the Mesh
box to launch the mesher.
Twiddle your thumbs and try to avoid checking facebook while the meshing application
launches. If a Meshing Options window shows up to the right, you can dismiss it.

Mapped Face Meshing


For users of ANSYS version 16, mapped face meshing is now called Face Meshing.

First we will apply "mapped face meshing" to get a regular mesh. In the Outline window,
click in the tree. This will show the meshing options in the main menu bar
(look just above the tree outline). In the meshing options, select Mesh Control >
Mapped Face Meshing.
In the Graphics window, click on the rectangle to select it, then in the Details window,
click Geometry > Apply.

This will apply "Mapped Face Meshing" to the rectangle which will yield a regular mesh.

Edge Sizing
We will control the mesh size by specifying the size of the divisions to be used on the
edges of the rectangle. To create the edge sizings, make sure Mesh is highlighted in
the tree. Then select Mesh Control > Sizing.
We'll be applying the sizing in meters. So check that the units are set to Metric (m, kg
...).

Since we'll be applying the sizing to edges, select the edge selection filter by clicking on
it.
Select Zoom to Fit as shown in the snapshot below to fit the entire geometry in the
graphics window. Hold down the left mouse button and drag over the four horizontal
edges (two top and two bottom). The surfaces will be highlighted in green when they've
been selected.

In the details window, select Geometry > Apply. Now the mesher knows which edges
to apply the sizing to. Ensure that Type is set to Element Size, then change
the Size from Default to 0.05 m as shown below. This will set each division size on the
corresponding edges to 0.05 m. (If we want a finer mesh, we would input a smaller
size.)
Now, we will create an edge sizing for the vertical edges of the geometry. Create
another edge sizing, and this time, choose the left and right vertical edges of the
geometry by holding down the Ctrl key and selecting each of them, and go to Geometry
> Apply. Change the Type to Number of Divisions. Next, specify Number of
Divisions to 30. Note that one can specify the Element Size or Number of Divisions
depending on which is more convenient.
Before generating the mesh, we will turn off the Advanced Sizing Function . Make
sure that Mesh is highlighted in the tree and in the Details window, expand Sizing. Next
to Use Advanced Size Function, change from On to Off.

Generate the Mesh


In the Mesh context menu, Mesh > Generate Mesh.

The generated mesh should now be seen. (If you don't see it at first, select in
the tree outline to show the generated mesh). You can zoom in/out using the middle
mouse wheel. We see that ANSYS decreases the mesh size near the entrance since it
sees a corner. This is fine for our case since this will better resolve the rapidly
developing boundary layer near the entrance. So we won't override this.
Named Selections
Next, we will have to specify names of different portions of the geometry to use in
FLUENT to define boundary conditions. Make sure the Edge Selection Filter is
selected before proceeding.

Inlet

Select the left, vertical edge of the geometry with a left mouse click - it should highlight
green. Right click, and select Create Named Selection. Name the selection Inlet.
Click OK once finished.

Centerline

Next, we will specify the axis/centerline of the pipe. Select the bottom surface of the
pipe, and create a named selection. Name it Centerline.

Isothermal Wall

We will now specify the portion of the wall that is isothermal. Select the left portion of
the upper surface of the pipe. Create a named selection and call it Isothermal Wall.

Heated Wall

We will now specify the portion of the wall that is heated. Select the right portion of the
upper surface of the pipe. Create a named selection and call it Heated Wall.

Outlet

We will specify the outlet of the pipe. Select the right, vertical edge of the pipe. Create a
named selection, and call it Outlet.

Flow Domain

Finally, we specify the flow domain of the pipe. With the face selection filter, select the
face of the pipe. Right click and create a named selection and call it flow domain.
Click to update all the changes made in the mesher.
We are done with the mesh creation, so we can now save the project, and close the
mesher.

Physics Setup
The geometry and the mesh have been set up to solve the problem using FLUENT but
a few things need to be considered before we proceed.
Double Precision
Both single and double precision versions of FLUENT are available in workbench.
Although single precision is sufficiently accurate in most cases, the disparate length
scale in our model (long, thin pipe) may create large round-off error. Hence, we will use
double precision to reduce this error.
Axisymmetric
When Axisymmetric is selected, FLUENT transforms the Cartesian coordinates to
cylindrical polar coordinates. The gradient in the axis symmetric model now becomes:
Material Properties
The values entered in material properties will be applied to the constants in the
governing equations.
Operating Condition
The absolute pressure is defined as the sum of the gauge pressure and the reference
pressure:

In FLUENT, the reference pressure can be specified under operating condition. By


default, the operating condition is 1 atm.

Open FLUENT
Make sure a check mark appears next to the mesh panel in workbench. Double click
Setup to open FLUENT.

Initial Settings
Before FLUENT launches, we will be prompted to set some options. In Options check
the box next to Double Precision. .
Once the options are set, click OK.

Problem Setup - General


Now, FLUENT should open. We will begin setting up some options for the solver. In the
left hand window (in what I will call the Outline window), under Problem Setup,
select General. The only option we need to change here will address the fact that pipe
domain we created is axisymmetric. Under 2D Space, click the radio box next
to Axisymmetric.

Models
In the outline window, click Models. For viscous model, laminar is the default, so we
don't need to change that. We will need to utilize the energy equation in order to solve
for the temperature. Under Models highligh Energy - Off and click Edit.... Now,
the Energy window will launch. Check the box next to Energy Equation and hit OK.

Materials
In the Outline window, highlight Materials. In the Materials window, highlight Fluid, and
click Create/Edit.... this will launch the Create/Edit Materials window; here we can
specify the properties of the fluid. Set the Density to 1.2, the Specific Heat to 1000,
the Thermal Conductivity to .02, and the Viscosity to 1.8e-5.
Once finished, click Change/Create, then Close.

Boundary Conditions
Now we will specify the boundary conditions governing the problem. In
the Outline window, highlight Boundary Conditions.

Operating Conditions

The default operating pressure in FLUENT is 1 atm, which is 101325 Pa. We can
equate the operating pressure to the absolute pressure by setting the gauge
pressure to zero.

Centerline

Under Zone, highlight Centerline. Change the Type to axis. Confirm you are changing
the selection, then leave the name as the default centerline.

Heated Wall

Under Zone, highlight heated_wall. The Type should have defaulted to wall. Next,
click Edit.... Click the Thermal tab, and select the Heat Fluxradio button. Change
the Heat Flux (w/m2) to 37.5. Click OK.

Inlet

Under Zone, highlight inlet. The Type should have defaulted to velocity-inlet. Next,
click Edit.... In the Momentum tab, change the Velocity Specification
Method to Components, and specify the Axial Velocity to 0.1. Click OK
Isothermal Wall

Under Zone, highlight isothermal_wall. The Type should have defaulted to wall. Next,
click Edit.... Click the Thermal tab, and select the Temperature radio button. Change
the Temperature (k) to 300. Click OK.

Outlet

Under Zone, highlight outlet. The Type should have defaulted to pressure-outlet.
Next, click Edit.... In the Momentum tab, ensure the Gauge Pressure is 0. Click OK.

Numerical Solution

Solution Methods
In the Outline window, select Solution Methods to open the Solution Methods window.
Under Spatial Discretization, change the option under Momentum from First Order
Upwind to Second Order Upwind. Under Energy, also change the option to Second
Order Upwind.

Monitors
In the Outline window, click Monitors to open the Monitors window. In
the Monitors window, select Residuals - Print,Plot and press Edit.... This will open
the Residual Monitors window. We want to change the convergence criteria for our
solution. Under Equation and to the right of Continuity, change the Absolute
Criteria to 1e-6. Repeat for x-velocity, y-velocity, and energy, then press OK.

Reference Values
In the Outline window, select Reference Values. Under Compute From, select Inlet.
Ensure that the values displayed are the values we specified.

Solution Initialization
In the Outline window, select Solution Initialization. We need to make an "Initial
Guess" to the solution so FLUENT can iterate to find the final solution. In the Solution
Initialization window, select Standard Initialization then under Compute from,
select Inlet from the drop down box. Check to see that the values that generate match
our inputted values, then press Initialize

Data File Quantities


After we have initialized the solution, we can select additional quantities to be
transferred over to CFD-Post. These quantities are not selected by default and so we
must select them ourselves. Go to File>Data File Quantities. Under Additional
Quantities, find and select Skin Friction Coefficient and click OK.

Run Calculation
In the Outline window, select Run Calculation. Change the Number of Iterations to
1000. Double click Calculate to run the calculation. After the iterations have converged,
save the project, and you may close the solver.
Numerical Results

Open the Post Processor


In the Project Schematic double click Results to open the post processor. When the A6:
Fluid Flow (FLUENT) - CFD - Post Window opens, look at the geometry by clicking the
+Z axis on the compass

Velocity Vectors

In the Post Processing window, click the Vector icon to create a vector result.
When prompted, name the result Velocity Vector. In the Details of Velocity
Vector window, begin on the Geometry tab. Under Locations, select Periodic 1. This
will show the velocity along the entire geometry surface periodically. Next, click on
the Symbol tab. Change the Symbol Size to 0.1. Finally, move to the View tab. We
want to see the entire geometry of the pipe: not just half of it like we currently see. To
see the whole pipe, check the box next to Apply Reflection/Mirroring, and change
the Method to ZX Plane. Because the pipe is long and skinny, it will be difficult to see
the results. This post processor allows us to stretch the results to make the results
easier to see. To apply a scaling, check the box next to Apply Scale, and change
the Scale to 1,10,1 (this will scale the y-direction by 10). When finished, press Apply to
see the result. If you wish to see the result without the wireframe of the pipe, uncheck
the box next to Wireframe under User Location and Plots.
In ANSYS version 14.5 and later, only one half of the pipe cross-section is displayed
after using the mirroring option. You can work around this by applying the mirroring
condition in the "Default transform" setting and not in the "View" Tab. To do this select
"Default Transform" in the left-hand menu, uncheck "Instancing Info from Domain",
check "Apply Reflection" and select to mirror about the ZX Plane.
click here to enlarge

Velocity Contour

In the Post Processing window, click the Contour icon to create a Contour result.
When prompted, name the result Velocity Contour. In the Details of Velocity
Contour window, begin on the Geometry tab. Under Locations, again select Periodic
1. Also, change the Variable to Velocity. Next, move to the View tab. Check the box
next to Apply Reflection/Mirroring, and change the Method to ZX Plane and
again,check the box next to Apply Scale, and change the Scale to 1,10,1. When
finished, press Apply to see the result. Finally, we need to remove the Velocity Vectors
from the Graphic Window. Do this by unchecking the box next to Velocity Vector in
the Outline window under User Location and Plots.

Click here to enlarge


Temperature Contour

In the Post Processing window, click the Contour icon to create another Contour
result. When prompted, name the result Temperature Contour. In the Details of
Temperature Contour window, begin on the Geometry tab. Under Locations,
select Periodic 1. This time, change the Variable to Temperature. Next, move to
the View tab. Apply the same mirroring and scaling as we did for the Velocity Contours.
When finished, press Apply. Uncheck the box next to Velocity Contour to only see the
Temperature Contours.

Click here to enlarge

Pressure Contour
Create another contour result, and name Pressure Contour. Use all of the same
settings as the previous results but this time choosing Variable > Pressure in
the Geometry tab.
Click here to enlarge

Graph of Temperature along Centerline


To graph the temperature along the centerline, we first need to create the centerline as
a path. To accomplish this, click on the Location icon , select Line, and
name the line Centerline. In the Details of Centerline window, set the Method to two
points. Point 1 is (0,0,0), and Point 2 is (8.64,0,0). Enter these values into
the details window. Next, change the number of Samples to 100. Press Apply once
finished.

To create a chart, press the chart icon . When prompted, name the
page Temperature Along Centerline. In the Details of Temperature Along
Centerline window, begin on the General tab. In the Title, enter Temperature Along
Centerline. Next, click on the Data Series tab. Under Data Source, in the drop down
menu next to Location, select Centerline. Now move to the X Axis tab. In the drop
down menu next to Variable, scroll all the way down and select X. In the Y Axis tab,
change the Variable to Temperature. when finished, press Apply to see the chart.
Click here to enlarge

Graph of Temperature along Outlet


To graph the temperature along the outlet, we need to create the outlet as a path much
like we did with the centerline. Click on the Location icon , select Line, and
name the line Outlet. In the Details of Centerline window, set the Method to two points.
Point 1 is (8.64,0,0), and Point 2 is (8.64,0.06,0). Enter these values into
the details window. Next, change the number of Samples to 100. Press Apply once
finished.

Next, press the chart icon . When prompted, name the page Temperature Along
Outlet. In the Details of Temperature Along Outlet window, begin on the General tab.
In the Title, enter Temperature Along Outlet. Next, click on the Data Series tab.
Under Data Source, in the drop down menu next to Location, select Outlet. Now move
to the X Axis tab. In the drop down menu next to Variable, and select Temperature. In
the Y Axis tab, change the Variable to Y. when finished, press Apply to see the chart.
Click here to enlarge

Graph of Nusselt Number along the heated section of the pipe


The Nusselt number is a non-dimensional parameter that provides a measure of the
convection heat transfer at a surface. It is the ratio of convection to pure conduction
heat transfer. We will now derive the Nusselt number as a function of the given
parameters and temperature.
The convection heat transfer at the pipe wall is:

We can rearrange terms to find an expression for h, the convection coefficient:

Substitute the convection coefficient expression into the Nusselt Number expression:

where
h is the convection coefficient.
k is the thermal conductivity.
L is the length scale. Similar to the Reynold's Number, the length scale is the diameter
of the pipe for an internal pipe flow.
q''_w is the heat flux at the heated surface, 37.5 W/m^2.
Tw is the pipe wall temperature at a given location along the pipe.
Tm is the mean temperature in the pipe at the location where Tw is defined.

Wall Temperature

To find the temperature at the wall, click on insert >> location >> point, and name
it Tw exit. In the Details of Tw exit window, set Method to XYZ and enter (8.64, 0.06, 0)
in Point.Click Apply to create a point at the upper right corner of the pipe.

Click on Expression right below and right click in the window to create a
new expression named Tw. Under Details of Tw panel,
entermaxVal(Temperature)@Tw exit in the Definition tab.
Tw now gives the temperature at the location (8.64, 0.06, 0), which is on the exit pipe
wall.
Mixed Mean Temperature

To find the mean temperature at a given location in the pipe, click


on insert >> location >> line, and name it exit. In the Details of exit window, set
Method to Two Points and enter (8.64, 0, 0) for Point 1 and (8.64, 0.06, 0) for Point 2.
Click Apply to create a line at the exit of the pipe. The mean temperature is the area
weighted average temperature and we can use integral to find the appropriate mean
Temperature:

Click on the Calculators tab and double click on Function Calculator.


Select lengthInt for the Function, exit for the Location, and Velocity u for the Variable.
Check show equivalent expression and click Calculate. The expression
"lengthInt(Velocity u)@exit is essentially the integral of u*dr and can be conveniently
used to calculate the mean temperature.
Under Expressions, right click in the window to create a new expression and name it
Tm. In the Details of Tm window, enter the following:
lengthInt(Velocity u*Y*Temperature)@exit/lengthInt(Velocity u*Y)@exit
This expression will now give the mean temperature at the location in which we called
"exit". Recall the pipe radius r is defined in the Y direction in FLUENT. Hence we will
use Y to define the radial position in the pipe, as shown in the expression above.

Nusselt Number

We are now ready to find the Nusselt Number. Create another expression and name
it Nu exp. Under the Definition tab, enter the Nusselt Number expression shown in the
equation above. The units are entered in square brackets, this is done to ensure the
expression for the Nusselt Number is dimensionless.

You may get a slightly higher or lower value for the Nusselt Number here.

We would like to compare the Nusselt Number along the heated section of the pipe. We
can generate the Nusselt Number at a different location by simply changing the x-
coordinate of exit and Tw exit, which we defined earlier. Once the new coordinates
defined in exit and Tw exit are updated, the associated expression Tw, Tm, and Nu
exp will be updated automatically.
We can expect a maximum and dominant convection heat transfer at the entrance of
the heated section of the pipe. The convection heat transfer raises the temperature
inside the pipe, as well as mean temperature, along the downstream direction. The
mean temperature near the exit is higher relative to the entrance and therefore a lower
convection heat transfer is expected at the exit. Again, the Nusselt Number is a
measure of convection heat transfer relative to conduction heat transfer. Thus we
should expect the Nusselt Number to decrease along the length of the pipe.

To export the data, click on the "export" button. Comma Seperated Value (.csv) is able
to be read by matlab and Excel, so it should be fine.
We are now ready to validate and verify our results.

Verification & Validation

Create Another Instance of the Project


Return to the Project Schematic Window. Right click on the Fluid Flow
(FLUENT) box , and select Duplicate. This will create another
instance of the project. When the duplicate box generates, rename it Refined Mesh

Refine the Mesh

Open up the mesher of the newly created project by double clicking box
of Refined Mesh. We want to refine the mesh by increasing the number of elements. To
accomplish this, expand Mesh in the Outline window, and click Edge Sizing. If you
followed the tutorial, this should be an element sizing of the horizontal lines of the
domain. Decrease the Element Size from 0.1 to .025. Next, click Edge Sizing 2, the
divisional edge sizing of the outlet and inlet. Increase the Number of Divisions to {{80))
divisions. In the menu bar, select Mesh > Generate Mesh. After the Mesh Generates,
close the mesher.

Connect The Unrefined Mesh's Solution


Return to the project schematic. We want to be able to compare the Unrefined Mesh's
results to those of the Refined Mesh. To accomplish, click and drag the Solution
Box of the 2D Steady Convection project instance to the
Results Box of the Refined MeshProject instance. See the picture below for clarification.

Next, press to update the project.


View Results
Next, open the Post Processor of the Refined Mesh project instance by double
clicking . In the Outline, select the Temperature Along Centerline chart we
made earlier. Next, In the Details of Temperature Along Centerline window, go to
the Line Display tab. You should see there are two data series on the graph.
Select Series 1 for Refined Mesh, change Line Style to Dot, and press Apply. You
should now see two plotted lines on the plot, as below.

Click here to enlarge

Repeat this process for the Temperature Along Outlet chart.

Click here to enlarge


Because the data does not diverge as we refine the mesh, we have validated our
results. We are done with the simulation.

Você também pode gostar