Upload
mohan-raj
View
97
Download
1
Embed Size (px)
Citation preview
University of Victoria Mechanical Engineering Department
Mech495/535 – Computational Fluid Dynamics and Heat Transfer
ANSYS Project:
Using a commercial CFD package to solve fluid flow problems
Material prepared by T.C. Wu Email solution to [email protected]
Due date: Mar 27, 2012 Date: Tuesday, March 6, 13, 20, 27
Time: 12:30 pm -‐ 1:20 pm Location: ELW B238
Problem Description 1) Fluid Flow and Heat Transfer in a Mixing Elbow
This tutorial illustrates using ANSYS FLUENT fluid flow systems in ANSYS Workbench to set up and solve a three-‐dimensional turbulent fluid-‐flow and heat-‐transfer problem in a mixing elbow. This tutorial is designed to introduce you to the ANSYS Workbench tool set using a simple geometry. In this tutorial you will create the elbow geometry and the corresponding computational mesh using the geometry and meshing tools within ANSYS Workbench. You will use ANSYS FLUENT to set up
(D1 = 1 in and 1.5 in)
and solve the CFD problem, and then visualize the results in both ANSYS FLUENT and in the CFD-‐Post postprocessing tool. Some capabilities of ANSYS Workbench (for example, duplicating fluid flow systems, connecting systems, and comparing multiple data sets) are also examined in this tutorial.
2) Steady Flow Pass a Cylinder
Consider the steady state case of a fluid flowing past a cylinder as illustrated. Obtain the velocity and pressure distributions when the Reynolds number is chosen to be 20 and 200. In order to simplify the computation, the diameter of the pipe is set to 1 m, the x component of the velocity is set to 1 m/s and 10 m/s, also the density of the fluid is set to 1 kg/m^3. Thus, the dynamic viscosity must be set to 0.05 kg/m*s in order to obtain the desired Reynolds number. Deliverables 1) Fluid Flow and Heat Transfer in a Mixing Elbow
A. D1 = 1 in, compute and save: • Velocity contour along a symmetry plan • Temperature contour along a symmetry plan
B. D1 = 1.5 in, compute and save: • Display velocity contour along a symmetry plan for D1 = 1 in and 1.5 in • Display temperature contour along a symmetry plan for D1 = 1 in and 1.5
in C. D1 = 1.5 in, Uy = 2.4 m/s. Compute and save:
• Velocity contour along a symmetry plan • Temperature contour along a symmetry plan
2) Steady Flow Pass a Cylinder
A. Re = 20, using the laminar, compute and save: • Velocity vector plot around the cylinder • Velocity contour plot around the cylinder • Stream lines contour plot around the cylinder
B. Re = 200, using turbulent k-‐epsilon model, compute and save:
• Velocity vector plot around the cylinder • Velocity contour plot around the cylinder • Stream lines contour plot around the cylinder
C. Re = 200, select a different turbulence model (k-‐omega, for example), compute and save:
• Velocity vector plot around the cylinder • Velocity contour plot around the cylinder • Stream lines contour plot around the cylinder
Finally, create a file with your name and with the headers 1A, 1B, 1C, 2A, 2B and 2C (indicating choice of turbulence model). Under each heading insert the required plots. Send the aforementioned files by e-‐mail to [email protected].
Introduction The basic steps involved in any computational analysis such as a CFD analysis are:
• Pre-‐processing • Solution • Post-‐processing
The pre-‐processing stage is the most time consuming part for the user. It involves the generation and discretization of the solution domain, the specification of the properties of our domain and, finally, the specification of the boundary conditions. The solution involves specification of the numerical method to be used and patience because a fluid flow problem can take a long time to converge. As an example, today it is computationally not feasible to solve the fluid flow problem around an airfoil at Re higher than 200,000 using the full Navier-‐Stokes equations. As a result, various turbulence models are used to simplify the numerical procedure. Finally, an essential step when using computational methods is the post-‐processing. At this stage we have to use the engineering criteria to analyze the solution and determine if it is correct or if some parameters at the pre-‐processing stage need to be adjusted. Procedure: Fluid Flow and Heat Transfer in a Mixing Elbow
Open ANSYS Workbench by going to Start > ANSYS 13.0 > Help > ANSYS Help. Select FLUENT > Tutorial Guide > 1. Introduction to Using ANSYS FLUENT in ANSYS Workbench: Fluid Flow and Heat Transfer in a Mixing Elbow Follow each step from 1.4.2 (step 1) to 1.4.12 (step 11) for deliverables 1A and 1B. Change flow inlet conditions and solve for 1C.
Steady Flow Pass a Cylinder Problem Specification Consider the steady state case of a fluid flowing past a cylinder as illustrated. Obtain the velocity and pressure distributions when the Reynolds number is chosen to be 20. In order to simplify the computation, the diameter of the pipe is set to 1 m, the x component of the velocity is set to 1 m/s and the density of the fluid is set to 1 kg/m^3. Thus, the dynamic viscosity must be set to 0.05 kg/m*s in order to obtain the desired Reynolds number.
Part 1 1. Pre-‐analysis and start-‐up Prior to opening ANSYS FLUENT, we must answer a couple of questions. We must determine what our solution domain is and what the boundary conditions are.
Solution domain For an external flow problem like this, one needs to determine where to place the outer boundary. A circular domain will be used for this simulation. The effects that the cylinder has on the flow extend far. Thus, the outer boundary will be set to be 64 times as large as the diameter of the cylinder. That is, the outer boundary will be a circle with a diameter of 64 m. The solution domain discussed here is illustrated.
Boundary Conditions First, we will specify a velocity inlet boundary condition. We will set the left half of the outer boundary as a velocity inlet with a velocity of 1 m/s in the x direction. Next, we will use a pressure outlet boundary condition for the left half of the outer boundary with a gauge pressure of 0 Pa. Lastly we will apply a no slip boundary condition to the cylinder wall. The aforementioned boundary conditions are illustrated.
2. Geometry
Strategy for geometry creation In order to create the desired geometry we will first create a surface body for the cylinder. Next, we will create a surface body for the outer boundary as a frozen, so that it doesn't merge with the first surface body. Then, we will use a Boolean operation to subtract the small surface body from the large surface body. At this point, we will have the surface body of the outer boundary with a hole in the middle where the cylinder is. Lastly, we will project a vertical line on to the geometry, so that radial edge sizing can be implemented in the meshing process.
Open ANSYS Workbench and select FLUENT project Open ANSYS Workbench by going to Start > ANSYS 13.0 > Workbench. This will open the start up screen. Drag (or Double Click) Fluid Flow(FLUENT) into the Project Schematic window.
To open the Files view, select View → Files.
Analysis Type (Right Click) Geometry > Properties, Set Analysis Type to 2D
Saving It would be of best interest to save the project at this point. Click on the "Save As…" button, which is located on the top of the Workbench Project Page. Save the project as "SteadyCylinder" in your working directory. When you save in ANSYS a file and a folder will be created. For instance if you save as "SteadyCylinder", a "SteadyCylinder.wbpj" file and a folder called "SteadyCylinder_files" will appear. In order to reopen the ANSYS files in the future you will need both the ".wbpj" file and the folder. If you do not have BOTH, you will not be able to access your project.
Launch DesignModeler Double click Geometry. In the pop-‐up window choose Meter for the desired length unit.
Create a sketch for the inner circle and dimension Click on the +Z axis on the bottom right corner of the Graphics window to have a normal look of the XY Plane.
Under Tree Outline, select XYPlane, and click New Sketch button, . Then click on Sketching right before Details View. This will bring up the Sketching Toolboxes. In the Sketching toolboxes, select Circle. Click on the origin of the sketch, making sure the P symbol following with the mouse is showing. Just create a rough circle, and its dimension will be defined later. Under Sketching Toolboxes, select Dimensions tab, use Diameter to dimension the circle that just been created as shown below.
Under the Details View table (located in the lower left corner), set D1 = 1 m as shown below.
Inner circle surface body creation At first, you might want to room into the circle to have a better field of view. In order to create the surface body, first click Concept > Surfaces From Sketches as shown below.
This will create a new surface SurfaceSK1. Under Details View, select Sketch1 (located underneath XYPlane in the Tree) as Base Objects and click Apply. Finally, click Generate,
. A gray inner circle surface body is created and the Tree Outline is shown below.
If any step is messed up, simply click the item in Tree Outline and try again. The item might have a different number but won’t affect the result. Also it can be started over from beginning by File → Start Over.
Create a sketch for the outer circle and dimension In this step we will create a new sketch for outer circle in the XY Plane. This step is required for the Boolean operation that we will carry out later in the geometry process. It allows us to create two distinguishable geometries, in the xy plane. Click on XYPlane in the Tree Outline. Click on the New Sketch button. Use similar procedure aforementioned for inner circle. Now, create a circle centered at the origin in Sketch2. Set the diameter of the circle to 64m.
Outer circle surface body creation In this step the surface body will be created as a frozen, such that it does not merge with the inner circle surface body. Concept > Surfaces From Sketches Set the Base Object to Sketch 2. Then set Operation to Add Frozen as shown below.
Then, click Generate. The Tree Outline is now similar to the image as shown below.
The first surface body is the inner circle surface body. The second one is the outer circle surface body.
Boolean operation: subtraction In this step, the inner circle will be subtracted from the outer circle in order to obtain the desired geometry. Create > Boolean First, set Operation to Subtract. Apply the outer circle surface body (by click the second Surface Body underneath 2 Parts, 2 Bodies in Tree Outline) as the Target Body. Then, apply the inner circle surface body as the Tool Body. Lastly, click Generate. At this point if you zoom into the centre of the circle you should see the 1m diameter hole, as shown below.
At this point, the Tree Outline is shown below. Note that only one surface body is left after Boolean subtraction.
Create a bisecting line The purpose of this step and the following two steps is to imprint a line onto the geometry that will, allow for radial edge sizing in the meshing step. Click on XYPlane in the tree and it should highlight blue. Then, click the new sketch button. In the new sketch draw a line on the Y axis that goes through both of the concentric circles. Make sure that it is coincident to the Y axis. Then trim the line segments that lay inside of the inner circle and the line segments that lay outside of the outer circle. This is carried out by using the Trim feature located in the Modify portion of Sketching.
Line body creation Concept > Lines From Sketches Set the Base Object to Sketch 3 (located underneath XYPlane in the Tree Outline). Click Generate.
After this step, there are two Line Body as shown below. Click either one should reveal a yellow line.
Projection Tools > Projection Hold down Ctrl key to select these two lines you just created above, and apply to Edges. Then apply the surface body to Target. You must do these steps by using the edge selection filter, , and the surface selection filter, . Lastly, click Generate.
Save project and close DesignModeler This will go back to Workbench.
3. Mesh In this section the geometry will be meshed with 18,432 elements. The geometry will be given 192 circumferential divisions and 96 radial divisions. Mapped face meshing will be used and biasing will be used in order to significantly increase the number of elements located close to the cylinder.
Launch mesher In Project Schematic window, (Double Click) Mesh If two error messages showing "PlugIn Error: No valid bodies ...." Skip this by click ok.
Mapped face meshing (Right Click) Mesh > Insert > Mapped Face Meshing Set Geometry to both portions of the surface body. You will have to hold down Ctrl key in the selection process in order to highlight both halves. Click Update.
Circumferential edge sizing (Right Click) Mesh > Insert > Sizing Set Geometry to both edges of the surface body. You will have to use the edge selection filter and hold down Ctrl in the selection process in order to highlight both halves. Set Type to Number of Divisions, set Number of Divisions to 96 and set Behavior to Hard. Click Update to generate the new mesh.
Radial edge sizing 1 (top half) (Right Click) Mesh > Insert > Sizing Set Geometry to the top half of the bisecting line. Set Type to Number of Divisions, set Number of Divisions to 96 and set Behavior to Hard. Then, set Bias Type to the first option and set Bias Factor to 460. These selections are shown in the image below.
Radial edge sizing 2 (bottom half) (Right Click) Mesh > Insert > Sizing Set Geometry to the bottom half of the bisecting line. Set Type to Number of Divisions, set Number of Divisions to 96 and set Behavior to Hard. Then, set Bias Type to the second option and set Bias Factor to 460. These selections are shown in the image below.
Then, click Update to generate the new mesh. You should obtain the mesh which is shown below.
Verify mesh size (Click) Mesh > (Expand) Statistics You should have 18,624 nodes and 18,432 elements.
Create named selections In this section the various parts of the geometry will be named according to the image.
In Outline window, click Model (A3) then use edge selection filter to select the left half of the outer boundary. Then right click and select create named selection. Name it "farfield1". Similar procedure, create a named selection for the right half of the outer boundary and call it "farfield2". Lastly, create a named selection for both sides of the inner circle (cylinder) and call it "cylinderwall". When creating the third named selection, make sure that you included both halves of the circle. You will have to hold down Ctrl to select both edges. It was shown in below.
Save project and close meshing In Workbench Project schematic window. Right click Mesh → Update.
4. Setup (Physics)
Launch FLUENT (Double Click) Setup in the Project Schematic window. Select Double Precision
Check mesh (Click) Mesh > Info > Size You should now have an output in the command pane stating that there are 18,432 cells. (Click) Mesh > Check You should see no errors in the command pane.
Specify material properties Problem Setup > Materials > Fluid > Create/Edit.... Then set the Density to 1 kg/m^3 and set Viscosity to 0.05 kg/m*s so that set the Re=20 specifically. Click Change/Create then click Close. Specify models Problem Setup > Models > Viscous By default, it is set to Viscous – Laminar, and all others options are off. If not, (Click) Viscous > Edit and set to laminar. Also if the Reynolds number is changed to turbulent regime in the future, you will need to adjust the model from laminar to turbulent model (k-‐epsilon, for example) accordingly.
Boundary conditions
FarField1 Problem Setup > Boundary Conditions > farfield1 Set Type to velocity-‐inlet. Click Edit.... Set Velocity Specification Method to Components, set X-‐Velocity to 1 m/s, and set Y-‐Velocity to 0 m/s.
FarField2 Problem Setup > Boundary Conditions > farfield2 Set Type to pressure-‐outlet.
Cylinder Wall Problem Setup > Boundary Conditions > cylinderwall Set Type to wall.
Reference Values Problem Setup > Reference Values > Compute from > farfield1 Check if set the Density to 1 kg/m^3, Viscosity to 0.05 kg/m-‐s, Velocity to 1 m/s. The other default values will work for the purposes of this simulation.
Save project In FLUENT click File > Save Project
5. Solution
Second order upwind momentum scheme Solution > Solution Methods > Spatial Discretization Set Momentum to Second Order Upwind
Convergence criterion Solution > Monitors > Residuals > Edit... Set the Absolute Criteria for continuity, x-‐velocity and y-‐velocity all to 1e-‐6. Click ok
Initial guess Solution > Solution Initialization Set Compute From to farfield1. Alternately, you can simply set X Velocity to 1 m/s. Then, click Initialize.
Iterate until convergence Solution > Run Calculation Set the Number of Iterations to 2000. Then, click Calculate. (You may have to hit Calculate twice.) Now, have a cup of coffee. The solution should converge after approximately 1647 iterations as shown below.
Save Project In FLUENT click File > Save Project
6. Results
Velocity vectors Results > Graphics and Animations > Vectors > Set Up... The Scale was set to 2, as shown below. Then click Display.
The vector plot will be similar to the image as shown below when zoom-‐in around the cylinder.
(Click) File > Save Picture Pick JPEG and Color. Unclick White Background. Then Save… Make sure the file location. The saved image will be the first deliverable of this tutorial.
Velocity contours Results > Graphics and Animations > Contours > Set Up... Set the options as shown below.
The velocity contour will be similar to this.
Save this picture for second deliverable.
Stream lines Results > Graphics and Animations > Contours > Set Up... Set the options as shown below.
The stream lines will be similar to this.
Save this picture for third deliverable. Close FLUENT.
Part 2 In Workbench Project Schematic window, right click the title cell A of Fluid Flow (FFLUENT) and select Duplicate, a new cell B will be duplicated. Double click the Solution to start a new simulation using different flow conditions.
1. Increase velocity to 10 m/s, so that the Re = 200. Use turbulent k-‐epsilon model and run the calculation. Note: Whenever the flow conditions changed, the solution need to be initialized again when you start the calculation.
2. Use k-‐omega or different model and calculate for Re = 200.
Appendix A picture of flow around a cylinder at Re = 26 (picture reproduced courtesy of An Album of Fluid Motion assembled by Milton Van Dyke).