CFX-5 Tutorials Tutorial 5 FlowAround a Blunt Body Sample files used in this tutorial can be copied to your working directory from<CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: BluntBody.pre BluntBodyDist.cse BluntBodyMesh.gtm Flow Around a Blunt BodyIntroduction Page 124 CFX-5 Tutorials Master Contents Master Index Help On Help 5.A: Introduction 5.A.1: Features explored in this tutorial Introduction: This tutorial addresses the following features of CFX-5. You learn about: solving and post-processing a case where the geometry has been omitted on one side of a symmetry plane using free slip wall boundaries on the sides of and above the domain as a compromise between accurate flow modelling and computational grid size Component Feature Details CFX-Pre User Mode General Mode Simulation Type Steady State Fluid Type Ideal Gas Domain Type Single Domain Turbulence Model Shear Stress Transport Heat Transfer Isothermal Boundary Conditions Inlet (Subsonic) Outlet (Subsonic) Symmetry Plane Wall: No-Slip Wall: Free-Slip Timestep Physical Timescale CFX-Solver Manager Restart Parallel processing CFX-Post Plots Default Locators Outline Plot (Wireframe) Sampling Plane Streamline Vector Volume Other Changing the colour range Instancing Transformation Lighting Adjustment Symmetry Viewing the Mesh Flow Around a Blunt BodyIntroduction CFX-5 Tutorials Page 125 Master Contents Master Index Help On Help accurately modelling the near-wall flow using Shear Stress Transport (SST) turbulence model running the CFX-Solver in parallel (optional) creating vector plots in CFX-Post with uniform spacing between the vectors creating a macro using power syntax in CFX-Post 5.A.2: Before beginning this tutorial Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you performthe tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials. 5.A.3: Overview of the problem to solve This example demonstrates external air flow over a generic vehicle body. Since both the geometry and the floware symmetric about a vertical plane, only half of the geometry will be used to find the CFD solution. Figure 1: External Air Flow Over a Generic Vehicle Body 1.44 m 5.2 m air speed 15.0 m/s Flow Around a Blunt BodyDefining the Simulation in CFX-Pre Page 126 CFX-5 Tutorials Master Contents Master Index Help On Help 5.B: Defining the Simulation in CFX-Pre This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file BluntBody.pre to complete this sectionfor youandcontinue fromObtaininga SolutionUsing the CFX-5 Solver (p. 133). See any of the earlier tutorials for instructions on how to do this. 5.B.1: Creating a New Simulation 1. Start CFX-Pre. 2. Select File > New Simulation. 3. Select General mode. 4. Set File name to BluntBody and then click Save. 5.B.2: Importing the Mesh Tip: While we provide a mesh to use with this tutorial, you may want to develop your own in the future. Instructions on howto create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file BluntBodyMesh.gtm, located in the examples directory (<CFXROOT>/examples), to your working directory. 2. Click the Mesh tab to access the Mesh workspace. 3. Right-click in the Mesh Selector, then select Import. 4. Leave Mesh Format set to CFX-5 GTM file. 5. Set File to BluntBodyMesh.gtm. 6. Click OK to import the mesh. 5.B.3: Creating the Domain The flow in the domain is expected to be turbulent and approximately isothermal. The Shear Stress Transport (SST) turbulence model with automatic wall function treatment will be used because of its highly accurate predictions of flow separation. To take advantage of the SST model, the boundary layer should be resolved with at least 10 mesh nodes. In order to reduce computational time, the mesh in this tutorial is much coarser than that. Flow Around a Blunt BodyDefining the Simulation in CFX-Pre CFX-5 Tutorials Page 127 Master Contents Master Index Help On Help See "The Shear Stress Transport (SST) k-w Based Model" on page 71 in the document "CFX-5 Solver Theory" and "Automatic Near-Wall Treatment for k-w Based Models" on page 90 in the document "CFX-5 Solver Theory" for more details. To create a new domain 1. Click Domain . 2. Set Name to BluntBody. 3. Click OK. Edit Domain: BluntBody is displayed with General Options selected. 4. Set Location to Assembly. 5. Leave Domain Type set to Fluid Domain. 6. Retain Fluids List as Air Ideal Gas. 7. Leave Coord Frame set to Coord 0. 8. Leave Reference Pressure set to 1 [atm]. Note: This tutorial uses an ideal gas as the fluid whereas previous tutorials have used a General Fluid. When modelling a compressible flow using the ideal gas approximation to calculate density variations, it is important to set a realistic Reference Pressure. This is because some fluid properties depend on the absolute fluid pressure (calculated as the static pressure plus the reference pressure). One atmosphere is equal to 1.0E+5 Pa. You can enter pressure values in a variety of units in CFX-Pre. Valid formats for scientific notation numbers include 1e5, 1E5, 1e+5, 1E+05 and 1.0e+05. You should not use spaces between any of the characters. 9. Under Buoyancy, leave Option set to Non Buoyant. 10. Under Domain Motion leave Option set to Stationary. 11. Click the Fluid Models tab, then: a. Under Heat Transfer Model, leave Option set to Isothermal and set Fluid Temperature to 288 [K]. b. Under Turbulence Model, set Option to Shear Stress Transport. c. Under Turbulent Wall Functions, set Option to Automatic. The Initialisation panel sets domain specific initial conditions, which are not used in this tutorial. Global initialisation will be set later in the tutorial. 12. Click OK to create the domain. Flow Around a Blunt BodyDefining the Simulation in CFX-Pre Page 128 CFX-5 Tutorials Master Contents Master Index Help On Help 5.B.4: Creating Composite Regions An imported mesh may contain many 2D regions. For the purpose of creating boundary conditions, it can sometimes be useful to group several 2D regions together and apply a single boundary condition to the composite 2Dregion. In this case, you are going to create a Union between two regions that both require a free slip wall boundary condition. 1. Click the Regions tab. 2. Right-click in the Region Selector, then select New. 3. In the Create Region box, enter FreeWalls and click OK. 4. In the Region Editor, set Combination to Union. Note: The Alias option can be used to re-name a region. This can be very useful if you wish to apply the physics fromone simulation to another with different region names. 5. Set Dimension to 2D. 6. In the Region List, hold down the <Ctrl> key and select Free1 and Free2. 7. Click OK to create the new region. The RegionEditor closes. The RegionSelector is updatedtoshowthat the new region has been added. 5.B.5: Creating the Boundary Conditions The simulation requires Inlet, Outlet, Wall (No Slip and Free Slip) and symmetry plane boundary conditions. The regions for these boundary conditions were defined when the mesh was created. To Create the Inlet Boundary Condition 1. Click Boundary Condition . 2. In Create Boundary, set Name to Inlet and leave Domain set to BluntBody. 3. Click OK. Edit Boundary is displayed. 4. On the Basic Settings panel, set: a. Boundary Type to Inlet b. Location to Inlet Flow Around a Blunt BodyDefining the Simulation in CFX-Pre CFX-5 Tutorials Page 129 Master Contents Master Index Help On Help 5. Click the Boundary Details tab, then: a. Under Flow Regime, confirm that Option is set to Subsonic. b. Under Mass andMomentum, confirmthat Optionis set toNormal Speed and set Normal Speed to 15 [m s^-1]. c. Under Turbulence set Option to Intensity and Length Scale, Fractional Intensity to0.05, andEddyLengthScale to0.1 [m]. 6. Click OK to create the boundary condition. To Create the Outlet Boundary Condition 1. Click Boundary Condition . 2. Set Name to Outlet, leave Domain set to BluntBody, and then click OK. 3. On the Basic Settings panel, set: a. Boundary Type to Outlet b. Location to Outlet 4. Click the Boundary Details tab, then: a. Under Flow Regime, confirm that Option is set to Subsonic. b. Under Mass and Momentum set Option to Static Pressure and Relative Pressure to 0 [Pa]. 5. Click OK to create the boundary condition. To Create Free Slip Wall Boundary Condition The top and side surfaces of the rectangular region will use free slip wall boundary conditions. On Free Slip Walls the shear stress is set to zero so that the fluid is not retarded. The velocity normal to the Wall is also set to zero. The velocity parallel to the Wall is calculated during the solution. This is not an ideal boundary condition for this situation since the flow around the body will be affected by the close proximity to the walls. If this case was modelling a wind tunnel experiment, the domain should model the size and shape of the wind tunnel and use no-slip walls. If this case was modelling a blunt body open to the atmosphere, a much larger domain should be used to minimise the effect of the walls. There are other possible ways of dealing with, or eliminating, wall effects, but these are beyond the scope of this tutorial. Flow Around a Blunt BodyDefining the Simulation in CFX-Pre Page 130 CFX-5 Tutorials Master Contents Master Index Help On Help You will apply a single boundary condition to both walls by using the composite region defined earlier. 1. Click Boundary Condition . 2. Set Name to FreeWalls, then click OK. 3. On the Basic Settings panel, set: a. Boundary Type to Wall b. Location to FreeWalls 4. Click the Boundary Details tab, under Wall Influence on Flow, set Option to Free Slip. 5. Click OK to create the boundary condition. To Create the Symmetry Plane Boundary Condition 1. Click Boundary Condition . 2. Set Name to SymP, then click OK. 3. On the Basic Settings panel, set: a. Boundary Type to Symmetry b. Location to SymP 4. Click OK to create the boundary condition. To Create a Wall Boundary Condition on the Blunt Body Surface 1. Click Boundary Condition . 2. Set Name to Body, then click OK. 3. On the Basic Settings panel, set: a. Boundary Type to Wall b. Location to Body 4. Click the Boundary Details tab, then, under Wall Influence on Flow, set Option to No Slip. 5. Click OK to create the boundary condition. The remaining 2D regions (in this case, just the lowZ face) will be assigned the default boundary conditionwhichis anadiabatic, no-slipwall condition. In this case, the name of the default boundary condition is BluntBody Default. Although the boundary conditions Body and BluntBody Default are identical (except for their locations), the Body boundary condition was created so that, during post-processing, its location can by conveniently distinguished from the other adiabatic, no-slip Wall surfaces. Flow Around a Blunt BodyDefining the Simulation in CFX-Pre CFX-5 Tutorials Page 131 Master Contents Master Index Help On Help 5.B.6: Setting Initial Values 1. Click Global Initialisation to display Global Initialisation. 2. Under Cartesian Velocity Components, set: a. Option to Automatic with Value b. U to 15 [m s^-1] c. V to 0 [m s^-1] d. W to 0 [m s^-1] 3. Under Static Pressure and Turbulence Kinetic Energy leave Option set to Automatic. 4. Turn on Turbulence Eddy Dissipation and leave Option set to Automatic. 5. Click OK to set the initialisation details. 5.B.7: Setting Solver Control 1. Click Solver Control . Solver Control is displayed. 2. Under Advection Scheme, set Option to High Resolution. 3. Under Convergence Control, set: a. Timescale Control to Physical Timescale b. Physical Timescale to 2 [s] This is the approximate dynamic time for the flow and is an aggressive timestep for use with a turbulence model. c. Max. No. Iterations to 60 4. Under Convergence Criteria, leave Residual Type set to RMS and set Residual Target to 1e-05. 5. Click OK to set the solver control parameters. 5.B.8: Writing the Solver (.def) File 1. Click Write Solver (.def) File . Write Solver File is displayed. 2. Leave Operation set to Start Solver Manager. 3. Leave Report Summary of Interface Connections turned off and Quit CFX-Pre turned on. Flow Around a Blunt BodyDefining the Simulation in CFX-Pre Page 132 CFX-5 Tutorials Master Contents Master Index Help On Help 4. Click OK. 5. Click Yes when asked if you want to save the CFX file. Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver CFX-5 Tutorials Page 133 Master Contents Master Index Help On Help 5.C: Obtaining a Solution Using the CFX-5 Solver This tutorial introduces the parallel solver capabilities of CFX-5. If youdonot want tosolve this tutorial inparallel (onmore thanone processor) or, donot have a licence to run the CFX-Solver in parallel, you can continue with this tutorial fromthis point tosolve it inserial (as youhave for previous tutorials). If you donot knowif youhave a license torunthe CFX-Solver inparallel, you should either ask your system administrator, or query the license server as described below. The results produced will be identical, whether produced by a parallel or serial run. If you would like to solve this tutorial in parallel, continue with the tutorial fromObtaining a Solution in Parallel (p. 134). To solve it in serial, continue fromObtaining a Solution in Serial (p. 134). Querying the License Server for CFX-5 Parallel This section explains how to find out whether you have any licenses to run CFX-5 in parallel, by using the CFX License Manager. 1. Fromthe CFX-5Launcher, select Tools >CFXLicenseManager toopen the CFX License Manager. This is a tool for managing the licensing of CFX-5. The top of the window displays information about the systemand license setup. The bottomhalf is a message window. 2. If running using a Windows platform select Query > Licenses Available. 3. If running using a Unix platform select Licenses > Features > Available. The message window will display information about available licenses on your system, in the following form: CFX-5-SOLVER 5.200 100 30-Sep-2003 CFDS CFX-5-NOLIMIT 5.200 100 30-Sep-2003 CFDS CFX-5-PAR-PROC 5.200 200 30-Sep-2003 CFDS CFX-5-PARALLEL 5.200 100 30-Sep-2003 CFDS CFX-5-COMBUSTION 5.200 100 30-Sep-2003 CFDS CFX-5-MULTIFLUID 5.200 100 30-Sep-2003 CFDS CFX-5-MFR 5.200 100 30-Sep-2003 CFDS Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver Page 134 CFX-5 Tutorials Master Contents Master Index Help On Help Look for the presence of CFX-5-PARALLEL type licenses. If you have this type of license, you can run the CFX-5 Solver in parallel. 5.C.1: Obtaining a Solution in Serial When the CFX-Solver Manager starts: 1. Click Start Run. The CFX-Solver calculates the solution to your CFD problem. 2. When the CFX-Solver has finished, click OK in the message box. To View the Results 3. Click Post-Process Results . 4. When Start CFX-Post appears, turn on Shut down Solver Manager then click OK. Continue with this tutorial fromViewing the Results (p. 141). 5.C.2: Obtaining a Solution in Parallel Using the parallel capability of the CFX-Solver allows you to divide a large CFD problem so that it can run on more than one machine at once, saving time and avoiding problems which arise when a CFD calculation requires more memory than a single machine has available. The partition (division) of the CFD problem is automatic but you need to set up the machines you want to run on. Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver CFX-5 Tutorials Page 135 Master Contents Master Index Help On Help Background to Parallel Running in CFX-5 A number of events occur when you set up a parallel run and then ask the CFX-Solver to calculate the solution: Your mesh will be divided into the number of partitions that you have chosen. The CFX-Solver runs separately oneachof the partitions onthe selected machine(s). The results that one CFX-Solver process calculates affects the other CFX-Solver processes at the interface between the different sections of the mesh. All of the CFX-Solver processes are required to communicate with each other and this is handled by the master process. The master process always runs on the machine that you are logged into when the parallel run starts. The other CFX-Solver processes are slave processes. After the problem has been resolved, a single Results File is written. It will be identical to a Results File from the same problem run as a serial process, with one exception: an extra variable Real partition number will be available for the parallel run. This will be described later in the tutorial. Setting Up to Run in Parallel Windows If you are working on Windows, no set up is required if your system administrator has followed the instructions in "Windows Parallel Setup" on page 60 in the document "CFX-5 Installation" as part of the installation procedure. You can move straight to "To Define a Parallel Run" on page 136 in the document "CFX-5 Tutorials". UNIX Followthe procedure belowprior to running in parallel for the first time on UNIX systems. Additional information can be found in "UNIX Parallel Setup" on page 47 in the document "CFX-5 Installation". Note: The following procedure may not be needed for all systems. Your systemadministrator will informyouif youneedtocreatea .rhostsfile to run in parallel. Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver Page 136 CFX-5 Tutorials Master Contents Master Index Help On Help You need to know the hostname of the machine that you are currently logged into. It will be used for the master process. 1. Type cfx5info -host in a UNIX terminal window. The output should be used as the hostname. 2. Create a file named .rhosts in your home directory. Do this using any text editor. 3. Put the following line into the .rhosts file: <master> <user> Where <master> is the hostname found in step 1 above and <user> is your current user name. For example, your user name is smith, and you are logged onto a machine with the hostname of machine1. Then your .rhosts file would contain the following line of text: machine1 smith 4. You now need to make this file readable by you only. This can be done by typing the following in a UNIX terminal window: chmod 600 ~/.rhosts If you have a different home directory on a machine you want to use for a slave process, you will have to create a .rhosts file on it in the same way, using exactly the same text (for example, use the same hostname, not the machines own hostname, for <master>). Note: If you do not have the same user name, you will be unable to run in parallel on this machine. To Define a Parallel Run In CFX-Solver Manager, Define Run should already be open. 1. Set Definition File to BluntBody.def. If you had wanted to run the problem as a serial run (as you have done in previous tutorials) you could have clicked Start Run. However, you are going to run the problem in parallel instead. 2. Leave Type of Run set to Full. If Typeof Runwas insteadset toPartitioner Only, your meshwouldbe split into a number of partitions but would not be run in the CFX-Solver afterwards. 3. Set Run Mode to PVM Distributed Parallel. RunModecanbe set toone of several options. See "RunMode" onpage 12 in the document "CFX- Solver Manager" for details. Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver CFX-5 Tutorials Page 137 Master Contents Master Index Help On Help The name of the machine that youare currently loggedintoshouldbe inthe Host Name list. You are going to run with two partitions on two different machines, so another machine must be added. Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver Page 138 CFX-5 Tutorials Master Contents Master Index Help On Help 4. Click Insert Host to specify a new host machine. The Select Parallel Hosts panel is displayed. This is where you choose additional machines to run your processes. Your system administrator should have set up a hosts file containinga list of themachines that areavailabletoruntheparallel CFX-5 Solver. The Host Name column displays names of available hosts. The second column shows the number of processors on that machine. The third shows the relative processor speed: a processor on a machine with a relative speed of 1 would typically be twice as fast as a machine with a relative speed of 0.5. The last column displays operating system information. This information is read from the hosts file; if any information is missing or incorrect your system administrator should correct the hosts file. Note: The # Processors, Rel. Speed and System information does not have to be specified to be able to run on a host. 5. Select the name of another machine in the Host Name list Select a machine that you can log into. 6. Click Add. The name of the machine is added to the Host Name column. Note: Ensure that the machine which you are currently logged into is in the Hosts Name list in the Define Run window. 7. Close the Select Parallel Hosts window. 8. Enable Show Advanced Controls. 9. Click the Partitioner tab at the top of the panel. 10. Use the default MeTiS partitioner. Your model will be divided into two sections, with each section running in its own CFX-Solver process. The default is the MeTiS partitioner because it produces more efficient partitions than either Recursive Coordinate Bisection or User Specified Direction. See "Setting Up and Running a Parallel Run" on page 45 in the document "CFX- Solver Manager" for details of the other settings on this panel. Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver CFX-5 Tutorials Page 139 Master Contents Master Index Help On Help 11. Click Start Run to begin the parallel run. The Text Output Area will display information about the partitioning job as below: +--------------------------------------------------------------------+ | Job Information | +--------------------------------------------------------------------+ Run mode: partitioning run Host computer: fastmachine1 Job started: Wed Nov 28 15:18:40 2000 This tells you that the information following is concerned with the partitioning. After the partitioning job has finished, you will find: CPU-Time requirements: - Preparations 1.460E+00 seconds - Low-level mesh partitioning 1.000E-01 seconds - Global partitioning information 3.100E-01 seconds - Vertex, element and face partitioning information 1.600E-01 seconds - Element and face set partitioning information 5.000E-02 seconds - Summed CPU-time for mesh partitioning 2.080E+00 seconds +--------------------------------------------------------------------+ | Job Information | +--------------------------------------------------------------------+ Host computer: fastmachine1 Job finished: Wed Nov 28 15:19:16 1998 Total CPU time: 1.143E+01 seconds or: ( 0: 0: 0: 11.428 ) ( Days: Hours: Minutes: Seconds ) This marks the end of the partitioning job. The CFX-5 Solver nowbegins to solve your parallel run: +--------------------------------------------------------------------+ | Job Information | +--------------------------------------------------------------------+ Run mode: parallel run (PVM) Host computer: fastmachine1 Par. Process: Master running on mesh partition: 1 Job started: Thu Nov 28 15:19:20 2000 Host computer: slowermachine Par. Process: Slave running on mesh partition: 2 Job started: Thu Nov 28 15:24:55 2000 The machine which you are logged into runs the master process, and Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver Page 140 CFX-5 Tutorials Master Contents Master Index Help On Help controls the overall simulation. The second machine selected will run the slave process. If you had more than two processes, each additional process is run as a slave process. The master process in this example is running on the mesh partition number 1 and the slave is running on partition number 2. You can find out which nodes and elements are in each partition by using CFX-Post later on in the tutorial. When the CFX-Solver finishes, the Output File displays the following: +--------------------------------------------------------------------+ | Job Information | +--------------------------------------------------------------------+ Host computer: fastmachine1 Par. Process: Master running on mesh partition: 1 Job finished: Thu Nov 28 16:44:01 2000 Total CPU time: 9.025E+02 seconds or: ( 0: 0: 15: 2.517 ) ( Days: Hours: Minutes: Seconds ) Host computer: slowermachine Par. Process: Slave running on mesh partition: 2 Job finished: Wed Nov 28 16:54:30 2000 Total CPU time: 1.291E+03 seconds or: ( 0: 0: 21: 31.034 ) ( Days: Hours: Minutes: Seconds ) --> Master-Partition Nr. 1 reaches final synchronization point! --> Slave-Partition Nr. 2 reaches final synchronization point! This run of the CFX-5 Solver has finished. You may need to scroll up through the output file to view the region shown above. More details on the contents of the Output File can be found in "The CFX-5 Output File" on page 87 in the document "CFX-Solver Manager". The CFX-Solver displays the following at the end of the run: BluntBody_001 has completed normally. All RMS residuals and global imbalance are below their target criteria. 12. Click OK. 13. Click Post-Process Results . 14. When Start CFX-Post appears, turn on Shut down Solver Manager then click OK. Flow Around a Blunt BodyViewing the Results CFX-5 Tutorials Page 141 Master Contents Master Index Help On Help 5.D: Viewing the Results In this tutorial, a vector plot is created in CFX-Post. This will let you see how the flow behaves around the body. You will also use Symmetry Planes and learn more about manipulating the geometry view in the 3D Viewer. 5.D.1: Using Symmetry Planes Earlier in this tutorial you used a symmetry plane boundary condition because the original blunt body had a symmetry plane. Due to this symmetry, it was necessary to use only half of the full geometry to calculate the CFD results. However, for visualisation purposes, it is helpful to use the full blunt body. CFX-Post is able to recreate the full data set from the half that was originally calculated. This is done by creating an Instance Transform object. Manipulating the Geometry You need to manipulate the geometry so that you will be able to see what happens when you use the symmetry plane. The CFX-Post features that you haveusedinearlier tutorials will not be describedindetail. Newfeatures will be described in detail. 1. Click View Toward +X by using the viewer icon drop-down menu. Creating an Instance Transform Instance Transforms are used to visualise a full geometry representation in cases where the simulation took advantage of symmetry to solve for only part of the geometry. There are three types of transforms that you can use: Rotation, Translation, Reflection. In this tutorial you will create a Reflection transform located on a plane. 1. Click Create plane . 2. Set Name to Reflection Plane, then click OK. 3. Under Geometry, set Method to ZX Plane and Y to 0. 4. Disable Visibility. 5. Click Apply. This creates a Plane in the same location as the symmetry Plane defined in CFX-Pre. Now the instance transform can be created using this Plane: 6. Click Create instancing transformation and accept the default name. Flow Around a Blunt BodyViewing the Results Page 142 CFX-5 Tutorials Master Contents Master Index Help On Help 7. On the Definition panel, fill in the settings as shown below. 8. Click Apply to create the Instance Transform. Using the Reflection Transform You can use the transform when creating or editing graphics objects. For example, you can modify the Wireframe view to use it as follows: 1. Edit the Wireframe object. 2. Set Transform to Instance Transform 1, retain the other settings as their defaults and click Apply. Zoom in so that the geometry fills the Viewer. Flow Around a Blunt BodyViewing the Results CFX-5 Tutorials Page 143 Master Contents Master Index Help On Help You will see the full blunt body. It is possible to select more than one symmetry plane. More details canbe foundin"Instance Transform" onpage 120 in the document "CFX-Post". 5.D.2: Creating Vectors You are now going to create a vector plot to show velocity vectors behind the blunt body. You need to first create an object to act as a locator, which, in this case, will be a Sampling Plane. Then create the vector plot itself. Creating the Sampling Plane A Sampling Plane is a plane with evenly spaced sampling points on it. 1. Click Create Plane . 2. In New Plane, set Name to Sample, then click OK. 3. Under Geometry: a. Set Method to Point and Normal. b. The following (x, y, z) values must be entered into the Point boxes to define the centre of the Sampling Plane: 6, -0.001, 1. c. For the Normal vector enter the values: 0, 1, 0. d. Expand the Plane Bounds section of the form. e. Set Type to Rectangular, X Size to 2.5 [m], and Y Size to 2.5 [m]. f. Expand the Plane Type section of the form. g. Turn on Sample and set X Samples and Y Samples to 20. 4. Click Apply to create the Sampling Plane. 5. Click View Toward +Y . You will not see the location of the sampling points because Draw Lines is turned off by default on the Render tab. 6. Click the Render tab: a. Turn on Draw Lines. b. Turn off Draw Faces. 7. Click Apply. You can zoomin on the Sampling Plane to see the location of the sampling points (where lines intersect). One way to do this is to hold <Shift> while middle clicking the area of interest. There are a total of 400 (20 * 20) sampling points on the plane. A vector can be created at each sampling point. Flow Around a Blunt BodyViewing the Results Page 144 CFX-5 Tutorials Master Contents Master Index Help On Help 8. Make the Sampling Plane invisible by turning off Visibility and then clicking Apply. Creating a Vector Plot Using the Sampling Plane 1. Click Create Vector Plot . 2. In New Vector, click OK to accept the default name. 3. Under Geometry, set: a. Domains to All Domains b. Locations to Sample c. Variable to Velocity 4. Click the Colour tab, then set Mode to Use Plot Variable. This colours the Vectors by the variable shown on the Geometry panel (Velocity). 5. Click the Symbol tab, then set Symbol Size to 0.15. This scales the length of the vectors. 6. Click Apply to create the Vector plot. 7. Zoom until the Vector plot is roughly the same size as the 3D Viewer. The plot should look similar to the one below. (If you get lost, click View Toward +Y and zoom in again.). You should be able to see a region of recirculation behind the blunt body. Note: In this example, you may want to increase the density of the vectors (by increasing the number of sampling points) to resolve the flow in this region. However, you could end up with poor results. This is because the mesh has only 2-3 elements across the feature. This is insufficient to resolve Flow Around a Blunt BodyViewing the Results CFX-5 Tutorials Page 145 Master Contents Master Index Help On Help the vortex properly. You would need to decrease the size of the mesh elements (decrease the meshlengthscale inthis region) inorder toimprove the solution accuracy. You can try the following before continuing to the next section. 1. Change the location of the Vector plot to SymP and click Apply. 2. Double-click the Body object. Set Mode to Variable and colour the Body boundary object by Pressure and change the Transform (on the Render panel) to the transformation previously created (Instance Transform 1). Turn on Visibility 3. Try using different mouse methods of manipulating the geometry. Examine the effect of Move Light (<Ctrl> plus <Shift> and use the Arrow keys to move) and Zoom box . 4. Make the Body boundary object invisible and create a view of the surface mesh on the SymP object by making it visible, turning on lines, and turning off faces. You will be able to see the mesh around the blunt body, with the mesh length scale decreasing near the body, but still coarse in the region of recirculation. By zooming in, you will be able to see the layers of inflated elements near the body and ground. If you want to know more about any feature, select Help > Master Contents from the main menu. 5.D.3: Creating Surface Streamlines In order to showthe path of air along the surface of the blunt body, surface streamlines can be made as follows: 1. Click Create plane . 2. In New Plane, set Name to Starter, then click OK. 3. Under Geometry: a. Set Method to YZ Plane. b. Set X to -0.1 [m]. 4. Click Apply. The plane appears just upstream of the blunt body. 5. Turn off Visibility, then click Apply. This hides the plane from view, although the plane still exists. 6. Click Create streamline . Flow Around a Blunt BodyViewing the Results Page 146 CFX-5 Tutorials Master Contents Master Index Help On Help 7. In New Streamline, accept the default Name by clicking OK. 8. On the Geometry panel: a. Set Type to Surface Streamline. b. Under Definition, set Surfaces to Body, Start From to Locations, Locations to Starter. 9. Click Apply. The surface streamlines appear on the surface of the blunt body. They start near the upstream end because the starting points were formed by projecting nodes from the plane to the blunt body. 5.D.4: Creating a Surface Plot of y+ The velocity next to a no-slip Wall boundary changes rapidly froma value of zero at the wall to the free streamvalue a short distance away fromthe wall. This layer of high velocity gradient is known as the boundary layer. Many meshes are not fine enough near a wall to accurately resolve the velocity profile in the boundary layer. Wall functions can be used in these cases to apply an assumed functional shape of the velocity profile. Other grids are fine enough that they do not require wall functions, and application of the latter has little effect. The majority of cases fall somewhere inbetweenthese two extremes, where the boundary layer is partially resolved by nodes near the wall and wall functions are used to supplement accuracy where the nodes are not sufficiently clustered near the wall. One indicator of the closeness of the first node to the wall is the dimensionless wall distance y+. It is good practice to examine the values of y+at the end of your simulation. At the lower limit, a value of y+less than or equal to 11 indicates that the first node is within the laminar sublayer of the boundary flow. Values larger thanthis indicate that anassumedlogarithmic shape of the velocity profile is being used to model the boundary layer portion between the wall andthe first node. Ideally you shouldconfirmthat there are several nodes (3 or more) resolving the boundary layer profile. If this is not observed, it is highly recommended that more nodes be added near the wall surfaces in order to improve simulation accuracy. In this tutorial, a coarse mesh is used to speed the run time. Thus the grid is far too coarse to resolve any of the boundary layer profile, and the solution is not highly accurate. More relatedinformationcanbe foundin"ModellingFlowNear the Wall" on page 88 in the document "CFX-5 Solver Theory", including the difference between the solution Yplus and Solver Yplus. Flow Around a Blunt BodyViewing the Results CFX-5 Tutorials Page 147 Master Contents Master Index Help On Help Creating a Surface Plot of y+ A surface plot is one which colours a surface according to the values of a variable: in this case, y+. A surface plot of y+ can be obtained as follows: 1. Turn off Visibility for all previous plots. 2. Click Perspective to enable a perspective view. 3. In the Objects Workspace, double-click the BluntBody Default object, then: a. On the Colour panel, set Mode to Variable. b. Set Variable to Yplus. Click to the right of the Variable dropdown menu to viewa full list of variables, including Yplus. c. Set Range to Local. d. Click the Render tab, then use the reflection transformyou created earlier (Instance Transform 1). e. Turn on Visibility. 4. Click Apply. 5. Produce a plot of Yplus on the Body object in the same way. 5.D.5: Demonstrating Power Syntax This section demonstrates a Power Syntax Macro used to evaluate the variation of any variable in the direction of the X axis. This is an example of Power Syntax programming in CFX-Post. For more information on Power Syntax, please see "Power Syntax Overview" on page 238 in the document "CFX-Post". For information on CCL please see "Overview of the CFX Command Language (CCL)" on page 200 in the document "CFX-Post". 1. Play the session file named BluntBodyDist.cse. A macro containing CCL and power syntax is loaded. The macro tells CFX-Post to create slice planes, normal to the X axis, at 20 evenly-spaced locations fromthe beginning to the end of the BluntBody domain. On each plane, it measures and prints the minimum, maximum, and average values for a specified variable (using Conservative values). The planes are coloured using the specified variable. This macro will be executed by entering a line of power syntax in the Command Editor. Flow Around a Blunt BodyViewing the Results Page 148 CFX-5 Tutorials Master Contents Master Index Help On Help Note: The CFX-Post engine can respond to CCL commands issued directly, or to commands issued using the graphical user interface. The Command Editor can be used to enter any valid CCL command directly. Please see "Command Editor" on page 169 in the document "CFX-Post" for more information. 2. Position the geometry to look toward the -X axis. 3. From the Main menu click Tools > Command Editor. 4. Type the following line into the CommandEditor (the quotation marks and the semi-colon are required): !BluntBodyDist("Velocity u"); 5. Click Process. The Minimum, Maximum and Average values of the variable at each X location are written to the file BluntBody.txt. The results can be viewed by opening the file in a text editor. You can also run the macro with a different variable. To view the content of the session file (which contains explanatory comments), open the session file in a text editor. It contains all of the CCL and power syntax commands and will provide a better understanding of how the macro works. 5.D.6: Viewing the Mesh Partitions (Parallel Only) If you solved this tutorial in parallel then an additional variable named Real partition number will be available in CFX-Post 1. Create an Isosurface of Real partition number equal to 1. 2. Create a second Isosurface of Real partition number equal to 1.999. The two Isosurfaces showthe edges of the two partitions. The gap between the two plots shows the overlap nodes. These were contained in both partitions 1 and 2. When you have finished looking at the results, shut down CFX-Post. Next Tutorial