Вы находитесь на странице: 1из 312

Table of Contents

Introduction to CFX

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

TOC-1

April 28, 2009 Inventory #002599

Workshop Supplement

Inventory Number: 002599 1st Edition ANSYS Release: 12.0 Published Date: April 28, 2009
Registered Trademarks:
ANSYS is a registered trademark of SAS IP Inc. All other product names mentioned in this manual are trademarks or registered trademarks of their respective manufacturers.

Disclaimer Notice:
This document has been reviewed and approved in accordance with the ANSYS, Inc. Documentation Review and Approval Procedures. This ANSYS Inc. software product (the Program) and program documentation (Documentation) are furnished by ANSYS, Inc. under an ANSYS Software License Agreement that contains provisions concerning non-disclosure, copying, length and nature of use, warranties, disclaimers and remedies, and other provisions. The Program and Documentation may be used or copied only in accordance with the terms of that License Agreement.

Copyright 2009 SAS IP, Inc. Proprietary data. Unauthorized use, distribution, or duplication is prohibited. All Rights Reserved.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

TOC-2

April 28, 2009 Inventory #002599

Table of Contents
1. 2. 3. 4. 5. 6. 7. 8. 9. Mixing T-Junction Transonic Flow Over a NACA 0012 Airfoil Room Temperature Study Flow Through Porous Media Cavitating Centrifugal Pump Electronics Cooling with Natural Convection and Radiation Tank Flushing Transient Brake Rotor Scripting and Batch Processing

Workshop Supplement

WS1-1 WS2-1 WS3-1 WS4-1 WS5-1 WS6-1 WS7-1 WS8-1 WS9-1 WS10-1

10. Turbo Pre and Post

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

TOC-3

April 28, 2009 Inventory #002599

Workshop 1 Mixing T-Junction

Introduction to CFX

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-1

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

Welcome!
This introductory tutorial models mixing of hot and cold water streams The workshop starts from an existing mesh and applies boundary conditions to model a cold main inlet and a hot side inlet Analysis goals for this type of problem could be to determine: how well do the fluids mix? what are the pressure drops?
Note: Its a good idea to identify the quantities of interest from the start. You can use these to monitor the progress of the solution
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS1-2

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

Pre-processing Goals
Launch CFX-Pre from Workbench Use pre-defined materials Define the fluid models in a domain Create and edit objects in CFXPre Define boundary conditions Set up monitor points using simple expressions Launch the CFX Solver Manager from Workbench Monitor convergence

Workshop Supplement

Launch CFD-Post from an existing CFX simulation in Workbench Rotate, zoom and pan the view Create contour plots Create a plane for use as a locator Create a velocity vector plot Use pre-defined views Create streamlines of velocity Create an isosurface, coloured by a separate variable

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-3

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

Start in Workbench

Workshop Supplement

The first step is to start Workbench: 1. From the windows Start menu, select Programs > Ansys 12.0 > Workbench 2. When Workbench opens, select File > Save and save the project as MixingTee.wbprj

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-4

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

Start a CFX case

Workshop Supplement

3. Next, expand the Component Systems toolbox and drag a CFX analysis into the top left area of the Project Schematic

4. Double-click on Setup to launch CFX 5. When CFX-Pre opens, right-click on Mesh in the Outline tree and select Import Mesh > ANSYS Meshing 6. Select the file fluidtee.cmdb and click Open
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-5

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre GUI Overview


Outline Tree New objects appear here as they are created Double-click to edit existing object New objects are often inserted by right-clicking in the Outline tree Message Window Warnings, errors and messages appear here

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-6

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Mesh and Regions

Workshop Supplement

The Mesh is represented in Wireframe format in the Viewer

A domain named Default Domain is automatically created from all 3-D regions in the mesh file(s) A boundary named Default Domain Default is automatically created from all 2-D regions for each domain

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-7

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Domain settings

Workshop Supplement

The Default Domain contains all 3D mesh regions that are imported. If you create new domains, those regions are automatically removed from the Default Domain. The Default Domain is automatically deleted if no unassigned 3D regions remain.

The first step is to change the domain name to something more meaningful. 1. Right-click on Default Domain in the Outline tree 2. Select Rename
The domain name can now be edited

3. Change the domain name to junction

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-8

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Domain settings (continued)


4. Double-click on the renamed domain junction
The Domain panel contains three tabs named Basic Settings, Fluid Models and Initialisation. For more complex simulations additional tabs may appear.

Workshop Supplement

5.

Set the Material to Water.


The available materials can be found in the drop-down menu

Note that CFX has a comprehensive library of materials. These can be accessed by using the icon and then selecting the Import Library Data icon.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-9

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Domain settings (continued)


6. Click the Fluid Models tab 7. In the Heat Transfer section, change Option to Thermal Energy
Heat Transfer will be modelled. This model is suitable for incompressible flows The k-Epsilon turbulence model will be used, which is the default

Workshop Supplement

8. Leave all other settings as they are

9. Click OK to apply the new settings and close the domain form

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-10

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

Boundary Conditions

Workshop Supplement

The next step is to create the boundary conditions. You will create a cold inlet, a hot inlet and an outlet. The remaining faces will be set to adiabatic walls. Currently all external 2D regions are assigned to the junction Default boundary condition.

Each domain has an automatic default boundary condition for external surfaces. The default boundary condition is a No Slip, Smooth, Adiabatic wall. As you create new boundary conditions, those regions are automatically removed from the default boundary condition.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-11

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Inlet boundary conditions

Workshop Supplement

Now that the domain exists, boundary conditions can be added 1. 2. 3. 4. Right-click on the junction domain Select Insert > Boundary Set the Name to inlety Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-12

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Inlet boundary conditions (contd.)


5. Leave the Boundary Type field set to Inlet 6. Set Location to inlet y
The available locations can be found in the drop-down menu of the extended menu

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-13

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Inlet boundary conditions (contd.)


This inlet will have a normal speed of 5 m/s and temperature of 10C. 7. Click the Boundary Details tab 8. Enter a value of 5 for Normal Speed. The default units are [m s^-1] 9. Enter a value of 10 for Static Temperature. Use the drop-down menu to the right of the field to change the units to C (Celcius) 10. Click OK to apply the boundary and close the form

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-14

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Inlet boundary conditions (contd.)


1. Right-click on the junction domain and select Insert > Boundary 2. Set the Name to inletz and click OK 3. Leave the Boundary Type field set to Inlet 4. Set Location to inlet z

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-15

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Inlet boundary conditions (contd.)


This inlet will have an inlet speed of 3 m/s and temperature of 90C. 5. Click the Boundary Details tab 6. Enter a Normal Speed of 3 [m s^-1] 7. Set the Static Temperature to 90 [C] (make sure the units are correct!) 8. Click OK

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-16

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Outlet boundary conditions


1. 2. 3. 4. 5. Insert a boundary named outlet Set the Boundary Type to Outlet Set Location to outlet Click the Boundary Details tab Set Relative Pressure to 0 [Pa]
This is relative to the domain Reference Pressure, which is 1 [atm]

Workshop Supplement

6. Leave all other settings at their default values


The Average Static Pressure boundary condition allows pressure to float locally on the boundary while preserving an specified average pressure. If Pressure had been chosen a fixed Pressure would be applied at every nodal location on the outlet boundary

7. Click OK
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-17

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Wall boundary conditions

Workshop Supplement

The default boundary condition (junction Default in this case) comprises of all the 2-D regions not yet assigned a boundary condition. 1. Right-click junction Default, select Rename and change the boundary name to wall
The default boundary type is an adiabatic wall and is appropriate here

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-18

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CCL at a Glance

Workshop Supplement

Before proceeding you will now take a quick look at CCL (CFX Command Language). CCL describes objects in a command language format. You will come across CCL in all CFX modules. Among other things, CCL allows you to perform batch processing and scripting. 1. Right-click on inlety and select Edit in Command Editor

2. Close the Command Editor after taking a quick look at the CCL definition of the Inlet boundary condition
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-19

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

Initialisation

Workshop Supplement

Initial values must be provided for all solved variables. This gives the solver a starting point for the solution. There are two options when setting an initial value for a variable: Automatic: This will use a previous solution if provided, otherwise the solver will generate an initial guess based on the boundary conditions Automatic with Value: This will use a previous solution if provided, otherwise the value you specify will be used
The solver generated initial conditions are often good enough as a starting point. However, in some cases you will need to provide a better starting point to avoid solver failure

Initial conditions can be set on a per-domain basis, or on a global basis. 1.Since you will use Automatic Initial Conditions, there is no need to set any values, but click the Initialisation icon to view the settings, and then close the form
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-20

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

Solver Control

Workshop Supplement

The Solver Control options set various parameters that are used by the solver and can affect the accuracy of the results. The default settings are reasonable, but will not be correct for all simulations. In this case the default settings will be used, but you will still look at what those defaults are. 1. Double-click on Solver Control from the Outline tree The solver will stop after Max. Iterations regardless of the convergence level Advection Scheme and Timescale Control will be discussed later Residuals are a measure of how well the posed equations have been solved. In this case the solver will stop when the RMS (Root Mean Squared) residuals have reached 1.E-4. Tighter convergence is achieved with lower residuals. 2. Click Close

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-21

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Monitor points

Workshop Supplement

In all engineering flows, there are specific variables or quantities of interest. Sometimes, these establish themselves in a different way from other variables and do not reach a satisfactory value at the same time as the overall solution converges, so it is always a good idea to monitor them as the solution progresses. In this simulation, pressure will be monitored at both inlets.

1. Double-click Output Control from the Outline tree 2. On the Output Control form, select the Monitor tab 3. Check the Monitor Options box 4. Click the New icon 5. Set the Name to p inlety and click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-22

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Monitor points (continued)


An expression will be used to define the monitor point. 7. Set Option to Expression 8. Enter the expression: areaAve(Pressure)@inlety in the Expression Value field The expression calculates the area weighted average of pressure at the boundary inlety. Note that expressions and expression language will be covered in more detail elsewhere.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS1-23

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Monitor points (continued)


A second monitor point will be used to monitor the pressure at the second inlet, inletz. 9. Click the New icon 10. Set the Name to p inletz and click OK

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-24

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFX-Pre Monitor points (continued)


An expression will be used to define the monitor point: 12. Set Option to Expression 13. Enter the expression areaAve(Pressure)@inletz in the Expression Value field 14. Click OK to apply the settings and close the Output Control form The expression calculates the area weighted average of pressure at the boundary inletz. These monitor points will be utilised during the solution process in a later part of this tutorial.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS1-25

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

Solution Goals
Launch CFX-Pre from Workbench. Use pre-defined materials. Define the fluid models in a domain. Create and edit objects in CFXPre. Define boundary conditions. Set up monitor points using simple expressions. Launch the CFX Solver Manager from Workbench. Monitor convergence.

Workshop Supplement

Launch CFD-Post from an existing CFX Simulation in Workbench. Rotate, zoom and pan the view. Create contour plots. Create a plane for use as a locator. Create a velocity vector plot. Use pre-defined views. Create streamlines of velocity. Create an isosurface, coloured by a separate variable.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-26

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

Obtaining a solution
1. Exit CFX-Pre

Workshop Supplement

When running in WB the CFX-Pre case will be saved automatically

2. Save the Workbench project 3. In Workbench, double-click Solution to launch the CFX Solver Manager

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-27

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

Obtaining a solution (continued)

Workshop Supplement

The CFX Solver Manager will start with the simulation ready to run. 3. Click Start Run to begin the solution process 45 iterations are required to reduce the RMS residuals to below the target of 1.0x10-4 The pressure monitor points approach steady values

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-28

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

Post-processing Goals
Launch CFX-Pre from Workbench. Use pre-defined materials. Define the fluid models in a domain. Create and edit objects in CFX-Pre. Define boundary conditions. Set up monitor points using simple expressions. Launch the CFX solver manager from Workbench. Monitor convergence.

Workshop Supplement

Launch CFD-Post from an existing CFX Simulation in Workbench. Rotate, zoom and pan the view. Create contour plots. Create a plane for use as a locator. Create a velocity vector plot. Use pre-defined views. Create streamlines of velocity. Create an isosurface, coloured by a separate variable.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-29

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

Launching CFD-Post
1. Exit the CFX Solver Manager 2. Save the project 3. Double click Results to launch CFD-Post

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-30

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Overview
When CFD-Post opens, you will see that the layout is similar to CFX-Pre There are two windows on the left side: Selector Window Lists currently defined graphics objects. Object for each boundary condition are created automatically Object are edited by double-clicking or right-clicking on the object The check boxes next to each object turn the visibility on or off in the Viewer Details Window When you edit an object the Details window shows the current object status
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS1-31

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Manipulating the view

Workshop Supplement

When the results are loaded, CFD-Post displays the outline (wireframe) of the model The icons on the viewer toolbar control how the mouse manipulates the view

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-32

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Temperature contour plot


In the first step, you will plot contours of temperature on the exterior walls of the model 1. Click the Contour icon from the toolbar 2. Click OK to accept the default name Contour 1 3. Set Locations to wall

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-33

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Temperature contour plot (contd.)


4. Set the Variable to Temperature

Workshop Supplement

The drop-down menu provides a list of common variables. Use the icon to access a full list

5. 6.

Leave the other settings unchanged Click Apply to generate the plot

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-34

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post - Temperature contour plot (contd.)

Workshop Supplement

A temperature contour plot on the walls should now be visible. 7. Try changing the view using rotate, zoom and pan. You may find it easier to use the middle mouse button in combination with <Ctrl> and <Shift> 8. Also try clicking on the axes in the bottom right corner of the Viewer

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-35

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post
You can create many different objects in CFD-Post. The Insert menu shows a full list, but there are toolbar shortcuts for all items. Some common object are: Location: Points, Lines, Planes, Surfaces, Volumes Vector Plots Contour Plots Streamline Plots Particle Track (if enabled in CFX-Pre) For turbo machinery cases there are additional objects available that will be discussed later.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS1-36

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Creating a plane at x = 0


1. First, hide the previously created contour plot, by unchecking the associated box in the tree view

Workshop Supplement

2. Click the Location button on the toolbar and select Plane from the drop-down menu 3. Click OK, accepting the default name of Plane 1

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-37

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Creating a plane at x = 0 (contd.)


4. Set Method to YZ Plane 5. Leave X set to 0 [m] 6. Click Apply to generate the plane

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-38

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Creating a velocity vector plot


While planes can be coloured by variables, in this case the plane will be used only as a locator for a vector plot. 1. Hide the plane by un-checking the associated box in the tree view 2. Click the Vector icon from the toolbar 3. Click OK, accepting the default name of Vector 1

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-39

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Velocity vector plot (continued)


4. 5. 6. Set Locations to Plane 1 Leave the Variable field set to Velocity Click Apply

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-40

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Aligning the view

Workshop Supplement

Given that the vector plot is on a 2-D Y-Z plane, you might want to view the plot normal to that axis (i.e. aligned with the X axis). 7. Click on the red x-axis in the bottom right corner of the Viewer to orientate the view

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-41

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Creating velocity streamlines


1. Hide the previously created vector plot, by unchecking the associated box in the tree view

Workshop Supplement

2.

Click the Streamline icon from the toolbar Click OK, accepting the default name of Streamline 1

3.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-42

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Velocity streamlines (continued)


4. 5.

Workshop Supplement

In the Start From field, select both inlety and inletz. Use the icon to the right of the field and select both locations using the CTRL key. Leave the Variable field set to Velocity

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-43

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Velocity streamlines (continued)


6. 7. 8. 9. Click the Symbol tab Change the Stream Type to Ribbon Click Apply Examine the streamlines from different views using rotate, zoom and pan
The ribbons give a 3-D representation of the flow direction Their colour indicates the velocity magnitude Velocity streamlines may be coloured using other variables e.g. temperature

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-44

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Creating a velocity isosurface


1. Hide the previously created streamlines, by un-checking the associated box in the tree view

Workshop Supplement

2. Click the Location button on the toolbar and select Isosurface from the drop-down menu 3. Click OK, accepting the default name of Isosurface 1

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-45

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Velocity isosurface (continued)

Workshop Supplement

4. Set the Variable to Velocity (magnitude used in this context) 5. Enter a value of 7.7 [m s^-1] in the Value field (note: there is nothing special about this value other values can be tried) 6. Click Apply
The speed is > 7.7 m/s inside the isosurface and < 7.7 m/s outside. Isosurfaces in general are useful for showing pockets of highest velocity, temperature, turbulence, etc.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-46

April 28, 2009 Inventory #002599

WS1: Mixing T-Junction

CFD-Post Velocity isosurface (continued)

Workshop Supplement

By default, an isosurface is coloured by the variable used to create it (speed in this case), but a different variable can be used. 7.Click the Colour tab 8.Set the Mode to Temperature 9.Set the Range to Local 10.Click Apply

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS1-47

April 28, 2009 Inventory #002599

Workshop 2 Transonic Flow Over a NACA 0012 Airfoil.

Introduction to CFX

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-1

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Goals

Workshop Supplement

The purpose of this tutorial is to introduce the user to modelling flow in high speed external aerodynamic applications. In this case the flow over a NACA 0012 airfoil at an angle of attach of 1.49 will be simulated and the lift and drag values will be compared to published results. These results were taken with a Reynolds number of 9x106 and a chord length of 1m.* The airfoil is travelling at Mach 0.7 so the simulation will need to account for compressibility as well as turbulence effects. To reduce the computational cost, the mesh will be made up of a 2D slice through the airfoil (one element thick).
* NASA TM 81927 Two-Dimensional Aerodynamic Characteristics of the NACA 0012 Airfoil in the Langley 8-Foot Transonic Pressure Tunnel 1981. Harris, C. D.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-2

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Start a Workbench project


1. Launch Workbench 2. Save the new project as naca0012 in your working directory 3. Drag a Fluid Flow (CFX) module from the Analysis Systems section of the Toolbox onto the Project Schematic 4. In the Project Schematic right-click on the Mesh cell and select Import Mesh File 5. Set the file filter to FLUENT Files and select NACA0012.msh
With the mesh file imported the Geometry cell will not be needed so it is removed from the Fluid Flow module.

Workshop Supplement

Note that you could have dragged Component System > CFX onto the Project Schematic, as in the first workshop. The mesh would then be imported after starting CFX-Pre.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-3

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Mesh Modification
1. Open CFX-pre by right-clicking on the Setup cell and selecting Edit
After CFX-Pre has opened the mesh can be examined and it is clear that the scale is incorrect as the airfoil chord is 1000 m rather than 1 m, indicating the mesh was built in mm rather than m. This can be fixed using the mesh transformation options.

Workshop Supplement

2. Right-click on Mesh in the Outline tree and select Transform Mesh 3. Change the Transformation to Scale 4. Leave the method to Uniform and enter a Uniform Scale of 0.001 5. Click OK 6. Select the Fit View icon from the Viewer toolbar
Zoom in further to see the airfoil
April 28, 2009 Inventory #002599

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-4

WS2: Flow over an Airfoil

Mesh Modification
The mesh has been built to have a single boundary around the entire outer edge. This needs to be split into inlet and outlet regions. While it is better to create the correct mesh regions when generating the mesh, CFX-Pre can be used to modify the mesh regions. 1. Right-click Mesh in the Outline tree and select Insert > Primitive Region 2. Click on the Start Picking button 3. From the drop down selection menu select Flood Select (see image to the right) 4. In the viewer select any element from the front curved boundary
The flood fill will select all cells where the change in angle is less than 30

Workshop Supplement

Inlet

Outlet

5. Click in the Move Faces To field and type Inlet 6. Click OK


ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-5

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Mesh Modification
The remaining section will now be renamed Outlet. 1. Expand the Mesh section of the tree so the list of Principal 2D Regions is visible. Note that this list now contains the location Inlet 2. Click on the region pressure far field 1 to confirm it is the region representing the outlet
It will be highlighted in the Viewer

Workshop Supplement

3. Right-click on pressure far field 1 and select Rename. Change the name to Outlet

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-6

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Domain Setup

Workshop Supplement

Usually the option to automatically generate domains is active, this can be checked by editing Case Options > General in the Outline tree. 1. Check that Automatic Default Domain is active the click OK.

2. Right-click on Default Domain in the Outline tree and rename it to Fluid 3. Double-click on Fluid to edit the domain settings

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-7

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Domain Setup

Workshop Supplement

This case involves high speed aerodynamics so it is important to include compressibility. It is important to set the correct operating pressure so that the intended Reynolds number is achieved. The simulation will take place at 288 [K] in air; this allows the speed of sound to be calculated. This can then be converted into a free-stream velocity using the Mach number. Using the definition for Reynolds number the fluid density can be obtained, which can then be used to determine the operating pressure for the simulation, assuming an ideal gas.

c = RT = 1.4 287 288 = 340.17[m / s ] u = M c = 0.7 340.17 = 238.12[m / s ]

ul Re 9e 6 1.82e 5 Re = = = = 0.688[kg / m 3 ] 238.12 1 ul P = RT = 0.688 287 288 = 56867[ Pa ]

c =Speed of sound R=Gas Constant =Ratio of specific heats T=Temperature u= Free-stream velocity M=Mach number Re=Reynolds number = Dynamic viscosity = Density
April 28, 2009 Inventory #002599

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-8

WS2: Flow over an Airfoil

Domain Setup
In the Fluid domain Basic Settings tab: 1. Set the Material to Air Ideal Gas 2. Set the Reference Pressure to 56867 [Pa]
Make sure you change set the units

Workshop Supplement

3. Move to the Fluid Models tab 4. Set the Heat Transfer Option to Total Energy
This is required for compressible simulations This includes viscous heating effects

5. Enable Incl. Viscous Work Term 6. Set the Turbulence Option to Shear Stress Transport 7. Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-9

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Boundary Conditions

Workshop Supplement

An outlet relative pressure of 0 [Pa] will now be applied. This pressure is relative to the operating pressure of 56867 [Pa]. Absolute Pressure = Reference Pressure + Relative Pressure 1. Right-click on the domain Fluid in the Outline tree and select Insert > Boundary, naming the boundary Outlet 2. Change the Boundary Type to Outlet and check that the location is set to Outlet 3. Move to the Boundary Details tab and set the Mass and Momentum option to Average Static Pressure with a value of 0 [Pa] 4. Click OK The sides of the domain will use symmetry conditions since this is a 2D simulation. 1. Insert a Symmetry boundary called Sym Left, at the location sym left 2. Insert a Symmetry boundary called Sym Right, at the location sym right

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-10

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Boundary Conditions

Workshop Supplement

The mesh has been constructed so that the airfoil is at 0 angle of attack. To apply the required angle of 1.49 the flow direction at the inlet must be adjusted. The values will be created using expressions. 1. Right-click on Expression in the tree and select Insert > Expression. Call it Uinf. 2. Set the Definition to 238.12 [m s^-1] then click Apply
All expressions must have the appropriate dimensions

3. In the expression editor add the following expressions by right-clicking on Expressions and selecting Insert > Expression AOA = 1.49[deg] Ux = Uinf*cos(AOA) Uy = Uinf*sin(AOA) 4. Return to the main Outline tree
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-11

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Boundary Conditions
1. Right-click on Fluid and insert a boundary called Inlet 2. The Boundary Type should be set to Inlet by default and a Location of Inlet should also be selected by default 3. Move to the Boundary Details tab 4. Change the Mass and Momentum option to Cart. Vel. Components 5. Enter the U, V and W values as Ux, Uy and 0 [m s^-1]
Use the Expression icon to allow the Ux and Uy expressions to be entered

Workshop Supplement

6. Set Static Temperature = 288 [K] 7. Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-12

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Boundary Conditions
The Viewer indicates the locations of the inlet and outlet boundaries. Note that the arrows do not represent the applied flow direction. The final boundary condition is the wall around the airfoil. This should already exist as Fluid Default. 1.Edit Fluid Default to check that only the wall bottom and wall top regions remain in the default boundary 2.Click Close 3.Rename Fluid Default to Airfoil

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-13

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Monitors

Workshop Supplement

For this simulation the lift and drag are the quantities of interest, so monitor points will be added to track their values and ensure they reach a steady value. The lift and drag coefficients will be created using expressions. Remember that the freestream flow is offset from the x-direction so the forces will have to be adjusted to account for the angle of attack. 1.Enter the following expressions, or select File > Import > CCL and load the file Airfoil.ccl. If loading the CCL file, use the Append option as shown
Fy=force_y()@Airfoil Fx=force_x()@Airfoil Lift =cos(AOA)*Fy-sin(AOA)*Fx Drag =cos(AOA)*Fx +sin(AOA)*Fy Denom=0.5*massFlowAve(Density)@Inlet*Uinf^2*1[m]*0.1[m] cL=Lift/Denom cD=Drag/Denom
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-14

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Monitors
1. 2. 3. 4.

Workshop Supplement

Edit Output Control from the Outline tree and go to the Monitor tab Check the Monitor Options box Click on the Add New Item icon and name it CL Set the Option to Expression and enter cL
This is the monitor point for the Coefficient of Lift. Note that all names and expressions are case sensitive, so the monitor point is named CL and it refers to the expression named cL. This is the Coefficient of Drag

5. Add a new item called CD and set it to the expression cD

6. Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-15

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Solver Control
Open the Solver Control section from the Outline tree 1. Increase the Max. Iterations to 200 2. Change the Timescale Factor from 1 to 10
A larger timescale can accelerate convergence, but too large a timescale will cause the solver to fail This is a tighter convergence criteria and is discussed further below

Workshop Supplement

3. Set the Residual Target to 1e-6

4. Click OK 5. This case is now ready to run so click on File > Save Project then close the CFX-Pre window to return to the main Workbench window

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-16

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Running the Simulation

Workshop Supplement

1. In Workbench right-click on Solution and select Update 2. After the solver has started right-click on Solution again and select Display Monitors
This will open the Solver Manager and allow the residuals and monitors to be viewed

In the Solver Manager the User Points tab displays the monitor points setup in the Output Control section of CFX Pre. This will include the values of CL and CD. These should converge to a steady value before the convergence criteria is met. Otherwise the run should be extended. Many cases will be converged when an RMS residual level of 1e-4 is reached. For this case this is inadequate since the lift and drag had not reached steady values when the residuals were at 1e-4, hence a tighter convergence criteria was used. 3. Check through all of the residuals and monitor values. The values of CD and CL become steady after about 50 iterations. You can click the Stop button from the toolbar to stop the run at this point.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-17

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Monitor Values
Before exiting the Solver Manager the converged values of CL and CD can be viewed by clicking on the monitor lines. The values extracted should be CL=0.236 and CD=0.0082. These values compare well to published values* of CL=0.241 and CD=0.0079. Now close the solver and return to the Workbench window.

Workshop Supplement

* AIAA-87-0416 Numerical Simulation of Viscous Transonic Airfoil Flows 1987. Thomas J Coakley, NASA AMES Research Centre.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-18

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Post-processing
1. Right-click in the Results cell and select Edit to open CFD-Post. The results should automatically be loaded This case required a large domain to allow the boundary conditions to be imposed without a large artificial restriction on the flow. However during post-processing the main interest will be in the flow close to the airfoil. 2. Click on the Z-axis in the bottom right corner of the Viewer to orientate the view 3. Use the box zoom (right mouse button) so the Viewer displays the region around the airfoil
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS2-19

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Post-processing
When looking at the flow around an airfoil, plots of several variables can be of interest such as velocity, pressure and Mach number. 1. In the tree turn on the visibility of Sym Left by clicking in the check box 2. Double-click on Sym Left to bring up the details section 3. Under the Colour tab change the mode to Variable and select Velocity using the Global Range, then click Apply Notice that the maximum velocity is around 350 [m/s]. This is higher than the sonic speed of 340 [m/s] calculated earlier for free-stream conditions.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS2-20

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Post-processing
To plot the Mach number a contour plot will be used so the supersonic region can clearly be identified. 1. Select Insert > Contour or click on the contour icon 2. Accept the default name then set Locations to Sym Left and the Variable to Mach Number 3. Change the Range to User Specified and enter 0 to 1.1 as the range 4. Set # of Contours to 12, then click Apply 5. Turn of the Visibility of Sym Left so that the previous velocity plot is hidden 6. Try plotting other variables such as Pressure or Density, use the Local or Global Range when limits are not known
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS2-21

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Post-processing

Workshop Supplement

To plot the pressure coefficient distribution around the airfoil a polyline is needed to represent the airfoil profile and a variable needs to be created to give CP. 1. 2. 3. 4. 5. Create a Polyline using Location > Polyline from the toolbar Change the Method to Boundary Intersection Set Boundary List to Airfoil Set Intersect With to Sym Left and then click Apply Turn off visibility of the previous created Contour plot to see the Polyline A line will be created around one end of the airfoil. For full 3D cases XY planes can be create at various span locations and used to extract Polylines.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-22

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Post-processing
5. Move to the Expressions tab and right-click to create a new expression named cP with the definition: Pressure/(0.5*massFlowAve(Density)@Inlet*Uinf^2)

Workshop Supplement

6. Move to the Variables tab and right-click to create a new variable named CP. 7. Set the Method to Expression and select cP. Click OK.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-23

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Post-processing

Workshop Supplement

A chart showing the pressure distribution around the airfoil will now be created. 1.Insert a chart using Insert > Chart or selecting 2.In the General tab leave the type as XY 3.Move to the Data Series tab and enter a new series. Set the location to Polyline 1 4.Move to the X Axis tab and change the variable to X 5.Move to the Y Axis tab and change the variable to CP 6.Click Apply and the chart is generated These values can be compared with experimental results.*
* AIAA-87-0416 Numerical Simulation of Viscous Transonic Airfoil Flows 1987. Thomas J Coakley, NASA AMES Research Centre.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-24

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Post-processing
7. Return to the Data Series tab and change the name to CFX 8. Insert a new series and give it the name Experiment 9. Change the Data Source to File and select the file CP.csv 10. On the Line Display tab, set Line Style to None and Symbols to Rectangle. Also ensure that Symbol Colour is a different colour from the currently plotted CFX line 11. Click Apply and both data series are drawn

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-25

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Summary
The workshop has covered:

Workshop Supplement

Loading an existing mesh Scaling the mesh Generating New Regions from existing 2D Primitives Setting up and running a high speed compressible flow simulation over an airfoil Extracting lift and drag forces and comparing with experimental data Examining the flow patterns around the airfoil Comparing the pressure distribution to experimental values

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-26

April 28, 2009 Inventory #002599

WS2: Flow over an Airfoil

Scope for further work.

Workshop Supplement

This simulation is a good match to experimental work but further steps could be taken if required, including: Refining the mesh, particularly in the wake region. Applying a transition model to account for the small region of laminar flow around the nose of the airfoil. Adding additional airfoil features such as a finite thickness trailing edge that will be used on all real airfoils. Simulating the whole wing to account for spanwise variations. Adding more features to a simulation will usually increase the computational cost, so one of the most important step in any simulation is to decide which features need to be included and which can be left out.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS2-27

April 28, 2009 Inventory #002599

Workshop 3 Room Temperature Study

Introduction to CFX

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-1

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Introduction

Workshop Supplement

In this workshop you will be analyzing the effect of computers and workers on the temperature distribution in an office. In the first stage airflow through the supply air ducts will be simulated and the outlet conditions for the duct will be used to set the inlet conditions for the room. Although both components could be analyzed together, separating the two components allows different room configurations to be analyzed without solving the duct flow again.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-2

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Duct Simulation
The operating conditions for the flow are: The working fluid is Air Ideal Gas Fluid Temperature = 21 [C] Inlet: 0 [atm] Total Pressure Outlet: 0.225 [kg/s] (per vent)

Workshop Supplement

vent2 Inlet

vent1

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-3

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Starting CFX in Workbench

Workshop Supplement

1. Open Workbench 2. Drag CFX into the Project Schematic from the Component Systems toolbox 3. Change the name of the system to duct 4. Save the project as RoomStudy.wbpj in an appropriate directory 5. Double-click Setup

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-4

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Import Mesh

Workshop Supplement

The first step is to import the mesh that has already been created: 1. Right-click on Mesh in the Outline tree and select Import Mesh > ICEM CFD 2. Select the file duct_mesh.cfx5 3. Make sure Mesh Units are in m and click Open to import the mesh

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-5

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Create Domain
You can now create the computational domain:

Workshop Supplement

1. Double-click on Default Domain in the Outline tree to edit the domain 2. On the Basic Settings tab, set the Fluid 1 Material setting to Air Ideal Gas 3. Switch to the Fluid Models tab 4. Set the Heat Transfer Option to Isothermal
Heat Transfer is not modeled, but since the working fluid is an ideal gas we need to provide a temperature so its properties can be calculated

5. Set the Fluid Temperature to 21 [C] 6. Change the Turbulence Model Option to Shear Stress Transport 7. Click OK to commit the changes to the domain

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-6

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Create Boundary Conditions


Now create the following boundary conditions: 1. INLET Boundary Condition
Name: INLET Boundary Type: Inlet Location: INLET Mass and Momentum Option: Total Pressure (stable) Relative Pressure: 0 [Pa]

Workshop Supplement

2. VENT1 Boundary Condition


Name: VENT1 Boundary Type: Outlet Location: VENT1 Mass and Momentum Option: Mass Flow Rate Mass Flow Rate: 0.225 [kg/s]

3. VENT2 Boundary Condition


Name: VENT2 Boundary Type: Outlet Location: VENT2 Mass and Momentum Option: Mass Flow Rate Mass Flow Rate: 0.225 [kg/s]
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-7

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Solver Control
1. Double click on Solver Control from the Outline tree 2. Enable the Conservation Target toggle

Workshop Supplement

The default Conservation Target is 1%. This means that the global imbalance for each equation must be less than 1% (i.e. (flux in flux out)/flux in < 1%). The solver will not stop until both the Residual Target and the Conservation Target have been met (or Max. Iterations is reached).

3. Click OK to commit the settings

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-8

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Monitor Point

Workshop Supplement

Monitor points are used to monitor quantities of interest during the solution. They should be used to help judge convergence. In this case you will monitor the velocity of the air that exits through the vent. One measure of a converged solution is when this air has reached a steadystate velocity. 1. 2. 3. 4. 5. Double click on Output Control from the Outline tree Switch to the Monitor tab and enable the Monitor Options toggle Under Monitor Points and Expressions, click the New icon Keep the default name Monitor Point 1 Set the Option to Expression

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-9

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Monitor Point
6. In the Expression Value field, type in:
areaAve(Velocity w)@VENT1

Workshop Supplement

7. Click OK to create the Monitor Point

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-10

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Write Solver File

Workshop Supplement

You can now save the project and proceed to write a definition file for the solver: 1. 2. 3. 4. Close CFX-Pre to return to Project window Save the project Right-click on Solution and select Edit Choose Start Run

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-11

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

CFX Solver Manager

Workshop Supplement

1. Examine the residual plots for Momentum and Mass and Turbulence 2. Examine the User Points plot

Monitor point Residual plot

3. When the run finished close the Solver Manager 4. View the results in CFD-Post by double-clicking Results in the Project window
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-12

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

CFD-Post

Workshop Supplement

Now we will export a Boundary Condition profile from the outlet regions for use in the next simulation. 1. Select File > Export 2. Change the file name to vent1.csv 3. Use the browse icon to set an appropriate directory 4. Set Type as BC Profile and Locations as VENT1 5. Leave Profile Type as Inlet Velocity and click Save 6. Similarly export a BC profile of VENT2 to the file named vent2.csv 7. Quit CFD-Post and return to the Project Schematic
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002599

WS3-13

WS3: Room Temperature Study

Operating Conditions
The operating conditions for the flow in the room are:

Workshop Supplement

The working fluid is Air Ideal Gas Computer Monitor Temperature = 30 [C] Computer Vent Flow Rate: 0.033 [kg/s] @ 40 [C] (per computer) Ceiling Vents: Profile Data, Temperature=21 [C]
vent2 outlet

vent1

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-14

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Starting Room Simulation in Workbench

Workshop Supplement

1. Drag CFX into the Project Schematic from the Component Systems toolbox 2. Change the name of the system to room 3. Double-click Setup in the room system

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-15

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Import Mesh

Workshop Supplement

The first step is to import the mesh that has already been created: 1. Right-click on Mesh in the Outline tree and select Import Mesh > ICEM CFD 2. Select the file room.cfx5 3. Make sure the Mesh Units are in m and click Open to import the mesh

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-16

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Create Domain
You can now create the computational domain:

Workshop Supplement

1. Edit Default Domain from the Outline tree 2. On the Basic Settings tab, set the Fluid 1 Material setting to Air Ideal Gas 3. Set the Buoyancy Option to Buoyant. Set the Buoyancy settings as shown: Gravity X Dirn. = 0 [ m s^-2 ] Gravity Y Dirn. = 0 [ m s^-2 ] Gravity Z Dirn. = -g (first, click the Enter Expression icon ) Buoy. Ref. Density = 1.185 [ kg m^-3 ]
Enabling Buoyancy allows for natural convection due to density variations. The buoyancy force is a function of density variations relative to the buoyancy reference density. Since density variations can be very small, using a reference density help avoid round-off errors. The reference density should be a typical fluid density in the domain.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-17

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Create Domain
4. 5. 6. 7. 8. 9.

Workshop Supplement

Switch to the Fluid Models tab Change the Heat Transfer Option to Thermal Energy Change the Turbulence Model Option to Shear Stress Transport Switch to the Initialisation tab Check the Domain Initialisation box Set the Temperature Option to Automatic with Value. Set the Temperature to 21 [C]
For most cases, setting an initial condition for domain temperature is not necessary since the solver can automatically calculate initial conditions. However, if you input a value that is closer to the final solution than what the solver would automatically calculate, you will reach a converged solution faster.

10. Click OK to commit the changes to the domain


ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002599

WS3-18

WS3: Room Temperature Study

Profile data initialization


1. Select Tools >Initialise Profile Data and choose the Data File as vent1.csv. Click OK
CFX-Pre reads the file and creates functions that point to the variables available in the file (see the User Functions section in the Outline tree). Boundary conditions can be set by referencing these functions. E.g. VENT1.Velocity u(x,y,z) refers to the Velocity u value in the VENT1 function with the local coordinate values x, y and z passed in as the arguments. Any value with the correct dimensions can be passed in as an argument, but usually the local coordinates are used.

Workshop Supplement

2. Similarly initialise profile data for vent 2 by choosing vent2.csv


ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-19

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Create Boundary Conditions


Now create the following boundary conditions: 1. vent1 Boundary Condition
Name: vent1 Boundary Type: Inlet Location: VENT1 Select Use Profile Data and choose VENT1 as the Profile Name Click Generate Values
This will create expressions for the Mass and Momentum option on the Boundary Details tab that reference the profile functions

Workshop Supplement

On the Boundary Details tab check that the expressions make sense Heat Transfer Option: Static Temperature Static Temperature: 21 [C]
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-20

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Create Boundary Conditions


2. vent2 Boundary Condition

Workshop Supplement

Name: vent2 Boundary Type: Inlet Location: VENT2 Select Use Profile Data and choose VENT2 as the Profile Name Click Generate Values
The Mass and Momentum Option will be automatically updated

Heat Transfer Option: Static Temperature Static Temperature: 21 [C]

3. workers Boundary Condition


Name: workers Boundary Type: Wall Location: WORKERS Heat Transfer Option: Temperature Fixed Temperature: 37 [C]
WS3-21
April 28, 2009 Inventory #002599

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3: Room Temperature Study

Create Boundary Conditions


4. outlet Boundary Condition
Name: outlet Boundary Type: Opening Location: OUTLET Mass and Momentum Option: Opening Pres. and Dirn Relative Pressure: 0 [Pa] Heat Transfer Option: Opening Temperature Opening Temperature: 21 [C]

Workshop Supplement

5. monitors Boundary Condition


Name: monitors Boundary Type: Wall Location: monitors Heat Transfer Option: Temperature Fixed Temperature: 30 [C]
WS3-22
April 28, 2009 Inventory #002599

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3: Room Temperature Study

Create Boundary Conditions


6. computerVent Boundary Condition
Name: computerVent Boundary Type: Inlet Location: COMPUTER1VENT, COMPUTER2VENT, COMPUTER3VENT, COMPUTER4VENT Mass and Momentum Option: Mass Flow Rate Mass Flow Rate: 0.132 [kg/s] Heat Transfer Option: Static Temperature Static Temperature: 40 [C]

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-23

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Create Boundary Conditions


7. computerIntake Boundary Condition
Name: computerIntake Boundary Type: Outlet Location: COMPUTER1INTAKE, COMPUTER2INTAKE, COMPUTER3INTAKE, COMPUTER4INTAKE Mass and Momentum Option: Mass Flow Rate Mass Flow Rate: 0.132 [kg/s] Mass Flow Update Option: Constant Flux

Workshop Supplement

This enforces a uniform mass flow across the entire boundary region, rather than letting a natural velocity profile develop. It is used here to make sure the flow rate through each intake is the same.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-24

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Solver Control
1. Edit Solver Control from the Outline tree

Workshop Supplement

Due to nature of this flow it will take a long time for a steady-state condition to be reached

2. Increase the Max. Iterations to 750 3. Change the Timescale Control to Physical Timescale 4. Set a Physical Timescale of 2 [s] 5. Enable the Conservation Target toggle 6. Click OK to commit the settings

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-25

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Monitor Point

Workshop Supplement

Monitor points are used to monitor quantities of interest during the solution. They should be used to help judge convergence. In this case you will monitor the temperature of the air that exits through the outlet. One measure of a converged solution is when this air has reached a steady-state temperature.

1. 2. 3. 4. 5.

Edit Output Control from the Outline tree Switch to the Monitor tab and enable the Monitor Options toggle Under Monitor Points and Expressions, click the New icon Enter the Name as temp Set the Option to Expression

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-26

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Monitor Point
6. In the Expression Value field, type in:
massFlowAve(Temperature)@outlet

Workshop Supplement

7. Click OK to create the Monitor Point

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-27

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Write Solver File

Workshop Supplement

You can now save the project and proceed to write a definition file for the Solver: 1. Close CFX-Pre to return to the Project window and save the project The solution will take several hours to solve on one processor. To save time, a results file is provided with this workshop. The Project Schematic shows that the room Solution has not been completed, so you cannot view the results in CFD-Post yet. To view the results for the file provided youll need to add the results to the project. 2. 3. 4. 5. Select File > Import from the main menu in Workbench Set the file filter to CFX-Solver Results File Select the results file provided with this workshop, room_001.res Change the name of the system to room results

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-28

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Project Schematic

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-29

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

CFX Solver Manager


Now you can view the solution for the previously solved case.

Workshop Supplement

1. Right-click on Solution in the room results system and select Display Monitors 2. Examine the residual plots for Momentum and Mass, Heat Transfer and Turbulence
The Residual Target of 1e-4 was met at about 270 iterations, but the solver did not stop because the Conservation Target had not been met

3. Examine the User Points plot


Air temperature leaving through the outlet did not start to reach a steady temperature until >650 iterations. Using residuals as the only convergence criteria is not always sufficient.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-30

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Residual and Monitor plot

Workshop Supplement

Residual plot

Monitor points

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-31

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

CFX Solver Manager

Workshop Supplement

6. Check the Domain Imbalances at the end of the .out file for each equation
You can right click in the text monitor, select Find and search for Domain Imbalance to find the appropriate section An imbalance is given for the U-Mom, V-Mom, W-Mom, P-Mass and HEnergy equations It took 653 iterations to satisfy the Conservation Target of 1% for the HEnergy equation see the Plot Monitor 1 tab

7. Close the Solver Manager 8. View the results in CFD-Post by double-clicking Results in the Project Schematic from the room system

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-32

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

CFD-Post
Start by creating a ZX Plane at Y = 1.2 [m] 1. Select Location > Plane from the toolbar

Workshop Supplement

2. In the Details windows on the Geometry tab, set the Definition Method to ZX Plane 3. Set Y to 1.2 [m] 4. On the Colour tab set Mode to Variable 5. Set Variable to Temperature 6. Set Range to Local and click Apply
Observe the temperature distribution (for example, how the warm air collects under the table)
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-33

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

CFD-Post

Workshop Supplement

Using the same procedure, create several other planes displaying the temperature profile: 1. ZX Plane at Y = 2 [m] 2. ZX Plane at Y = 5.1 [m] 3. XY Plane at Z = 0.25 [m] 4. When finished observing the temperature distribution, uncheck the visibility boxes of the planes that you created

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-34

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

CFD-Post
Plot vector plots on the planes that you created: 1. Click Insert > Vector from the main menu

Workshop Supplement

2. In the Details windows on the Geometry tab, set Location to Plane 2 and Symbols Size to 3.0 in Symbol tab 3. Click Apply 4. After observing the flow behavior on Plane 2, switch the Location to Plane 4

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-35

April 28, 2009 Inventory #002599

WS3: Room Temperature Study

Further Steps (Optional)


Time permitting, you may want to try the following: 1. Observe the density variation at various planes 2. Create a streamline from each of the vents

Workshop Supplement

You may want to adjust the values on the Limits tab (Max. Segments)

3. Animate the streamlines


Right-click on the Streamlines in the 3D viewer and select Animate

4. Create an isosurface based on different temperatures (e.g., 22 [C], 24 [C], etc.) 5. Calculate the areaAve of Wall Heat Flux on the workers
Click Tools > Function Calculator
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS3-36

April 28, 2009 Inventory #002599

Workshop 4 Flow Through Porous Media

Introduction to CFX

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS4-1

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Introduction
This workshop demonstrates how to model porous media in CFX. It models a catalytic converter. Nitrogen flows in through the inlet with a uniform velocity of 10 m/s, passes through a ceramic monolith substrate with square shaped channels, and then exits through the outlet. The substrate is impermeable in the X and Y direction, which is modeled by specifying loss coefficients 2 orders of magnitude higher than in the Z direction.

Workshop Supplement

Ceramic Monolith Substrate

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS4-2

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Starting CFX-Pre

Workshop Supplement

1. Start Workbench and save the Project as cat_converter.wbpj 2. Drag CFX into the Project Schematic from the Component Systems toolbox and name the system Porous 3. Start CFX-Pre by double clicking Setup 4. When CFX-Pre opens, right-click Mesh and select Import Mesh > ICEM CFD. Select the file catconv.cfx5 5. Keep the Mesh Units in m

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS4-3

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Material Import 1. Right-click Materials and select Import Library Data 2. Select N2 Ideal Gas by expanding the Calorically Perfect Ideal Gases branch 3. Click OK

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS4-4

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Fluid Domain Setup


1. Double-click Default Domain 2. For Fluid 1, set the Material to N2 Ideal Gas (note: use the icon) 3. Switch to the Fluid Models tab 4. Set Heat Transfer to Isothermal 5. Set Fluid Temperature to 450 [C] 6. Set Turbulence to k-epsilon 7. Click OK

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS4-5

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Setting Up Boundary conditions


1. Insert a boundary condition named Inlet 2. Set Boundary Type to Inlet 3. Set Location to INLET 4. Switch to the Boundary Details tab 5. Set Mass and Momentum to a Normal Speed of 10 [m s^-1] 6. Click OK 7. Insert a Boundary Condition named Outlet 8. Set Boundary Type to Outlet 9. Set Location to OUTLET 10. Switch to the Boundary Details tab 11. Enter a Relative Pressure of 0 [Pa] 12. Click OK
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS4-6

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Setting Up Porous Domain


1. Right-click on Flow Analysis 1 and insert a Domain named Substrate 2. Set the Location to SUBSTRATE 3. Set the Domain Type to Porous Domain 4. Switch to the Porosity Settings tab 5. Set Volume Porosity to 0.5 6. Set the Loss Model option to Directional Loss 7. For the Streamwise Direction, enter components of 0,0,1 8. Set Streamwise Loss to Linear and Quadratic Resistance Coefficients 9. Turn on Quadratic Resistance Coefficient and enter a value of 440 [kg m^-4] 10. Set the Streamwise Coefficient Multiplier to 100 and click OK
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS4-7

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Domain Interface
CFX automatically creates a Fluid-Porous interface between the Default Domain and Substrate. You can double-click Default FluidPorous Interface to view the setup, or highlight the Default Fluid Porous Interface Side 1 and Default Fluid Porous Interface Side 2 boundaries in the individual domains to see that that regions are correct.

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS4-8

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Output Control
1. Edit Output Control from the Outline tree 2. Switch to the Monitor tab and turn on Monitor Options 3. Click to create a new monitor object, and call it Mass Flow at Outlet 4. Set the Option to Expression 5. Set the Expression Value to massFlow()@Outlet Right-click 6. Insert a new object in the same way called Pressure Drop, using the Expression:

Workshop Supplement

massFlowAve(Total Pressure)@REGION:INLETSUBSTRATEINTERFACE_1 massFlowAve(Total Pressure)@REGION:OUTLETSUBSTRATEINTERFACE_1

7. Click OK
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS4-9

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Starting Solver
1. Close CFX-Pre and save the project 2. Double-click Solution to start the Solver Manager 3. When the Solver Manager opens click Start Run

Workshop Supplement

4. At the end of the run, click the User Points tab and click the green line where it flattens out. It reports a pressure drop value of approx 285 Pa across the substrate

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS4-10

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Post-processing
1. When the solver finishes, close the Solver Manager 2. Double-click on Results in the Project page to start CFD-Post 3. Once CFD-Post is open, select Location > Plane from the toolbar 4. Set Method to ZX Plane 5. Set Y to 0 [m] 6. Click Apply 7. Turn off Visibility for Plane 1 by disabling the check-box next to its entry in the Outline tree 8. Select Insert > Vector 9. Select Locations to Plane 1 10. Click Apply
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS4-11

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Post-processing
1. 2. 3. 4. 5. Hide the Vector plot created in the last step Select Insert > Contour Set Locations to Plane 1 Set Variable to Pressure Click Apply

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS4-12

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Post-processing
1. Select Location > Line from the toolbar 2. Set Point 1 to 0,0,-0.07 3. Set Point 2 to 0,0,0.07 4. Click Apply 5. Select Insert > Chart 6. On the General tab enter Pressure in Porous Domain as the Title 7. On the Data Series tab, click to create Series 1 8. Set Location to Line 1 9. On the X Axis tab, set Variable to Z 10. On the Y Axis tab, set Variable to Pressure 11. Click Apply
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS4-13

April 28, 2009 Inventory #002599

WS4: Flow Through Porous Media

Post-processing
1. Switch to the Expressions tab 2. Right-click and select New 3. Enter the Name as deltaP and enter the Definition as:
massFlowAve(Total Pressure)@Inlet massFlowAve(Total Pressure)@Outlet

Workshop Supplement

4. Click Apply to evaluate the expression The value should come out to be approximately 300 Pa. Since we know from the solver monitor value that approx. 285 Pa or Total Pressure is lost across the substrate, we can determine that 15 Pa is lost through the rest of the device.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS4-14

April 28, 2009 Inventory #002599

Workshop 5 Cavitating Centrifugal Pump

Introduction to CFX

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-1

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Introduction
The Purpose of the tutorial is to model cavitation in a centrifugal pump, which involves the use of a rotation domain and the cavitation model. The problem consists of a five blade centrifugal pump operating at 2160 rpm. The working fluid is water and flow is assumed to be steady and incompressible. Due to rotational periodicity a single blade passage will be modeled. The initial flow-field will be solved without cavitation. It will be turned on later.

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-2

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Workbench 1. Start Workbench and save the project as centrifugalpump.wbpj 2. Drag CFX into the Project Schematic from the Component Systems toolbox 3. Start CFX-Pre by double clicking Setup

Workshop Supplement

4. When CFX-Pre opens, import the mesh by right-clicking on Mesh and selecting Import Mesh > ICEM CFD 5. Browse to pump.cfx5 6. Keep Mesh units in m 7. Click Open

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-3

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Creating Working Fluids


Modifying the material properties: 1. Expand Materials in the Outline tree 2. Double-click Water 3. On the Material Properties tab change Density to 1000 [kg/m3] 4. Change Dynamic Viscosity to 0.001 [kg m^-1 s^-1] under Transport Properties 5. Click OK

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-4

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Setting up the Fluid Domain


1. Double-click on Default Domain 2. Under Fluid and Particle Definitions, delete Fluid 1 and then create a new Fluid named Water Liquid 3. Set Material to Water 4. Create another new Fluid named Water Vapour 5. Next to the Material drop-down list, click the icon, then the Import Library Data icon (on the right of the form), and select Water Vapour at 25 C under the Water Data object
Click OK

Workshop Supplement

6. Back in the Material panel, select Water Vapour at 25 C


Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-5

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Setting up the Fluid Domain


7. Set the Reference Pressure to 0 [Pa] 8. Set Domain Motion to Rotating 9. Set Angular Velocity to 2160 [rev min^-1] 10. Switch on Alternate Rotation Model

Workshop Supplement

11. Make sure Rotation Axis under Axis Definition is set to Global Z 11. Switch to the Fluid Models tab, and set the following: 12. Turn on Homogeneous Model in the Multiphase section 13. Under Heat Transfer set the Option to Isothermal, with a Temperature of 25 C 14. Set Turbulence Option to Shear Stress Transport 15. Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-6

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Inlet Boundary Condition

Workshop Supplement

1. Insert a boundary condition named Inlet 2. On the Basic Settings tab, set Boundary Type to Inlet 3. Set Location to INLET 4. Set Frame Type to Stationary 5. Switch to the Boundary Details tab 6. Specify Mass and Momentum with a Normal Speed of 7.0455 [m/s] 7. Switch to the Fluid Values tab 8. For Water Liquid, set the Volume Fraction to a Value of 1 9. For Water Vapour, set the Volume Fraction to a Value of 0 10.Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-7

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Outlet Boundary Condition


1. 2. 3. 4. 5. 6.

Workshop Supplement

Inset a boundary condition named Outlet On the Basic Settings tab, set Boundary Type to Opening Set Location to OUT Set Frame Type to Stationary Switch to the Boundary Details tab Specify Mass and Momentum using Entrainment, and enter a Relative Pressure of 600,000 [Pa] 7. Enable the Pressure Option and set it to Opening Pressure 8. Set Turbulence Option to Zero Gradient 9. Switch to the Fluid Values tab 10.For Water Liquid, set the Volume Fraction to a Value of 1 11.For Water Vapour, set the Volume Fraction to a Value of 0 12.Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-8

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Periodic Interface
1. Click to create an Interface, and name it Periodic 2. Set the Interface Type to Fluid Fluid 3. For Interface Side 1, set the Region List to DOMAIN INTERFACE 1 SIDE 1 and DOMAIN INTERFACE 2 SIDE 1 (use the icon and the Ctrl key) 4. For Interface Side 2, set the Region List to DOMAIN INTERFACE 1 SIDE 2 and DOMAIN INTERFACE 2 SIDE 2 5. Set the Interface Models option to Rotational Periodicity 6. Under Axis Definition, select Global Z 7. Set Mesh Connection Option to 1:1 8. Click OK

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-9

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Wall Boundary Conditions

Workshop Supplement

1. Insert a boundary condition named Stationary 2. Set it to be a Wall, using the STATIONARY location 3. On the Boundary Details tab, enable a Wall Velocity and set it to Counter Rotating Wall 4. Click OK 5. In the Outline Tree, right-click on the Default Domain Default boundary and rename it to Moving
The default behavior for the Moving boundary condition is to move with the rotating domain, so there is nothing that needs to be set

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-10

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Initialization

Workshop Supplement

1. Click to initialize the solution 2. On the Fluid Settings form, set Water Liquid Volume Fraction to Automatic with Value, and set the Volume Fraction to 1 3. Set Water Vapour Volume Fraction to Automatic with Value, and set the Volume Fraction to 0 4. Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-11

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Solver Control
1. Double click Solver Control in the Outline tree 2. Set Timescale Control to Physical timescale

Workshop Supplement

A commonly used timescale in turbomachinery is 1/omega, where omega is the rotation rate in radians per second. You can use an expression to determine a timestep from this. In this case, 2/omega will be used to achieve faster convergence. 3. Enter the following expression in the Physical Timescale box: 1/(pi*2160 [min^-1]) 4. Set Residual Target to 1e-5 5. On the Advanced Options tab, turn on Multiphase Control, then turn on Volume Fraction Coupling and set the Option to Coupled 6. Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-12

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Output Control

Workshop Supplement

1. Double Click on Output Control in the Outline tree 2. On the Monitor tab, turn on Monitor Options 3. Under Monitor Points and Expressions, create a new object and call it InletPTotalAbs 4. Set Option to Expression 5. Specify the following expression: massFlowAve(Total Pressure in Stn Frame )@Inlet 6. Create a new object called InletPStatic, and set Option to Expression 7. Specify the following expression: areaAve(Pressure )@Inlet 8. Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-13

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Solver
1. Close CFX-Pre and switch to the Workbench Project window 2. Save the project 3. Now double click on Solution in the Project Schematic to start the Solver Manager 4. When the Solver Manager opens, click Start Run 5. When the solution has completed, close the Solver Manager and return to the Project window 6. Save the project

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-14

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Post-processing
1. View the results in CFD-Post by double clicking Results in the Project Schematic 2. Insert a Contour by clicking 3. For the Location, click , expand Regions and then select BLADE 4. Set Variable to Absolute Pressure from the extended list 5. Set Range to Global 6. On the Render tab switch off Lighting and Show contour Lines 7. Click Apply

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-15

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Post-processing
9. Insert another Contour on the HUB location, using the variable Absolute Pressure coloured by Local Range. Turn off Lighting and Show Contour Lines.

Workshop Supplement

10. Insert another Contour on the SHROUD location, using the variable Absolute Pressure coloured by Local Range. Turn off Lighting and Show Contour Lines. The minimum pressure is above the Saturation Pressure of 2650 Pa for Water here. In the next step, the outlet pressure will be reduced enough to initiate Cavitation.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-16

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Adding another Analysis


1. Close CFD-Post and return to the Project Schematic 2. Click the arrow next to the A cell and select Duplicate
A new CFX project is created as a copy of the first

Workshop Supplement

3. Change the name of the new Simulation to Cavitation 4. Use the arrow next to the A cell to Rename it to No Cavitation 5. Save the Project 6. Double-click Setup for the Cavitation simulation to open CFX-Pre

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-17

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Physics Modifications
1. 2. 3. 4. 5. 6. 7. 8. 9.

Workshop Supplement

Edit the Default Domain On the Fluid Pair Models tab set Mass Transfer to Cavitation Set Option to Rayleigh Plesset Turn on Saturation Pressure Set a Saturation Pressure of 2650 [Pa] Click OK Edit the Outlet Boundary Condition On the Boundary Details tab, set the Relative Pressure to 300,000 [Pa] Click OK
Most cavitation solutions should be performed by turning cavitation on and then successively lowering the system pressure over several runs to more gradually induce cavitation. To speed up this workshop, a sudden change in pressure is introduced. Note that this approach may not be suitable for modelling some industrial cases.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-18

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Physics Modifications
1. 2. 3. 4. 5. 6. Edit Solver Control Set the Max. Iterations to 150 Set the Residual Target to 1e-4 Click OK Close CFX-Pre and save the project In the Project Schematic, drag cell A3 onto cell B3
The non-cavitating solution will be used as the initial guess for the cavitating solution

Workshop Supplement

7. Double-click Solution for the Cavitation system


In the Solver Manager note that the initial conditions have been provided from the project schematic

8. Click Start Run


ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-19

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Cavitation Solution
There is a significant spike in residuals, in part due to the outlet pressure difference, but also due to the fact that the absolute pressure is low enough to induce cavitation. 1. When the run completes, close the Solver Manager and return to the Project Schematic 2. Save the project 3. Double-click Results for the Cavitation project to open CFD-Post

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-20

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Post-processing
1. If it is not enabled, turn on visibility for the Wireframe and turn off visibility for any User Locations and Plots 2. Create an XY Plane at Z = 0.01 [m] 3. Colour it by Absolute Pressure (the variable is available in the Extended List by clicking ). Use a Global Range
The minimum absolute pressure is equivalent to the Saturation Pressure specified earlier, which is a strong hint that some cavitation has occurred

Workshop Supplement

4. Change the Colour Variable to Water Vapour.Volume Fraction 5. Change the Colour Map to Blue to White

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-21

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Post-processing
1. Turn off visibility for Plane 1 2. Create a Volume using the Isovolume method 3. Set the Variable to Water Vapour.Volume Fraction 4. Set Mode to Above Value, and enter a value of 0.5 5. To view 360 degrees of the model, double-click Default Transform 6. Uncheck Instancing Info from Domain 7. Set # of copies to 5 8. Set # of Passages to 5 9. Click OK

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-22

April 28, 2009 Inventory #002599

WS5: Cavitating Centrifugal Pump

Post-processing

Workshop Supplement

The main area of cavitation exists between the suction side of the blade and the shroud in this geometry. A secondary area of cavitation is just behind the leading edge of the blade on the pressure side Further steps to try: 1. Calculate torque on the BLADE using the function calculator (hint, use the extended region list to find the BLADE, and use Global Z axis) 2. Plot velocity Vectors on Plane 1, using the variable Water Liquid.Velocity in Stn. Frame 3. Calculate the mass flow through the pump (hint: use the function calculator to evaluate massFlow at the Outlet region) 4. Using a similar method to step 2, calculate the drop in Total Pressure from Inlet to Outlet 5. Plot Streamlines, starting from the Inlet location

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS5-23

April 28, 2009 Inventory #002599

Workshop 6 Electronics Cooling with Natural Convection and Radiation

Introduction to CFX

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-1

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Goals

Workshop Supplement

This workshop models the heat dissipation from a hot electronics component fitted to a printed circuit board (PCB) via a finned heat sink. The PCB is fitted into a casing, which is open at the top and bottom. Initially only the heat transfer via convection and conduction will be modelled. The effect of thermal radiation will then be included at a later stage.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-2

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Loading Mesh (Workbench)


1. Open a new Workbench project and save it as HeatSink.wbpj 2. Look in the Component Systems section of the toolbox and drag a CFX system onto the Project Schematic 3. Double-click Setup to start CFX-Pre 4. In CFX-Pre, right-click Mesh and select Import Mesh > ANSYS Meshing 5. Select HeatSink.cmdb and click Open

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-3

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Options

Workshop Supplement

1. In the tree expand Case Options, double-click General and ensure that Automatic Default Domains is switched on and Automatic Default Interfaces is active. 2. Set the Interface Method to One Per Domain Pair. Click OK.

Separate interfaces are required for each domain because when radiation is added, emissivity will be set differently at each domain interfaces

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-4

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Create Fluid Domains


First add a domain for the fluid region. The effects of buoyancy must be included, as the flow is driven by natural convection. The buoyancy reference density represents the density at the ambient conditions. 1.Right-click on Flow Analysis 1 and insert a new domain named Fluid 2.Open the details for Fluid and set the Location to Fluid 3.Set the Material to Air Ideal Gas 4.Switch the Buoyancy option to Buoyant and set the directional components to (0, -g, 0) Click on the expression button to enter g 5.Set the Reference Density to 1.1093 [kg m^-3] 6.Click the Fluid Models tab 7.Set Heat Transfer to Thermal Energy and Turbulence to None (Laminar) 8.Click OK
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS6-5

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Creating Materials

Workshop Supplement

CFX contains a library of many materials, but for this case we will create user materials for the component and Printed Circuit Board (PCB). 1. In the tree right-click on Materials and select Insert > Material. Name it ComponentMat 2. Define the material as a Pure Substance in the CHT Solids Material Group 3. Enable Thermodynamic State and select Solid
This must be set to allow it to be used in a solid domain

4. Click the Material Properties tab and set Density to 1120 [kg m^-3] 5. Select Specific Heat Capacity and set it to 1400 [J kg^-1 K^-1] 6. Expand Transport Properties and set Thermal Conductivity to 10 [W m^-1 K^-1] 7. Select OK
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-6

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Creating Materials
8. Repeat steps 1-7 to create PCBMat using
Density = 1250 [kg m^-3] Specific Heat Capacity = 1300 [J kg^-1 K^-1] Thermal Conductivity = 0.35 [W m^-1 K^-1]

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-7

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Create Solid Domains

Workshop Supplement

This case contains three different solid parts that use different materials. Each part will be created as a different domain. 1.Insert a new domain called HeatSink 2.Set the Location to HeatSink 3.Set the Domain Type to Solid Domain with the Material set to Aluminium 4.Click OK to create the domain
Note that an interface between the two domains is automatically created

5.Repeat steps 1-4 to create a solid domain called Component located at IC using the Material ComponentMat, and a further solid domain called PCB located at PCB using PCBMat
When all 4 domains are created the Default Domain will automatically be removed from the tree. Separate interfaces between each domain will have been automatically created, rather than combined into a single interface.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-8

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Adding Energy Source

Workshop Supplement

The component is generating 75 [W] of heat which must be added to the simulation. To add this energy source in CFX, a subdomain must be created. 1. In the tree right-click on the Component domain and select Insert > Subdomain, using the name Chip 2. Set the Location to IC so the subdomain occupies the whole of the Component domain 3. Switch to the Sources tab and check the Sources box and the Energy box 4. Set the Option to Total Source, enter 75 [kg m^2 s^-3] then click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-9

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Boundary Conditions

Workshop Supplement

For this case all of the heat will be extracted by the air passing over the heat exchanger so all solid walls will be defined using adiabatic settings. Within the simulation heat can pass between all of the solid and fluid domains because interfaces have been automatically created. To allow air to enter or leave the simulation domain, the top and bottom face of the fluid domain are defined as openings. 1.Right-click on the Fluid domain and insert a new boundary called Walls and set the Boundary Type to Wall 2.Set the Location to Wall 3.Switch to the Boundary Details tab and check that Heat Transfer is set to Adiabatic then click OK 4.In the PCB domain rename PCB Default to PCBwalls and check that Heat Transfer is set to Adiabatic
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002599

WS6-10

WS6: Electronics Cooling

Boundary Conditions

Workshop Supplement

1. In the Fluid domain rename Fluid Default to Openings and check that the Location is set to be the two ends of the fluid domain 2. In the Basic Settings tab change the Boundary Type to Opening 3. In the Boundary Details tab set the Mass and Momentum option to Opening Pres. and Dirn with a relative pressure of 0 [Pa] 4. Set Heat Transfer to Opening Temperature at 45 [C]

The Opening Pressure and Opening Temperature options set Total values when flow is entering the domain and Static values when flow is leaving. This is appropriate when the flow outside the domain is accelerated from rest before entering the domain but will have a velocity when leaving.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-11

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Solver Control
1. From the tree right-click Solver Control and select Edit 2. Increase the Max. Iterations to 500 3. Leave the Fluid Timescale Control set to Auto Timescale 4. Leave Solid Timescale set to Auto Timescale
Note that solid regions will use a much larger timescale than fluid regions because only the energy equation is being calculated within the solid

Workshop Supplement

5. Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-12

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Radiation Setup

Workshop Supplement

The next step is to redefine the model to include radiation effects. This will be set up as a second analysis that can be run after the convection only case using results from the initial simulation as starting conditions. This reduces the overall computational time, as the convection only case will be much closer to the end solution. Most of the settings will be the same as the original analysis so the first step will be to make a duplicate analysis. 1.Right-click on Flow Analysis 1 and rename it to Convection 2.Right-click on Convection and select Duplicate 3.Rename Copy of Convection to Radiation
This will form the basis of the radiation case

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-13

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Adding Radiation to the Air Domains

Workshop Supplement

The effects of radiation need to be included in the new analysis. In this case, the surface-to-surface model will be used so radiation is only passed from wall to wall and the fluid does not participate in any way. This saves computational time and is appropriate since air will not absorb or emit significant thermal radiation on these length scales. 1. In the Radiation analysis, edit the Fluid domain 2. Switch to the Fluid Models tab 3. Under Thermal Radiation set the Option to Discrete Transfer 4. Set Transfer Mode to Surface to Surface 5. Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-14

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Updating the Boundary Conditions.

Workshop Supplement

Adding radiation will produce an error because additional information is now required at the Openings boundary. 1.Edit the boundary Openings. Make sure that it is the copy from the Radiation Flow Analysis that is being edited 2.Click the Boundary Details tab and see that Thermal Radiation has been added and is set to Local Temperature 3.Click OK to accept this addition to the boundary condition
As the default value was all that was required in this case an alternative method of correcting this error would have been to right-click on the error message and select Auto Fix Physics.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-15

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Radiation Emissivity

Workshop Supplement

Different materials will have different radiation emissivity values. These can be set at each of the boundaries around the Fluid domain within the Radiation analysis. The emissivity of a surface is a function of the material, surface finish and any coatings that may have been applied as well as local temperature and the radiation wavelength. 1.In the Fluid domain find the interface boundary that connects the HeatSink to the fluid
Hint: boundaries are highlighted in the viewer when selected

2.Open up that boundary and in the Boundary Details tab change Emissivity to 0.3 then click OK
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-16

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Radiation Emissivity
Note that each interface object is shown at the flow analysis level. There are two interface boundaries (at the domain level) associated with each interface object. Here we are editing the emissivity values for the interface boundaries in the fluid domain. The interface boundaries in the solid domains do not have an emissivity, because there is no radiation in the solid domain (they are opaque!). 3.Find the interface boundary in the Fluid domain connecting the Component and Fluid domains and set Emissivity to 0.9 4.Find the interface connecting the PCB to the Fluid domain and set Emissivity to 0.9 5.Open the boundary Walls and set Emissivity to 0.9
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS6-17

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Defining Configurations

Workshop Supplement

CFX-Pre now contains two separate setups for this project. It is necessary to indicate the order in which they run and how they are linked. This is achieved by setting up configurations. (Note that you could run each case separately, manually starting the radiation case from the convection solution.) 1.In the main tree expand Simulation Control then right-click on Configurations and select Insert > Configuration, accepting the default name

2.In the General Settings tab set the Flow Analysis to Convection and Activation Condition 1 to Start of Simulation 3.Click OK
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-18

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Defining Configurations
4. Insert a second configuration and set the Flow Analysis to Radiation. Set the Activation Condition to End of Configuration, and set Configuration Names to Configuration 1 5. Switch to the Run Definition tab, select Configuration Execution Control then Initial Values Specification. Set the option to Configuration Results, using Configuration 1 6. Click OK
The convection case will run first, then when it finishes the .res file it created will be used to initialise the radiation simulation.

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-19

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Running the Simulation


1. Select File > Quit to exit CFX-Pre 2. Save the Project 3. In the Project Schematic, right-click on Solution and select Update 4. While the solver is running right-click on Solution again and select Display Monitors to check on progress

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-20

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Running the Simulation

Workshop Supplement

This case uses a multi-configuration setup so the first screen will show the global progress by showing which configuration is being run. 1. Change the Workspace from the current run to Configuration1_001
The standard out file and residuals are displayed

2. This run will take a while to run so after a few iterations stop the run and the results provided will be used 3. Close the Solver Manager
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-21

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Open CFD-Post

Workshop Supplement

The results field in the existing CFX module is associated with the partially calculated results from your setup. To analyse the existing results you will add a new results field to the project.
1. From the Component Systems section of the Toolbox drag a Results system onto the Project Schematic Right-click on the Results cell (B2) and select Edit When CFD-Post opens, select File > Load Results and select HeatSink.mres. Use the option Load complete history as: Separate cases
WS6-22
April 28, 2009 Inventory #002599

2.

3.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6: Electronics Cooling

Case Comparison
The case comparison tool allows two different setups to be shown side by side and any differences between the two cases identified. 1.In the tree edit Case Comparison 2.Enable the check-box Case Comparison Active and check that Case 1 is set to Configuration 1 and Case 2 is set to Configuration 2
In the viewer a new view is created to display the difference between the convection only case and the case including radiation

Workshop Supplement

3.Click Apply to enter comparison mode


ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-23

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Temperature
Temperature will be a key variable for any electronics cooling application so it will be displayed in several locations, such as within the flow, on the surfaces of the solid region and by extracting the maximum temperature within the component. When these plots are created they appear in the User Locations and Plots section of the tree. 1.Create a YZ plane using Location > Plane. Name it Centre, set X to 0 [m] and colour using the variable Temperature. 2.Create a contour plot using Insert > Contour or by clicking on . Use the fluid-solid interfaces as the location (use the icon and Ctrl key to select multiple locations from both configurations). Set the Variable to Temperature using the Global Range.

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-24

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Temperature
1. Move to the function calculator using the icon on the toolbar. Set the options to: Function = maxVal Location = Component Case = All Cases Variable = Temperature 2. Click Calculate
Note that with radiation (Configuration 2) the temperature in the solid is significantly lower than when radiation was not included. The cooling of the component is mirrored with an increase in the temperature of the walls around the fluid zone. This can be seen if you plot the temperature on the walls or use the Function Calculator with the areaAve function.

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-25

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Flow Displays

Workshop Supplement

To show the flow patterns a range of methods can be used including streamlines, vector plots and isosurfaces. 1. Switch off the visibility of the existing plots 2. Insert an isosurface using Location > Isosurface and set the Variable to Velocity with a value of 0.5 [m s^-1] 3. Gradually reduce the isosurface value to 0.2 [m s^-1] and notice that for the radiation case higher speed flow can be observed close to the fluid walls as well as the PCB

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-26

April 28, 2009 Inventory #002599

WS6: Electronics Cooling

Flow Displays
1. Insert a vector plot using Insert > Vector or click on

Workshop Supplement

2. Set the location to Centre. Change the sampling to Equally Spaced with 1000 points
If you wish to see the pattern in the slow speed sections try going to the Symbol tab and select Normalize Symbols

1. Insert streamlines using Insert > Streamlines or by clicking on 2. Set Start From to Openings 3. Apply 100 equally spaced points and set the Direction to Forward and Backward

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS6-27

April 28, 2009 Inventory #002599

Workshop 7 Tank Flushing

Introduction to CFX

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-1

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Introduction

Workshop Supplement

This workshop models a water tank filling and then emptying through a siphon. The problem is transient in nature and solved as a two fluid multiphase case (air + water). An initial water level is set in the tank. The water supply is turned on for the first second of the simulation and then shut off for the rest of the simulation. The water level rises until water flows out the U-tube generating a siphoning effect which effectively empties the tank.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-2

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Mesh Import

Workshop Supplement

1. Start Workbench, add a CFX Component System, then edit the Setup to start CFX-Pre 2. Right-click on Mesh > Import Mesh >ICEM CFD 3. Set the Mesh Units to cm
For some mesh formats it is important to know the units used to generate the mesh

4. Import the mesh flush.cfx5

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-3

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Define Simulation Type

Workshop Supplement

The first step is to change the Analysis Type to Transient: 1. Edit the Analysis Type object in the Outline tree 2. Set the Analysis Type Option to Transient 3. Set the Total Time to 2.5 [s] 4. Set the Timesteps to 0.01 [s] and click OK
The simulation will have 250 timesteps

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-4

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Edit Default Domain 1. Edit Default Domain from the Outline tree 2. Delete Fluid 1 under Fluid and Particle
Definition

Workshop Supplement

3. Click on the New icon 4. Name the new fluid Air 5. Set the Material to Air at 25C and the
Morphology to Continuous Fluid

6. Create another fluid named Water 7. Set the Material to Water and the
Morphology to Continuous Fluid

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-5

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Edit Default Domain 8. Turn on Buoyancy and set the (X, Y, Z)


gravity components to (0, -g, 0)

Use the expression icon to enter -g ( g is a built-in constant )

Workshop Supplement

9. Set the Buoy. Ref. Density to 1.185 [kg


m^-3]

This is the density of Air at 25 C. Search the help for Buoyancy in Multiphase Flow (including the quotes in the search) for more details

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-6

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Edit Default Domain


10. Switch to the Fluid Models tab 11. Under Multiphase Options, enable the Homogeneous Model
This makes the simplifying assumption that both phases share the same velocity field

Workshop Supplement

12. Set the Free Surface Model Option to Standard


This changes some solver numerics to resolve the free surface interface better

13. Under Heat Transfer, enable the Homogeneous Model toggle and set the Option to None 14. Set the Turbulence Model Option to k-Epsilon
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002599

WS7-7

WS7: Tank Flushing

Edit Default Domain


15. Switch to the Fluid Pair Model tab 16. Enable the Surface Tension Coefficient toggle and set the coefficient to 0.072 [N m^-1] 17. Under Surface Tension Force, set the Option to Continuum Surface Force 18. Set the Primary Fluid to Water 19. Under Interphase Transfer, set the Option to Free Surface 20. Click OK to complete the changes to the domain

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-8

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Create Boundary Conditions

Workshop Supplement

Start by creating an Opening boundary at the top of the tank to allow air to escape as the tank is filled: 1. Insert a new boundary named Ambient 2. Set the Boundary Type to Opening and the Location to AMBIENT 3. On the Boundary Details tab, set the Mass and Momentum Option to Opening Pres. And Dirn with a Relative Pressure of 0 [Pa] 4. On the Fluid Values tab, set the Volume Fraction of Air to 1 and the Volume Fraction of Water to 0 5. Click Ok to create the boundary

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-9

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Create Boundary Conditions

Workshop Supplement

Now create the outlet and symmetry boundaries. Since recirculation may occur at the outlet this boundary will be specified as an Opening: 1. Insert a new boundary named Outlet with the Boundary Type as Opening and the Location as OUTLET 2. In the Boundary Details, use Opening Pres. And Dirn with a Relative Pressure of 0 [Pa] 3. In the Fluid Values, set the Volume Fraction of Air to 1 and the Volume Fraction of Water to 0 4. Click Ok to create the boundary 5. Insert a Symmetry boundary named Sym1 on the Location SYM1 6. Insert a Symmetry boundary named Sym2 on the Location SYM2
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-10

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Inlet Water Flow Function

Workshop Supplement

Water will flow into the tank at a rate of 0.2 [kg s^-1] for 1 [s]; it will then be shut off for the remainder of the simulation. Therefore the inlet flow rate must be a function of time. You will write an expression using the if() function to define this behavior, then create the Inlet boundary:

1. Right-click on Expressions in the Outline tree and select Insert > Expression 2. Enter the Name as flowProfile 3. Enter the Definition as: if(t<1 [s], 0.2 [kg/s], 0 [kg/s]) and click Apply 4. Insert a new boundary named Inlet 5. Set the Boundary Type to Inlet and the Location to INLET
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002599

WS7-11

WS7: Tank Flushing

Inlet Boundary Condition

Workshop Supplement

6. In Boundary Details, set the Mass and Momentum Option to Bulk Mass Flow Rate 7. Set the Mass Flow Rate to the expression flowProfile 8. In the Fluid Values, set the Volume Fraction of Air to 0 and the Volume Fraction of Water to 1, then click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-12

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Define Expressions

Workshop Supplement

Next you will create expressions to define the initial water height and the initial hydrostatic pressure field. These expressions must define the correct initial flow field because the transient simulation is started cold (it is not started from a converged steady-state simulation).

1. Insert the following expressions:


waterHt = 6 [cm] waterVF = if(y<waterHt,1,0)*if(y>-0.01 [m],1,0)* if(x>-0.028 [m],1,0) waterDen = 998 [kg m^-3] HydroP = waterDen * g * (waterHt - y) * waterVF

waterHt is the initial height of the water in the tank. waterVF provides the initial volume fraction distribution in the tank (see next slide). waterDen is the density of water. HydroP provides the initial pressure distribution due to the hydrostatic pressure of water.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-13

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Define Expressions
The expression for waterVF contains three step() function terms multiplied together. The first function, step((waterHt - y) / 1[m]), returns 1 when y < waterHt. In other words the volume fraction of water is 1 below the y = waterHt line shown to the right. The second step() function returns 1 when y > -0.01[m]. The third step function returns 1 when x > -0.028 [m]. The result is that the volume fraction of water is equal to 1 only in the shaded area shown to the right. This defines the initial water volume fraction. Note that the arguments to the step() function must be dimensionless, hence each time we divide by 1[m].
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

x = - 0.028

y = waterHt y = - 0.01

WS7-14

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Define Initial Conditions


Now set the initial conditions using these expressions:

Workshop Supplement

1. Right-click on Flow Analysis 1 in the Outline tree and select Insert > Global Initialisation 2. Set all Cartesian Velocities Components to 0 [m s^-1] 3. Set the Relative Pressure to the expression HydroP 4. On the Fluid Settings tab, set the Volume Fraction for Water to the expression waterVF. Set the Volume Fraction for Air to the expression 1 waterVF 5. Click OK to set the initial conditions

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-15

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Define Transient Results

Workshop Supplement

By default results are only written at the end of the simulation. You must define transient results to view the intermediate solution:

1. Edit the Output Control object in the Outline tree 2. On the Trn Results tab, create a new Transient Results object, accepting the default Name 3. Set the Option to Selected Variables
This reduces the file size by only writing out selected variables

4. In the Output Variables List, use the icon and the Ctrl key to pick Air.Volume Fraction, Velocity, and Water.Volume Fraction 5. Under Output Frequency, set the Timestep Interval to 2, then click OK
Transient results will be written every second timestep, thus creating a total of 125 Transient Results files
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-16

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Create Monitor Point

Workshop Supplement

Next create a Monitor Point to track the volume of water in the domain during the solution:

1. Insert a new expression named waterVol with the Definition set to: volumeInt(Water.Volume Fraction)@Default Domain
This is the volume integral the water volume fraction in the domain

2. Edit the Output Control object in the Outline tree 3. On the Monitor tab, toggle Monitor Options, insert a new Monitor Point named Water Volume 4. Set the Option to Expression and enter the Expression Value as waterVol, then click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-17

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Run Solver

Workshop Supplement

1. Close CFX-Pre and save the project as TankFlush.wbpj 2. In the Project Schematic, Edit the Solution object to start the Solver Manager 3. Start the run from the Solver Manger
You can monitor the volume of water in the domain during the simulation on the User Points tab The simulation will take about 2 hours to complete. Therefore results files have been provided with this workshop

4. After a few timesteps, Stop your run 5. Select File > Monitor Finished Run in the Solver Manager 6. Browse to the results file provided with the workshop
Note the shape of the Water Volume curve, and see that less water is in the domain after the run is complete than there was at the beginning

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-18

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Post-Process Results 1. Using Windows Explorer, locate the supplied results file TankFlush_001.res, and drag it into an empty region of the Project Schematic 2. A new CFX Solution and Results cell will appear. Double-click on the Results object to open it in CFD-Post

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-19

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Post-Process Results

Workshop Supplement

1. Turn on Visibility for Sym1 2. On the Colour tab, set the Variable to Water.Volume Fraction and set the Colour Map to White to Blue

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-20

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Post-Process Results

Workshop Supplement

3. Use the Timestep Selector to load results from different points in the simulation 4. With the first Timestep loaded, open the Animation tool 5. Select the Quick Animation toggle and select Timesteps as the object to animate 6. Turn off the Repeat Forever button 7. Enable the Save Movie toggle and then click the Play icon to animate the results and generate an MPEG

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-21

April 28, 2009 Inventory #002599

WS7: Tank Flushing

Additional Notes

Workshop Supplement

The results show that a significant amount of air becomes entrained in the water. For this situation running the Inhomogeneous model is recommended so that each phase has its own velocity field. This would allow entrained air bubble to rise out of the water. When both phases have the same velocity field there is no way for entrained air to separate from the water. When running the Inhomogeneous model, the entrained phase should be set as a Dispersed Phase in CFX-Pre.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS7-22

April 28, 2009 Inventory #002599

Workshop 8 Transient Brake Rotor

Introduction to CFX

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-1

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Transient Brake Rotor


This case models the transient heating of a steel rear disk brake rotor on a car as it brakes from 60 to 0 mph in 3.6 seconds. To keep solution times to a minimum the case has been simplified by removing the wheel and brake assembly to leave only the brake rotor. The brake pad is modeled by applying a heat source to a small region of the brake rotor.

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-2

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Assumptions

Workshop Supplement

The ambient air temperature is 81 F and the rotor is at ambient temperature before braking begins The vehicle tire size is 205/55/R16 The total vehicle weight including passengers and cargo is 1609 kg The entire kinetic energy of the vehicle is dissipated through the brake rotors Energy dissipation during braking is split 70/30 between the front and rear brakes and split evenly between the left and right sides The vehicles speed reduces linearly from 60 to 0 mph in 3.6 seconds
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-3

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Solution Approach

Workshop Supplement

The solution is transient, so you will need to begin by solving a steady-state case at a vehicle speed of 60 mph
Transient simulations usually need to begin from a converged steady-state simulation. This establishes the initial fluid field so that the transient solution can start smoothly

You will need two domains; a solid domain for the brake rotor and a fluid domain for the surrounding air The reference frame will be that of the vehicle. So the rotor will be spinning relative to this reference frame and air will be flowing past at the vehicle velocity

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-4

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Start Steady-State Simulation

Workshop Supplement

1. Start CFX-Pre in a new working directory and create a new simulation named BrakeDisk 2. Right-click on Mesh in the Outline tree and import the CFXMesh file named BrakeRotor.gtm
The rotor mesh will be imported along with a bounding box surrounding the rotor

3. In the Outline tree, expand Mesh > BrakeRotor.gtm > Principal 3D Regions
There are two 3D regions in this mesh named B24 and B31

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-5

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Examine Mesh Regions

Workshop Supplement

4. Click once in the tree on each of these 3D regions


The mesh bounding each 3D region is displayed in the Viewer Notice that a mesh exists for the solid brake rotor and for the surrounding fluid region. These meshes are in separate 3D regions but still within the same Assembly

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-6

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Create the Fluid Domain

Workshop Supplement

By default the Simulation Type is set to Steady-State, so the next step is to create the fluid domain 1. Select the Domain icon from the toolbar and enter the Name as AirDomain 2. Pick the Location corresponding to the air region from the drop-down menu
The regions are highlighted in the Viewer to assist you

3. The fluid domain uses Air Ideal Gas as the working fluid at a Reference Pressure of 1 [atm]; the domain is Stationary relative to the chosen reference frame and Buoyancy (gravity) can be neglected. Use this information to set appropriate Basic Settings for this domain
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-7

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Create the Fluid Domain

Workshop Supplement

4. Switch to the Fluid Models tab for the domain 5. Set the Heat Transfer Option to Thermal Energy and leave the Turbulence Option set to the default k-Epsilon model 6. Switch to the Initialisation tab for the domain
Initialisation must be set separately for each domain when both fluid and solid domains are included in a simulation. You cannot set global initial condition because some quantities do not apply in solid domains (e.g. velocity, pressure)

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-8

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Create the Fluid Domain 7. Enable the Domain Initialisation, toggle


All settings can then be left at their default values

Workshop Supplement

8. Click OK to create the domain

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-9

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Create the Solid Domain


The next step is to create the solid domain for the brake rotor.

Workshop Supplement

1. Create a new domain named Rotor 2. Pick the Location corresponding to the brake rotor 3. Set the Domain Type to Solid Domain 4. Set the Material to Steel 5. Leave the Domain Motion Option as Stationary
For this case it is not necessary to solve the solid domain in a rotating reference frame. It is easier to leave it in a stationary reference frame, then define Solid Motion on the next tab. See the notes at the end of this workshop for more details.

6. Switch to the Solid Models tab and enable the Solid Motion toggle
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-10

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Create Expressions 7. Set the Solid Motion Option to Rotating

Workshop Supplement

The next quantity to enter is the Angular Velocity. This needs to be calculated based on the vehicle speed (60 mph) and the radius of the tire attached to the brake rotor. The tires were specified as 205/55/R16 (205 mm tire width, aspect ratio of 55, 16 rim diameter). Next you will create expressions to calculate the Angular Velocity.

8. Switch to the Outline tab (do not close the Domain tab) 9. Right-click on Expressions in the tree and select Insert > Expression
You may need to expand the Expressions, Functions and Variables entry in the tree to be able to right-click on Expressions

10. Enter the expression Name as Speed and click OK


The Expressions tab will appear
WS8-11
April 28, 2009 Inventory #002599 ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8: Transient Brake Rotor

Create Expressions

Workshop Supplement

11.In the Definition window (bottom-left of the screen) enter 60 [mile hr^-1] then click Apply 12.Right-click in the top half of the Expressions window and select Insert > Expression; enter the Name as TireRadius 13.Enter the Definition as (16 [in] / 2) + (205 [mm] * 0.55) and click Apply
Notice that you do not need to convert between different units; just provide units when defining quantities and CFX will convert when necessary

14.Create another expression named Omega, type the Definition as Speed / TireRadius and then click Apply 15.Now switch back to the Domain: Rotor tab

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-12

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Complete the Solid Domain

Workshop Supplement

16. Click the expression icon next to the Angular Velocity field and type in Omega (the name of the expression you just created) 17. Pick the Rotation Axis as the Global X axis 18. On the Initialisation tab set the Temperature Option to Automatic with Value and enter a Temperature of 81 [ F ]
Make sure you have changed the units to F

19. Now click OK to create the domain

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-13

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Create Boundary Conditions

Workshop Supplement

Boundary conditions are needed for the bounding box of the air domain. You will create an inlet boundary upstream of the rotor, an outlet boundary downstream of the rotor and an opening boundary for the remaining bounding surfaces. Start with the inlet boundary:

1. In the Outline tree, right-click on AirDomain and select Insert > Boundary. Enter the Name as AirIn when prompted and click OK 2. On the Basic Settings tab, set the Boundary Type to Inlet and the Location to Inlet 3. On the Boundary Details tab, set the Mass And Momentum Option to Normal Speed 4. In the Normal Speed field click the expression icon and enter Speed
This is one of the expressions you created earlier
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-14

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Create Boundary Conditions

Workshop Supplement

5. Set the Heat Transfer Option to Static Temperature and enter the a value of 81 [ F ] 6. Click OK to create the inlet boundary Now create the outlet boundary condition: 1. Right-click on AirDomain and insert a boundary named AirOut 2. Use the following setting for this boundary:
Boundary Type = Outlet Location = Outlet Mass And Momentum Option = Average Static Pressure Relative Pressure = 0 [ Pa ]

3. Click OK to create the outlet boundary


ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-15

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Create Boundary Conditions Lastly, create the opening boundary condition: 1. Insert a boundary named AirOpening into the AirDomain 2. Use the following settings for this boundary:
Boundary Type = Opening Location = OuterWalls Mass And Momentum Option = Entrainment Relative Pressure = 0 [ Pa ] Turbulence Option = Zero Gradient Heat Transfer Option = Opening Temperature Opening Temperature = 81 [ F ]

Workshop Supplement

3. Click OK to create the opening boundary

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-16

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Create Domain Interface

Workshop Supplement

Domain Interfaces are required when more than one domain exists in your simulation. Without domain interfaces one domain would not see or feel the effect of neighboring domains. A Default Fluid Solid Interface should already exist, but we will manually create the interface here as a practice exercise.

1. Select the Domain Interface icon from the toolbar and enter the Name as RotorInterface 2. Set the Interface Type to Fluid Solid 3. For Interface Side 1, set the Domain (Filter) to AirDomain; pick both BrakePadsFluidSide and RotorFluidSide from the Region List
The Domain (Filter) is only used to limit the Region List to regions in the selected domain. You do not have to use the filter, but it makes region picking easier and less error prone
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-17

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Create Domain Interfaces

Workshop Supplement

The regions BrakePadsFluidSide and RotorFluidSide were created when the mesh was generated. By considering what regions will be needed at the mesh generation stage, the set up in CFX-Pre is made easier

4. For Interface Side 2, set the Domain (Filter) to Rotor. Pick BrakePadsSolidSide and RotorSolidSide from the Region List 5. Under Interface Models, leave the Frame Change and Pitch Change Option set to None
See the notes at the end of this workshop for more details on appropriate Frame Change models for Fluid Solid Interfaces

6. Click OK to create the Domain Interface


Notice that the default interface no longer exists
WS8-18
April 28, 2009 Inventory #002599

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8: Transient Brake Rotor

Modify Interface Boundaries

Workshop Supplement

Notice in the Outline tree that new Side 1 and Side 2 boundary conditions have been created automatically in the Air and Solid domains. These boundary conditions are associated with the Domain Interface

1. Double click RotorInterface Side 1 in the AirDomain 2. Select the Boundary Details tab
By default the boundary condition is a no slip, stationary, smooth wall. It is necessary to modify these settings so that the air feels a rotating wall at the fluid solid interface
Boundary Conditions are always relative to the local frame of reference for the domain. In this case the reference frame for both domains is stationary, so we need to add a wall velocity to the fluid side.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-19

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Modify Interface Boundaries 3. 4. 5. 6. 7.

Workshop Supplement

Enable the Wall Velocity toggle Set the Option to Rotating Wall Set the Angular Velocity to the expression Omega Pick Global X as the Rotation Axis Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-20

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Set Solver Controls

Workshop Supplement

The last step before running the steady-state solution is to set the Solver Control parameters. Default Solver Control parameters already exist, so you can edit the existing object:

1. Double-click the Solver Control entry in the Outline tree 2. Change the Fluid Timescale Control to Physical Timescale
Based on the domain length (about 1.2 [m]) and the inlet velocity (60 mph), the advection time for air through the domain is about 0.045 [s]

3. Set the Physical Timescale to 0.02 [s] 4. Set the Solid Timescale Control to Physical Timescale 5. Set the Solid Timescale to 100 [s] 6. Click OK
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-21

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Run the Steady-State Solution


You can now run the case in the Solver

Workshop Supplement

1. Select the Run Solver and Monitor icon 2. Click Save to write the BrakeDisk.def file and launch the Solver Manager
The solution should converge in about 60 iterations

3. When the Solver finishes, check the Domain Imbalance values in the out file
All imbalances should be well below 1%

4. Click the Post Process Results icon from the toolbar

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-22

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Post-Processing

Workshop Supplement

Since this case is just the starting point for the transient simulation, there is very little post-processing to perform.

1. Check that the solution looks correct by plotting velocity 2. On the Variables tab, double click on the Temperature variable. Check that the Min and Max values are almost identical 3. Quit CFX-Post and return to the BrakeDisk simulation in CFX-Pre 4. Save the CFX-Pre simulation

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-23

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Start Transient Simulation

Workshop Supplement

Next you will define the transient simulation by modifying the steadystate simulation in CFX-Pre. Start by saving the simulation under a new name so that you do not overwrite the previous set up

1. Select File > Save Case As 2. Enter the File name as BrakeDiskTrn.cfx and click Save To set up the transient simulation you will need to:
Edit the expression for Speed so that the inlet velocity reduces with time Change the Simulation Type to Transient and enter the transient time step information Add a heat source to the braking surfaces to simulate the heat generated through braking. Youll need additional expressions for this Modify the Solver Controls Add some Monitor Points
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-24

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Edit Expressions

Workshop Supplement

Start by defining the stopping time for the vehicle and then editing the expression for Speed based on the stopping time

1. Right-click on Expressions in the Outline tree, select Insert > Expression and enter the name as StoppingTime 2. Set the Definition to 3.6 [s] and click Apply 3. Change the expression Speed to: 60 [mile hr^-1] (60 [mile hr^-1] / StoppingTime)* t then click Apply 4. On the Plot tab, check the box for t and enter a range from 0 3.6 [s] 5. Click Plot Expression
You should see Speed decreasing linearly from about 27 to 0 [m s^-1] as shown on the next slide
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-25

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Edit Expressions

Workshop Supplement

6. Create a new expression named Deltat with a value of 0.05 [s]


This expression will be used next to set the timestep size for the transient simulation

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-26

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Change Simulation Type

Workshop Supplement

Next you will change the Simulation Type to Transient and enter information about the duration of the simulation

1. In the Outline tree, double click on Analysis Type 2. Set the Analysis Type Option to Transient 3. Enter the Total Time as the expression StoppingTime 4. Enter Timesteps as the expression Deltat 5. Set the Initial Time Option to Automatic with Value and use a Time of 0 [s]
Transient timesteps of 0.05 [s] will be taken, starting at 0 [s] and ending at 3.6 [s] for a total of 72 timesteps

6. Click OK

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-27

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Add a Braking Heat Source

Workshop Supplement

To add a heat source to simulate the heat generated through braking, edit the solid side boundary condition associated with the interface RotorInterface. Notice that the interface covers the entire surface of the rotor, but a mesh region exists where the brake pads are located. In the Outline tree you can expand Mesh > BrakeRotor.gtm > Principle 3D Regions > B31 > Principle 2D Regions to see the region BrakePadsSolidSide.

1. Edit the RotorInterface Side 2 boundary condition in the Rotor domain 2. On the Sources tab enable the Boundary Source toggle, then the Source toggle and then the Energy toggle

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-28

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Add a Braking Heat Source

Workshop Supplement

Using the assumptions listed at the start of the workshop, the energy to apply to the brake surface can be calculated. The vehicle velocity as a function of time and the vehicle mass is known. Therefore the kinetic energy dissipated through the brakes over one timestep can be calculated. It is also known that 15% of the total energy is dissipated through each rear brake rotor.

3. Switch to the Expressions tab, or double click Expressions from the Outline tree if the tab is not already open 4. Create a new expression named Mass with a value of 1609 [kg] and click Apply
To calculate the kinetic energy lost over one timestep you need to know the change in Speed over the timestep. You already have an expression for the Speed at the end of the timestep, so you need an expression for the Speed at the end of the previous timestep.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-29

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Add a Braking Heat Source

Workshop Supplement

5. Right click on the expression named Speed and select Duplicate from the pop-up menu
Copy of Speed will be created

6. Right click on Copy and Speed and Rename it to SpeedOld 7. Edit the Definition for SpeedOld to read:
60 [mile hr^-1] (60 [mile hr^-1] / StoppingTime)* (t Deltat)

8. Create a new expression named DeltaKE. Enter the Definition as: 0.5 * Mass * (SpeedOld^2 Speed^2)
15% of DeltaKE will be applied to the rotor. The energy source term will be applied as a flux which has units of [J s^-1 m^-2]. Therefore you need to divide by the timestep size and the area of the brake pads to obtain the correct flux. Lastly, the source needs to be limited to just the brake pad region within the RotorInterface Side 2 boundary condition.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-30

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Add a Braking Heat Source

Workshop Supplement

9. Create a new expression named HeatFlux. Enter the Definition as: inside()@REGION:BrakePadsSolidSide * 0.15 * DeltaKE / ( area()@ REGION:BrakePadsSolidSide * Deltat )
The inside( ) function returns 1 when inside the specified region, otherwise it returns 0 The syntax @REGION:Name is used to refer to any locator in the mesh. This differs from the standard @Name syntax which is used to refer to a physics locator (e.g. a domain, boundary condition, subdomain etc.). You can right-click in the Definition section to access these names.

10.Switch back to the Boundary tab for RotorInterface Side 2 11.Set the Energy Option to Flux 12.Enter the expression HeatFlux for the Flux and click OK
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-31

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Modify Solver Controls

Workshop Supplement

1. Edit the Solver Control object from the Outline tree


The default transient Solver Control settings use a maximum of 10 coefficient loops per timestep with a RMS residual target of 1e-4. Fewer loops may be used if the residual target is met sooner. If the residual target is not met after 10 loops the solver will continue on to the next timestep regardless. It is therefore important to check you are converging to an acceptable level during a transient simulation.
Convergence in transient simulations can be improved by using more coefficient loops or by using a smaller timestep. It is generally better to use a smaller timestep with fewer coefficient loops.

2. The default settings are appropriate for this simulation. Click OK


ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002599

WS8-32

WS8: Transient Brake Rotor

Monitor Points

Workshop Supplement

Monitor Points are used to monitor variables at x, y, z coordinates or monitor the value of expressions as the solution progresses.
Monitor points should be used whenever possible to assist with judging convergence. For steady-state simulations monitor a quantity of interest and check that it has reached a steady value when the solver finishes. In transient simulations monitor points are often the easiest way to produce time history plots of a variable or expression

1. Edit the Output Control object from the Outline tree 2. On the Monitor tab enable the Monitor Options check box 3. In the Monitor Points and Expressions frame, click the New icon to create a new monitor point 4. Enter the Name as AvgRotorT and click OK
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-33

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Monitor Points 5. Change the Option to Expression 6. Enter the Expression Value as
volumeAve(Temperature)@Rotor

Workshop Supplement

This expression will return the average temperature of the rotor

7. Click the New icon to create a second monitor point named BrakeSfcT. 8. Make sure that BrakeSfcT is selected, change the Option to Expression and enter the expression below. You can right click on the Expression Value field instead of typing.
areaAve(Temperature)@REGION:BrakePadsSolidSide This expression will return the average temperature on the specified region

9. Click Apply to commit the Output Control settings


ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-34

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Transient Results

Workshop Supplement

By default results are only written at the end of the simulation. You need to create transient results files to be able to view the results at different time intervals.

1. Switch to the Trn Results tab in the Output Control window and click the Create New icon 2. Change the Option to Selected Variables
By selecting only the variables of interest the transient results files are kept small

3. In the Output Variables List, use the icon to select the variables Temperature and Velocity (use the Ctrl key to pick multiple variables) 4. Set the Output Frequency Option to Timestep Interval 5. Enter a Timestep Interval of 4 then click OK
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-35

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Start Solver

Workshop Supplement

The transient simulation is now ready to proceed to the solver.

1. Click the Define Run icon from the toolbar


This will launch the Solver Manager but will not start the run. We need to provide an Initial Values File before running the Solver

2. Click Save to write the file BrakeDiskTrn.def


A Physics Validation Summary will appear

3. Read the Physics Validation message and then read the warning it is referring to which is shown in the message window below the Viewer. Click Yes to continue. 4. When the Solver Manager opens enable the Initial Values Specification toggle and select the file BrakeDisk_001.res. Click Start Run.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-36

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Monitor Completed Run

Workshop Supplement

The solution time for the transient simulation is significantly more than for the steady-state simulation. Results files are provided for the transient simulation to save time.

5. Click the Stop icon in the Solver Manager after a couple of timesteps have been completed 6. In the Solver Manager select File > Monitor Finished Run 7. Browse to the directory where the previously run transient files are located, select the .res file then click Open
On the User Points tab the time history plots for the two monitor points are shown.

8. Check that the residual plots and imbalances show reasonable convergence 9. Click the Post-Process Results icon to proceed to CFXPost
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-37

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Post Processing

Workshop Supplement

Next you will make a transient animation showing the evolution of temperature on the surface of the rotor.

1. Edit the RotorInterface Side 2 object 2. Colour the object by Temperature using a Global Range
In transient simulations the global range of a variable covers all timesteps when the selected variable exists in the transient results files

3. Edit the Default Legend View 1 object 4. On the Appearance tab, change the Precision to 0 and Fixed (the default is 3 and Scientific) and then click Apply 5. Orient the view similar to the image below

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-38

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Create Animation 6. Select the Text icon from the toolbar then click OK to accept the default Name 7. On the Definition tab, enable the Embed Auto Annotation toggle 8. Set the Type to Time Value then click Apply 9. Select the Animation icon from the toolbar 10. Select the Quick Animation toggle 11. Set the Repeat option to 1. You may need to turn off the Repeat Forever icon first
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Workshop Supplement

WS8-39

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Create Animation

Workshop Supplement

12. Enable the Save Movie toggle 13.Check that Timesteps is highlighted in the selection window and click the Play icon to play and generate the animation
CFX-Post will generate one frame from each of the available transient results files. The animation file will be written to the current working directory.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-40

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Rotating Solid Domains Notes

Workshop Supplement

The following notes are for reference only and explain some of the features of rotating solid domains in greater depth. In a solid domain both the Domain Motion and the Solid Motion can be set to Rotating. Setting the Domain Motion Option to Rotating for a solid domain in a transient simulation automatically includes the circumferential position for the solid domain in the results file. In other words, the solid domain will appear to rotate in the theta direction for visualisation purposes. By itself, using Domain Motion = Rotating tells the solver to use mesh coordinates in the relative frame, similar to rotating fluid domains. It does not cause the solver to physically rotate the volumetric mesh or temperature field during the solution. Therefore the solution will look identical to that of a stationary solid domain.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-41

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Rotating Solid Domains Notes

Workshop Supplement

The reason for this behavior is not immediately obvious. However, there are many rotating solid cases that can be modeled as stationary solids, but for post-processing purposes you still want to see the solid rotate along with, say, the fluid domains to which it is connected. Turbomachinery blade cooling applications are a common example. In some cases is it also necessary to account for the rotational motion of the solid energy, and the resulting temperature field. One of two approaches can be used to account for this effect, and the two are not exactly equivalent. Fortunately there is some flexibility in your choice of approach. Either approach is valid when you want energy to be distributed in the circumferential direction around the solid and the source of heat is stationary in the stationary frame.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-42

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Rotating Solid Domains Notes

Workshop Supplement

The first approach, as used in this workshop, is to use the Solid Motion settings on the Domain > Solid Models panel. The solid mesh is not physically rotated; instead a term is added to the solid energy equation to advect the energy using the defined velocity components or angular velocity. Therefore a stationary heat source applied to a solid boundary condition, like the brake pad for example, is felt throughout the entire disc rotor. Remember that we are in a stationary reference frame here, so the heat source applied to the boundary does not rotate. The second approach is to account for the relative rotational motion at the Fluid-Solid interface using a rotating reference frame for the solid (Domain Motion Option = Rotating) combined with the Transient Rotor Stator (TRS) frame change model, leaving the Solid Motion undefined. The relative motion at the interface is accounted for by rotating the surface mesh at the interface. This modeling approach is appropriate in two situations: when the heat source is applied from the fluid side of the interface or when the heat source is applied from the solid side and the heat source rotates with the solid.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-43

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Rotating Solid Domains Notes

Workshop Supplement

As an example, if a hot jet of fluid is impinging on a cooler rotating solid, the entire rotating solid will heat up over time. If you do not use one of these two approaches then a single hot spot will form in the solid domain. In the first approach the Domain Motion is left as Stationary while the Solid Motion settings define the motion. The frame change model at the interface is left as None or Frozen Rotor. In the second approach there is no advection term in the solid energy equation (Solid Motion is not defined), but the mesh rotates at the interface (Domain Motion is Rotating and a TRS interface is used). Note that in general you should not combine the two approaches. You would not use Domain Motion with Transient Rotor Stator and also define Solid Motion since this will rotate things twice.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-44

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Rotating Solid Domains Notes

Workshop Supplement

At the Fluid-Solid interface, Frame Change and Pitch Change options must be set. You should understand these concepts for Fluid-Fluid interfaces before understanding the following guidelines. The FluidSolid interface Pitch Change model can be None, Automatic, Pitch Ratio or Specified Pitch Angles. When the full 360 degree solid domain in modeled, as in this workshop, then None, Pitch Ratio of 1.0 and Specified Pitch Angles of 360 degrees on both sides are all equivalent options. If you are modeling a periodic section of the fluid and solid domain, and a pitch change occurs at the interface, then you should use one of Automatic, Pitch Ratio or Specified Pitch Angle to correctly scale the heat flow profile across the interface, with the local magnitude scaled by the pitch ratio. In this case side 1 and side 2 heat flows should differ by the pitch ratio.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-45

April 28, 2009 Inventory #002599

WS8: Transient Brake Rotor

Rotating Solid Domains Notes

Workshop Supplement

Just as with rotating fluid domains, a rotating solid domain must be rotationally periodic or the full 360 degrees must be modeled. On the fluid side of the interface all Wall Velocities must be tangent to the rotating direction. Modeling a vented brake rotor, which has some walls moving normal to the rotating direction, would require a rotating solid domain, a rotating fluid domain surrounding the solid domain, and then a stationary fluid domain.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS8-46

April 28, 2009 Inventory #002599

Workshop 9 Scripting and Batch Processing

Introduction to CFX

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-1

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Introduction

Workshop Supplement

This workshop models flow over a backwards facing step with heat transfer through the lower wall. The quantities of interest are the Skin Friction Coefficient and the Stanton Number on the lower wall. The choice of turbulence model can influence these results, so you will use session files and scripts to run three simulations, each with a different turbulence model, and then compare the results.

3.8 x H Inlet 4xH

40 x H Outlet

Flow Separation H
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

q
April 28, 2009 Inventory #002599

WS9-2

WS9: Scripting and Batch Processing

Overview

Workshop Supplement

In this workshop both the mesh and the physics definition are provided. The physics definition is contained in a CCL file that you will import into CFX-Pre to define the first simulation; you will then write a Definition file. The same Definition file will be used to run all three simulations, but additional CCL will be passed to the solver at run-time to alter the turbulence model. You will write a short script to run all three simulations, providing the necessary solver arguments for each run. Lastly you will create and edit a CFX-Post session file so that postprocessing output can be created for all three simulations.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-3

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Define The First Simulation

Workshop Supplement

1. Start CFX-Pre from the CFX Launcher (do not use Workbench for this example) and create a new simulation
The first simulation will use the k-epsilon turbulence model

2. Import the mesh file backstep.gtm 3. Select File > Import > CCL 4. Import the file ke.ccl
The physics definition is imported. The CCL file you just imported was generated by setting up the simulation in CFX-Pre and then exporting the CCL through File > Export CCL.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-4

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Examining the Setup


Now take a minute to look at the simulation setup:

Workshop Supplement

1D Interpolation Functions have been used to define Inlet velocity and turbulence profiles based on experimental data The mesh is 1 element thick with symmetry boundaries on the X-Y planes
This simplifies the simulation to 2D

There is a boundary named HeatedWall through which a constant Heat Flux is applied The k-epsilon turbulence model is used
The second and third simulations will use the SST and the k-omega turbulence models

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-5

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Write the Solver File

Workshop Supplement

You can now write the Definition file for the k-epsilon simulation.

1. Click the Write Solver File icon 2. Enter the filename as ke.def and click Save

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-6

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Preparing CCL Files

Workshop Supplement

The next step is to prepare CCL files that change the turbulence model and can be passed to the solver at run-time. You can use the existing CCL as a template. One way to extract the existing CCL is through the Command Editor in CFX-Pre.

1. Open a new text file in Notepad 2. In CFX-Pre, right-click on Default Domain in the Outline tree, and select Edit in Command Editor 3. Copy and paste all the text from the Command Editor to your text file

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-7

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Preparing CCL Files Delete the lines Create Other Side = Off and Interface Boundary = Off under BOUNDARY: Default Domain Default and BOUNDARY: HeatedWall Save the text file in your working directory and name it SST.ccl

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-8

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Preparing CCL Files


Now you can edit the text file in Notepad

Workshop Supplement

6. Edit the TURBULENCE MODEL Option and the TURBULENT WALL FUNCTIONS Option located at the bottom of the file as shown:
TURBULENCE MODEL: Option = k epsilon END TURBULENT WALL FUNCTIONS: Option = Scalable END TURBULENCE MODEL: Option = SST END TURBULENT WALL FUNCTIONS: Option = Automatic END

7. Save the changes to SST.ccl


If you do not know the correct CCL syntax, you can make changes in the CFX-Pre GUI and then edit the object in the Command Editor to view the syntax.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-9

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Preparing CCL Files

Workshop Supplement

Now change to the k-omega turbulence model for the third simulation:

8. Edit the TURBULENCE MODEL Option as shown:


TURBULENCE MODEL: Option = SST END TURBULENT WALL FUNCTIONS: Option = Automatic END TURBULENCE MODEL: Option = k omega END TURBULENT WALL FUNCTIONS: Option = Automatic END

9. Save the file as komega.ccl


The files provided with this workshop contain a scripts directory which has copies of komega.ccl and SST.ccl. You can use these files if necessary. It is not recommended to copy and paste from Powerpoint because the formatting on some characters does not translate well to Notepad.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-10

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Create a Solver Script

Workshop Supplement

The next step is to create a script that will run all the simulations in the solver. You could write the script in any scripting language that can be executed on your computer. Some options are Perl, a Windows batch script (.bat) or a UNIX shell script (.sh). In this workshop you will write a Perl script. This is a good choice because:

Perl scripts can be run on Windows and UNIX/Linux platforms Perl comes built-in with your CFX installation and is integrated into CCL Perl is used elsewhere in CFX, so learning some basic Perl will allow you to add advanced features to CCL. You will see an example of this when post-processing this workshop.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-11

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Create a Solver Script

Workshop Supplement

1. Open a new text file in Notepad and save it in your working directory as runsolver.pl 2. Enter the following text (the file is also provided in the scripts directory with the workshop)
#! perl -w print Running the k-epsilon simulation\n; system cfx5solve -def ke.def"; print Running the SST simulation\n; system cfx5solve -def ke.def ccl SST.ccl ini ke_001.res name SST"; print Running the k-omega simulation\n; system cfx5solve -def ke.def ccl komega.ccl ini ke_001.res name komega";

3. Save the changes to runsolver.pl


ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002599

WS9-12

WS9: Scripting and Batch Processing

Notes on the Perl Script

Workshop Supplement

The following provides a brief explanation of the syntax used in the Perl script:

The first two lines provide information on how Perl should interpret the script. The details are not necessary here, but you can start all your Perl scripts with these two lines # is the comment character system executes the command in quotes Each statement should finish with the ; character

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-13

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Notes on the Perl Script

Workshop Supplement

The Perl script runs the solver three times using different arguments each time. The first time the k-epsilon simulation is run by providing the Definition file to the solver. The second and third time the following additional arguments are provided:

ccl <file>.ccl: this passes the CCL file to the solver that contains the new turbulence model settings. This CCL is processed after the CCL contained in the Definition file. In CCL, when the same parameter is defined more than once, the last CCL to be processed takes precedence -ini <file>: uses the k-epsilon results to initialize the run -name <name>: this sets the name of the .out and .res files output by the solver.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-14

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Running the Script

Workshop Supplement

1. In the CFX Launcher check that the Working Directory is set to the directory containing the Definition file (ke.def), the CCL files (SST.ccl, komega.ccl) and the Perl script (runsolver.pl) 2. Select Tools > Command Line 3. Type perl runsolver.pl and press Enter
Starting the Command Line from the CFX Launcher is always recommended because: The current directory gets set to the CFX Launcher Working Directory A number of CFX environment variables get set. One benefit of this is you do not need to use the full path to cfx5solve in the script The Perl script will now run the simulations and generate results files. You can track the progress of the runs by opening the Solver Manager, selecting File > Monitor Run in Progress, and selecting the appropriate _001.dir directory.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-15

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Session Files in CFX-Post


Once the runs have finished you can proceed to CFX-Post

Workshop Supplement

1. Start CFD-Post from the CFX Launcher (do not load results yet) 2. Select Session > New Session
Session files record all the actions you perform

3. Set the Name to post.cse


This creates a new session file, but nothing is recorded to the file until you begin recording

4. Select Session > Start Recording 5. Select File > Load Results 6. Load the results file ke_001.res

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-16

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Session Files in CFX-Post 7. Select Session > Stop Recording

Workshop Supplement

The above steps have recorded the CCL used to load a results file into CFX-Post. You will use this later to load the other files, all in batch mode

8. Create a Vector Plot of Velocity on Sym1 9. Examine Temperature on Sym1 with a User Specified Range of 293 [ K ] to 1500 [ K ]
Note the hot pocket of temperature in the recirculation zone

10. Select Session > Start Recording to begin recording commands again 11. Select Insert > Location > Polyline, and accept the default name Polyline 1 12. Choose Boundary Intersection as the Method and in the Boundary List pick HeatedWall 13. For Intersect With select Sym1 and then click Apply
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-17

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Create New Variables

Workshop Supplement

Next you will create new variables for the Skin Friction Coefficient (Cf) and the Stanton Number (St). Both variables will be multiplied by 1000 to give a more sensible scale. You can then create Charts showing these variables along the Polyline you just created. 1. Select Insert > Variable 2. Set the Name to Cf x 1000 3. Enter the definition in the Expression box as: 1000 * Wall Shear X / (0.5 * Density * (massFlowAve(Velocity)@In^2)) then click Apply 4. Select Insert > Variable 5. Set the Name to St x 1000 6. Enter the definition in the Expression box as shown, then click OK: 1000 * Wall Heat Transfer Coefficient / (massFlowAve(Velocity)@In * Density * Specific Heat Capacity at Constant Pressure)
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-18

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Create a Chart
Now create Charts showing these variables along the Polyline 1. Select Insert > Chart, accepting the default name Chart 1 2. Switch to the Data Series tab 3. Set the Name to Cf-ke 4. Set the Location to Polyline 1 5. Toggle Custom Data Selection 6. Set the X Axis Variable to X 7. Set the Y Axis Variable to Cf x 1000 8. Click Apply 9. Click the New button

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-19

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Create a Chart
10. 11. 12. 13. 14. 15. 16. Set the Name to St-ke Set the Location to Polyline 1 Toggle Custom Data Selection Set the X Axis Variable to X Set the Y Axis Variable to St x 1000 Click Apply Select the Export button (next to Apply) 17. Set the Name to ChartKE.csv and click Save 18. Select File > Close, choosing not to save the state 19. Select Session > Stop Recording

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-20

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Saving the Session File


The Session file now contains commands that: Open a results file Create a Polyline and Charts Export data Close the results file

Workshop Supplement

The next step is to edit the Session file to make it useful for running in batch mode. A discussion of all the commands you will enter is provided at the end of the workshop. If you encounter any problems you can look at the post.cse file provided with this workshop in the scripts directory

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-21

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Editing the Session File

Workshop Supplement

1. Open your Session file post.cse in a text editor. Insert/edit the text highlighted in bold font below. This will loop over all three sets of results.
COMMAND FILE: CFX Post Version = 11.0 END !foreach $res ('ke_001.res','SST_001.res','komega_001.res') !{ ! print Processing $res\n; ! @temp = split('_001.res',$res); ! $type = $temp[0]; DATA READER:

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-22

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Editing the Session File


DATA READER: Clear All Objects = false Append Results = false Apply X Offset = false Apply Y Offset = false Apply Z Offset = false Keep Camera Position = true Load Particle Tracks = true END DATA READER: Domains to Load= END > load filename=$res

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-23

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Editing the Session File

Workshop Supplement

2. Continue to make the following changes. You will need to scroll down to find these areas. This will set the Line Name for the Charts based on the results file being processed
CHART SERIES:Series 1 Chart Line Custom Data Selection = On Chart Line Filename = Chart Series Type = Regular Chart X Variable = X Chart Y Variable = Cfx1000 Histogram Y Axis Weighting = None Location = /POLYLINE:Polyline 1 Series Name = Cf-$type CHART LINE:Chart Line 1 Auto Chart Line Colour = On Chart Line Colour = 1.0, 0.0, 0.0 Chart Line Filename = Chart Line Style = Automatic Chart Line Type = Regular Chart Symbol Colour = 0.0, 1.0, 0.0 Chart Symbol Style = None Chart X Variable = X Chart Y Variable = CF x 1000 Line Name = Cf-$type

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-24

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Editing the Session File

Workshop Supplement

CHART SERIES:Series 2 Chart Line Custom Data Selection = On Chart Line Filename = Chart Series Type = Regular Chart X Variable = X Chart Y Variable = Stx1000 Histogram Y Axis Weighting = None Location = /POLYLINE:Polyline 1 Series Name = St-$type

CHART LINE:Chart Line 2 Auto Chart Line Colour = On Chart Line Colour = 1.0, 0.0, 0.0 Chart Line Style = Automatic Chart Line Visibility = On Chart Symbol Colour = 0.0, 1.0, 0.0 Chart Symbol Style = None Fill Area = On Fill Area Options = Automatic Is Valid = True Line Name = St-$type

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-25

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Editing the Session File

Workshop Supplement

Next you will add commands to evaluate some additional quantities of interest and print them out. This part was not done during the interactive CFX-Post session. The additional quantities of interest are: The highest Temperature in the domain The average Skin Friction Coefficient on the Polyline The average Stanton Number on the Polyline

3. Insert the text after the END statement for the Chart, near the bottom of the file, before the start of the EXPORT object:
END ! $maxtemp = maxVal(Temperature","Default Domain"); ! $aveCf = lengthAve("Cf x 1000","Polyline 1"); ! $aveSt = lengthAve("St x 1000","Polyline 1"); ! printf("For $type model, Highest Temp in domain is %.0f, average Cf is %.2f, average St is %.2f\n",$maxtemp,$aveCf,$aveSt); EXPORT:
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-26

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Editing the Session File

Workshop Supplement

4. Lastly make the following changes to set a filename for each exported csv file and close the foreach loop that was started at the beginning:
! $exfile = "chart".$type.".csv"; EXPORT: Export File = $exfile Export Chart Name = Chart 1 Overwrite = On END >export chart > close !}

5. Save the file in your text editor


ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-27

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Running the Session File


You are now ready to run the modified Session file

Workshop Supplement

1. At the Command Line that was opened from the CFX Launcher type cfx5post batch post.cse and press Enter
The output will print out which results file is being processed, and the evaluated quantities for maximum Temperature, average Skin Friction Coefficient and average Stanton Number. Three csv files containing the exported Chart data will also be written to the current directory.

2. The csv data files can be imported into Microsoft Excel through Data > Import External Data > Import Data. Set the data to be comma de-limited 3. You can create a chart with the data sets. See Excel help for details.
A sample Excel file is provided with this workshop
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-28

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Comparing Data
Comparison of Skin Friction Coefficients with experiment
3.0 2.5 2.0 1.5

Workshop Supplement

Cf (x1000)

1.0 0.5 0.0 -0.5 -1.0 -1.5 -2.0 0 0.2 0.4 0.6 0.8 1 1.2

ke SST k-omega Experiment

X [m]

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-29

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Comparing Data

Workshop Supplement

Comparison of Stanton Number vs experiment


4 3.5 3
St (x 1000)

2.5 2 1.5 1 0.5 0 0 0.2 0.4 0.6


X [m]

ke SST k-omega Experiment

0.8

1.2

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-30

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Data Discussion

Workshop Supplement

The results show reasonable agreement with the Skin Friction and Stanton Number data. Note that the SST and k-omega model give a more accurate downstream reattachment location (where the Skin Friction Coefficient is zero). It has been found that a finer mesh will produce results closer to the experimental data. You can download the validation paper that was used as the basis for this workshop from the ANSYS Customer Portal.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-31

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Discussion of Commands

Workshop Supplement

A number of Perl commands and CFX Power Syntax commands were added to the Session file. These command are outlined here. For a more complete understanding refer to a Perl manual and ANSYS CFX-Post Users Guide > Power Syntax in ANSYS CFX in the CFX Help Documentation. foreach $res(...)
This evaluates each object inside the brackets, assigns the current value inside the bracket to $res, and then processes all the commands inside the curly brackets {..}. Hence, $res changes for each loop

@temp = split(....);
This creates an array called temp by splitting the filename into parts, separated by the pattern _001.res.

$type = $temp[0];
We now use the first element in the temp array as our type name. We have now extracted the first part of the results file name (e.g. ke, SST or komega)
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-32

April 28, 2009 Inventory #002599

WS9: Scripting and Batch Processing

Discussion of Commands

Workshop Supplement

>load filename = $res This is a CCL action that gets the value of $res and loads it. Line Name = Cf-$type We change the line name so it is appended with either ke, SST, or komega, depending on which loop we are currently in ! $maxtemp = maxVal("Temperature","Default Domain"); This is a power syntax function that obtains the max value of a variable at a location (in this case over the entire domain) and stores the value in a variable (in this case $maxtemp). There are many more of these functions available. See the Power Syntax documentation for details.

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS9-33

April 28, 2009 Inventory #002599

Workshop 10 Turbo Pre and Post

Introduction to CFX

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-1

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Introduction
A simple workshop follows to demonstrate how to use the Turbomachinery mode in CFX-Pre and CFD-Post. This workshop models an Axial fan. The model consists of a single rotating domain for the fan blade with stationary domains upstream and downstream of the blade. The full axial fan contains ten blades. Due to rotational periodicity a single blade passage will be modeled. Frozen Rotor interfaces are used to connect the rotating and stationary domains.

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-2

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Turbo-Pre
1. Open Workbench (Start > Programs > ANSYS 12.0 > ANSYS Workbench) 2. Drag CFX into the project schematic 3. Start CFX-Pre by double clicking Setup 4. Select Tools > Turbo Mode

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-3

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Basic Settings

Workshop Supplement

The Turbo mode uses a setup wizard to walk you through CFXPre. The first step is the Basic Settings panel:

1. Set the Machine Type to Fan 2. Select Z as the Rotation Axis


Notice that the rotational axis is displayed in the Viewer

3. Click Next >

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-4

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Component Definition

Workshop Supplement

The Component Definition panel is used to import meshes, select the rotation speed for each component and set the tip clearance (if any). Start by defining the first stationary component:

1. Right-click in the Component Definition white space, and select Add Component 2. Select the Type as Stationary and set the Name to S1 3. Select the Mesh File as fan.gtm 4. Expand the Available Volumes frame and select the Volumes as INBlock Main 5. Expand the Region Information frame and compare with the picture on the next page and make the necessary changes

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-5

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Component Definition
The Region Information is used by CFX-Pre to identify mesh regions of interest. CFX-Pre will try to automatically identify these regions, but manual input may be required depending on how the regions are named in the mesh file. CFX-Pre will automatically create boundary conditions and domain interfaces using these regions, so checking the Region Information at this stage will save time later.

Workshop Supplement

The mesh file contains all three components, but only one of those components is to be included in S1 Default values can be used for all other options
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-6

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Component Definition Now define the rotating component:

Workshop Supplement

1. Right-click in the Component Definition white space, and select New Component 2. Select Rotating and set the Name as R1 3. Set the Rotating Value to 3000 [rev min^-1]
The rotation direction is shown in the Viewer

4. Do not select a mesh file. The mesh has already been imported in the previous step. Under Available Volumes select Passage 5. Expand the Wall Configuration frame. Set Tip Clearance at Shroud to YES and Tip Clearance at Hub to NO
This sets boundary conditions for a fan with a rotating hub and a counter-rotating shroud surface
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-7

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Component Definition

Workshop Supplement

6. Expand the Region Information frame and compare with the picture below and make the necessary changes

This sets boundary conditions for a fan with a rotating hub and a counter-rotating shroud surface
WS10-8
April 28, 2009 Inventory #002599

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10: Turbo Pre and Post

Component Definition
Now define the second stationary component: 1. Create a new stationary component named S2 2. Under Available Volumes select OUTBlock Main 3. Expand the Passages and Alignment frame

Workshop Supplement

The number of Passages in 360 and the number of Passages To Model is determined automatically You can change the automatic values or apply a Theta Offset by clicking the Edit button, but this is not necessary for this case

4. Expand the Region Information frame and compare with the picture next page and make the necessary changes

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-9

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Component Definition

Workshop Supplement

5. Click Next > to proceed

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-10

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Physics Definition

Workshop Supplement

All Physics settings, including Fluid Type, Simulation Type, Inlet and Outlet boundary conditions, Interface types, and Solver Parameters are set in one panel. 1. The default Fluid, Simulation Type and Model Data are appropriate for this simulation 2. Select Boundary Template as P-Total Inlet Mass Flow Outlet
The Boundary Template provides quick setup of the most common turbomachinery boundary combinations

3. Set P-Total to 0 [atm] 4. Set Mass Flow to Per Component and then enter a Mass Flow Rate of 0.04 [kg s^-1] 5. Set Flow Direction to Cylindrical Components with direction set to 1,0,0

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-11

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Physics Definition

Workshop Supplement

6. Change the Interface Default Type to Frozen Rotor 7. Expand the Solver Parameters frame 8. Set the Convergence Control to Physical Timescale with a value of 0.02 [s] (select the expression icon to allow this to be entered)
This sets the timescale to roughly 6/, where is the machine rotational speed in [rad/s]. Typically, the timescale for rotating machinery is specified somewhere between 0.1/ and 10/.

9. Click Next > to proceed

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-12

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Interface Definition
Interfaces are automatically created using the Region Information from the Component Definition panel. 1. Select each interface to verify it has been created correctly
There are two Frozen Rotor interfaces, three Periodic interfaces and an interface near the blade tip to connect dissimilar meshes together The interfaces have been correctly created

Workshop Supplement

2. Click Next > to continue

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-13

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Boundary Definition
Boundary conditions are also automatically created using the Region Information from the Component Definition panel and information from the Physics Definition panel. 1. Select each boundary condition to verify the settings are appropriate 2. Select Next > to continue

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-14

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Final Operations
The Final Operations panel allows you to Enter General Mode. Enter General Mode is useful if you want to use other CFX-Pre features (profile boundaries, CEL etc) but still complete most of the set up using the Turbomachinery mode. 1. Click Finish

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-15

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Solver and CFD-Post


1. Switch to the Projects window 2. Select File > Save 3. Enter the File name as turbo_demo.wbpj and click Save 4. Now double-click on Solution in the Project Schematic to start the Solver Manager 5. When the Solver Manager opens, click Start Run

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-16

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Turbo-Post

Workshop Supplement

In CFD-Post the following features will be demonstrated: Auto Initialize of Turbo Components Modifying Turbo regions Displaying Hubs and Blades using the 3D view Create vector and contour plots using the Blade to Blade View Create vector and contour plots using the Meridional View Use of Turbo Charts and Macros Table creation and viewing using the Table Viewer

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-17

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Turbo-Post GUI

Workshop Supplement

1. Switch to the Projects window 2. View the results in CFD-Post by double clicking Results in the Project Schematic 3. In CFD-Post, click on the Turbo tab 4. Click Initialise All Components
For each component CFD-Post detects which regions correspond to the Hub, Shroud, Blade, Inlet, Outlet and Periodic regions. CFDPost uses this information to make turbo plots and charts. You can manually assign these regions, or check the auto-assigned regions by editing each of the component object from the Turbo tree (Component 1 (S1), Component 2 (R1) and Component 3 (S2)) You can toggle between a Single View and Three Views. The three views shown are a 3D view, a Blade to Blade View and a Meridional View

5. Select the Three Views toggle

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-18

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

3D View
6. Edit the 3D View object from the Turbo tree
The Details of 3D View are shown

Workshop Supplement

7. Select All Domains 8. Under Parts to Draw, select Hub and Blade 9. Toggle Show Faces on 10.Under Instancing, set Domain to R1, set # of Copies to 3 and then click Apply 11.Now set Domain to S1, set # of Copies to 3 and click Apply 12.Finally set Domain to S2, set # of Copies to 3 and click Apply
The 3D View now shows 3 copies of the Hub and Blade in each of the 3 components

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-19

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Blade-to-Blade View
Now create a Blade to Blade Vector Plot: 1. Edit the Blade-to-Blade object from the Turbo tree 2. Change Plot Type to Vector

Workshop Supplement

3. Set Sampling to Equally Spaced and # of Points to 400 4. Click Apply


A Vector Plot is shown in the Blade-to-Blade View

5. Change Sampling from Equally Spaced to Vertex and click Apply


The Vector Plot now shows vectors starting from each mesh node
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-20

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Blade-to-Blade View

Workshop Supplement

6. In Details of Blade-to-Blade Plot, change the Plot Type to Contour and select the Variable as Total Pressure in Stn Frame, then click Apply 7. Create a Stream plot of Velocity in the same way
Change the number of points to 100

8. Double-click on 3D View in the Turbo tree 9. Enable the Show Blade-to-Blade plot toggle and click Apply to show the blade-to-blade Stream plot in the 3D View

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-21

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Meridional View

Workshop Supplement

1. Edit the Meridional object from the Turbo tree 2. Generate a Contour plot of Pressure using a Local Range
A Contour plot is shown in the Meridional View

3. Now enable the Show Sample Mesh toggle (near the bottom of Details of Meridional Plot )
A mesh is now shown on the Contour plot This illustrates the resolution used in creating the meridional data

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-22

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Turbo-Post

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-23

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Turbo Charts & Macros


Turbo Charts and Macros are also available: 1. Double-click on the Inlet to Outlet object under Turbo Charts in the Turbo tree 2. Increase the number of Samples/Comp. to 20 3. Examine some of the other Turbo Charts

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-24

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Tables

Workshop Supplement

The Table Viewer allows you to create a table that can be exported in .html, .csv, or .txt formats. You can also save a state file for a table for later use. Next you will create a table and export it to an html file.

1. Select the Table Viewer tab from the bottom of the Viewer window 2. Select the New Table icon from the Table Viewer toolbar and accept the default name 3. In cell A1 type: Mass Averaged Inlet Total Pressure 4. In cell B1, type the equation: =massFlowAve(Total Pressure)@S1 Inlet
Alternatively you can use the Table Viewer toolbar to select Insert: Function > CFD-Post > massFlowAve, then Insert: Variable > Total Pressure, etc to build the expression
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-25

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Tables
5. In cell A2 type: Mass Averaged Outlet Total Pressure 6. In cell B2, enter the equation: =massFlowAve(Total Pressure )@S2 Outlet

Workshop Supplement

7. In cell A3 type: Omega 8. In cell B3, select Insert: Expression > omega or type: =omega
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002599

WS10-26

WS10: Turbo Pre and Post

Tables

Workshop Supplement

9. In cell A4 type: Filename 10. In cell B4, select Insert: Annotation > File Name > Name 11. Click the Save Table icon from the Table Viewer toolbar 12. Save the file as axial_table.html 13. Open this file in a web browser

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-27

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Turbo Reports

Workshop Supplement

CFX Post includes automatic report generation based on templates. A number of Turbo-specific templates are available:

1. From the main menu select File > Report > Report Templates 2. Select Fan Report and click Load 3. Once the report has been generated, click on the Report Viewer tab

4. Browse through the report to see what has been included


ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-28

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Turbo Report

Workshop Supplement

You can add you own Figures, Tables, Charts and Comments to the report. Next you will add a figure to the end of the report showing a Vector plot at 50% span in the blade passage.

1. Click the Comment icon from the main toolbar 2. Enter User Plots the for Name 3. Type the following in to the Comment Viewer :

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-29

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Turbo Report
4. Switch to the Report Viewer, and Refresh the report
The Refresh button is in the Report Viewer toolbar The new comment will appear at the end of the report

Workshop Supplement

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-30

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Turbo Report
Now create a Velocity plot at 50% span:

Workshop Supplement

1. 2. 3. 4. 5.

Switch to Turbo tab Double-click Blade-to-Blade from the Turbo tree Set Span to 0.5 Set Plot Type to Vector and Variable to Velocity Click Apply

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-31

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Turbo Report
Now add this plot to you report:

Workshop Supplement

1. Click the Figure icon from the main toolbar 2. Set the Name to Vector Midspan and click OK 3. Scroll to the bottom of the Outline tree
The Figure appears at the end of the Report

4. Switch to the Report Viewer tab and Refresh the report to see the changes

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-32

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

Turbo Plot
Once the report is complete you can publish it to an html file

Workshop Supplement

1. Click the Publish icon from the Report Viewer toolbar 2. Click OK to write the HTML file
The file and figures can be distributed as necessary

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-33

April 28, 2009 Inventory #002599

WS10: Turbo Pre and Post

CFD-Post
You may want to try the following on your own, time permitting

Workshop Supplement

1. Create various figures, tables, comments and charts that you might typically want to see in your analysis 2. Try enabling the Generate CFX-Viewer Files toggle when publishing your report
Image in the report can then be rotated, zoomed and panned. The CFX Viewer must be installed on the machine viewing the report; this is freely available from the Customer Portal and does not require a license (so your customers can view your figures in 3D)

ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

WS10-34

April 28, 2009 Inventory #002599