Tutorial 2: Assigning Boundary Conditions and Running a Calculation Introduction: This tutorial assumes that the user already has basic knowledge on how to work with ANSYS from the previous tutorial. Why is it that we need to specify the boundary condition? The positive side of things is that the user doesn’t have to deal directly with the fluid flow equations (Navier Stokes equations), ANSYS provides the user with interface tools to easy the process of assigning boundary conditions ,these equations are solved in the software’s black box. Solving differential equations requires for the user to specify a boundary condition, because in a way we are using mathematical equations to model a physical phenomenon which is in our case a fluid flow situation. Imagine that you open the water tape at home; the outflow of the tape is the outflow boundary condition, while the inflow is the water supply coming from the water supply network. Figure: Water Tap 1 Step 1: Launch ANSYS ,by going to the start-up menu and double clicking on workbench file in the ANSYS 13.0 folder, Go to Analysis Systems (CFX) and double click, then double click on Geometry. Figure 1: A reminder that not all lab machines have the ANSYS software installed on them. Step 2: Select Meter as the dimension unit and press ok. Figure 2: Units selection depends on what kind of units is preferred by the manufacturer, if you were dealing with a customer in United States he will be using foot while if you were dealing with a customer in the United Kingdom he will be using inch. 2 Step 3a: Go to File and choose Import External Geometry File. Figure 3a: Always try to work in an organized manner and remember where you had saved your created model. Step 3b: Select the Part1.x_t and press open. Figure 3b: In some cases the required file is not visible and the user will need to specify in the Files of type Parasolid. 3 Step 4a: At a first glance the imported geometry is not visible, as a result go to the icon generate and press on it. Figure 4a: The user can access the modelling tools by pressing on the Sketching tab or he can access the modelling planes by going to Modelling. 4 Step 4b: After press on the generate icon the computational domain should look some thing as shown below. Figure 4b: The user can access the modelling tools by pressing on the Sketching tab or he can access the modelling planes by going to Modelling. Step 5: Go to work bench, you will see a green tick beside the Geometry text, which means your cleared to proceed to the next step, double click on the Mesh section. Figure 5: once the mesh window is launched you need to wait several seconds till the domain geometry is passed onto the Meshing part of the package. 5 Step 6: click on the mesh icon using right hand side button on the mouse, go to insert and select method . Figure 6: The user can have a look on the meshing options help on the right hand side. 6 Step 7a: Next step is to click using the left mouse button on the box domain and then press on apply. Figure 7a: Looking at the Messages window below shows that now bugs have occurred yet. 7 Step 7b: Next step is to click using the left mouse button on the box domain and then press on apply. Figure 7b: What is visible beside the geometry text that 1 body has been added. 8 Step 7c: Go to Method and choose Tetrahedrons. Figure 7c: You can try the other meshing methods. 9 Step 7d: Under Algorithm choose Patch Independent, the click on Update and then click on Generate Mesh . Figure 7d: What is visible beside the geometry text that I body has been added. 10 Step 7e: The Resulting mesh is a coarse mesh, go to relevance centre and choose fine, then click on Update and then on Generate Mesh. Figure 7e: A finer mesh can capture more flow details than a coarse one. 11 Step 8: Going back to work bench the user will notice that there is a green tick beside the Mesh, which means everything is ready to proceed to the next step, double click on Setup. Figure 8: In the next section we have to assign names and values to the geometric boundaries. Step 9: The Setup window with the studied domain should look something like this. Figure 9: once the setup section is done that means the results section is nearly their after the run of the calculation is conducted. 12 Step 10: Left click on the CFX.cmbd, as a result you will get to sub trees, Principal 3D Regions, Principal 2D Regions. Figure 10: Our main work at this stage is on the Principal 2D regions. 13 Step 11: Right click on F19.18 face it should get highlighted in green on the setup window and select rename, this face will be named as inflow. Figure 11: Try the other provided shapes in the Sketching panel. 14 Step 12: Conduct the renaming procedure onto all faces which are necessary for the studied case. Figure 12: The naming process might be hectic at the moment but it will make things a lot easy at later stages. 15 Step 13a: Under the Principle 2D Regions deselect the tick boxes for the outer domain faces, that will hide the outer domain faces and makes it much easier to select the inner faces. Select the capsule faces which are 3 in our case (by clicking using the left hand side button on the mouse and pressing on the shift button simultaneously. Figure 13a: The capsule outer surface that was selected should be highlighted in green. 16 Step 13b: Right click on the group selection and choose insert and then choose boundary and then choose wall (smooth wall). Figure 13b: The capsule outer surface that was assigned the smooth wall is highlighted in green. 17 Step 14: Right click on the inflow plane in the Principal 2D Regions, go to insert and then select Inlet. Figure 15: We have specified here the inflow plane for the domain. 18 Step 15: As a result of selecting the Inlet plane, the inflow plane is highlighted in green. Figure 15: If the user wants to go back in steps he will have to go to workbench depending on his problem. 19 Step 16: Click on boundary Details. Figure 16: if the flow is happening in a tube it’s advisable to use Cyl.Vel.Components. 20 Step 17: When the Cartesian components are selected the user is asked for the U,V,W velocity values in our case enter the value -20(m/s) for U velocity while assign V and W zero value. Figure 17: Under Turbulence you can play around with the turbulence intensity by selecting other options. 21 Step 19: Select the outflow plane under the Principal 2D Regions, then right click and go to insert, then boundary and select outlet. Figure 19: We have specified here the domain out let. 22 Step 20: Click on Boundary Details, then go to options and select. Cart. Vel, Components. Once selected you will get three slots requesting from you to enter the U,V,W values of the velocities. Figure 20: Once the user presses apply and ok ,arrows will become visible on the assigned plane . 23 Step 21: Assign the U velocity -20(m/s) value, while V and W assign them 0(m/s) value. Figure 21: At later stages you can assign V and W values whatever values that replicate your studied case. 24 Step 22: Select the top, bottom ,left and right planes (by clicking on the left hand side button of the mouse and pressing the shift button, then press the right button, select boundary and finally select wall . Figure 22: For our studied case the domain walls seem a bit too close to the capsule, you can modify that by remodelling the geometry and increasing the size of the domain, remember that by increasing the size of the domain, that will mean more computer resources are required for the mesh generation and the calculation process later . 25 Step 23: Click on Boundary details , from options select Cartesian Components, and assign the U velocity a value of -20(m/s), a question comes to the mind of the user why assign -20, the answer is because the main Cartesian coordinate system which is visible, a not to the user I have assigned intentionally the wall boundaries a velocity which is similar to the flow velocity so that during the data analysis stage no wall effects will be captured that would interfere with the flow pattern around the capsule . Figure 23: In green is the selected outer boundaries. 26 Step 24: Once all the boundaries are assigned the required values the researcher can proceed to Solver Control and double click. The default Domain has all the boundaries that we assigned values to. Figure 24: Try to look on what options dose output control have for you. 27 Step 25: The software uses a approximate numerical methods which result in resudules during the process the, the smaller the value of the residual is the higher the accuracy of the obtained simulation results are, As can be noticed the Residual control value is 1E-4 under Fluid Timescale Control, notice also that under convergence criteria that Max.Iterations value is 100 .once your happy with the selected values press apply and then ok. Figure 25: If the user is unhappy with the residual value he can modify it to whatever value that he sees applicable for his simulation run. 28 Step 26: Going back to workbench, you would notice there is a green tick beside setup which means you can proceed to solution and get your first simulation by double clicking on Solution, Note that if you have run the simulation before, initial data values are created and you might need to delete these initial values either because the simulation had crashed or because you need a new set of generated data after you had changed some flow parameters. By right clicking on solution you can select delete previously generated data. Figure 26: The researcher at this stage will realize that he will have to go back and forth to Workbench every now and then. 29 Step 27: Next thing will be a window A5:Fluid Flow(CFX)-CFX Fluid Solver, press on Start Run. Figure 27: Initialization Values Specification is important for initial values for your simulation. 30 Step 28: Once the calculation run is started by pressing START RUN, you will see something like this. Figure 28: The simulation with will start conducting its iterations, the x axis on the plot refers to the number of iterations,. 31 Step 29: Congratulations the simulation is running now. Figure 29: By looking on the right hand side we can see the different output info generated during the simulation run. 32 Step 30: Go to Workbench and double click on Results. Figure 30: You can modify the values for your simulation at any time and redo the simulation on the condition that you delete your previously generated initial data. 33 Step 31: Once the variable value is obtained the software will automatically stop or it will continue till the last iteration step which is in our case 100. The CFX-Solver Manager tells you if the simulation was run successfully or not. Figure 31: Next tutorial will be related to data visualization and analysis. 34 That’s the end of the third tutorial on ANSYS I hope that was helpful please feel free to contact me regarding any mistakes or recommendations for the tutorial. Ahmed Al Makky A.al-Makky@warwick.ac.uk http://www2.warwick.ac.uk/fac/sci/eng/pg/students/esrhaw 35