19
CFD TUTORIAL ANSYS CFX AEORDYNAMICS OF THE AHMED BODY Àrea de Mecànica de Fluids EMCI, EPS

Aerodynamics Tutorial English

Embed Size (px)

Citation preview

Page 1: Aerodynamics Tutorial English

CFD TUTORIAL

ANSYS CFX

AEORDYNAMICS OF THE AHMED BODY

Àrea de Mecànica de Fluids

EMCI, EPS

Page 2: Aerodynamics Tutorial English

1. Purpose The purpose of this tutorial is to show the abilities of the CFX software program for analyzing the aerodynamics of ground-based vehicles. Here, we study the Ahmed body with a rear angle equal to α = 35º. The main purpose is to obtain the key variables used in aerodynamics studies. These correspond to the drag coefficient (Cd), lift coefficient (Cl) and yaw coefficient (Ct).

Figure 1. Geometry of the Ahmed body.

The Ahmed body is a reference geometry intended to represent ground vehicles. It was designed by Prof. Ahmed in order to study the wind effects on simplified geometries of vehicles. This body was chosen by the ERCOFTAC (European Research Community on Flow, Turbulence and Combustion) association and for the MOVA (Models for Vehicle Aerodynamics) organization in order to develop a set of studies based on numerical simulations. Therefore, the Ahmed body has become a benchmarking problem that all CFD softwares should be able to accurately solve.

Figure 2. Size [in mm] of the Ahmed body.

Page 3: Aerodynamics Tutorial English

2. Methodology As it has been stated in previous tutorials, the simulation process consists of three steps: Preprocessing: Initial step devoted to define the geometry, decide the boundary conditions, choose the material properties and mesh the fluid domain into smal control volumes called elements. Solver: Second step where the software program is executed and the results are monitored. Postprocessing: Third step where we analyze the results obtained from the CFD simulation. In this last step it is very important to obtain the values of the main variables of interest such as velocity, pressure, temperature, etc. All the three steps explained above will be here carried out. For doing so we will use the CFD software program called CFX of ANSYS .

3. Preprocessing We launch the software ANSYS CFX 11.0. by double clicking on the desktop icon

( ). Then, a new window will appear asking for the working directory. We must use the most convenient for our purposes. Then (figure 3), we select the CFX-Pre 11.0 software among those availabe in the launcher window. This allows us to execute the Preprocessing mode of the CFX model.

Figure 3. Window for the launcher program.

- Select File → New Simulation... from the menu bar.

Page 4: Aerodynamics Tutorial English

Then, select General and click OK. Figure 4. Screen for choosing the simulation type.

Now we must import the mesh. For doing so: - Select File → Import Mesh... from the menu bar. - In the new dialogue box that opens (see figura 5), we browse for the mesh file of our problem. Now, the file extenstion is *.msh, since the mesh has been designed in GAMBIT. We would like to stress that CFX allows to import mesh files for a wide variety of formats.

Figure 5. Screen where we browse for the file mesh.

Now, we may click Open and the geometry will appear. It may be that the imported geometry visualizes in an inappropriate way. For changing the visualitzation mode, click on the mouse right button on the screen and select Predefined Camera → Isometric View (Z up).

Page 5: Aerodynamics Tutorial English

Figure 6. Choosing the visualization mode.

Figure 7. Mesh visualization.

Page 6: Aerodynamics Tutorial English

As it has been stated above, we are interested in obtaining the aerodynamics coefficients. Therefore, let us first define the expressions corresponding to these coefficients. For doing so, we select the menu Insert → Expressions, Functions and

Variables → Expression, or click on the icon. Then, we create the following expressions (figure 8):

Figure 8. Expressions created.

As it can be seen in figure 8, we have defined three constants: density (air), surface (frontal cross-sectional area of the Ahmed body) and inlet velocity. Nowe we can define the fluid domain as well as the boundary conditions. Apply a double click on the Default Domain and select the following options (figure 9):

Figure 9. Default domain definition.

Page 7: Aerodynamics Tutorial English

Now, let us now to the menu bar and select Insert → Boundary Condition or click on

the icon. Let us now create the following boundaries: Bus, Entrada, Sortida, ParetsiSostreTunel i TerraTunel. - Bus:

Figure 10. Bus boundary parameters.

- Entrada:

Figure 11. Entrada boudary parameters.

- Wind tunnel walls:

Figure 12. Wind tunnel walls boundary parameters.

- Sortida:

Page 8: Aerodynamics Tutorial English

Figure 13. Sortida (exit) boundary parameters.

- Ground:

Figure 14. Ground boundary definition.

Now, let us define the initial condition. Click on the icon or selecte the menu Insert → Global Initialisation. Choose the velocity function and select Turbulence Eddy Dissipation (figure 15).

Figure 15. Inicialization. We now define the simulation type. Here we will carry out a steady simulation. For

doing so, let us click on the icon or select Insert → Simulation Type or double click on the tree icon. Figure 16 details the options we select.

Page 9: Aerodynamics Tutorial English

Figure 16. Simulation type options selected.

Finally, let us modify the Solver Control. We may click on the icon or double click on the document tree.

Figure 17. Solver control parameters.

Now, we define the following options in order to obtain suitable graphics for the aerodynamic coefficients. With a double click on the Output Control, we select the Monitor option and create a Monitor Point for each one of the aerodynamic coefficients we want to analyze and, at the same time, we create the corresponding expressions for calculating them.

Page 10: Aerodynamics Tutorial English

Figure 18. Creating the monitoring points.

Page 11: Aerodynamics Tutorial English

4. Solver

For solving the model we may select File → Write Solver File or click on the icon. By doing so, a new window will appear, similar to the following one:

Figure 19. Window for saving the definition file and executing the solution.

It is important to select Start Solver Manager in order to execute the simulation. Now, click on Start Run.

Figure 20. Dialague box for defining the run parameters.

Page 12: Aerodynamics Tutorial English

Then, the simulation will execute.

Figure 21. Window with the information of the execution process.

Once the execution has been finished, we may postprocessing the results in order to analyze the simulation.

Figure 22. Executing the postprocess step.

Page 13: Aerodynamics Tutorial English

5. Postprocessing Now, let us describe in detail the results obtained. First, we save the results for the several aerodynamic coefficients within a table. Without closing the Solver window, let us click on the mouse right button on the graphics obtained and select Export Plot Data (figure 23). Then, select the format (figure 24) and we save the results for a posterior analysis.

Figs. 23 and 24. Exporting the graphicla results into a tabulate format.

Then, we create a cut plane in order to better visualize the results. For doing so, we may click on the icon (figure 25) or select from the menu bar Insert → Location → Plane.

Figure 25. Creating a plane.

We may define the position and coordinates of the plane. We may also modify (within the Render option) the visualitzation mode. Now we are able to analyze the results. First, let us create contours (contour) for both pressure and velocity, streamlines and vectors. All of these results will be referred to a set of previous defined planes.

Page 14: Aerodynamics Tutorial English

Let us now create the contourns plot, streamlines and vectors. First select in the menu bar Insert or clicking on the icions (see figure 26).

Figure 26. Icons for creating vectors, contours and streamlines (linies de corrent).

Once created, we decide if we want to visualize pressure, velocity, etc., and the planes or surfaces we are interested in. We amy also modify the number of divisions for the contour lines in order to obtain a better visualization.

Figure 27. Definition of a cut plane selecting a pressure field.

We may save all the previous information in a template. This is called “state” and for doing so we select in the menu bar File → Save State As...

Page 15: Aerodynamics Tutorial English

Then, we can open the same state in any other case that analyzes the same geometry and we will visualize the same planes, points, lines, etc. Let us now show different results corresponding to the magnitude of the velocity, pressure, streamlines and velocity vectors.

Figure 28. Velocity magnitude.

Page 16: Aerodynamics Tutorial English

Figure 29.Velocity magnitude (XY plane).

Figure 30. Velocity magnitude and velocity vectors (ZY plane).

Page 17: Aerodynamics Tutorial English

Figure 31. Turbulent kinetic energy.

Figure 32. Pressure contours on the Ahmed body.

Page 18: Aerodynamics Tutorial English

Changing the geometry The rear angle in the Ahmed body is key for determining the values of the aerodynamic coefficients. This may be noticed by modifying the Ahmed body geometry. For doing so, we re-open the cae and substitute the geometry. Let us select in the menu bar File → Reload Mesh Files or click on the icon (figure 33a) and select the new mesh file (figure 33b).

Figures 33a i 33b. Reload of the new mesh file.

Figure 34. New configuration of the Ahmed body.

When we import the new mesh, some errors arise. These are due to the automatic definition of boundary conditions for each region. In order to solve this problem just double click on these errors and we may redefine the corresponding boundary conditions.

Page 19: Aerodynamics Tutorial English

Figure 35. Error messages referred to the boundary conditions. Now, we can save (with a different name) and execute ths simulation. Once finished, we may open the state definet previously in the postprocessing step (figure 36).

Figure 36. Load the previous state in the post-processing module.

An additional modification would consists of changing the inlet velocity and test the behavior for the aerodynamic coefficients.