ansys cfx intro 12.0 1st-edition - workshops

312
TOC-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002599 Table of Contents Introduction to CFX

Upload: kdennisnguyen

Post on 29-Dec-2015

130 views

Category:

Documents


14 download

TRANSCRIPT

Page 1: Ansys Cfx Intro 12.0 1st-Edition - Workshops

TOC-1ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Table of Contents

Introduction to CFX

Page 2: Ansys Cfx Intro 12.0 1st-Edition - Workshops

TOC-2ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #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.

Page 3: Ansys Cfx Intro 12.0 1st-Edition - Workshops

TOC-3ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTable of Contents

1. Mixing T-Junction WS1-1

2. Transonic Flow Over a NACA 0012 Airfoil WS2-1

3. Room Temperature Study WS3-1

4. Flow Through Porous Media WS4-1

5. Cavitating Centrifugal Pump WS5-1

6. Electronics Cooling with Natural Convection and Radiation WS6-1

7. Tank Flushing WS7-1

8. Transient Brake Rotor WS8-1

9. Scripting and Batch Processing WS9-1

10. Turbo Pre and Post WS10-1

Page 4: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1-1ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop 1

Mixing T-Junction

Introduction to CFX

Page 5: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-2ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementWelcome!•

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: It’s a good idea to identify the quantities of interest from the start. You can use these to monitor the progress of the solution

Page 6: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-3ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPre-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 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•

Launch the CFX Solver Manager from Workbench

Monitor convergence

Page 7: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-4ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementStart in WorkbenchThe 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

Page 8: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-5ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

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

Start a CFX case

Page 9: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-6ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-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

Page 10: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-7ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-Pre Mesh and Regions

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

The Mesh is represented in Wireframe format in the Viewer

Page 11: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-8ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-Pre – Domain settings

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

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.

Page 12: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-9ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-Pre – Domain settings (continued)4.

Double-click on the renamed domain junction

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.

The Domain panel contains three tabs named Basic Settings, Fluid Models and Initialisation. For more complex simulations additional tabs may appear.

Page 13: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-10ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-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 flows8.

Leave all other settings as they are– The k-Epsilon turbulence model will be

used, which is the default9.

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

Page 14: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-11ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementBoundary Conditions

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.

Page 15: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-12ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-Pre – Inlet boundary conditionsNow that the domain exists, boundary conditions can be added

1.

Right-click on the junction domain2.

Select Insert > Boundary

3.

Set the Name to inlety4.

Click OK

Page 16: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-13ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-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

Page 17: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-14ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-Pre – Inlet boundary conditions (contd.)This inlet will have a normal speed of 5 m/s and temperature of 10°C.

7.

Click the Boundary Details tab8.

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

Page 18: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-15ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-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

Page 19: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-16ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-Pre – Inlet boundary conditions (contd.)This inlet will have an inlet speed of 3 m/s and temperature of 90°C.

5.

Click the Boundary Details tab6.

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

Page 20: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-17ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-Pre – Outlet boundary conditions

1.

Insert a boundary named outlet2.

Set the Boundary Type to Outlet

3.

Set Location to outlet4.

Click the Boundary Details tab

5.

Set Relative Pressure to 0 [Pa]•

This is relative to the domain Reference Pressure, which is 1 [atm]

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

Page 21: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-18ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-Pre – Wall boundary conditionsThe 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

Page 22: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-19ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop Supplement

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

CCL at a Glance

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.

Page 23: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-20ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementInitialisation

– 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

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:

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

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

Page 24: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-21ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSolver Control

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

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.

Page 25: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-22ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-Pre – Monitor points

1.

Double-click Output Control from the Outline tree

2.

On the Output Control form, select the Monitor tab

3.

Check the Monitor Options box4.

Click the New icon

5.

Set the Name to p inlety and click OK

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.

Page 26: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-23ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-Pre – Monitor points (continued)An expression will be used to define the monitor point.

7.

Set Option to Expression8.

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.

Page 27: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-24ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-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

Page 28: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-25ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX-Pre – Monitor points (continued)An expression will be used to define the monitor point:

12.

Set Option to Expression13.

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.

Page 29: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-26ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSolution 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 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.•

Launch the CFX Solver Manager from Workbench.

Monitor convergence.

Page 30: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-27ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementObtaining a solution1.

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

2.

Save the Workbench project3.

In Workbench, double-click Solution to launch the CFX Solver Manager

Page 31: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-28ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementObtaining a solution (continued)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

Page 32: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-29ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost-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 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.

Launch the CFX solver manager from Workbench.

Monitor convergence.

Page 33: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-30ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementLaunching CFD-Post1.

Exit the CFX Solver Manager

2.

Save the project3.

Double click Results to launch CFD-Post

Page 34: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-31ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post Overview

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

When CFD-Post opens, you will see that the layout is similar to CFX-Pre

There are two windows on the left side:

Page 35: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-32ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Manipulating the view

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

Page 36: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-33ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Temperature contour plotIn 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

Page 37: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-34ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Temperature contour plot (contd.)4.

Set the Variable to Temperature−

The drop-down menu provides a list of common variables. Use the “…”

icon

to access a full list5.

Leave the other settings unchanged

6.

Click Apply to generate the plot

Page 38: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-35ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post - Temperature contour plot (contd.)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

Page 39: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-36ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post

– Location: Points, Lines, Planes, Surfaces, Volumes

– Vector Plots– Contour Plots– Streamline Plots– Particle Track (if enabled in CFX-Pre)

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:

For turbo machinery cases there are additional objects available that will be discussed later.

Page 40: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-37ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Creating a plane at x = 01.

First, hide the previously created contour plot, by un-

checking the associated box in the tree view

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

Page 41: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-38ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Creating a plane at x = 0 (contd.)

4.

Set Method to YZ Plane5.

Leave X set to 0 [m]

6.

Click Apply to generate the plane

Page 42: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-39ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Creating a velocity vector plotWhile 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

Page 43: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-40ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Velocity vector plot (continued)

4.

Set Locations to Plane 15.

Leave the Variable field set to Velocity

6.

Click Apply

Page 44: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-41ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Aligning the viewGiven 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

Page 45: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-42ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Creating velocity streamlines1.

Hide the previously created vector plot, by un-

checking the associated box in the tree view

2.

Click the Streamline icon from the toolbar

3.

Click OK, accepting the default name of Streamline 1

Page 46: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-43ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Velocity streamlines (continued)

4.

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.

5.

Leave the Variable field set to Velocity

Page 47: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-44ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Velocity streamlines (continued)6.

Click the Symbol tab

7.

Change the Stream Type to Ribbon8.

Click Apply

9.

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

Page 48: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-45ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Creating a velocity isosurface1.

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

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

Page 49: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-46ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Velocity isosurface (continued)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.

Page 50: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS1: Mixing T-Junction

WS1-47ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post – Velocity isosurface (continued)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 tab8.Set the Mode to Temperature9.Set the Range to Local10.Click Apply

Page 51: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2-1ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop 2

Transonic Flow Over a NACA 0012 Airfoil.

Introduction to CFX

Page 52: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-2ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementGoalsThe 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.

Page 53: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-3ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementStart a Workbench project1. Launch Workbench2. Save the new project as naca0012

in your

working directory3. 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.

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.

Page 54: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-4ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMesh Modification1. 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.

2. Right-click on Mesh

in the Outline tree and select Transform Mesh

3. Change the Transformation

to Scale4. Leave the method to Uniform

and enter a Uniform

Scale

of 0.0015. Click OK6. Select the Fit View icon from

the Viewer toolbar– Zoom in further to see the airfoil

Page 55: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-5ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMesh 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

button3. 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°5. Click in the Move Faces To

field and type Inlet

6. Click OK

Inlet

Outlet

Page 56: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-6ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMesh 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

3. Right-click on pressure far field 1

and select Rename. Change the name to Outlet

Page 57: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-7ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDomain SetupUsually 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 Fluid3. Double-click on Fluid

to edit the domain settings

Page 58: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-8ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDomain SetupThis 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.

][56867288287688.0

]/[688.0112.238

82.19ReRe

]/[12.23817.3407.0]/[17.3402882874.1

356

PaRTP

mkgeeul

ulsmcMu

smRTc

=××==

×==⇒=

=×=×=

=××==

ρ

μρμρ

γ c

=Speed of soundR=Gas Constantγ

=Ratio of specific heatsT=Temperatureu= Free-stream velocityM=Mach numberRe=Reynolds numberμ= Dynamic viscosity ρ= Density

Page 59: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-9ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDomain SetupIn the Fluid

domain Basic Settings

tab:

1. Set the Material to Air Ideal Gas2. Set the Reference Pressure

to 56867 [Pa]

– Make sure you change set the units3. Move to the Fluid Models

tab

4. Set the Heat Transfer

Option

to Total Energy– This is required for compressible simulations

5. Enable Incl. Viscous Work Term– This includes viscous heating effects

6. Set the Turbulence

Option

to Shear Stress Transport

7. Click OK

Page 60: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-10ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementBoundary ConditionsAn 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 Outlet3. 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 left2. Insert a Symmetry

boundary called Sym Right, at the location sym right

Page 61: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-11ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementBoundary Conditions 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

Page 62: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-12ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementBoundary Conditions1. Right-click on Fluid

and insert a boundary

called Inlet2. 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

tab4. Change the Mass and Momentum

option to

Cart. Vel. Components5. 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 entered6. Set Static Temperature

= 288 [K]

7. Click OK

Page 63: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-13ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementBoundary ConditionsThe 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 boundary2.Click Close3.Rename Fluid Default

to Airfoil

Page 64: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-14ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMonitorsFor 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 free- stream 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()@AirfoilFx=force_x()@AirfoilLift =cos(AOA)*Fy-sin(AOA)*FxDrag =cos(AOA)*Fx +sin(AOA)*FyDenom=0.5*massFlowAve(Density)@Inlet*Uinf^2*1[m]*0.1[m]cL=Lift/DenomcD=Drag/Denom

Page 65: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-15ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMonitors1. Edit Output Control

from the Outline tree and go to the Monitor

tab

2. Check the Monitor Options

box3. Click on the Add New

Item icon and name it CL

4. 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”.

5. Add a new item called CD

and set it to the expression cD– This is the Coefficient of Drag

6. Click OK

Page 66: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-16ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSolver ControlOpen the Solver Control

section from the

Outline tree1. 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

3. Set the Residual Target

to 1e-6– This is a tighter convergence criteria and is

discussed further below4. Click OK5. 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

Page 67: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-17ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRunning the Simulation1. 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

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.

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.

Page 68: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-18ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMonitor ValuesBefore 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.

* AIAA-87-0416 Numerical Simulation of Viscous Transonic Airfoil Flows 1987. Thomas J Coakley, NASA AMES Research Centre.

Page 69: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-19ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost-processing1. 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

Page 70: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-20ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost-processingWhen 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.

Page 71: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-21ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost-processingTo 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 Apply5. Turn of the Visibility of Sym Left so that the

previous velocity plot is hidden6. Try plotting other variables such as Pressure

or Density, use the Local or Global Range when limits are not known

Page 72: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-22ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost-processingTo 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. Create a Polyline using Location > Polyline from the toolbar2. Change the Method

to Boundary Intersection

3. Set Boundary List to Airfoil4. Set Intersect With

to Sym Left

and then click Apply

5. 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.

Page 73: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-23ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost-processing5. 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)

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.

Page 74: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-24ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost-processing

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 14.Move to the X Axis

tab and change the variable to X

5.Move to the Y Axis

tab and change the variable to CP6.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.

Page 75: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-25ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost-processing7. Return to the Data Series

tab and change the

name to CFX8. Insert a new series and give it the name

Experiment9. Change the Data Source

to File

and select the

file CP.csv10. 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

Page 76: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-26ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSummaryThe workshop has covered:

• 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

Page 77: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS2: Flow over an Airfoil

WS2-27ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementScope for further work.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.

Page 78: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3-1ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop 3

Room Temperature Study

Introduction to CFX

Page 79: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-2ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementIntroduction

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.

Page 80: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-3ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDuct 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)

Inlet

vent1

vent2

Page 81: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-4ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementStarting CFX in Workbench

1. Open Workbench2. Drag CFX into the Project Schematic from the Component Systems

toolbox3. Change the name of the system to duct4. Save the project as RoomStudy.wbpj in an appropriate directory5. Double-click Setup

Page 82: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-5ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementImport Mesh

1. Right-click on Mesh in the Outline tree and select Import Mesh > ICEM CFD

2. Select the file duct_mesh.cfx53. Make sure Mesh Units are in m and click Open to import the mesh

The first step is to import the mesh that has already been created:

Page 83: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-6ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Domain

1. Double-click on Default Domain in the Outline tree to edit the domain2. On the Basic Settings tab, set the Fluid 1 Material setting to Air Ideal

Gas3. Switch to the Fluid Models tab4. 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 Transport7. Click OK to commit the changes to the domain

You can now create the computational domain:

Page 84: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-7ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Boundary Conditions

1. INLET Boundary Condition– Name: INLET– Boundary Type: Inlet– Location: INLET– Mass and Momentum Option:

Total Pressure (stable)– Relative Pressure: 0 [Pa]

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]

Now create the following boundary conditions:

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]

Page 85: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-8ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSolver Control

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

3. Click OK to commit the settings

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).

Page 86: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-9ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMonitor Point

1. Double click on Output Control from the Outline tree2. Switch to the Monitor tab and enable the Monitor Options toggle3. Under Monitor Points and Expressions, click the New icon4. Keep the default name Monitor Point 15. Set the Option to Expression

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 steady- state velocity.

Page 87: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-10ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMonitor Point

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

7. Click OK to create the Monitor Point

Page 88: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-11ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementWrite Solver File

1. Close CFX-Pre to return to Project window2. Save the project3. Right-click on Solution and select Edit4. Choose Start Run

You can now save the project and proceed to write a definition file for the solver:

Page 89: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-12ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop Supplement

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

3. When the run finished close the Solver Manager4. View the results in CFD-Post by double-clicking Results in the Project

window

CFX Solver Manager

Monitor point

Residual plot

Page 90: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-13ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post

1. Select File > Export2. Change the file name to vent1.csv3. Use the browse icon to set an appropriate

directory4. Set Type as BC Profile and Locations as

VENT15. Leave Profile Type as Inlet Velocity and

click Save6. Similarly export a BC profile of VENT2 to

the file named vent2.csv7. Quit CFD-Post and return to the Project

Schematic

Now we will export a Boundary Condition profile from the outlet regions for use in the next simulation.

Page 91: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-14ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementOperating Conditions

• 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]

The operating conditions for the flow in the room are:

outlet

vent1

vent2

Page 92: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-15ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementStarting Room Simulation in Workbench

1. Drag CFX into the Project Schematic from the Component Systems toolbox

2. Change the name of the system to room3. Double-click Setup in the room system

Page 93: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-16ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementImport Mesh

1. Right-click on Mesh in the Outline tree and select Import Mesh > ICEM CFD

2. Select the file room.cfx53. Make sure the Mesh Units are in m and click Open to import the mesh

The first step is to import the mesh that has already been created:

Page 94: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-17ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Domain

1. Edit Default Domain from the Outline tree2. On the Basic Settings tab, set the Fluid 1 Material setting to Air Ideal

Gas3. 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 ]

You can now create the computational domain:

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.

Page 95: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-18ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Domain4. Switch to the Fluid Models tab5. Change the Heat Transfer Option to Thermal Energy6. Change the Turbulence Model Option to Shear Stress Transport7. Switch to the Initialisation tab8. Check the Domain Initialisation box 9. Set the Temperature Option to Automatic with Value. Set the

Temperature to 21 [C]

10. Click OK to commit the changes to the domain

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.

Page 96: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-19ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementProfile 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.

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

Page 97: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-20ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate 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

– On the Boundary Details tab check that the expressions make sense

– Heat Transfer Option: Static Temperature

– Static Temperature: 21 [C]

Now create the following boundary conditions:

Page 98: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-21ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop Supplement

2. vent2 Boundary Condition– 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]

Create Boundary Conditions

Page 99: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-22ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop Supplement

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]

5. monitors Boundary Condition– Name: monitors– Boundary Type: Wall– Location: monitors– Heat Transfer Option: Temperature– Fixed Temperature: 30 [C]

Create Boundary Conditions

Page 100: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-23ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop Supplement

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]

Create Boundary Conditions

Page 101: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-24ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop Supplement

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

• 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.

Create Boundary Conditions

Page 102: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-25ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSolver Control

1. Edit Solver Control from the Outline tree– 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

Page 103: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-26ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMonitor Point

1. Edit Output Control from the Outline tree2. Switch to the Monitor tab and enable the Monitor Options toggle3. Under Monitor Points and Expressions, click the New icon4. Enter the Name as temp5. Set the Option to Expression

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.

Page 104: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-27ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMonitor Point

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

7. Click OK to create the Monitor Point

Page 105: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-28ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementWrite Solver File

1. Close CFX-Pre to return to the Project window and save the project

2. Select File > Import from the main menu in Workbench3. Set the file filter to CFX-Solver Results File4. Select the results file provided with this workshop, room_001.res5. Change the name of the system to room results …

You can now save the project and proceed to write a definition file for the Solver:

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 you’ll need to add the results to the project.

Page 106: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-29ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementProject Schematic

Page 107: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-30ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX Solver Manager

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.

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

Page 108: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-31ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementResidual and Monitor plot

Residual plot Monitor points

Page 109: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-32ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFX Solver Manager

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 H-

Energy equations• It took 653 iterations to satisfy the Conservation Target of 1% for the H-

Energy 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

Page 110: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-33ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post

1. Select Location > Plane from the toolbar

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)

Start by creating a ZX Plane at Y = 1.2 [m]

Page 111: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-34ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post

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

Using the same procedure, create several other planes displaying the temperature profile:

Page 112: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-35ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post

1. Click Insert > Vector from the main menu

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

Plot vector plots on the planes that you created:

Page 113: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS3: Room Temperature Study

WS3-36ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementFurther Steps (Optional)

1. Observe the density variation at various planes

2. Create a streamline from each of the vents• 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

Time permitting, you may want to try the following:

Page 114: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS4-1ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop 4

Flow Through Porous Media

Introduction to CFX

Page 115: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-2April 28, 2009

Inventory #002599

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.

Ceramic Monolith Substrate

Page 116: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-3April 28, 2009

Inventory #002599

Starting CFX-Pre1. 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

Page 117: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-4April 28, 2009

Inventory #002599

Material Import1. Right-click Materials and select

Import Library Data

2. Select N2 Ideal Gas by expanding the Calorically Perfect Ideal Gases branch

3. Click OK

Page 118: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-5April 28, 2009

Inventory #002599

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

Page 119: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-6April 28, 2009

Inventory #002599

Setting Up Boundary conditions1. Insert a boundary condition named

Inlet2. Set Boundary Type to Inlet3. Set Location to INLET4. Switch to the Boundary Details tab5. Set Mass and Momentum to a Normal

Speed of 10 [m s^-1]6. Click OK7. Insert a Boundary Condition named

Outlet8. Set Boundary Type to Outlet9. Set Location to OUTLET10. Switch to the Boundary Details tab11. Enter a Relative Pressure of 0 [Pa]12. Click OK

Page 120: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-7April 28, 2009

Inventory #002599

Setting Up Porous Domain1. Right-click on Flow Analysis 1 and insert

a Domain named Substrate2. Set the Location to SUBSTRATE3. Set the Domain Type to Porous Domain4. Switch to the Porosity Settings tab5. Set Volume Porosity to 0.56. Set the Loss Model option to Directional

Loss7. For the Streamwise Direction, enter

components of 0,0,18. Set Streamwise Loss to Linear and

Quadratic Resistance Coefficients9. 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

Page 121: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-8April 28, 2009

Inventory #002599

Domain Interface

CFX automatically creates a Fluid-Porous interface between the Default Domain and Substrate.

You can double-click Default Fluid- Porous 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.

Page 122: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-9April 28, 2009

Inventory #002599

Output Control

1. Edit Output Control from the Outline tree2. Switch to the Monitor tab and turn on

Monitor Options3. Click to create a new monitor object,

and call it Mass Flow at Outlet 4. Set the Option to Expression5. Set the Expression Value to

massFlow()@Outlet6. Insert a new object in the same way

called Pressure Drop, using the Expression:

7. Click OK

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

Right-click

Page 123: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-10April 28, 2009

Inventory #002599

Starting Solver1. Close CFX-Pre and save the project2. Double-click Solution to start the Solver Manager3. When the Solver Manager opens click Start Run

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

Page 124: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-11April 28, 2009

Inventory #002599

Post-processing1. When the solver finishes, close the

Solver Manager2. Double-click on Results in the Project

page to start CFD-Post3. Once CFD-Post is open, select

Location > Plane from the toolbar4. Set Method to ZX Plane 5. Set Y to 0 [m]6. Click Apply7. Turn off Visibility for Plane 1 by

disabling the check-box next to its entry in the Outline tree

8. Select Insert > Vector9. Select Locations to Plane 110. Click Apply

Page 125: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-12April 28, 2009

Inventory #002599

Post-processing1. Hide the Vector plot created in the last step2. Select Insert > Contour3. Set Locations to Plane 14. Set Variable to Pressure5. Click Apply

Page 126: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-13April 28, 2009

Inventory #002599

Post-processing1. Select Location > Line from the

toolbar2. Set Point 1 to 0,0,-0.073. Set Point 2 to 0,0,0.074. Click Apply5. Select Insert > Chart6. On the General tab enter Pressure in

Porous Domain as the Title7. On the Data Series tab, click to

create Series 18. Set Location to Line 19. On the X Axis tab, set Variable to Z10. On the Y Axis tab, set Variable to

Pressure11. Click Apply

Page 127: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS4: Flow Through Porous Media

WS4-14April 28, 2009

Inventory #002599

Post-processing1. Switch to the Expressions tab2. Right-click and select New3. Enter the Name as deltaP and enter

the Definition as: massFlowAve(Total Pressure)@Inlet - massFlowAve(Total Pressure)@Outlet

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.

Page 128: Ansys Cfx Intro 12.0 1st-Edition - Workshops

ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved. WS5-1

April 28, 2009Inventory #002599

Workshop 5

Cavitating Centrifugal Pump

Introduction to CFX

Page 129: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-2April 28, 2009

Inventory #002599

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.

Page 130: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-3April 28, 2009

Inventory #002599

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

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

Workbench

Page 131: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-4April 28, 2009

Inventory #002599

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

Creating Working Fluids

Page 132: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-5April 28, 2009

Inventory #002599

Setting up the Fluid Domain

1. Double-click on Default Domain2. Under Fluid and Particle Definitions, delete

Fluid 1 and then create a new Fluid named Water Liquid

3. Set Material to Water4. Create another new Fluid named Water Vapour5. 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

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

Page 133: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-6April 28, 2009

Inventory #002599

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

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

Page 134: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-7April 28, 2009

Inventory #002599

Inlet Boundary Condition1. Insert a boundary condition named Inlet2. On the Basic Settings tab, set Boundary Type to Inlet3. Set Location to INLET4. Set Frame Type to Stationary5. Switch to the Boundary Details tab6. Specify Mass and Momentum with a Normal Speed of 7.0455 [m/s]7. Switch to the Fluid Values tab8. For Water Liquid, set the Volume Fraction to a Value of 19. For Water Vapour, set the Volume Fraction to a Value of 010.Click OK

Page 135: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-8April 28, 2009

Inventory #002599

Outlet Boundary Condition1. Inset a boundary condition named Outlet2. On the Basic Settings tab, set Boundary Type to Opening3. Set Location to OUT4. Set Frame Type to Stationary5. Switch to the Boundary Details tab6. 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 Pressure8. Set Turbulence Option to Zero Gradient9. Switch to the Fluid Values tab10.For Water Liquid, set the Volume Fraction to a Value of 111.For Water Vapour, set the Volume Fraction to a Value of 012.Click OK

Page 136: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-9April 28, 2009

Inventory #002599

Periodic Interface1. Click to create an Interface, and name

it Periodic2. Set the Interface Type to Fluid Fluid3. 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 Z7. Set Mesh Connection Option to 1:18. Click OK

Page 137: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-10April 28, 2009

Inventory #002599

Wall Boundary Conditions1. Insert a boundary condition named Stationary2. Set it to be a Wall, using the STATIONARY location3. On the Boundary Details tab, enable a Wall Velocity and set it to

Counter Rotating Wall4. 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

Page 138: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-11April 28, 2009

Inventory #002599

Initialization1. Click to initialize the solution2. On the Fluid Settings form, set Water Liquid Volume Fraction to

Automatic with Value, and set the Volume Fraction to 13. Set Water Vapour Volume Fraction to Automatic with Value, and set the

Volume Fraction to 04. Click OK

Page 139: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-12April 28, 2009

Inventory #002599

Solver Control1. Double click Solver Control in the Outline tree2. Set Timescale Control to Physical timescale

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-55. On the Advanced Options tab, turn on Multiphase Control, then turn on

Volume Fraction Coupling and set the Option to Coupled6. Click OK

Page 140: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-13April 28, 2009

Inventory #002599

Output Control1. Double Click on Output Control in the Outline tree2. On the Monitor tab, turn on Monitor Options3. Under Monitor Points and Expressions, create a new object and call it

InletPTotalAbs4. Set Option to Expression5. Specify the following expression:

massFlowAve(Total Pressure in Stn Frame )@Inlet6. Create a new object called InletPStatic, and set Option to Expression7. Specify the following expression:

areaAve(Pressure )@Inlet8. Click OK

Page 141: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-14April 28, 2009

Inventory #002599

Solver1. Close CFX-Pre and switch to the

Workbench Project window2. Save the project3. 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

Page 142: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-15April 28, 2009

Inventory #002599

Post-processing1. View the results in CFD-Post

by double clicking Results in the Project Schematic

2. Insert a Contour by clicking3. For the Location, click ,

expand Regions and then select BLADE

4. Set Variable to Absolute Pressure from the extended list

5. Set Range to Global6. On the Render tab switch off

Lighting and Show contour Lines

7. Click Apply

Page 143: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-16April 28, 2009

Inventory #002599

Post-processing9. Insert another Contour on the HUB

location, using the variable Absolute Pressure coloured by Local Range. Turn off Lighting and Show Contour Lines.

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.

Page 144: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-17April 28, 2009

Inventory #002599

Adding another Analysis1. Close CFD-Post and return to the Project

Schematic2. Click the arrow next to the A cell and

select Duplicate– A new CFX project is created as a copy of

the first3. Change the name of the new Simulation to

Cavitation4. Use the arrow next to the A cell to

Rename it to No Cavitation5. Save the Project6. Double-click Setup for the Cavitation

simulation to open CFX-Pre

Page 145: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-18April 28, 2009

Inventory #002599

Physics Modifications1. Edit the Default Domain2. On the Fluid Pair Models tab set Mass Transfer to Cavitation 3. Set Option to Rayleigh Plesset4. Turn on Saturation Pressure5. Set a Saturation Pressure of 2650 [Pa]6. Click OK7. Edit the Outlet Boundary Condition8. On the Boundary Details tab, set the Relative Pressure to 300,000 [Pa]9. 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.

Page 146: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-19April 28, 2009

Inventory #002599

Physics Modifications1. Edit Solver Control2. Set the Max. Iterations to 1503. Set the Residual Target to 1e-44. Click OK5. Close CFX-Pre and save the project6. 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

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

Page 147: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-20April 28, 2009

Inventory #002599

Cavitation SolutionThere 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 project3. Double-click Results for the

Cavitation project to open CFD-Post

Page 148: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-21April 28, 2009

Inventory #002599

Post-processing1. 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

4. Change the Colour Variable to Water Vapour.Volume Fraction

5. Change the Colour Map to Blue to White

Page 149: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-22April 28, 2009

Inventory #002599

Post-processing1. Turn off visibility for Plane 12. Create a Volume using the Isovolume

method3. Set the Variable to Water Vapour.Volume

Fraction4. 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 Domain7. Set # of copies to 58. Set # of Passages to 59. Click OK

Page 150: Ansys Cfx Intro 12.0 1st-Edition - Workshops

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

Workshop Supplement

WS5: Cavitating Centrifugal Pump

WS5-23April 28, 2009

Inventory #002599

Post-processingThe 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 sideFurther 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

Page 151: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6-1ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Introduction to CFX

Workshop 6

Electronics Cooling with Natural Convection and Radiation

Page 152: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-2ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

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.

Goals

Page 153: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-3ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementLoading Mesh (Workbench)1. Open a new Workbench project and save it

as HeatSink.wbpj2. 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-Pre4. In CFX-Pre, right-click Mesh and select

Import Mesh > ANSYS Meshing5. Select HeatSink.cmdb and click Open

Page 154: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-4ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementOptions1. 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

Page 155: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-5ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop Supplement

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 Fluid2.Open the details for Fluid and set the Location to Fluid3.Set the Material to Air Ideal Gas4.Switch the Buoyancy option to Buoyant and set the directional components to (0, -g, 0)

– Click on the expression button to enter –g5.Set the Reference Density to 1.1093 [kg m^-3]6.Click the Fluid Models tab7.Set Heat Transfer to Thermal Energy and Turbulence to None (Laminar)8.Click OK

Create Fluid Domains

Page 156: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-6ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreating Materials

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 domain4. 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

CFX contains a library of many materials, but for this case we will create user materials for the component and Printed Circuit Board (PCB).

Page 157: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-7ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreating Materials8. 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]

Page 158: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-8ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Solid DomainsThis 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 HeatSink2.Set the Location to HeatSink3.Set the Domain Type to Solid Domain with the Material set to Aluminium4.Click OK to create the domain

– Note that an interface between the two domains is automatically created5.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.

Page 159: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-9ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementAdding Energy Source

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

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.

Page 160: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-10ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementBoundary ConditionsFor 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 Wall2.Set the Location to Wall3.Switch to the Boundary Details tab and check that Heat Transfer is set to Adiabatic then click OK4.In the PCB domain rename PCB Default to PCBwalls and check that Heat Transfer is set to Adiabatic

Page 161: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-11ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementBoundary Conditions

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 Opening3. 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.

Page 162: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-12ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSolver Control1. From the tree right-click Solver Control

and select Edit2. Increase the Max. Iterations to 5003. Leave the Fluid Timescale Control set to

Auto Timescale4. 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

5. Click OK

Page 163: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-13ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRadiation SetupThe 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 Convection2.Right-click on Convection and select Duplicate3.Rename Copy of Convection to Radiation

– This will form the basis of the radiation case

Page 164: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-14ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementAdding Radiation to the Air DomainsThe 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 tab3. Under Thermal Radiation set the

Option to Discrete Transfer4. Set Transfer Mode to Surface to Surface5. Click OK

Page 165: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-15ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementUpdating the Boundary Conditions.

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 edited2.Click the Boundary Details tab and see that Thermal Radiation has been added and is set to Local Temperature3.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.

Page 166: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-16ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRadiation EmissivityDifferent 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

Page 167: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-17ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRadiation EmissivityNote 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.94.Find the interface connecting the PCB to the Fluid domain and set Emissivity to 0.95.Open the boundary Walls and set Emissivity to 0.9

Page 168: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-18ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDefining ConfigurationsCFX-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 Simulation3.Click OK

Page 169: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-19ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDefining Configurations4. 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.

Page 170: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-20ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRunning the Simulation1. Select File > Quit to exit CFX-Pre2. Save the Project3. In the Project Schematic, right-click on

Solution and select Update4. While the solver is running right-click on

Solution again and select Display Monitors to check on progress

Page 171: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-21ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRunning the SimulationThis 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

Page 172: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-22ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementOpen CFD-Post

1. From the Component Systems section of the Toolbox drag a Results system onto the Project Schematic

2. Right-click on the Results cell (B2) and select Edit

3. When CFD-Post opens, select File > Load Results and select HeatSink.mres. Use the option Load complete history as: Separate cases

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.

Page 173: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-23ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCase ComparisonThe 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

3.Click Apply to enter comparison mode

Page 174: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-24ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTemperatureTemperature 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.

Page 175: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-25ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTemperature1. 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.

Page 176: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-26ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementFlow DisplaysTo 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 plots2. 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

Page 177: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS6: Electronics Cooling

WS6-27ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementFlow Displays

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

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

Page 178: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7-1ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop 7

Tank Flushing

Introduction to CFX

Page 179: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-2ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

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.

Introduction

Page 180: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-3ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMesh Import

1. Start Workbench, add a CFX Component System, then edit the Setup to start CFX-Pre

2. Right-click on Mesh > Import Mesh >ICEM CFD3. 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

Page 181: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-4ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDefine Simulation Type

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

The first step is to change the Analysis Type to Transient:

Page 182: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-5ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementEdit Default Domain

1. Edit Default Domain from the Outline tree

2. Delete Fluid 1 under Fluid and Particle Definition

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

Page 183: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-6ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementEdit Default Domain8. 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 )

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

Page 184: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-7ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementEdit Default Domain

10. Switch to the Fluid Models tab11. Under Multiphase Options, enable

the Homogeneous Model• This makes the simplifying assumption that

both phases share the same velocity field

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

Page 185: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-8ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementEdit 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

Page 186: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-9ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Boundary Conditions

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

Start by creating an Opening boundary at the top of the tank to allow air to escape as the tank is filled:

Page 187: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-10ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Boundary Conditions

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

Now create the outlet and symmetry boundaries. Since recirculation may occur at the outlet this boundary will be specified as an Opening:

Page 188: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-11ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementInlet Water Flow Function

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

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:

Page 189: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-12ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementInlet Boundary Condition

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

Page 190: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-13ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDefine Expressions

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.

Page 191: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-14ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDefine 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].

x = - 0.028

y = waterHt

y = - 0.01

Page 192: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-15ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDefine Initial Conditions

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 HydroP4. 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

Now set the initial conditions using these expressions:

Page 193: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-16ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDefine Transient Results

1. Edit the Output Control object in the Outline tree2. On the Trn Results tab, create a new Transient Results

object, accepting the default Name3. Set the Option to Selected Variables

• This reduces the file size by only writing out selected variables4. 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

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

Page 194: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-17ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Monitor Point

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

domain2. Edit the Output Control object in the Outline tree3. On the Monitor tab, toggle Monitor Options, insert a new

Monitor Point named Water Volume4. Set the Option to Expression and enter the Expression

Value as waterVol, then click OK

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

Page 195: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-18ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRun Solver

1. Close CFX-Pre and save the project as TankFlush.wbpj2. In the Project Schematic, Edit the Solution object to start

the Solver Manager3. 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 run5. Select File > Monitor Finished Run in the Solver Manager6. 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

Page 196: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-19ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost-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

Page 197: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-20ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost-Process Results

1. Turn on Visibility for Sym12. On the Colour tab, set the Variable to Water.Volume

Fraction and set the Colour Map to White to Blue

Page 198: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-21ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost-Process Results

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 animate6. Turn off the Repeat Forever button7. Enable the Save Movie toggle and then click the Play icon

to animate the results and generate an MPEG

Page 199: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS7: Tank Flushing

WS7-22ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementAdditional Notes

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.

Page 200: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8-1ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop 8

Transient Brake Rotor

Introduction to CFX

Page 201: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-2ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTransient 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.

Page 202: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-3ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementAssumptions

• 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

Page 203: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-4ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSolution Approach

• The solution is transient, so you will need to begin by solving a steady-state case at a vehicle speed of 60 mph

• 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

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

Page 204: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-5ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementStart Steady-State Simulation

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 CFX- Mesh 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

Page 205: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-6ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementExamine Mesh Regions

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

Page 206: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-7ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate 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

By default the Simulation Type is set to Steady-State, so the next step is to create the fluid domain

Page 207: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-8ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate the Fluid Domain

4. Switch to the Fluid Models tab for the domain5. Set the Heat Transfer Option to Thermal Energy and leave

the Turbulence Option set to the default k-Epsilon model6. 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)

Page 208: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-9ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate the Fluid Domain

7. Enable the Domain Initialisation, toggle• All settings can then be left at their

default values

8. Click OK to create the domain

Page 209: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-10ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate the Solid Domain

1. Create a new domain named Rotor2. Pick the Location corresponding to the brake rotor3. Set the Domain Type to Solid Domain4. Set the Material to Steel5. Leave the Domain Motion Option as Stationary

6. Switch to the Solid Models tab and enable the Solid Motion toggle

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

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.

Page 210: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-11ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Expressions

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

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.

7. Set the Solid Motion Option to Rotating

Page 211: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-12ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Expressions

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

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

Notice that you do not need to convert between different units; just provide units when defining quantities and CFX will convert when necessary

Page 212: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-13ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementComplete the Solid Domain

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 axis18.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

Page 213: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-14ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Boundary Conditions

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

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:

Page 214: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-15ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Boundary Conditions

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

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

Now create the outlet boundary condition:

Page 215: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-16ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Boundary Conditions

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 ]

3. Click OK to create the opening boundary

Lastly, create the opening boundary condition:

Page 216: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-17ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Domain Interface

1. Select the Domain Interface icon from the toolbar and enter the Name as RotorInterface

2. Set the Interface Type to Fluid Solid3. For Interface Side 1, set the Domain (Filter) to

AirDomain; pick both BrakePadsFluidSide and RotorFluidSide from the Region List

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.

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

Page 217: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-18ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Domain Interfaces

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

6. Click OK to create the Domain Interface• Notice that the default interface no longer exists

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

See the notes at the end of this workshop for more details on appropriate Frame Change models for Fluid Solid Interfaces

Page 218: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-19ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementModify Interface Boundaries

1. Double click RotorInterface Side 1 in the AirDomain2. Select the Boundary Details tab

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

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.

Page 219: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-20ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementModify Interface Boundaries

3. Enable the Wall Velocity toggle4. Set the Option to Rotating Wall5. Set the Angular Velocity to the expression Omega6. Pick Global X as the Rotation Axis7. Click OK

Page 220: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-21ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSet Solver Controls

1. Double-click the Solver Control entry in the Outline tree2. 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 Timescale5. Set the Solid Timescale to 100 [s]6. Click OK

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:

Page 221: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-22ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRun the Steady-State Solution

1. Select the Run Solver and Monitor icon2. 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

You can now run the case in the Solver

Page 222: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-23ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost-Processing

1. Check that the solution looks correct by plotting velocity2. 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

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

Page 223: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-24ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementStart Transient Simulation

1. Select File > Save Case As…2. Enter the File name as BrakeDiskTrn.cfx and click SaveTo 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. You’ll need additional expressions for this

– Modify the Solver Controls– Add some Monitor Points

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

Page 224: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-25ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementEdit Expressions

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 Apply3. 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

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

Page 225: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-26ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementEdit Expressions

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

Page 226: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-27ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementChange Simulation Type

1. In the Outline tree, double click on Analysis Type2. Set the Analysis Type Option to Transient3. Enter the Total Time as the expression StoppingTime4. Enter Timesteps as the expression Deltat5. 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

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

Page 227: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-28ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementAdd a Braking Heat Source

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

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.

Page 228: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-29ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementAdd a Braking Heat Source

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.

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.

Page 229: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-30ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementAdd a Braking Heat Source

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 SpeedOld7. 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.

Page 230: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-31ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementAdd a Braking Heat Source

9. Create a new expression named HeatFlux. Enter the Definition as: inside()@REGION:BrakePadsSolidSide * 0.15 * DeltaKE / ( area()@ REGION:BrakePadsSolidSide * Deltat )

10.Switch back to the Boundary tab for RotorInterface Side 211.Set the Energy Option to Flux12.Enter the expression HeatFlux for the Flux and click OK

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.

Page 231: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-32ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementModify Solver Controls

1. Edit the Solver Control object from the Outline tree

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

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.

Page 232: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-33ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMonitor Points

1. Edit the Output Control object from the Outline tree2. On the Monitor tab enable the Monitor Options check

box3. In the Monitor Points and Expressions frame, click the

New icon to create a new monitor point4. Enter the Name as AvgRotorT and click OK

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

Page 233: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-34ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMonitor Points

5. Change the Option to Expression6. Enter the Expression Value as

volumeAve(Temperature)@Rotor

• 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

Page 234: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-35ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTransient Results

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 Interval5. Enter a Timestep Interval of 4 then click OK

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.

Page 235: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-36ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementStart 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.

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

Page 236: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-37ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMonitor Completed Run

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 Run7. 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 convergence9. Click the Post-Process Results icon to proceed to CFX-

Post

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.

Page 237: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-38ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPost Processing

1. Edit the RotorInterface Side 2 object2. Colour the object by Temperature using a Global Range

3. Edit the Default Legend View 1 object4. On the Appearance tab, change the Precision to 0 and

Fixed (the default is 3 and Scientific) and then click Apply5. Orient the view similar to the image below

In transient simulations the global range of a variable covers all timesteps when the selected variable exists in the transient results files

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

Page 238: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-39ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate 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

Page 239: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-40ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate Animation

12. Enable the Save Movie toggle13. 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.

Page 240: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-41ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRotating Solid Domains Notes

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.

Page 241: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-42ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRotating Solid Domains Notes

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.

Page 242: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-43ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRotating Solid Domains Notes

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.

Page 243: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-44ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRotating Solid Domains Notes

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.

Page 244: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-45ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRotating Solid Domains Notes

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 Fluid- Solid 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.

Page 245: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS8: Transient Brake Rotor

WS8-46ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRotating Solid Domains Notes

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.

Page 246: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9-1ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop 9

Scripting and Batch Processing

Introduction to CFX

Page 247: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-2ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementIntroduction

3.8 x H 40 x H

Outlet

q

4 x HInlet

H

Flow Separation

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.

Page 248: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-3ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementOverview

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 post- processing output can be created for all three simulations.

Page 249: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-4ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDefine The First Simulation

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.gtm3. Select File > Import > CCL4. 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.

Page 250: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-5ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementExamining the Setup

• 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

Now take a minute to look at the simulation setup:

Page 251: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-6ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementWrite the Solver File

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

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

Page 252: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-7ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPreparing CCL Files

1. Open a new text file in Notepad2. 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

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.

Page 253: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-8ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPreparing 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

Page 254: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-9ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPreparing CCL Files

6. Edit the TURBULENCE MODEL Option and the TURBULENT WALL FUNCTIONS Option located at the bottom of the file as shown:

7. Save the changes to SST.ccl

Now you can edit the text file in Notepad

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.

TURBULENCE MODEL: Option = k epsilon

ENDTURBULENT WALL FUNCTIONS: Option = Scalable

END

TURBULENCE MODEL: Option = SST

ENDTURBULENT WALL FUNCTIONS: Option = Automatic

END

Page 255: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-10ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPreparing CCL Files

8. Edit the TURBULENCE MODEL Option as shown:

9. Save the file as komega.ccl

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

TURBULENCE MODEL: Option = SST

ENDTURBULENT WALL FUNCTIONS: Option = Automatic

END

TURBULENCE MODEL: Option = k omega

ENDTURBULENT WALL FUNCTIONS: Option = Automatic

END

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.

Page 256: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-11ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate a Solver Script

• 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.

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:

Page 257: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-12ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate a Solver Script

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)

3. Save the changes to runsolver.pl

#! 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";

Page 258: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-13ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementNotes on 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

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

Page 259: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-14ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementNotes on the Perl Script

• –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.

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:

Page 260: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-15ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRunning the Script

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 Line3. Type perl runsolver.pl and press EnterStarting the Command Line from the CFX Launcher is always recommended because:

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.

– 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

Page 261: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-16ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSession Files in CFX-Post

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 Recording5. Select File > Load Results6. Load the results file ke_001.res

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

Page 262: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-17ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSession Files in CFX-Post

7. Select Session > Stop Recording• 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 Sym19. 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

Page 263: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-18ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate New Variables

1. Select Insert > Variable2. Set the Name to Cf x 10003. 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 > Variable5. Set the Name to St x 10006. 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)

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.

Page 264: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-19ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate a Chart

1. Select Insert > Chart, accepting the default name “Chart 1”

2. Switch to the Data Series tab3. Set the Name to Cf-ke4. Set the Location to Polyline 15. Toggle Custom Data Selection6. Set the X Axis Variable to X7. Set the Y Axis Variable to Cf x 10008. Click Apply9. Click the New button

Now create Charts showing these variables along the Polyline

Page 265: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-20ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCreate a Chart

10. Set the Name to St-ke11. Set the Location to Polyline 112. Toggle Custom Data Selection13. Set the X Axis Variable to X14. Set the Y Axis Variable to St x 100015. Click Apply16. Select the Export button (next to

Apply)17. Set the Name to ChartKE.csv and

click Save18. Select File > Close, choosing not to

save the state19. Select Session > Stop Recording

Page 266: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-21ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSaving 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

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

Page 267: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-22ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementEditing the Session File

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:

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.

Page 268: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-23ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementEditing the Session File

DATA READER:Clear All Objects = falseAppend Results = falseApply X Offset = falseApply Y Offset = falseApply Z Offset = falseKeep Camera Position = trueLoad Particle Tracks = true

ENDDATA READER:

Domains to Load=END> load filename=$res

Page 269: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-24ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementEditing the Session File

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 LINE:Chart Line 1Auto Chart Line Colour = OnChart Line Colour = 1.0, 0.0, 0.0Chart Line Filename =Chart Line Style = AutomaticChart Line Type = RegularChart Symbol Colour = 0.0, 1.0, 0.0Chart Symbol Style = NoneChart X Variable = XChart Y Variable = CF x 1000Line Name = Cf-$type

CHART SERIES:Series 1Chart Line Custom Data Selection = OnChart Line Filename =Chart Series Type = RegularChart X Variable = XChart Y Variable = Cfx1000Histogram Y Axis Weighting = NoneLocation = /POLYLINE:Polyline 1Series Name = Cf-$type

Page 270: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-25ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementEditing the Session File

CHART SERIES:Series 2Chart Line Custom Data Selection = OnChart Line Filename =Chart Series Type = RegularChart X Variable = XChart Y Variable = Stx1000Histogram Y Axis Weighting = NoneLocation = /POLYLINE:Polyline 1Series Name = St-$type

CHART LINE:Chart Line 2Auto Chart Line Colour = OnChart Line Colour = 1.0, 0.0, 0.0Chart Line Style = AutomaticChart Line Visibility = OnChart Symbol Colour = 0.0, 1.0, 0.0Chart Symbol Style = NoneFill Area = OnFill Area Options = AutomaticIs Valid = TrueLine Name = St-$type

Page 271: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-26ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementEditing the Session File

– 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:

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:

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:

Page 272: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-27ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementEditing the Session File

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:

5. Save the file in your text editor

! $exfile = "chart".$type.".csv";

EXPORT:Export File = $exfileExport Chart Name = Chart 1Overwrite = On

END>export chart

> close

!}

Page 273: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-28ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementRunning the Session File

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

You are now ready to run the modified Session file

Page 274: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-29ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementComparing Data

Comparison of Skin Friction Coefficients with experiment

-2.0

-1.5

-1.0

-0.5

0.0

0.5

1.0

1.5

2.0

2.5

3.0

0 0.2 0.4 0.6 0.8 1 1.2

X [m]

Cf (

x100

0) keSSTk-omegaExperiment

Page 275: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-30ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementComparing Data

Comparison of Stanton Number vs experiment

0

0.5

1

1.5

2

2.5

3

3.5

4

0 0.2 0.4 0.6 0.8 1 1.2

X [m]

St (x

100

0) keSSTk-omegaExperiment

Page 276: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-31ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementData Discussion

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.

Page 277: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-32ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDiscussion of Commands

– 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)

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 User’s Guide > Power Syntax in ANSYS CFX in the CFX Help Documentation.

Page 278: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS9: Scripting and Batch Processing

WS9-33ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementDiscussion of Commands

– >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.

Page 279: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10-1ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop 10

Turbo Pre and Post

Introduction to CFX

Page 280: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-2ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementIntroduction

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.

Page 281: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-3ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop Supplement

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

Turbo-Pre

Page 282: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-4ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop Supplement

1.

Set the Machine Type to Fan2.

Select Z as the Rotation Axis•

Notice that the rotational axis is displayed in the Viewer

3.

Click Next >

Basic Settings

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

Page 283: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-5ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementComponent Definition

1.

Right-click in the Component Definition white space, and select Add Component…

2.

Select the Type as Stationary and set the Name to S13.

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

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:

Page 284: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-6ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementComponent Definition

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

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.

Page 285: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-7ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementComponent Definition

1.

Right-click in the Component Definition white space, and select New Component…

2.

Select Rotating and set the Name as R13.

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

Now define the rotating component:

Page 286: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-8ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementComponent Definition

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

Page 287: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-9ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementComponent Definition

1.

Create a new stationary component named S22.

Under Available Volumes select OUTBlock Main

3.

Expand the Passages and Alignment frame•

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

Now define the second stationary component:

Page 288: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-10ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementComponent Definition

5.

Click Next > to proceed

Page 289: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-11ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPhysics Definition

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

All Physics settings, including Fluid Type, Simulation Type, Inlet and Outlet boundary conditions, Interface types, and Solver Parameters are set in one panel.

Page 290: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-12ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementPhysics Definition

6.

Change the Interface Default Type to Frozen Rotor7.

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

Page 291: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-13ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementInterface Definition

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

2.

Click Next > to continue

Interfaces are automatically created using the Region Information from the Component Definition panel.

Page 292: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-14ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementBoundary Definition

1.

Select each boundary condition to verify the settings are appropriate

2.

Select Next > to continue

Boundary conditions are also automatically created using the Region Information from the Component Definition panel and information from the Physics Definition panel.

Page 293: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-15ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementFinal Operations

1.

Click Finish

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.

Page 294: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-16ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementSolver and CFD-Post

1.

Switch to the Projects window2.

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

Page 295: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-17ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTurbo-Post

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

Page 296: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-18ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTurbo-Post GUI

1.

Switch to the Projects window2.

View the results in CFD-Post by double clicking Results in the Project Schematic

3.

In CFD-Post, click on the Turbo tab4.

Click Initialise All Components•

For each component CFD-Post detects which regions correspond to the Hub, Shroud, Blade, Inlet, Outlet and Periodic regions. CFD-

Post 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))

5.

Select the Three Views toggle•

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

Page 297: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-19ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop Supplement3D View

6.

Edit the 3D View object from the Turbo tree•

The Details of 3D View are shown

7.

Select All Domains8.

Under Parts to Draw, select Hub and Blade

9.

Toggle Show Faces on10.Under Instancing, set Domain to R1, set # of

Copies to 3 and then click Apply11.Now set Domain to S1, set # of Copies to 3

and click Apply12.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

Page 298: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-20ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementBlade-to-Blade ViewNow create a Blade to Blade Vector Plot:

1.

Edit the Blade-to-Blade object from the Turbo tree

2.

Change Plot Type to Vector

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

Page 299: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-21ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementBlade-to-Blade View

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

Page 300: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-22ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementMeridional View

1.

Edit the Meridional object from the Turbo tree2.

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

Page 301: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-23ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTurbo-Post

Page 302: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-24ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTurbo Charts & Macros

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

Turbo Charts and Macros are also available:

Page 303: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-25ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTables

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 Pressure4.

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

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.

Page 304: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-26ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTables

5.

In cell A2 type: Mass Averaged Outlet Total Pressure6.

In cell B2, enter the equation:

=massFlowAve(Total Pressure )@S2 Outlet

7.

In cell A3 type: Omega8.

In cell B3, select Insert: Expression > omega or type: =omega

Page 305: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-27ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTables

9.

In cell A4 type: Filename10.

In cell B4, select Insert: Annotation > File Name > Name

11.

Click the Save Table icon from the Table Viewer toolbar12.

Save the file as axial_table.html

13.

Open this file in a web browser

Page 306: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-28ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop Supplement

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

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

Page 307: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-29ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTurbo Report

1.

Click the Comment icon from the main toolbar2.

Enter User Plots the for Name

3.

Type the following in to the Comment Viewer :

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.

Page 308: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-30ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTurbo 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

Page 309: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-31ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTurbo Report

1.

Switch to Turbo tab2.

Double-click Blade-to-Blade from the Turbo tree

3.

Set Span to 0.54.

Set Plot Type to Vector and Variable to Velocity

5.

Click Apply

Now create a Velocity plot at 50% span:

Page 310: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-32ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTurbo Report

1.

Click the Figure icon from the main toolbar2.

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

Now add this plot to you report:

Page 311: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-33ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementTurbo Plot

1.

Click the Publish icon from the Report Viewer toolbar2.

Click OK to write the HTML file•

The file and figures can be distributed as necessary

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

Page 312: Ansys Cfx Intro 12.0 1st-Edition - Workshops

WS10: Turbo Pre and Post

WS10-34ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002599

Workshop SupplementCFD-Post

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)

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