Sunteți pe pagina 1din 13

CPE402/6020 Computational Fluid Dynamics

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

Computational Fluid Dynamics Tutorial 1: Software overview


We will be using ANSYS V14 software throughout this course and this tutorial gives an introduction to some of its basic features. The ANSYS software consists of a front end program called WORKBENCH which coordinates a number of different analysis programs which carry out particular parts of an overall computation. Three of these software programs are relevant to the course: DESIGN MODELER is software used to construct the precise geometry of the computational domain of interest MESHER is software used to generate a suitable numerical mesh and to name the domain boundary surfaces and interior regions FLUENT is software for numerical solution of the equations for flow, temperature and species concentrations Once the problem to be solved is identified, DESIGN MODELER is used to construct the domain geometry; the result is passed to MESHER to generate a mesh and name boundary and interior zones; finally, the mesh is passed to FLUENT where the physical problem is specified and then a numerical solution is obtained. Also within FLUENT, results are extracted. In the tutorial today you will work through a few simple problems to build up experience with using the software as a whole and the components individually. You will save files to allow you to return later to work further on the problem. It is best to store your work on a memory stick (inexpensive for large capacity) to avoid running over your allocated disc storage space. This is important since ANSYS will not recover if space runs out when saving files, the files will be lost and you will need to start again! Flow at the inlet of a circular pipe This is possibly the simplest flow problem in all of CFD that can not be solved analytically. At the inlet to the pipe the velocity can be assumed to be uniform and we are interested in the growth of boundary layers along the pipe wall as the flow evolves towards the developed flow state. Since the pipe is circular, the geometry is axisymmetric and solution is required in a single representative plane parallel to the pipe axis and extending from the axis out to the wall. Thus, the solution domain is a two-dimensional (2D) rectangular shape as shown below with the specific dimensions that will be used in the tutorial.

Solid Wall Inlet Pipe Axis 1 Outlet

CPE402/6020 Computational Fluid Dynamics 1. Start ANSYS WORKBENCH

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

Along the top are menu bars for opening and saving a project. At this stage save the project as TUT1_Pipe in a folder at some location in your file system. You will see that in that folder a file by that name with extension .wbpj (workbench project) has been saved and a folder TUT1_Pipe_files has been created. The geometry, mesh and Fluent files will be saved under this folder. Along the left side is the Toolbox area and here are listed the individual analysis programs required to solve a problem (under Component Systems), as well as collections of these in preassembled units (Analysis Systems). We will select components individually. In the main window is the Project Schematic where component or analysis systems will be placed in cells connected to one another to represent the connections in the analysis. 2. Add the DESIGN MODELER program Find the Geometry component in the Component Systems list. Click and drag it to the Project Schematic window and place it in the dashed outline that appears. You have created a geometry cell and this should now appear in place of the dashed green box.

3. Construct the geometry A question mark icon appears in A2 of the geometry cell indicating that input is needed. Click on A2 with the right mouse button (RMB) and select New Geometry to enter DESIGN MODELER (DM). When the software starts you are asked to select the length unit of measure to be used. Select the metre (m) which should be the default. (Regardless of the units selected here, when coordinate values are passed to the Fluent analysis program they will be interpreted as metres.) 2

CPE402/6020 Computational Fluid Dynamics

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

In DM you create a precise description of geometry in a variety of ways. Commonly, geometry is based on sketches in particular planes that are then operated on to form geometry. Operations include extruding and revolving a sketched shape to form a three-dimensional (3D) body, combining bodies using Boolean operations or using primitive, i.e. pre-made, bodies. You will see all of these at some point in the course tutorials and many in the tutorial today. In this first example, the domain is 2D and we can make a sketch in the shape of the domain and generate a 2D body (just a surface in this case) directly. The Fluent program assumes 2D problems in the x-y coordinate plane, so we will create our 2D shape in that plane. But DESIGN MODELER assumes a 3D geometry by default. Back in Workbench, click RMB in Cell A2 and select Properties. Under Analysis Type in the list, change to 2D. Under the Tree Outline (in DESIGN MODELER) click on the XYPlane icon (1 in the illustration) to select that plane and then click on the New Sketch icon (2) to begin a sketch on that plane. Select the Sketching tab (3) at the bottom of the Tree Outline. This changes from Tree Outline to the Sketching Toolboxes where tools associated with the sketching process are found. These include ones for drawing shapes and lines, modifying what is drawn and indicating dimensions. Technical drawing software uses constraints to guide the drawing. As the curser is moved near to existing elements of the sketch or the coordinate axes and origin, the curser changes to signal that it is precisely at some special place or that what is being drawn has some special orientation. Our geometry will be a rectangle formed by two points, one the origin of the coordinate system and the second at (20,2.5). Select the Rectangle tool from the Draw menu and place the first point at the origin of the coordinate system (a P will be showing and just the origin point will be highlighted). It may be easier to see this well if the view is changed to be normal to the sketch plane (view icon showing a head facing a green plane). Click at roughly the position where the second point should be to complete the rectangle and then the Escape key to exit the Rectangle tool. The second point can now be placed precisely by giving dimensions relative to the coordinate axes. From the Dimensions menu select General to dimension the distance from the y axis. Click on the top side of the rectangle and pull the mouse upward and click the left mouse button (LMB) to place the dimension. Below the sketching/modelling region you will see details of the sketch including the dimension you just added. There you can enter the precise dimension of 20 required. Do the same for the right hand side of the rectangle (2.5m). 3

CPE402/6020 Computational Fluid Dynamics

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

You may have noticed the lines in the sketch change from a teal colour to deep blue when the dimensions were added. All lines of the sketch should now be deep blue indicating that all lines making up the sketch are fully defined. If any of the sketch remains the teal colour, further dimensions or constraints are needed.

Finally, we need to generate a geometry from this sketch. Click on the Modeling tab and note that a + icon appears next to the XYPlane indicating that subordinate elements are present. Expand to see the sketch that has just been made. Click on Concept/Surfaces from Sketches from the top menus to convert the sketch to a surface. In the Details View below the Tree Outline notice that the Base Objects entry is not yet selected to be the sketch. Click on the sketch in the Tree Outline and then the Apply button next to Base Objects. The surface now appears in the tree and the sketch is selected as the basis for the surface, but there are no parts or bodies indicated next to the geometry icon below it. Note also that a lightning bolt icon appears next to the surface icon in the tree. This indicates that the surface remains to be generated. Either click on the Generate toolbar icon or RMB on the surface icon and select Generate. The rectangle becomes shaded to indicate it is a surface and not just a rectangular outline. Finally, before finishing with GEOMETRY we must indicate here what sort of material occupies the region of spaced (domain) enclosed by the geometry. The software is more general than handling just fluid flow (CFD) and in some problems one may be interested in a solid domain, in other cases a domain occupied by fluid and in some cases a domain occupied partly by solids and partly by fluids. Click on the Surface Body icon in the Tree Outline and under Details View set Fluid/Solid to Fluid so we may compute a flow. (Here you may note that the body was set to Solid by default which is incorrect if we want flow to take place there!) The geometry geometry construction for the example has been completed. 4. Meshing Meshing is the important step of dividing the geometry into a number of sub volumes called cells in preparation for numerical solution. The smaller the mesh cells (and the larger their number) the better the governing equations are resolved. The mesh cell size required to achieve a given level of resolution can vary throughout the domain since at different locations the velocities, temperatures and concentrations can vary in space at different rates. Where quantities in the solution change rapidly with distance smaller mesh size is required than where change is gradual.

CPE402/6020 Computational Fluid Dynamics

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

In this tutorial we will simply let the meshing program determine the grid using its automatic algorithm. Although we will introduce a simple way of adjusting the general size of the mesh cells. It will also be necessary to indicate that the mesh should be generated in a manner appropriate for particular requirements of CFD, as opposed to solid mechanics computations. In WORKBENCH find the Mesh icon in the Component Systems list under Toolbox and click and drag it to the geometry cell position A2 and drop it there.

This results in a line connecting this position to a new meshing cell representing the MESHING program. You will notice a circular double-arrow icon which indicates that the meshing element does not have the latest information from upstream programs, i.e. from DM. Click with RMB on the meshing cell B3 and select Refresh to refresh the upstream information. When the refresh is complete the lightning bolt icon appears in cell B3. As before this indicates that the mesh is ready to be generated, in this case a mesh for the geometry using default mesh settings. We can either enter the MESHING program to generate the mesh or we can update the mesh directly from WORKBENCH. We actually need to change one or two meshing settings and define some boundary surfaces, so we will enter the program now. Open the MESHING program by RMB click on cell B3 and selecting Edit. You will see a view window similar to that in DM and a meshing Outline to the left. In the Outline are items representing the geometry, coordinate systems and the mesh itself. In more complex geometries multiple bodies may form the overall domain and different local coordinate systems may be helpful. The MESHING program can be used by a number of different numerical solution programs including ones for solid mechanics computations. We must at this stage select the type of computation so the mesh will be generated in conformity with the numerical methods used in FLUENT. To do this LMB click on the Mesh icon in the Outline and in the Details of Mesh section below this select CFD under Physics Preference. You will see a new entry appear: Solver Preference and this should be Fluent by default. Change it to Fluent if another solver is listed. The mesh can now be generated: RMB and select Update. 5

CPE402/6020 Computational Fluid Dynamics

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

The mesh is now generated but there is one further tasks we must complete before moving on to make a numerical solution in FLUENT. Names must be given to the different sides of the domain to allow boundary conditions to be set in FLUENT and this is done in the MESHING program. Here we want to give names to the boundaries needed to produce a simple flow solution. We will start by naming the left side of the rectangle inlet and the right side outlet. We will leave the top and bottom boundaries unnamed which will then be taken by default to be solid wall boundaries. Any names can be given, but it is simplest to use names contained in the special names used by FLUENT for particular boundary condition types. At the flow inlet we will want the velocity-inlet boundary condition and for the outlet the pressure-outlet boundary condition. By using names including inlet and outlet the correct boundary conditions will automatically be assigned when the mesh is passed along to FLUENT. We could alternatively use names like inlet_1 or first outlet and the correct boundary conditions would result. If in FLUENT the wrong boundary condition has been picked up, it can be changed there. To name the inlet boundary select the left edge with LMB click so we can name it. Make sure the Edge filter is selected on the toolbar along the top of the windows. This picks out only edge elements in the view window as the curser is moved over the geometry. RMB click on the left edge and select Create Named Selection. In the window that ap pears enter the name inlet and click OK. Name the right edge outlet in the same way. You will see that a Named Selections icon has appeared in the Outline tree which when expanded reveals the two boundaries just named. You can click on these in the tree to confirm the boundary names and geometry entities involved are correct. Click on the Mesh icon in the Outline tree to see the mesh cells. The meshing is very coarse and we will want to force smaller cells to be generated. Below, in the Details of Mesh list, expand the Sizing category. Select Use Advanced and choose On: Fixed. Set the two size inputs (Min Size, Max Face Size, Max Size) to the value 0.5. Update the mesh. Meshing is complete; return the WORKBENCH. 5. Setup and Solution From WORKBENCH click and drag on the FLUENT icon in the Component Systems list under Toolbox placing it in meshing cell B3. The FLUENT program is now added to the analysis in the project. Again adding the new cell requires upstream information, in this case some of the meshing information must be 6

CPE402/6020 Computational Fluid Dynamics

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

regenerated to suit the FLUENT program formats. Click on the Update Project icon in the toolbar or, alternatively, RMB click on mesh B3 to select Update and then refresh cell C2. In more complex problems it can be safer to refresh and update one step at a time using the latter approach. This is because if an error occurs because of incorrect information upstream, the resulting non-sense being passed on may cause a problem in a downstream operation. So if refresh and update is done one step at a time the problem can be detected and corrected before producing a situation from which ANSYS may not be able to recover (software programmers just dont think of everything!).

Once green tick marks appear in all the upstream boxes and the FLUENT cells show question marks, open FLUENT by RMB click on C2 (Setup) and select Edit so we can set up a simple computation to see what the FLUENT program looks like. Click on OK when presented with the FLUENT Launcher. As with meshing, we will accept the default settings except where absolutely necessary to do otherwise! The defaults are fluid properties corresponding to air at standard temperature and pressure and, at the pressure boundary (outlet) a gauge pressure of zero. You will see three main areas: a view (or graphics) window in which the domain and mesh are shown initially, menus both along the top and down the left side (most commands can be accessed either way) and the text window below the graphics window. Originally (1980s) all control of a calculation including domain, mesh and boundary condition generation was controlled through the text window. It is still occasionally necessary to make use of the text window in the current version.

CPE402/6020 Computational Fluid Dynamics

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

To set conditions that will result in flow we can simply specify a non-zero velocity at the inlet, i.e. specifing a boundary condition there. We will impose at that boundary a uniform velocity normal to the edge of 0.001 m/s. Click on Boundary Conditions (either at the left or under Define along the toolbar). You will see a list of the different boundary condition zones that are present, including those you created with the MESHING program. Select inlet, make sure it is Type velocity-inlet and click Edit to specify details of this boundary condition. Under the Momentum tab set the velocity magnitude to 0.001 and note that this is in the direction normal to the boundary and is in units of m/s. Click OK. Click Solve/Solution Initialization, tick Standard Initialization and then click Initialize. This gives the solution a starting point of zero velocity everywhere (except at the inlet) and zero gauge pressure everywhere. To iterate to a solution click Solve/Run Calculation, set the number of iterations to 100 and click Calculate. By default residuals are plotted in the graphics window and printed to the text window. Residuals are intended to be a measure of how well the numerical equations have been solved at each iteration. There is one residual for each variable being solved, so one for x velocity, one for y velocity and one for pressure (solved by satisfying conservation of mass or continuity). The default requirement is for all residuals to fall below 10-3. You will see that the iteration process has stopped when this condition is first met for all variables simultaneously. For some problems this criterion is suitable while for others the residuals must be made far lower to gain a satisfactory numerical solution. The criteria for residuals can be altered by selecting Solve/Monitors and selecting Residuals and Edit. Under the Equations list change the criterion for each of the three equations to 10-4, click OK and then iterate further to reduce the residuals to this lower level.

The resulting numerical solution can be examined in a number of ways, including by computing average quantities, making x-y plots of solution variables as a function of position along given lines through the domain region and making contour plots of variables or velocity vector plots over surfaces. 8

CPE402/6020 Computational Fluid Dynamics

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

To display the computed velocity vectors click on Display/Graphics and Animations, select Vectors and click Set Up Click the Display button to see the velocity vectors coloured according to magnitude with length proportional to magnitude. Velocity is uniform at the inlet as specified but becomes lower near the wall and higher in the core of the flow as boundary layers grow along the walls.

Velocity Vectors.

Return to the WORKBENCH, save the project and exit. You will use this result later to make computations of developed flow using the same 2D geometry. Flow at the inlet of a pipe: 3D geometry For further practice with the software and to see that the above procedures apply largely unchanged to 3D geometry we will compute again the pipe flow in the full volume of the pipe rather than just the 2D plane. The solutions will be identical if the pipe remains circular and hence axisymmetric, so there is no need to compute the problem three-dimensionally. Let us say that we think our pipe is not perfectly circular in section and we would like to study the effect of this non-circularity. So we will compute the same 20 m length of pipe as before using an elliptical cross section shape rather than a circular one, as an exercise. 1. Geometry Start WORKBENCH, save the project in a new folder as TUT1_Elliptical_Pipe, add the geometry cell to the Project Schematic and open a New Geometry to enter DM. On the XYPlane sketch an ellipse centred on the origin with major radius 2.75 m and minor radius 2.25 m. The sketch is fully defined when the ellipse is dark blue. Click on the isometric view icon on the toolbar (or, equivalently, on the turquois sphere of the view window coordinate system) in preparation for forming the 3D body. To form the geometry body, extrude the sketch shape 20 m in the z direction using the Extrude icon on the toolbar (or under the Create menu). Click Generate to complete the Extrusion. Click on the Zoom to Fit icon on the toolbar to fill the view with the body so it can be seen most clearly. You might at this point try using some of the other viewing tools: Rotate, Pan, Zoom, Box Zoom. You will find that you need to click again to switch off a particular viewing tool or click on the select tool icon (either Single or Box select). Remember to select the final body and set it to Fluid; also the geometry is 3D so there is no need to set this in geometry properties since 3D is the default (check this). The geometry is now complete. 9

CPE402/6020 Computational Fluid Dynamics

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

2. Meshing, boundary naming, setup and solution The meshing, setup and solution steps are the same as before. Based on what you picked up from working the 2D problem, see if you can follow through the meshing, boundary naming, Fluent setup and solution steps. Remember to set CFD for Physics Preference in the Defaults list under the Mesh Details. Note that the boundaries in the 3D geometry are faces and not edges so you will need the selection filter set accordingly. Also, when you select faces you will note that the outlet face is obscured by the side of the cylinder which is also a face. You will find that the side face is selected instead of the end, but also two planes have appeared in the lower left corner of the view window. By clicking on the different planes the different layered faces can be selected. Otherwise the steps are the same and finally you will have made a velocity vector plot. Note that for this 3D geometry no domain outline is drawn (it was automatically in 2D). To see the outline of the pipe when you make the vector plot select Draw Mesh and in that dialog box click Outline (otherwise the mesh will also be drawn). Save the project from WORKBENCH and exit. The circular pipe and 2D computation You may have noticed that the 2D computation geometry was not quite a correct representation of pipe geometry. To represent a circular pipe correctly, the lower boundary must be an axis of symmetry whereas in the computation we made, that boundary was treated as a solid wall (the velocity came to zero there). Also, the default in FLUENT for a 2D computation is that the 2D surface is extruded along a line in the direction normal to the surface to form the implied geometry. For a pipe the computation plane (the surface) is rotated about the axis to produce the full geometry. This type of geometry is axisymmetric and the equations solved must be adjusted to account for the changing circumferential distance with radial position (y component) in the 2D plane. The computation made previously was for the flow between two parallel plates. We know theoretically that for that case the velocity in the core of the flow will be lower in relation to the average velocity than for the circular pipe. (Once the developed flow state is reached, the maximum velocity is exactly 2 times the average for pipe flow and 1.5 times the average for the planar case.) In this final section of the tutorial we will first change settings so the calculation correctly represents flow in the inlet to a circular pipe. Second, we will compute the developed flow between parallel plates which occurs well downstream of the inlet. 1. Change the geometry to axisymmetric The change required is in FLUENT. Note that FLUENT allows axisymmetric computation only for the restrictive case where the axis of symmetry coincides precisely with the x coordinate axis of the coordinate system used to describe the geometry in DM. If you made the geometry correctly, according to the preceding steps, this will be the case. Open TUT1_Pipe which you created in the first section of the tutorial. 10

CPE402/6020 Computational Fluid Dynamics

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

To check that the lower edge of the rectangle (i.e. the axis boundary) is correctly placed return to DM to take a close look at the geometry. Select the sketch icon from the Tree Outline (Modeling tab under XYPlane in this case) and then select the Sketching tab. Below and to the left you will see summary details of the sketch under Details View. This is where you originally set the dimensions. Change Show Constraints to Yes so that the constraints imposed on each line of the sketch are listed. You can click on the lines or points listed to see which line in the view window each corresponds to. Find the bottom line of the rectangle this line corresponds to the axis of symmetry in our problem and we want it to coincide precisely with the x axis. Check that it is listed as Horizontal and coincident with the x coordinate axis (Axis Line XAxis). Next go into the MESHING program and name the lower boundary axis. From WORKBENCH update the mesh (B3) and refresh FLUENT Setup (C2). Now open FLUENT (C2 Edit). Since you named the lower boundary axis FLUENT should have picked this up and automatically made the change. The computation is still for planar geometry and you will notice a warning message in the text window objecting to the symmetry axis boundary condition. This will be resolved by completing the setup for axisymmetric geometry. Do this under Define/General by selecting Axisymmetric under 2D Space. (It is an axially symmetric 2D space and not a planar symmetric 2D space, which is the default.) Now initialize and solve as before to obtain a numerical solution for the correct geometry for inlet flow in a circular pipe flow. Plot the velocity vectors as before and note that the maximum velocity is around 50% larger than the imposed inlet velocity and this occurs near the axis. That is, the core fluid has increased in velocity relative to the average (inlet value) but has yet to reach the expected value of twice the average for the eventual developed flow state. Save the project under WORKBENCH as TUT1_Pipe_Axisymmetric. 2. Calculate the developed flow between parallel plates The developed flow is characterised by a velocity profile that no longer changes along the pipe direction, i.e. the velocity is only a function of the y coordinate. A simple way to capture this state is to replace the inlet and outlet boundaries with a periodic boundary treatment. This boundary condition forces whatever velocity profile is computed at one of the boundaries (say the outlet) to be identical to that at the other (the inlet). This is a very powerful tool in CFD and we will look more closely at its use in some of the later tutorials. The periodicity can either be translational as here (the inlet boundary can be mapped onto the outlet boundary by moving each point by the same vector displacement) or it can be rotational (each point on one boundary maps to the other by rotation by the same angle about the same rotation axis). Open TUT1_Pipe under WORKBENCH and open FLUENT (C3 Edit). Setting up the periodic boundaries requires commands in the text window in FLUENT. Click in the text window and enter to see the menu list. You will note that the menu items are largely the same as those in the toolbar at the top of the FLUENT window. (Actually, it is also possible to set up periodic boundary conditions in MESHING and this will be demonstrated below and also used in a future tutorial.) The command we want is mesh/modify-zones/make-periodic. You will want to first type mesh, then enter twice to see the choices, then type the next choice (modify-zones) and enter to see the next level of choices etc. Instead of typing out the full command abbreviations can be used provided that 11

CPE402/6020 Computational Fluid Dynamics

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

they uniquely designate the required command. So for example, m can be entered rather than mesh since no other command at that level begins with an m; in the case of the compound command names, i.e. words separated with a hyphen, just the first letter in each work can be used provided no other command at that level has words with the same two first letters: thus, mp can be used to refer to make-periodic. You will be prompted to supply the names of the two boundaries involved (input and output), to indicate whether the periodicity is rotational (no). Answer yes (or just y) to the subsequent two questions Create periodic zones? and Auto detect translation vector?. You should find that it is reported in text window that the displacement between the two periodic boundaries is 20 m in the x direction and 0 m in the y direction (as should be expected) and that corresponding faces matched. Under Boundary conditions you will see that only one of the original two boundary conditions remains in the list and that it is type periodic. We are no longer driving the flow by imposing velocity at the inlet. Instead we can impose either the mass flow rate or the pressure gradient along the channel. Let us impose the mass flow rate so the average velocity is 0.001 m/s as before. The mass flow rate is that per unit width of the extruded 2D geometry which is 0.00306 kg/s for the 2.5 m domain height and the density 1.225 kg/m3 set by default for air in FLUENT. Click on the periodic boundary and Periodic Conditions to impose the Mass Flow as 0. 00306. Initialize and solve as before to get a numerical solution. (You may need to click Run Calculation more than one time as the solver may not at first recognise that more iterations are required.) Make the velocity vector plot to see that the velocity looks to be unchanging in the x direction, i.e. the flow is developed. Also, does the maximum velocity correspond to 1.5 times the average? (In principle the same could be done with the axisymmetric calculation. But dont expect it work in that case! The programmers have made a mistake which is in the process of being fixed. The problem results when the special treatment involved for an axis of symmetry is being combined with the special treatment for periodic boundaries. This is a perfectly correct combination of boundary conditions; it is just that the programmers did not test this particular combination!) An alternative approach: Interface boundaries There is a simpler way to impose the periodic boundaries which avoids needing to use the text window in FLUENT and instead makes use of a generally powerful function in the software for linking two adjacent boundaries. Periodic boundaries are effectively adjacent since what is happening at one is identical to what is happening at the other. Other circumstances where linking boundaries is needed is where a fluid and a solid region interact or where two solid regions (of differing material) interact. We will now use interface boundaries to achieve the periodic boundary condition. Delete the FLUENT cell from the WORKBENCH by RMB clicking on cell C1 and selecting Delete. If we did not remove FLUENT the new boundary condition names would conflict with the existing ones and FLUENT would find it difficult to recover! Open MESHING program (RMB on cell B3 and select Edit) and change the names of the end boundaries from inlet and outlet to interface 1 and interface 2. FLUENT can now detect these as type interface. Once refreshed and updated, add the FLUENT cell as before and open FLUENT. Now the periodic boundary can be formed under Define/Mesh Interfaces. Click Create/Edit to enter the dialog box. You will see the two interfaces you defined in MESHING under Interface Zones 1 and 2. Select one as Interface Zone 1 and the other as Interface Zone 2. Tick the Periodic Boundary Condition box and 12

CPE402/6020 Computational Fluid Dynamics

Tutorial 1

Dr. Jordan MacInnes, Autumn 2013

below tick Translational as Type. Un-tick the Auto Compute Offset box (currently the software is not very good at detecting the offset) and enter the vector coordinates of the offset between Interface Zone 1 face and the Interface Zone 2 face. This will either be +20 m or -20 m in the x direction, depending on which interface was selected for which zone. Give a name to the combined boundary condition in the upper left hand entry box and click Create. You will now see a new boundary condition of type Periodic listed and you can set up the mass flow just as before and run the computation. See if it works! Flow in the inlet to a 3D duct of non-circular section As a final exercise, why not try to set up a computation for inlet flow into a duct of some other section shape besides circular or elliptical? As before simply sketch the section shape you choose in the x-y plane and extrude it to form the geometry. To be different, use a duct of smaller dimensions: say with a section measuring a few centemeters. You might try computing with a different fluid than the default air: the only way the computation knows about the fluid involved is through the values supplied for viscosity and density. If you want to compute water flow (at ambient temperature) the values are 0.001 Pa s (viscosity) and 1000 kg/m3 (density) and you will be able to set these in Materials. Be sure you use an inlet velocity giving flow in the laminar regime. For air a value less than about 1 m/s should ensure laminar flow and for water a value less than about 0.1 m/s should give laminar flow. What happens if you repeat the computation with a larger velocity, i.e. in the transitional or turbulent flow regime? Why? When setting up your computation you may want to remember the following steps that highlight also some of the trivial little aspects that are easy to forget. Twelve general steps to make a computation with ANSYS FLUENT 1. Open Workbench (remember to save your work at key stages) 2. Add Geometry cell 3. Set dimensionality of the problem (2D or 3D) 4. Create the required geometry; select units as metres (so Fluent interprets correctly) 5. Be sure to specify each body as fluid or solid as appropriate 6. Add Meshing cell and refresh as indicated 7. Enter the meshing program 8. Set Mesh/Physics Preference to CFD 9. Mesh the domain and name the boundaries and regions 10. Add Fluent cell and refresh as indicated 11. Enter Fluent and set up equations, properties and boundary conditions 12. Initialise, solve and record results

13

S-ar putea să vă placă și