Tutorials

506
CFX-5 Tutorials

Transcript of Tutorials

Page 1: Tutorials

CFX-5 Tutorials

Page 2: Tutorials

Notice

This document and the CFX software products described or referred to in itare confidential and proprietary products of ANSYS Canada Ltd. or itslicensors. They are provided under, and are subject to, the terms andconditions of a written license agreement between ANSYS Canada Ltd. or itslicensors, and their customers, and must not be transferred, disclosed orotherwise provided to third parties unless otherwise permitted by thatagreement.

CFX is a registered trademark of CFX Ltd.

CFX is a trademark of Sony Corporation in Japan, which has been licensedby CFX Ltd.

All product names mentioned in this document are trademarks orregistered trademarks of their respective owners.

Unauthorised use, distribution, or duplication is prohibited.

Copyright © 1996 – 2004 by ANSYS Canada Ltd. All rights reserved.

ANSYS Canada Ltd.554 Parkside DriveWaterloo, OntarioCanadaN2L 5Z4

Website: http://www.ansys.com/cfx

Any inquiries regarding copyright should be directed to ANSYS, Inc.,Legal/Contracts Dept., 275 Technology Drive, Canonsburg, PA 15317, or byemail to [email protected].

Page 3: Tutorials

Table of Contents

CFX-5 Tutorials Page iii

CFX-5 Tutorials

CFX-5 TutorialsTable of Contents

CFX-5 Tutorials

Introduction to the CFX-5 Tutorials

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Working Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Sample Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Mesh Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Helpful Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4File Housekeeping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

List of Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Flow in a Static Mixer

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Page 4: Tutorials

Table of Contents

Page iv CFX-5 Tutorials

Defining a Simulation Using Quick Setup Mode in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . 10Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Defining Basic Settings of General Physics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Importing a Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Setting Zoom Values Using the Viewing Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Setting Rotated or Isometric View Values Using the Viewing Tools . . . . . . . . . . . . . . 14Defining Model Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Defining Solver Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Defining Boundaries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Setting Boundary Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Setting Flow Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Setting Temperature Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Reviewing Boundary Conditions Definition for Accuracy . . . . . . . . . . . . . . . . . . . . . . . . 19Creating the Second Inlet Boundary Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Creating the Outlet Boundary Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Moving to General Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Playing the Session File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Obtaining a Solution Using CFX-Solver Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Using Define Run With Data From a Previous Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Moving from CFX-Solver to CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Viewing Results in CFX-Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Setting the Edge Angle for a Wireframe Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Creating a Point for the Origin of the Streamline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Creating a Streamline Originating from a Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Rearranging the Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Configuring a Default Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Creating a Slice Plane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Defining Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Configuring Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Rendering Slice Planes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Colouring the Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Moving the Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Adding Contours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Saving and Restoring Views Using Cameras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

Working with Animations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Showing the Animation Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Creating the First Keyframe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Creating the Second Keyframe. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Viewing the Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Modifying the Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Saving to MPEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Exiting CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Page 5: Tutorials

Table of Contents

CFX-5 Tutorials Page v

Flow in a Static Mixer (Refined Mesh)

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Defining the Simulation using General Mode in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Importing a Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Importing CCL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Viewing Domain Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Viewing the Boundary Condition Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Defining Solver Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Playing the Session File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

Obtaining a Solution Using Interpolation with CFX-Solver . . . . . . . . . . . . . . . . . . . . . . . . . . 61Interpolating the Results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61Using Define Run With Data From a Previous Run. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Confirming Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Moving from CFX-Solver to CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Viewing Results in CFX-Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Creating a Slice Plane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Colouring the Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Viewing the Surface Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Looking at the Inflated Elements in Three Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . 67Creating a Second Volume Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Viewing the Surface Mesh on the Mixer Body. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Viewing the Layers of Inflated Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Using the Mesh Calculator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Viewing the Mesh Elements with Largest Face Angle Using a Volume . . . . . . . . . . . 71Viewing the Mesh Elements with Largest Face Angle Using a Point. . . . . . . . . . . . . . 72Exiting CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Flow in a Process Injection Mixing Pipe

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Page 6: Tutorials

Table of Contents

Page vi CFX-5 Tutorials

Defining a Simulation using General Mode in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78Importing a Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Setting Temperature-Dependent Material Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Plotting an Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82Evaluating an Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82Modify Material Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Creating the Side Inlet Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Creating the Main Inlet Boundary Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86Creating the Main Outlet Boundary Condition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Playing the Session File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

Obtaining a Solution Using CFX-Solver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Using Define Run With Data From a Previous Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Moving from CFX-Solver to CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

Viewing Results in CFX-Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Modifying the Outline of the Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Creating and Modifying Streamlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Modifying Streamline Colour Ranges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Colouring Streamlines with a Constant Colour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Duplicating and Modifying a Streamline Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Examining Turbulent Kinetic Energy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Exiting CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Flow from a Circular Vent

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

Defining the Steady-State Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Playing the Session file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Creating an Additional Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

Page 7: Tutorials

Table of Contents

CFX-5 Tutorials Page vii

Obtaining a Solution to the Steady-State Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

Defining the Transient Simulation in CFX-Pre. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Opening the Existing Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Modifying the Simulation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Modifying the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109Initialisation Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112Modifying the Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

Obtaining a Solution to the Transient Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115Changing Time Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115Creating an Isosurface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115Generating Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

Continuing the Transient Run. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Flow Around a Blunt Body

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Creating Composite Regions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Obtaining a Solution Using the CFX-5 Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Obtaining a Solution in Serial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134Obtaining a Solution in Parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141Using Symmetry Planes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141Creating Vectors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143Creating Surface Streamlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145Creating a Surface Plot of y+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Demonstrating Power Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147Viewing the Mesh Partitions (Parallel Only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

Page 8: Tutorials

Table of Contents

Page viii CFX-5 Tutorials

Buoyant Flow in a Partitioned Cavity

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152Simulation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157Setting Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

Free Surface Flow Over a Bump

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164Creating Expressions for Initial and Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . 165Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170Setting Mesh Adaption Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

Page 9: Tutorials

Table of Contents

CFX-5 Tutorials Page ix

Supersonic Flow Over a Wing

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191Creating Domain Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

Flow Through a Butterfly Valve

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205Defining the Properties of Sand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207Creating the Inlet Velocity Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209Expression Method for the Inlet Velocity Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210User CEL Function Method for the Inlet Velocity Profile . . . . . . . . . . . . . . . . . . . . . . . . 211Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

Page 10: Tutorials

Table of Contents

Page x CFX-5 Tutorials

Flow in a Catalytic Converter

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231Importing the Meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231Creating a Union Region. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234Creating the Subdomain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235Creating Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236Creating the Domain Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

Non-Newtonian Fluid Flow in an Annulus

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253Setting the Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

Page 11: Tutorials

Table of Contents

CFX-5 Tutorials Page xi

Flow in an Axial Rotor/Stator

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260

Defining the Frozen-Rotor Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263Component Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263Importing the Meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264Creating the Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265General Physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266Boundary Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266File Definition Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268

Obtaining a Solution to the Frozen Rotor Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

Setting up the Transient Rotor-Stator Calculation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276Opening the Existing Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276Modifying the Simulation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277Modifying the Domain Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278Modifying the Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278Creating Transient Results Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279

Obtaining a Solution to the Transient Rotor-Stator Model. . . . . . . . . . . . . . . . . . . . . . . . . . 280Serial Solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280Parallel Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280Monitoring the Run. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

Reacting Flow in a Mixing Tube

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289Outline of the Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289

Page 12: Tutorials

Table of Contents

Page xii CFX-5 Tutorials

Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290Creating a Multicomponent Fluid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295Defining the Reaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296Creating an Additional Variable to Model pH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300Modifying the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300Creating the Subdomain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306

Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307

Visualising the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308

Conjugate Heat Transfer in a Heating Coil

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311

Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312Creating the Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312Solid Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313Creating the Subdomain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319Creating a Cylindrical Locator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320Specular Lighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

Exporting the Results to ANSYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322Exporting Data from the CFX-Solver Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322Processing the Results in ANSYS: GUI method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323PostProcessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333Processing the Results in ANSYS: Command Line method. . . . . . . . . . . . . . . . . . . . . . 335

Page 13: Tutorials

Table of Contents

CFX-5 Tutorials Page xiii

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Multiphase Flow in Mixing Vessel

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342

Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343Importing the Meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343Creating the Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347Creating the Domain Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355Setting Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

Gas-Liquid Flow in an Airlift Reactor

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363

Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373

Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375Coarse Mesh Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375Displaying the Entire Airlift Reactor Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376Fine Mesh Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377

Page 14: Tutorials

Table of Contents

Page xiv CFX-5 Tutorials

Air Conditioning Simulation

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385Creating Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385Inlet velocity profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389Setting up the Thermostat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389Setting the Simulation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393Setting Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398Setting Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400

Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402Creating Graphics Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402Creating an Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405

Combustion and Radiation in a Can Combustor

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411

Using the Eddy Dissipation and P1 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413Creating a Reacting Mixture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420

Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422

Page 15: Tutorials

Table of Contents

CFX-5 Tutorials Page xv

Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423

Using the Laminar Flamelet and Discrete Transfer Models . . . . . . . . . . . . . . . . . . . . . . . . . 429Defining the Simulation in CFX-Pre. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429Creating a Reacting Mixture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430Modifying the Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432Viewing the Results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432

Cavitation Around a Hydrofoil

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439

Creating the Initial Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440Defining the simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444

Obtaining the Starting-Point Solution Using the CFX-5 Solver. . . . . . . . . . . . . . . . . . . . . . 445

Viewing the Results of the Starting-Point Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446

Running the Simulation with Cavitation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451Modifying the Initial Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

Obtaining the Cavitation Solution Using the CFX-5 Solver . . . . . . . . . . . . . . . . . . . . . . . . . 453

Viewing the Results of the Cavitation Solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454

Fluid Structure Interaction and Mesh Deformation

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462

Page 16: Tutorials

Table of Contents

Page xvi CFX-5 Tutorials

Using CEL Expressions to Govern Mesh Deformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464Setting up the Simulation in CFX-Pre. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464Modelling the Ball Dynamics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464Preparing the Working Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465Creating the Required Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465Importing the Initial Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466Setting the Simulation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467Creating the Tank Subdomain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471Setting Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472Obtaining a Solution using the CFX-5 Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472Viewing the Results in CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473Creating an animation with velocity vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473

Using a Junction Box Routine to Govern Mesh Deformation . . . . . . . . . . . . . . . . . . . . . . . 476Setting up the Simulation in CFX-Pre. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477Creating the Required Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477Importing the Initial Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478Defining the Junction Box Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479Setting the Simulation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483Setting Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484Obtaining a Solution using the CFX-5 Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484Analysing the Fluid Flow Force on the Ball . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484

Page 17: Tutorials

CFX-5 Tutorials Page 1

CFX-5 Tutorials

Introduction to theCFX-5 Tutorials

Page 18: Tutorials

Introduction to the CFX-5 Tutorials—Introduction

Page 2 CFX-5 Tutorials

Introduction

The tutorials have been designed to introduce the general techniques usedin CFX-5 and provide tips on advanced modelling.

Note: Before working with any of the tutorials you must set a workingdirectory and copy the sample files provided with your software. For moreinformation refer to "Working Directory" on page 2 and to "Sample Files" onpage 3.

Tutorials 1 through 4 introduce general principles used in CFX-5, includingsetting up the physical models, running CFX-5 Solver and visualising theresults. They are designed to allow for your increasing experience. As youwork through each tutorial, you will find the documentation detailsdecrease.

The remaining tutorials highlight specific functionality within CFX-5,including methods to import the mesh from other packages and runningCFD problems in parallel. They assume familiarity with CFX-5 gained byworking through the introductory tutorials. We recommend that you readthe "List of Tutorials" on page 6 in the document "CFX-5 Tutorials" beforebeginning the tutorials.

The files required to complete the tutorials are located in the subdirectorynamed “examples”, which is under the CFX-5.7.1 directory where CFX-5.7.1was installed.

See "CFX-5 Tutorials Table of Contents" on page i in the document "CFX-5Tutorials" for a table of contents for the tutorials.

Working Directory

One of the first things you must do when using CFX-5 is to set a workingdirectory. The working directory is the default location that files used by aproject are stored in. This directory is also the default location that isreferenced when first launching a project.

1. Your working directory depends on your use of CFX-5 in either

Workbench or Standalone mode.

• Workbench: CFX in Workbench uses a four option hierarchy todetermine the working directory. See "Working Directory" on page22 in the document "CFX-5 Reference Guide" for more information.

• Standalone: The location is displayed in CFX-5.7.1 Launcher

Page 19: Tutorials

Introduction to the CFX-5 Tutorials—Introduction

CFX-5 Tutorials Page 3

Sample Files

Before using any of the tutorial files create a copy of the sample files first.This ensures a duplicate is modified and that the source files can be reusedas required. It also prevents corruption of the source files. It is generallyrecommended that sample files be copied into your working directory.

To copy files from the default installation location to a working directoryensure you know the path to both the working directory and to theexamples. Use your operating systems standard procedure to copy files.

1. Examples are located in <CFXROOT>/examples

Tip: Reduce the size of the sample files you are working with by onlycopying the files specifically required in a tutorial.

Mesh Generation

The tutorials begin by importing meshes, all of which are supplied withCFX-5. Most meshes can be created using CFX-Mesh, a new geometry andmeshing tool that replaces CFX-Build.

CFX-CAD-Mesh version 1.0 uses ANSYS Design Modeler to create thegeometry and ICEM CFD 4.CFX to generate the mesh. Instructions togenerate meshes using CFX-CAD-Mesh version 1.0 are available for theStatic Mixer and Heating Coil tutorials (Tutorial 1, Tutorial 2 and Tutorial 14).

CFX-CAD-Mesh version 2.1 uses ANSYS Design Modeler and the CFX Mesherin ANSYS Workbench. Mesh generation instructions are available for alltutorials that import GTM files.

CFX-CAD-Mesh tutorials can be found by browsing to the CFX CommunitySite at:

www-waterloo.ansys.com/cfxcommunity/technotes/documentation/CFX-CAD2Mesh/

If you do not have a password for the Community Site, see "How do I obtaina password for the CFX Community Site?" on page 810 in the document"CFX-5 Reference Guide".

For more information on CFX-CAD-Mesh, please contact your customersupport representative. A list of contact details are available in "CFX Offices"on page 149 in the document "Introduction to CFX-5".

Page 20: Tutorials

Introduction to the CFX-5 Tutorials—Helpful Hints

Page 4 CFX-5 Tutorials

Helpful Hints

File Housekeeping

We recommend that you run a new problem in a new directory. All the filescreated by CFX-Pre, CFX-Solver and CFX-Post are written to theworking/project directory.

Defining aSimulation

The following is a brief overview of a typical problem setup in CFX-Pre:

• Mesh Import

• Simulation Type (steady state or transient)

• Domains (setting of physics options)

• Boundary Conditions

• Interface specification

• Initialisation

• Mesh Adaption Parameters

• Solver Control

• Output Control

• Writing a Definition File for the CFX-Solver

Running aDefinitionFile inCFX-Solver

The CFX-Solver calculates a solution to the problem. The CFX-SolverManager displays the solution progress in the form of residual plots anddisplays the “out” file, which is a text file containing the physics definitionand the values of solution variables at each iteration, as well as otherpertinent solution data.

AnalysingResults inCFX-Post

CFX-Post is the post-processing module that is used to view the results ofyour CFD model. A number of powerful plotting and calculation features areutilised in the tutorials to gain an understanding of the physics involvedwith each simulation.

WorkingThrough theTutorialsOnline

If you work through the tutorials following the instructions on the screen,we recommend that you start the online help viewer from the menu bar ofCFX-5 Launcher.

Printing theTutorials

To print a hard copy of the manual go to the Help menu and click PrintableBooks, then select CFX-5 Tutorials in the PDF file that opens. Select Printfrom the File menu and choose the pages to print. Note that some files arelarge; you may not want to print all of the pages.

Page 21: Tutorials

Introduction to the CFX-5 Tutorials—Helpful Hints

CFX-5 Tutorials Page 5

Changing theBackgroundColour

If viewing objects in CFX-5 becomes difficult due to contrast with thebackground the background can be altered for improved viewing.

In Workbench• Select Tools > Options from the Project Page

• Select Graphics Style under Common Settings

• Select a Background Style and suitable Background Colours

In CFX-5 Standalone• "Pre: Viewer" on page 48 in the document "CFX-Pre"

Page 22: Tutorials

Introduction to the CFX-5 Tutorials—List of Tutorials

Page 6 CFX-5 Tutorials

List of Tutorials

The following list shows you an overview of the tutorials related to CFX-5.You can follow a hyperlink (blue text) without closing this document byholding down the <Shift> key as you click on a link.

• Tutorial 1: Flow in a Static Mixer (p. 7)

• Tutorial 2: Flow in a Static Mixer (Refined Mesh) (p. 49)

• Tutorial 3: Flow in a Process Injection Mixing Pipe (p. 73)

• Tutorial 4: Flow from a Circular Vent (p. 97)

• Tutorial 5: Flow Around a Blunt Body (p. 123)

• Tutorial 6: Buoyant Flow in a Partitioned Cavity (p. 149)

• Tutorial 7: Free Surface Flow Over a Bump (p. 161)

• Tutorial 8: Supersonic Flow Over a Wing (p. 187)

• Tutorial 9: Flow Through a Butterfly Valve (p. 201)

• Tutorial 10: Flow in a Catalytic Converter (p. 227)

• Tutorial 11: Non-Newtonian Fluid Flow in an Annulus (p. 247)

• Tutorial 12: Flow in an Axial Rotor/Stator (p. 257)

• Tutorial 13: Reacting Flow in a Mixing Tube (p. 287)

• Tutorial 14: Conjugate Heat Transfer in a Heating Coil (p. 309)

• Tutorial 15: Multiphase Flow in Mixing Vessel (p. 339)

• Tutorial 16: Gas-Liquid Flow in an Airlift Reactor (p. 361)

• Tutorial 17: Air Conditioning Simulation (p. 381)

• Tutorial 18: Combustion and Radiation in a Can Combustor (p. 409)

• Tutorial 19: Cavitation Around a Hydrofoil (p. 437)

• Tutorial 20: Fluid Structure Interaction and Mesh Deformation (p. 459)

Page 23: Tutorials

CFX-5 Tutorials Page 7

CFX-5 Tutorials

Tutorial 1

Flow in a Static Mixer

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• StaticMixerMesh.gtm

• StaticMixer.pre

Page 24: Tutorials

Flow in a Static Mixer—Introduction

Page 8 CFX-5 Tutorials

1.A: Introduction

1.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• problem setup using Quick Setup Mode in CFX-Pre

• modifying the outline plot in CFX-Post

• using streamlines in CFX-Post to trace the flowfield from a point

• viewing temperature using coloured planes and contours in CFX-Post

• creating an animation and saving it to an MPEG file

• using camera objects to save and load views in CFX-Post

Component Feature Details

CFX-Pre User Mode Quick Setup Wizard

Simulation Type Steady State

Fluid Type General Fluid

Domain Type Single Domain

Turbulence Model k-Epsilon

Heat Transfer Thermal Energy

Boundary Conditions Inlet (Subsonic)

Outlet (Subsonic)

Wall: No-Slip

Wall: Adiabatic

Timestep Physical Timescale

CFX-Post Plots Animation

Contour

Outline Plot (Wireframe)

Point

Slice Plane

Streamline

Other Camera Object

Legend

MPEG Generation

Object Drag and Drop

Page 25: Tutorials

Flow in a Static Mixer—Introduction

CFX-5 Tutorials Page 9

1.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

1.A.3: Overview of the problem to solve

Introduction: In this tutorial, a static mixer consisting of two off–line inletpipes delivering water into a mixing vessel is used. You establish a generalworkflow for analysing the flow of fluid into and out of a mixer. This tutorialis important because it uses a simple problem to teach the generalapproach taken when working with an existing mesh.

Water enters through both pipes at the same rate but at differenttemperatures. The first entry is at a rate of 2.0m/s and a temperature of315.0K and the second entry is at a rate of 2.0 m/s at a temperature of285.0K. The radius of the mixer is 2m.

Your goal in this tutorial is to understand how to use CFX-5 to determine thespeed and temperature of the water when it exits the static mixer.

Figure 1: Static Mixer with 2 Inlet Pipes and 1 Outlet Pipe

2.0 m/s285.0 K

2.0 m/s315.0 K

r=2.0m

Page 26: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

Page 10 CFX-5 Tutorials

1.B: Defining a Simulation Using Quick SetupMode in CFX-Pre

Introduction: After having completed meshing CFX-Pre is used as aconsistent and intuitive interface for the definition of complex CFDproblems.

Synopsis Quick Setup Mode provides a simple wizard–like interface for setting upsimple cases. This is useful for getting familiar with the basic elements of aCFD problem setup. This section describes using Quick Setup to develop asimulation in CFX-Pre.

WorkflowOverview

Do not perform any of the following tasks now. For review purposes only thissection provides a brief summary of the topics to follow as a generalworkflow:

1. "Creating a New Simulation" on page 11

2. "Defining Basic Settings of General Physics" on page 12

3. "Importing a Mesh" on page 13

4. "Defining Model Data" on page 15

5. "Defining Solver Parameters" on page 16

6. "Defining Boundaries" on page 16

7. "Setting Boundary Data" on page 17

8. "Setting Flow Specification" on page 18

9. "Setting Temperature Specification" on page 18

10. "Reviewing Boundary Conditions Definition for Accuracy" on page 19

11. "Creating the Second Inlet Boundary Definition" on page 20

12. "Creating the Outlet Boundary Definition" on page 20

13. "Moving to General Mode" on page 21

14. "Writing the Solver (.def) File." on page 22

15. As an alternative to these steps, you can also review "Playing the Session

File" on page 23

Page 27: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

CFX-5 Tutorials Page 11

To begin this tutorial and create a new simulation in CFX-Pre, continue from"Creating a New Simulation" on page 11.

Tip: If you are already familiar with CFX-Pre, or if you simply want to skipthe manual process of creating a flow physics simulation, you can playa session file to complete the CFX-Pre part of the tutorial. To do so, see"Playing the Session File" on page 23.

1.B.1: Creating a New Simulation

Introduction: Before importing and working with a mesh, a simulation needsto be started using Quick Setup.

Synopsis By entering information in the User Mode Workspace—which containsforms designed to guide you through setting up a simple simulation—youcan define a simulation quickly. More information on Quick Setup can befound in "Quick Setup Mode" on page 19 in the document "CFX-Pre".

After filling out forms in the User Mode Workspace some simulations areready to be solved. However, other simulations require further changesusing General Mode (the normal mode of operation). In Tutorial 2 youcontinue working with this simulation in General Mode.

Two procedures are documented. Depending on your installation of CFX-5follow either the Standalone procedure or the Workbench procedure. Formore information, refer to "CFX-5.7.1 in Workbench" on page 19.

Procedure inStandalone

1. If required, launch CFX-Pre.

2. Select File > New Simulation.

3. Click Quick Setup in the New Simulation File window.

4. If required, set the path location to a different folder.

5. Under File name type StaticMixer.

6. Click Save.

The User Mode tab is displayed.

7. Proceed to "Defining Basic Settings of General Physics" on page 12.

Procedure inWorkbench

1. If required, launch Workbench.

2. Click Empty Project.

The Project Page will appear displaying an unsaved project.

3. Select File > Save or click Save.

4. If required, set the path location to a different folder.

Page 28: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

Page 12 CFX-5 Tutorials

5. Under Filename, type StaticMixer.

6. Click Save.

7. Click Start CFX-Pre under Advanced CFD on the left hand Task Bar.

8. Select File > New Simulation.

9. Click Quick Setup in the New Simulation File window.

10. If required, set the path location to a different folder.

11. Under File name type StaticMixer.

12. Click Save.

The User Mode tab is displayed.

1.B.2: Defining Basic Settings of General Physics

Introduction: You need to define the properties of fluids used in simulations.

Synopsis A variety of fluids are already defined as library materials. This tutorial usesa prepared fluid—Water— which is a General Fluid whose properties arethat of water at 25°C. However, you can develop your own custom fluids.For details about material property modifications, see "Materials Editor:Pure Substance" on page 131 in the document "CFX-Pre".

Procedure 1. Ensure Basic Settings is displayed.

2. Under Domain Name type StaticMixer.

3. Under Fluid select Water.

Page 29: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

CFX-5 Tutorials Page 13

1.B.3: Importing a Mesh

Introduction: At least one mesh must be imported before physics areapplied.

Synopsis An assembly is a group of mesh regions that are topologically connected.

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

Procedure 1. In Basic Settings, under Select Mesh, click Import .

A new section opens below User Mode for Definition.

2. In the bottom left of the screen, under File click Browse .

3. From your working directory, select StaticMixerMesh.gtm.

4. Click Open.

5. Click OK.

The mesh is loaded.

Page 30: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

Page 14 CFX-5 Tutorials

6. In Basic Settings, under Select Mesh, select B1.P3.

The mesh is selected.

1.B.4: Setting Zoom Values Using the Viewing Tools

Introduction: If the geometry becomes too large or small to fit in the Viewer,the geometry can be modified using the Viewing Tools toolbar.

Synopsis The view of a geometry can be modified in a number of ways. To manipulatethe display in the Viewer, the Viewing Tools toolbar is used.

Procedure 1. Click Zoom Box

2. Click and drag a rectangular selection over the geometry.

3. Release the mouse button to zoom in on the selection.

The geometry zoom changes to display the selection at a greaterresolution.

4. Click Fit View in the Viewing Tools toolbar to re-centre and

re-scale the geometry.

1.B.5: Setting Rotated or Isometric View Values Using theViewing Tools

Introduction: If the geometry is rotated or quickly needs to be viewed froma new angle, the geometry can be modified using the Viewing Tools toolbar.

Synopsis The view of a geometry can be modified in a number of ways. To manipulatethe display in the Viewer, the Viewing Tools toolbar is used.

Page 31: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

CFX-5 Tutorials Page 15

Procedure 1. Select Viewer > Rotate or click on the Viewing Tools toolbar.

2. Click and drag within the geometry repeatedly to test the rotation of the

geometry.

The geometry rotates based on the direction of movement.

3. Click Isometric View in the Viewing Tools toolbar to select a

specific view.

You can view the geometry from one of the Cartesian axis directions orfrom an isometric angle by using the drop-down menu.

4. Select View Towards -X.

A description of the other icons in the Viewing Tools toolbar can befound in "Viewer" on page 70 in the document "CFX-Pre".

5. Click Isometric View (Z up) from the Viewing Tools toolbar.

A clearer view of the mesh is displayed.

1.B.6: Defining Model Data

Introduction: The type of flow and the physical models to use in the fluiddomain need to be defined

Synopsis The flow is specified as steady state with turbulence and heat transfer.Turbulence is modelled using the k-epsilon turbulence model and heattransfer using the thermal energy model. The k-epsilon turbulence model isa commonly used model and is suitable for a wide range of applications. Thethermal energy model neglects high speed energy effects and is thereforesuitable for low speed flow applications.

Procedure 1. Ensure Model Data is displayed.

2. Set Reference Pressure to 0 [atm] (Atmospheres).

All other pressure settings are relative to this reference pressure.

3. Set Heat Transfer to Thermal Energy.

Page 32: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

Page 16 CFX-5 Tutorials

4. If required, set Turbulence to k-Epsilon.

1.B.7: Defining Solver Parameters

Introduction: Solver Control parameters control aspects of the numericalsolution generation process.

Synopsis While upwind is less accurate it is also more robust than other advectionschemes. This is suitable for obtaining an initial set of results, but in generalshould not be used to obtain final accurate results. For more informationrefer to "Advection Scheme Selection" on page 357 in the document "CFX-5Solver Modelling".

Procedure 1. Ensure Solver Parameters is displayed.

Tip: If required, click the + or the – next to a setting to expand or collapsethe setting.

2. Set Advection Scheme to Upwind.

3. Set Convergence Control to Physical Timescale.

Physical Timescale appears, replacing Time Scale Option

4. Set Physical Timescale to 2 [s].

5. Click Next.

1.B.8: Defining Boundaries

Introduction: The CFD model requires the definition of conditions on theboundaries of the domain.

Synopsis Based on "Figure 1: Static Mixer with 2 Inlet Pipes and 1 Outlet Pipe" onpage 9 we know there are two inlet boundaries and one outlet boundarythat need to be defined.

Page 33: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

CFX-5 Tutorials Page 17

Procedure 1. Ensure Boundary Definition is displayed.

2. Under Existing Boundaries click New .

3. Set Name to in1.

4. Click OK.

The boundary is created and, when selected, properties related to theboundary are displayed.

1.B.9: Setting Boundary Data

Introduction: Once boundaries are created you need to create associateddata.

Synopsis Based on "Figure 1: Static Mixer with 2 Inlet Pipes and 1 Outlet Pipe" onpage 9 we know the first inlet boundary condition consists of a velocity of2.0 m/s and a temperature of 315.0 K at one of the side inlets.

Procedure 1. Ensure Boundary Data is displayed.

2. Set Boundary Type to Inlet.

Page 34: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

Page 18 CFX-5 Tutorials

3. Set Location to in1.

1.B.10: Setting Flow Specification

Introduction: Once boundary data is defined the boundary needs to haveflow specifications assigned

Synopsis Setting flow specification includes selecting an option and definingadditional parameters based on the selection.

The first inlet boundary condition consists of a velocity of 2.0 m/s at one ofthe side inlets.

Procedure 1. Ensure Flow Specification is displayed.

2. Set Option to Normal Speed.

3. Set Normal Speed to 2 [m s^-1].

1.B.11: Setting Temperature Specification

Introduction: Once flow specification is defined the boundary needs to havetemperature assigned

Synopsis Setting temperature specifications includes selecting an option anddefining additional parameters based on the selection.

The first inlet boundary condition consists of a temperature of 315.0 K atone of the side inlets.

Page 35: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

CFX-5 Tutorials Page 19

Procedure 1. Ensure Temperature Specification is displayed.

2. Set Static Temperature to 315 K.

1.B.12: Reviewing Boundary Conditions Definition forAccuracy

Introduction: Defining the boundary condition for in1 required several stepsthat we review in general terms and list the expected results for comparisonwith the results of your file thus far.

Synopsis By reviewing what we have done in the previous modules we can follow theprocedure used to create a boundary condition. There are two moreboundary conditions to create and this review summarizes what has beendone to prepare you to create boundary conditions on your own.

Based on "Figure 1: Static Mixer with 2 Inlet Pipes and 1 Outlet Pipe" onpage 9 we know the first inlet boundary condition consists of a velocity of2.0 m/s and a temperature of 315.0 K at one of the side inlets.

Procedure 1. Ensure Boundary Definition is displayed.

2. Under Existing Boundaries click on in1 to display its values.

Page 36: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

Page 20 CFX-5 Tutorials

3. Review and compare for accuracy the following settings:

1.B.13: Creating the Second Inlet Boundary Definition

Introduction: Now that the first boundary has been created the sameconcepts can be applied to building the second inlet boundary.

Synopsis Based on "Figure 1: Static Mixer with 2 Inlet Pipes and 1 Outlet Pipe" onpage 9 we know the second inlet boundary condition consists of a velocityof 2.0 m/s and a temperature of 285.0 K at one of the side inlets.

Procedure 1. Ensure Boundary Definition is displayed.

2. Create a new boundary named in2 with these settings:

1.B.14: Creating the Outlet Boundary Definition

Introduction: Now that the second boundary has been created the sameconcepts can be applied to building the last boundary.

Synopsis Based on "Figure 1: Static Mixer with 2 Inlet Pipes and 1 Outlet Pipe" onpage 9 we know the outlet boundary condition needs to be developed.

Modify Set the following To this value

Boundary Data Boundary Type Inlet

Location in1

Flow Specification Option Normal Speed

Normal Speed 2 [m s^-1]

Temperature Specification Static Temperature 315.0 K

Modify Set the following To this value

Boundary Data Boundary Type Inlet

Location in2

Flow Specification Option Normal Speed

Normal Speed 2 [m s^-1]

Temperature Specification Static Temperature 285.0 K

Page 37: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

CFX-5 Tutorials Page 21

Procedure 1. Ensure Boundary Definition is displayed.

2. Create a new boundary named out with these settings:

3. Click Next.

1.B.15: Moving to General Mode

Introduction: Once boundaries are created we can move to General Modeand prepare for the generation of content for use with CFX-Solver.

Synopsis There are no further boundary conditions that need to be set. All 2D exteriorregions that have not been assigned a boundary condition areautomatically assigned the default boundary condition, namedStaticMixer Default. The boundary condition for unassigned regions isnormally a no-slip adiabatic wall, but can be changed to a different walltype. For more information, see "Default Boundary Conditions" on page 263in the document "CFX-Pre".

Modify Set the following To this value

Boundary Data Boundary Type Outlet

Location out

Flow Specification Option Average Static Pressure

Relative Pressure 0 [Pa]

Page 38: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

Page 22 CFX-5 Tutorials

Procedure 1. Click Finish to enter General Mode.

The three boundary conditions are displayed in the viewer as sets ofarrows at the boundary surfaces. Inlet boundary arrows are directedinto the domain. Outlet boundary arrows are directed out of thedomain.

1.B.16: Writing the Solver (.def) File.

Introduction: You are now ready to write the Definition file (which containsthe information required by the CFX-Solver for this CFD analysis), save theSimulation file, shut down CFX-Pre and start CFX-Solver Manager.

Synopsis The Simulation file—StaticMixer.cfx—contains the simulation definition ina format that can be loaded by CFX-Pre, allowing you to complete (ifapplicable), restore, and modify the simulation definition. The Simulationfile differs from the Definition file in two important ways:

• The Simulation file can be saved at any time while defining thesimulation.

• Mesh data is not contained in the Simulation file.The simulation file references the original mesh file(s).

Page 39: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

CFX-5 Tutorials Page 23

Procedure 1. Select File > Write Solver (.def) File or click Write a Solver File

Write Solver File is displayed.

2. If required, type StaticMixer.def under File name.

3. If required, set Operation to Start Solver Manager.

4. If required, set Report Summary of Interface Connections to off.

5. If using CFX-Pre in Standalone Mode, set Quit CFX-Pre to on.

This forces Standalone CFX-Pre to close after the Definition file has beenwritten. This option is not required in Workbench.

6. Click OK.

7. If you are notified the file already exists, click Overwrite.

This file is provided in the examples directory and may exist in yourworking folder if you have copied it there.

8. Click Yes if asked to save StaticMixer.cfx.

The definition file (StaticMixer.def) and the simulation file(StaticMixer.cfx) are created. CFX-Solver Manager automatically startsand the definition file is set in the Definition File box of Define Run.

9. Proceed to "Obtaining a Solution Using CFX-Solver Manager" on

page 25.

1.B.17: Playing the Session File

Introduction: If you have performed all the tasks in the previous steps,proceed directly to "Obtaining a Solution Using CFX-Solver Manager" onpage 25.

Synopsis A session file can be created and played at a later date to avoid having torecreate all the events configured when using CFX-Pre. Session files can becreated as required.

Two procedures are documented. Depending on your installation of CFX-5follow either the Standalone procedure or the Workbench procedure.

Procedure inStandalone

1. If required, launch CFX-Pre.

2. Select Session > Play Session.

3. Select StaticMixer.pre, located in the examples directory.

4. Click Open.

A Definition file is written.

5. Select File > Quit.

Page 40: Tutorials

Flow in a Static Mixer—Defining a Simulation Using Quick Setup Mode in CFX-Pre

Page 24 CFX-5 Tutorials

6. Click Quit.

7. Click the CFX-Solver icon on the CFX Launcher.

8. Select File > Define Run.

9. Under Definition File, click Browse .

10. Select StaticMixer.def, located in the examples directory.

11. Proceed to "Obtaining a Solution Using CFX-Solver Manager" on

page 25.

Procedure inWorkbench

1. If required, launch Workbench.

2. Click Empty Project.

3. Select File > Save or click Save.

4. If required, set the path location to a different folder.

5. Under Filename, type StaticMixer.

6. Click Save.

7. Click Start CFX-Pre.

8. Select Session > Play Session.

9. Select StaticMixer.pre, located in the examples directory.

10. Click Open.

A status bar appears in the bottom right of the screen while a Definitionfile is written.

11. Click the CFX-Solver tab.

12. Select File > Define Run.

13. Under Definition File, click Browse .

14. Select StaticMixer.def, located in the examples directory.

Page 41: Tutorials

Flow in a Static Mixer—Obtaining a Solution Using CFX-Solver Manager

CFX-5 Tutorials Page 25

1.C: Obtaining a Solution Using CFX-SolverManager

Introduction: CFX-Solver Manager has a visual interface that displays avariety of results and should be used when plotted data needs to be viewedduring problem solving.

Synopsis Two windows are displayed when CFX-Solver Manager runs. There is anadjustable split between the windows which is oriented either horizontallyor vertically, depending on the aspect ratio of the entire CFX-SolverManager window (also adjustable).

One window shows the convergence history plots and the other displaystext output from CFX-Solver.

The text lists physical properties, boundary conditions and various otherparameters used or calculated in creating the model. All the text is writtento the Output File automatically (in this case StaticMixer_001.out). Moredetail on the contents of the Output File can be found in "The CFX-5 OutputFile" on page 87 in the document "CFX-Solver Manager".

Page 42: Tutorials

Flow in a Static Mixer—Obtaining a Solution Using CFX-Solver Manager

Page 26 CFX-5 Tutorials

1.C.1: Using Define Run With Data From a Previous Run

Introduction: Define Run allows configuration of a run for processing byCFX-Solver.

Synopsis When the CFX-Solver Manager is launched automatically from CFX-Pre, allof the information required to perform a new Serial run (on a singleprocessor) is entered automatically. You do not need to alter theinformation in the Define Run window. This is a very quick way to launchinto CFX-Solver without having to define settings and values.

Numerous settings can be configured when using CFX-Solver Define Runwith data from CFX-Pre. For more information refer to "Run Definition" onpage 11 in the document "CFX- Solver Manager".

Procedure 1. Ensure Define Run is displayed.

2. Click Start Run.

CFX-Solver launches and a split screen appears. The left pane displaysthe results of the run graphically and the right pane displays theinformation as text. The panes continue to build as CFX-Solver Manageroperates.

Page 43: Tutorials

Flow in a Static Mixer—Obtaining a Solution Using CFX-Solver Manager

CFX-5 Tutorials Page 27

Note: Once the second iteration appears data begins to plot. Plotting maytake a long time depending on the amount of data to process. Do not shutdown the process.

3. Click OK when CFX-Solver is finished.

1.C.2: Moving from CFX-Solver to CFX-Post

Introduction: Once CFX-Solver has finished you can use CFX-Post to reviewthe finished results.

Synopsis CFX-Solver is used to calculate a problem. In order to review the results ofthe calculation use CFX-Post.

Procedure 1. Select Tools > Post–Process Results or click Post–Process Results

.

2. If using CFX-Solver in Standalone Mode, select

Shut down Solver Manager.

This forces Standalone CFX-Solver to close after the Definition file hasbeen written. This option is not required in Workbench.

3. Click OK.

After a short pause, CFX-Post starts and CFX-Solver Manager closes.

Page 44: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

Page 28 CFX-5 Tutorials

1.D: Viewing Results in CFX-Post

Introduction: When CFX-Post starts, the3D Viewer and Objects Workspace display by default.

3D Viewer: Displays an outline of the geometry and other graphics objects.In addition to the mouse, you can use icons from the Viewing Tools toolbar(along the top of the viewer) to manipulate the view.

Objects Workspace: Consists of the Object Selector and Object Editor.This is accessed by clicking the Objects tab in the CFX-Post Workspace.

Object Selector: The tree structure displaying existing objects.

Object Editor: Used to set or alter the properties of objects. It appearsbeneath the Object Selector after double-clicking an object in the ObjectSelector or; right-clicking an object in the Object Selector and selecting Editfrom the pop-up menu or; highlighting an object in the Object Selector andclicking Edit Selected Object Button or; creating a new object by clickingCreate New Object in the Object Selector

Note: There are other workspaces (e.g. for Variables, Expressions andCharts).

Page 45: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

CFX-5 Tutorials Page 29

Some objects are automatically created in CFX-Post. These includeboundary objects corresponding to each boundary condition specified inCFX-Pre. In this tutorial, the two inlets and the outlet have their ownboundary objects. The remaining surfaces of the geometry are groupedtogether into the Default boundary object. A Wireframe object is alsoautomatically created, and contains the surface mesh for the geometry.

WorkflowOverview

Do not perform any of the following tasks now. For review purposes only thissection provides a brief summary of the topics to follow as a generalworkflow:

1. "Setting the Edge Angle for a Wireframe Object" on page 29

2. "Creating a Point for the Origin of the Streamline" on page 31

3. "Creating a Streamline Originating from a Point" on page 32

4. "Rearranging the Point" on page 33

5. "Configuring a Default Legend" on page 34

6. "Creating a Slice Plane" on page 37

7. "Defining Geometry" on page 38

8. "Configuring Views" on page 38

9. "Rendering Slice Planes" on page 39

10. "Colouring the Plane" on page 39

11. "Moving the Plane" on page 40

12. "Adding Contours" on page 41

1.D.1: Setting the Edge Angle for a Wireframe Object

Introduction: The outline of the geometry is called the wireframe or outlineplot.

Synopsis CFX-Post only displays some of the surface mesh by default. This sometimesmeans that when you first load your Results file, the geometry outline is notdisplayed clearly. The amount of the surface mesh shown can be modifiedby editing the Wireframe object listed in the Object Selector.

The check boxes next to each object name in the Object Selector control thevisibility of each object. Currently only the Wireframe andDefault Legend (View Control) objects have their visibility turned on.

Page 46: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

Page 30 CFX-5 Tutorials

The edge angle determines how much of the surface mesh is visible. If theangle between two adjacent faces is greater than the edge angle, then thatedge is drawn. If the edge angle is set to 0 degrees, the entire surface meshis drawn. If the edge angle is large, then only the most significant corneredges of the geometry are drawn.

For this geometry, a setting of approximately 15 degrees lets you view themodel location without displaying an excessive amount of the surfacemesh.

In this module we also modify the zoom settings and view of the wireframe.

Procedure 1. In Objects, under Regions, double-click Wireframe.

Tip: While it is not necessary to change the view to set the angle, we doso to explore the practical uses of this feature.

2. Click Isometric View in the Viewing Tools toolbar to select a

specific view.

3. Select Isometric View (Z Up).

4. In Wireframe, under Definition, click the Edge Angle field.

An embedded slider is displayed.

5. Type a value of 10 [degree].

6. Click Apply to update the object with the new setting.

More surface mesh is displayed.

7. Drag the embedded slider to set the Edge Angle value to

approximately 45 [degree].

8. Click Apply to update the object with the new setting.

Less of the outline of the geometry is displayed.

9. Type a value of 15 [degree].

10. Click Apply to update the object with the new setting.

Tip: While it is not necessary to reset the view, we do so to make theappearance consistent between modules of the tutorials.

11. Click Isometric View in the Viewing Tools toolbar to select a

specific view.

Page 47: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

CFX-5 Tutorials Page 31

12. Select View Towards -X.

1.D.2: Creating a Point for the Origin of the Streamline

Introduction: A streamline is the path that a particle of zero mass wouldfollow through the domain. For further details on streamlines, please see"Streamline" on page 101 in the document "CFX-Post".

Procedure 1. Select Create > Object > Point.

You can also use the toolbars to create a variety of objects. Latermodules and tutorials explore this further.

2. Click OK.

This accepts the default name.

3. If required, in the Objects tab, under Point 1 click Geometry.

4. Under Definition, ensure that Method is set to XYZ.

5. Under Point, enter the following coordinates: -1.0 -2.9 1.0.

This is a point near an inlet.

6. Click Apply.

The point appears as a symbol in the 3D Viewer as a crosshair symbol.

Page 48: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

Page 32 CFX-5 Tutorials

1.D.3: Creating a Streamline Originating from a Point

Introduction: Where applicable, streamlines can trace the flow directionforwards (downstream) and/or backwards (upstream).

Synopsis In this module you create a streamline that moves forward from the pointyou created.

Procedure 1. Click Create > Object > Streamline.

You can also use the toolbars to create a variety of objects. Latermodules and tutorials explore this further.

2. Click OK.

This accepts the default name.

3. If required, in the Objects tab, under Streamline 1 click Geometry.

4. Under Definition, in Start From, ensure that Point 1 is set.

Tip: To create streamlines originating from more than one location, clickthe ellipsis icon to the right of the Start From box. This displays theLocation Selector, where <Ctrl> and <Shift> keys can be used to pickmultiple locators.

5. Click the Colour tab.

6. Set Mode to Variable.

7. Set Variable to Temperature.

8. Set Range to Local.

Page 49: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

CFX-5 Tutorials Page 33

9. Click Apply.

The streamline shows the path of a zero mass particle from Point 1. Thetemperature is initially high near the hot inlet, but as the fluid mixes thetemperature drops.

1.D.4: Rearranging the Point

Introduction: Once created, a point can be rearranged manually or by settingspecific co–ordinates.

Tip: In this module, you may choose to display various views and zoomsfrom the Viewing Tools toolbar (such as Isometric View (Z Up) orView Towards -x and so on as well as the Zoom Box) if you prefer tochange the display.

Procedure 1. Double-click Point 1 in the Object Selector.

Properties for the selected user location are displayed.

2. Under Point, set these coordinates: -1.0 -1 1.0.

3. Click Apply.

4. Select Viewer > Picking Mode, or click Pick From Viewer in the

Selection Tools.

While in this mode the viewer does not change settings (such as rotate,zoom, etc.).

Page 50: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

Page 34 CFX-5 Tutorials

5. In the Viewer, drag Point 1 to a new location within the mixer.

The point position is updated in the Object Editor and the streamline isredrawn at the new location. The point moves normal in relation to theviewing direction.

6. Select Viewer > Rotate or click on the Viewing Tools toolbar.

Tip: You can also click in the viewer area, and press space bar to togglebetween Picking Mode and Viewing Mode. A way to pick objects fromViewing Mode, is to hold down <Ctrl> + <Shift> while clicking on anobject with the left mouse button.

7. Under Point, reset these coordinates: -1.0 -2.9 1.0.

8. Click Apply.

The point appears at its original location.

9. Click Isometric View in the Viewing Tools toolbar and select

View Towards -X.

1.D.5: Configuring a Default Legend

Introduction: The appearance of the default legend can be modified.

Synopsis The Default Legend appears whenever a plot is created which is colouredby a variable. The streamline colour was based on temperature, thereforethe legend shows the temperature range. The colour pattern on thelegend’s colour bar is banded in accordance with the bands in the plot1.

Various properties can be modified, including orientation, location and thevisibility of units. You can also change the appearance of text. For fulldetails, please see "Legend" on page 116 in the document "CFX-Post".

The default legend displays values for the last eligible plot that was openedin the Object Editor. To maintain a legend definition during a CFX-Postsession, you can create a new legend by clicking Create legend .

1. An exception occurs when one or more bands in a contour plot representvalues beyond the legend’s range. In this case, such bands are colouredusing a colour that is extrapolated slightly past the range of colours shownin the legend. This can happen only when a user-specified range is used forthe legend.

Page 51: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

CFX-5 Tutorials Page 35

Since there are many settings that can be customized for the legend, thismodule allows you the freedom to experiment with them. The last steps setup the legend to a default with a minor modification to the position.

Tip: When editing values, you can click Reset at any time before clickingApply to reset original values. This is useful if you make many changes,but have not applied them and want to reset all values to where theystarted before your edits.

Note: If using Defaults when modifying the legend, settings for bothDefinition and Appearance are reset. Use this setting cautiously as youmay end up having to redefine settings in another tab.

Procedure 1. Under Objects, expand View Control.

2. Double click Default Legend.

Definition settings display in the Object Editor.

3. Modify a few settings without clicking Apply.

4. Click Defaults.

This is useful if you make and apply changes and then want to reset allvalues to the original default values.

Page 52: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

Page 36 CFX-5 Tutorials

5. Apply the following settings

6. Click Apply.

The appearance and position of the legend changes based on thesettings specified.

7. Modify various settings in Definition and click Apply after each change.

8. Select Appearance.

Modify Set the following To this value

Definition Title Mode User Specified

Title Streamline Temp.

Vertical/Horizontal Horizontal

Location Y Justification Bottom

Page 53: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

CFX-5 Tutorials Page 37

9. Modify a variety of settings in the Appearance and click Apply after

each change.

Tip: If setting either Location to None you can customize the exactlocation of the legend by using the slider or typing values between 0and 1 in Position.

10. Click Defaults.

11. Click Apply.

12. Under Objects, in User Locations and Plots, clear the check box for

Point 1 and Streamline 1.

Since both are no longer visible the associated legend no longerdisplays.

1.D.6: Creating a Slice Plane

Introduction: Defining a slice plane allows you to obtain a cross–section ofthe geometry.

Synopsis In CFX-Post you often view results by colouring a graphics object. Thegraphics object could be an isosurface, a vector plot, or in this case, a plane.The object can be a fixed colour or it can vary based on the value of avariable.

You already have some objects defined by default (listed in the ObjectSelector). You can view results on the boundaries of the Static Mixer bycolouring each boundary object by a variable. To view results within thegeometry (i.e. on non-default locators), new objects need to be created.

You can use the following methods to define a Plane:

• Three Points: creates a plane from three user specified points.

• Point and Normal: defines a plane from one point on the plane and anormal vector to the plane.

• YZ Plane, ZX Plane and XY Plane: similar to Point and Normal exceptthat the normal is defined to be normal to the indicated plane.

The plane you create passes through the point (0,0,1) and its orientation isnormal to the Z axis.

Procedure 1. Select Create > Object > Plane or click Create Plane .

2. In the New Plane window type Slice.

Page 54: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

Page 38 CFX-5 Tutorials

3. Click OK.

The Geometry, Colour and Render tabs let you switch betweensettings.

4. In the Object Editor, click the Geometry tab.

1.D.7: Defining Geometry

Introduction: You need to choose the vector normal to the Plane.

Synopsis You want the Plane to lie in the x-y plane, hence its normal vector pointsalong the z-axis. Any vector which points in the z-direction can be specified,the most obvious being (0,0,1).

Procedure 1. If required, under Geometry, expand Definition.

2. Under Method select Point and Normal.

3. Under Point enter 0,0,1.

4. Under Normal enter 0, 0,1.

5. Click Apply.

Slice displays under User Locations and Plots. However, the slice isnot visible in the 3D Viewer due to the current view configuration.

1.D.8: Configuring Views

Introduction: Depending on the view of the geometry various objects maynot appear visible because they fall in a two dimensional space that can notbe seen.

Synopsis In order to display the plane the view needs to be modified. Several settingsmust be changed to display the plane clearly.

Procedure 1. In the Viewing Tools toolbar, click Isometric View (Z Up) .

2. Click Zoom Box

3. Click and drag a rectangular selection over the geometry.

4. Release the mouse button to zoom in on the selection.

5. Select Viewer > Rotate or click on the Viewing Tools toolbar.

6. Click and drag the mouse pointer down slightly to rotate the geometry

towards you.

7. Click Perspective .

Page 55: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

CFX-5 Tutorials Page 39

8. Click Orthographic from the Viewing Tools toolbar.

Orthographic does not consider depth when plotting an image in theViewer and is the default setting.

9. Click Isometric View (Z Up) in the Viewing Tools toolbar.

1.D.9: Rendering Slice Planes

Introduction: Render settings determine how the Plane is drawn.

Synopsis You can alter shading and lighting properties and display or hide the facesand lines on the Plane. See "Object Editor: Render Panel" on page 18 in thedocument "CFX-Post" for more details.

Procedure 1. If required, under Slice, select Render.

2. Turn off Draw Faces.

3. Turn on Draw Lines.

4. Under Draw Lines change Colour Mode to User Specified.

5. Click the current colour in Line Colour to change to a different colour.

For a greater selection of colours, click the ellipsis to use theSelect colour window.

6. Click Apply.

7. Click Zoom Box

8. Zoom in on the geometry to view it in greater detail.

The line segments show where the slice plane intersects with meshelement faces. The end points of each line segment are located wherethe plane intersects mesh element edges.

9. In the Viewing Tools toolbar, click View Toward -Z .

1.D.10: Colouring the Plane

Introduction: The Colour panel in the Object Editor is used to determinehow the object faces are coloured.

Synopsis By default, planes are coloured grey. Every graphic object in CFX-Post has adefault colour. For details, see "Default Colours" on page 73 in thedocument "CFX-Post". You can change the colouring of the plane so that aspecific colour corresponds to a specific temperature. By drawing faces butnot lines the colour is easier to see.

Page 56: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

Page 40 CFX-5 Tutorials

Procedure 1. Click the Render tab.

2. Turn on Draw Faces.

3. Turn off Draw Lines.

4. Click Apply.

5. In the Object Editor, click the Colour tab.

6. Set Mode to Variable.

You can specify the variable (in this case, Temperature) used to colourthe object. The Constant mode allows you to colour the Plane with afixed colour.

7. Set Variable to Temperature.

8. Click Apply.

Hot water (red) enters from one inlet and cold water (blue) from theother.

1.D.11: Moving the Plane

Introduction: The plane can be moved to different locations.

Synopsis In order to move the plane from one location to another Picking Mode isused. For more information refer to "Picking Mode" on page 75 in thedocument "CFX-Pre".

Procedure 1. In the Viewing Tools toolbar, click Isometric View (Z Up) .

2. Click the Geometry tab.

Review the settings in Definition under Point and under Normal.

3. Select Viewer > Picking Mode, or click Pick From Viewer in the

Selection Tools.

4. Click and drag the plane to a new location that intersects the domain.

When you release the mouse button, the Object Editor and Viewerupdate automatically. Note that Point updates with new settings.

5. Set Point settings to 0,0,1.

6. Click Apply.

7. Select Viewer > Rotate or click on the Viewing Tools toolbar.

8. Turn off visibility for Slice.

9. Click Apply.

Page 57: Tutorials

Flow in a Static Mixer—Viewing Results in CFX-Post

CFX-5 Tutorials Page 41

1.D.12: Adding Contours

Introduction: Contours connect all points of equal value for a scalar variable(for example, Temperature) and help to visualise variable values andgradients.

Synopsis Coloured bands fill the spaces between contour lines. Each band is colouredby the average colour of its two bounding contour lines (even if the latterare not displayed).

Important: The colours of 3D graphics object faces are slightly altered whenlighting is on. To view colours with highest accuracy, turn off Lighting in theDraw Faces frame on the Render panel (in the Object Editor for the object).

Procedure 1. Select Create > Object > Contour or click Create contour plot .

2. Set Name to Slice Contour.

3. Click OK.

4. Under Definition, set Locations to Slice.

5. Set Variable to Temperature.

6. Leave # of Contours (shown at the bottom of the editor) set to 10.

7. Click the Render tab.

8. Turn off Draw Faces.

9. Click Apply to create the contour plot.

10. Turn on Draw Faces.

11. Click Apply.

Page 58: Tutorials

Flow in a Static Mixer—Saving and Restoring Views Using Cameras

Page 42 CFX-5 Tutorials

1.E: Saving and Restoring Views UsingCameras

Introduction: The camera feature saves the current view so that it can berestored later

Synopsis Working with camera views is particularly useful when working with difficultgeometry, or in situations when you repeatedly switch between 2 or moreviews.

To work with cameras, the Camera Tools toolbar is used.

Procedure 1. Select Viewer > Save Camera or click Save Camera .

The current view becomes the new default for the selected camera andis displayed in the toolbar. This defaults to Camera1.

2. Reposition, rotate or zoom the geometry in the viewer.

3. Select Viewer > New Camera or click New Camera .

4. Click OK.

The default name, Camera 5, is used for the new view.

5. Click the Camera Selector in the Camera Tools toolbar.

6. Select Camera 1.

The original view is restored.

7. Using the Camera Selector, switch the view back to Camera 5.

8. Select Viewer > Delete Camera or click Delete Camera .

When deleting a camera view the 3D viewer displays a default view.

9. Using the Camera Selector, switch the view back to Camera 1.

Page 59: Tutorials

Flow in a Static Mixer—Working with Animations

CFX-5 Tutorials Page 43

1.F: Working with Animations

Introduction: Animations build transitions between views for developmentof video files.

WorkflowOverview

Do not perform any of the following tasks now. For review purposes only thissection provides a brief summary of the topics to follow as a generalworkflow:

1. "Showing the Animation Editor" on page 43

2. "Creating the First Keyframe" on page 43

3. "Creating the Second Keyframe" on page 44

4. "Viewing the Animation" on page 45

5. "Modifying the Animation" on page 45

6. "Saving to MPEG" on page 47

1.F.1: Showing the Animation Editor

Introduction: The Animation Editor is used to define keyframes and exportcontent to a video format.

Procedure 1. Select Tools > Animation or, on the Tools toolbar, click

Show Animation Editor .

The Animation Editor can be repositioned as required.

1.F.2: Creating the First Keyframe

Introduction: Keyframes are required in order to produce an animation.

Synopsis In this module we define the first viewer state which will be connected to asecond viewer state by interpolated intermediate frames.

Procedure 1. In the Viewing Tools toolbar, click View Towards -Z .

2. Under User Locations and Plots, turn off the visibility of Slice Contour

and turn on the visibility of Slice.

3. In the Animation Editor, under Keyframe Creation and Editing, click

New .

A new keyframe named KeyframeNo1 is created. This represents thecurrent image displayed in the 3D Viewer.

Page 60: Tutorials

Flow in a Static Mixer—Working with Animations

Page 44 CFX-5 Tutorials

1.F.3: Creating the Second Keyframe

Introduction: Keyframes are required in order to produce an animation.

Synopsis In this module we define the second viewer state which will be connectedto the first viewer state by interpolated intermediate frames.

Procedure 1. From the Object Selector, under User Locations and Plots,

double-click Slice.

2. In the Object Editor, on the Geometry tab, set Point coordinate values

to (0,0,-1.99).

3. Click Apply.

The slice plane moves to the bottom of the mixer.

4. In the Animation Editor, under Keyframe Creation and Editing, click

New .

KeyframeNo2 is created and represents the image displayed in theViewer.

5. Select KeyframeNo1.

6. Set # of Frames (located near the bottom of the Animation Editor) to

20.

This is the number of intermediate frames used when going fromKeyframeNo1 to KeyframeNo2. This number is displayed in theFrames column next to KeyframeNo1.

7. Press Enter.

The Frame # column shows the frame in which each keyframe appears.KeyframeNo1 appears at frame #1 since it defines the start of theanimation. KeyframeNo2 is at Frame # 22 since you have 20intermediate frames (frames 2 to 21) in between KeyframeNo1 andKeyframeNo2.

8. Click Previous Keyframe located at the top of the Animation

Editor panel.

The slice plane in the Viewer returns to its original position.

Page 61: Tutorials

Flow in a Static Mixer—Working with Animations

CFX-5 Tutorials Page 45

1.F.4: Viewing the Animation

Introduction: More keyframes could be added, but this animation has onlytwo keyframes (which is the minimum possible).

Synopsis The controls previously greyed-out in the Animation Editor are nowavailable. The number of intermediate frames between keyframes is listedbeside the keyframe having the lowest number of the pair. The number ofkeyframes listed beside the last keyframe is ignored.

The Looping option determines what happens when the animationreaches the last keyframe. When it is set to Loop, the animation repeatsitself the number of times defined by Cycles. In this case only one Cycle isplayed. When Looping is set to Bounce, every other cycle is played inreverse order, starting with the second.

See "Animation Editor" on page 150 in the document "CFX-Post" for moredetails on the Animation Editor.

Procedure 1. Click Play Forward .

The animation plays from Frame # 1 to Frame # 22. It plays relativelyslowly because the slice plane must be updated for each frame.

1.F.5: Modifying the Animation

Introduction: The animation can be reconfigured as required.

Synopsis To make the plane sweep through the whole geometry, you set the startingposition of the plane to be at the top of the mixer. You also modify theRange properties of the plane so that it shows the temperature variationbetter.

As the animation is played, you can see the hot and cold water entering themixer. Near the bottom of the mixer (where the water flows out) you can seethat the temperature is quite uniform. The new temperature range lets youview the mixing process more accurately than the global range used in thefirst animation.

When the animation has finished, the MPEG file is written to the directoryspecified. The MPEG can be played back in any Media Player that supportsthe MPEG format.

Page 62: Tutorials

Flow in a Static Mixer—Working with Animations

Page 46 CFX-5 Tutorials

Procedure 1. Apply the following settings

2. Click Apply.

The slice plane moves to the top of the static mixer.

Note: Do not double click in the next step.

3. In the Animation Editor, single click (do not double-click)

KeyframeNo1 to select it.

If you had double-clicked KeyFrameNo1, the plane and viewer stateswould have been redefined according to the stored settings forKeyFrameNo1. If this happens, click Undo and try again to select thekeyframe.

4. Click Set Keyframe .

The image in the Viewer replaces the one previously associated withKeyframeNo1.

5. Double-click KeyframeNo2.

The object properties for the slice plane are updated according to thesettings in KeyFrameNo2.

6. Apply the following settings

7. Click Apply.

8. In the Animation Editor, click KeyframeNo2.

9. Click Set Keyframe to save the new settings to KeyframeNo2.

Modify Set the following To this value

Slice > Geometry Point 0, 0, 1.99

Slice > Colour Range User Specified

Min 295 [K]

Max 305 [K]

Modify Set the following To this value

Slice > Colour Range User Specified

Min 295 [K]

Max 305 [K]

Page 63: Tutorials

Flow in a Static Mixer—Working with Animations

CFX-5 Tutorials Page 47

1.F.6: Saving to MPEG

Introduction: By defining the geometry and then saving to MPEG the resultscan be shared in a video format.

Procedure 1. Under Playback Options, turn on Save Animation Movie.

2. Click Browse next to MPEG File.

3. Under File name type StaticMixer.mpg.

Note that you must type the extension for the file name as it will not beautomatically assigned.

4. If required, set the path location to a different folder.

5. Click Save.

At this point, the animation has not yet been produced.

6. Click Previous Keyframe .

Wait a moment as the display updates the keyframe display.

7. Click Play Forward .

8. If prompted to overwrite an existing movie click Overwrite.

The animation plays and builds an mpg file.

9. Click the Options button at the bottom of the Animation Editor.

• On the Advanced panel, you can see that a Frame Rate of 24frames per second was used to create the animation. The animationyou produced contains a total of 22 frames, so it takes just under 1second to play in a media player.

• More details about the options on this form can be found in"Animation Editor: Options Dialog Box" on page 154 in thedocument "CFX-Post".

10. Click Cancel to close the form.

11. Click Close to close the Animation Editor.

1.F.7: Exiting CFX-Post

Introduction: When finished with CFX-Post exit the current window.

Synopsis Two procedures are documented. Depending on your installation of CFX-5follow either the Standalone procedure or the Workbench procedure.

Procedure inStandalone

1. When you are finished, select File > Quit to exit CFX-Post.

2. Click No if prompted to save.

Page 64: Tutorials

Flow in a Static Mixer—Working with Animations

Page 48 CFX-5 Tutorials

3. Review the animation in third–party software as required.

Procedure inWorkbench

1. Before quitting it is advised to return to the Project Page and save the

current project.

2. When you are finished, select File > Close to close the current file.

3. Click No if prompted to save.

4. Close the current project.

5. Close Workbench.

6. Review the animation in third–party software as required.

Page 65: Tutorials

CFX-5 Tutorials Page 49

CFX-5 Tutorials

Tutorial 2

Flow in a Static Mixer(Refined Mesh)

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• StaticMixer.def

• StaticMixer_001.res

• StaticMixerRef.pre

• StaticMixerRefMesh.gtm

Page 66: Tutorials

Flow in a Static Mixer (Refined Mesh)—Introduction

Page 50 CFX-5 Tutorials

2.A: Introduction

2.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• using the General Mode of CFX-Pre(This mode is used for more complex cases.)

• rerunning a problem with a refined mesh

• importing CCL to copy the definition of a different simulation into thecurrent simulation

• viewing the mesh with a Sphere volume locator and a Surface Plot

• using a Plane Volume locator and the Mesh Calculator to analyse meshquality

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Fluid Type General Fluid

Domain Type Single Domain

Turbulence Model k-Epsilon

Heat Transfer Thermal Energy

Boundary Conditions Inlet (Subsonic)

Outlet (Subsonic)

Wall: No-Slip

Wall: Adiabatic

Timestep Physical Timescale

CFX-Post Plots Planevolume

Slice Plane

Spherevolume

Other Viewing the Mesh

Page 67: Tutorials

Flow in a Static Mixer (Refined Mesh)—Introduction

CFX-5 Tutorials Page 51

2.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

2.A.3: Overview of the problem to solve

Introduction: In this tutorial you use a refined mesh to obtain a bettersolution to the Static Mixer problem created in Tutorial 1. You establish ageneral workflow for analysing the flow of fluid into and out of a mixer. Thistutorial is important because it uses a specific problem to teach the generalapproach taken when working with an existing mesh.

You start a new simulation in CFX-Pre and import the refined mesh. Thistutorial introduces General Mode—the mode used for most tutorials—inCFX-Pre. The physics for this tutorial are the same as for Tutorial 1. Therefore,you can import the physics settings used in Tutorial 1 into CFX-Pre to savetime.

Page 68: Tutorials

Flow in a Static Mixer (Refined Mesh)—Defining the Simulation using General Mode in CFX-Pre

Page 52 CFX-5 Tutorials

2.B: Defining the Simulation using GeneralMode in CFX-Pre

Introduction: After having completed meshing CFX-Pre is used as aconsistent and intuitive interface for the definition of complex CFDproblems.

Synopsis This section describes the step-by-step definition of the flow physics inCFX-Pre. As an alternative, you can play a session file to complete theCFX-Pre part of the tutorial.

WorkflowOverview

Do not perform any of the following tasks now. For review purposes only thissection provides a brief summary of the topics to follow as a generalworkflow:

1. "Creating a New Simulation" on page 52

2. "Importing a Mesh" on page 53

3. "Importing CCL" on page 54

4. "Viewing Domain Settings" on page 55

5. "Viewing the Boundary Condition Setting" on page 56

6. "Defining Solver Parameters" on page 56

7. "Writing the Solver (.def) File." on page 57

8. As an alternative to these steps, you can also review "Playing the Session

File" on page 59

To begin this tutorial and create a new simulation in CFX-Pre, continue from"Creating a New Simulation" on page 52.

2.B.1: Creating a New Simulation

Introduction: Before importing and working with a mesh a simulation needsto be developed using General.

Synopsis Two procedures are documented. Depending on your installation of CFX-5follow either the Standalone procedure or the Workbench procedure. Formore information, refer to "CFX-5.7.1 in Workbench" on page 19.

Procedure inStandalone

1. If required, launch CFX-Pre.

2. Select File > New Simulation.

Page 69: Tutorials

Flow in a Static Mixer (Refined Mesh)—Defining the Simulation using General Mode in CFX-Pre

CFX-5 Tutorials Page 53

3. Click General in the New Simulation File window.

4. If required, set the path location to a different folder.

5. Under File name type StaticMixerRef.

6. Click Save.

The Mesh tab is displayed.

7. Proceed to "Importing a Mesh" on page 53.

Procedure inWorkbench

1. If required, launch Workbench.

2. Click Empty Project.

The Project Page will appear displaying an unsaved project.

3. Select File > Save or click Save.

4. If required, set the path location to a different folder.

5. Under Filename, type StaticMixerRef.

6. Click Save.

7. Click Start CFX-Pre under Advanced CFD on the left hand Task Bar.

8. Select File > New Simulation.

9. Click General in the New Simulation File window.

10. Under File name type StaticMixerRef.

11. If required, set the path location to a different folder.

12. Click Save.

The Mesh tab is displayed.

2.B.2: Importing a Mesh

Introduction: At least one mesh must be imported before physics areapplied.

Synopsis An assembly is a group of mesh regions that are topologically connected.Each assembly can contain only one mesh, but multiple assemblies arepermitted. The Mesh tab shows the regions in Assembly in a tree structure.The level below Assembly displays 3D regions and the level below each 3D

Page 70: Tutorials

Flow in a Static Mixer (Refined Mesh)—Defining the Simulation using General Mode in CFX-Pre

Page 54 CFX-5 Tutorials

region shows the 2D regions associated with it. The check box next to eachitem in the Mesh tree indicates the visibility status of the object in theviewer; you can click these to toggle visibility.

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

Procedure 1. Select File > Import Mesh or click Import Mesh .

2. In the bottom left of the screen, under File click Browse .

3. From your working directory, select StaticMixerRefMesh.gtm.

4. Click Open.

5. Click OK.

The mesh is opened.

6. Click Isometric View (Z up) from the Viewing Tools toolbar.

A clearer view of the mesh is displayed.

2.B.3: Importing CCL

Introduction: Since the physics for this simulation is very similar to that forthe first tutorial, you can save time by importing the settings used in thelatter.

Synopsis The CCL contains settings that reference mesh regions. For example theoutlet boundary condition references the mesh region named out. In thistutorial, the name of the mesh regions are the same as in Tutorial 1, so youcan import the CCL without error.

The physics for a simulation can be saved to a CCL (CFX CommandLanguage) file at any time by selecting File > Export CCL. However, anumber of other files can also be used as sources to import CCL including:

• Simulation files (*.cfx)

• Results files (*.res)

• Definition (*.def)

Note: If you import CCL that references non-existent mesh regions you willget errors.

Page 71: Tutorials

Flow in a Static Mixer (Refined Mesh)—Defining the Simulation using General Mode in CFX-Pre

CFX-5 Tutorials Page 55

Procedure 1. Select File > Import CCL.

Import CCL appears.

2. Under Import Method select Append.

Append and Replace are useful if you have defined physics and wish toupdate or replace them with newly imported physics.

3. Under File type select CFX-5 Def/Res Files (*def *res).

4. Select StaticMixer.def, located in the examples directory.

5. Click Open.

6. Click Physics.

The Physics Selector displays a summary of the current simulation in atree structure. Some items may be recognized from Tutorial 1—forexample the boundary condition objects in1, in2 and out. See "PhysicsSelector" on page 12 in the document "CFX-Pre" for more details.

2.B.4: Viewing Domain Settings

Introduction: It is useful to view current settings to review options availablein General Mode.

Synopsis Various domain settings can be set. These include:

• General Options

• Fluid Models

• Initialisation

General OptionsGeneral Options specify the location of the domain, coordinate framesettings and the fluids/solids that are present in the domain. You alsoreference Pressure, Buoyancy and whether the domain is Stationary orRotating. Mesh motion can also be set.

Fluid ModelsFluid Models set models that apply to the fluid(s) in the domain, such asheat transfer, turbulence, combustion and radiation models. An optionabsent in Tutorial 1 is Turbulent Wall Functions, which is set to Scalable.Wall functions model the flow in the near-wall region. For the k-epsilonturbulence model, you should always use scalable wall functions. See"Modelling Flow Near the Wall" on page 88 in the document "CFX-5 SolverTheory" for more details.

Page 72: Tutorials

Flow in a Static Mixer (Refined Mesh)—Defining the Simulation using General Mode in CFX-Pre

Page 56 CFX-5 Tutorials

InitialisationInitialisation sets the initial conditions for the current domain only. This isgenerally used when multiple domains exist to allow setting different initialconditions in each domain, but can also be used to initialise single-domainsimulations such as this case. Global Initialisation allows all domains to beinitialised simultaneously. You will use this in many of the later tutorials.

Procedure 1. Under Physics, under Flow, double-click StaticMixer.

2. Click General Options and review, but do not change, the current

settings.

3. Click Fluid Models and review, but do not change, the current settings.

4. Click Initialisation and review, but do not change, the current settings.

5. Click Close.

2.B.5: Viewing the Boundary Condition Setting

Synopsis For the k-epsilon turbulence model you must specify the turbulent natureof the flow entering through the inlet boundary. For this simulation, thedefault setting of Medium (Intensity = 5%) is used. This is a sensiblesetting if you do not know the turbulence properties of the incoming flow.For more information on setting the turbulence quantities, see"Turbulence" on page 57 in the document "CFX-5 Solver Modelling".

Procedure 1. Under Static Mixer, in Flow, double-click in1.

2. Click Boundary Details and review, but do not change, the current

settings.

3. Click Close.

2.B.6: Defining Solver Parameters

Introduction: Solver Control parameters control aspects of the numericalsolution generation process.

Synopsis In Tutorial 1 you set some solver control parameters, such as AdvectionScheme and Timescale Control, while other parameters were setautomatically by CFX-Pre. This was done in "Defining Solver Parameters" onpage 16.

Page 73: Tutorials

Flow in a Static Mixer (Refined Mesh)—Defining the Simulation using General Mode in CFX-Pre

CFX-5 Tutorials Page 57

In this tutorial we use High Resolution for the advection scheme. This ismore accurate than the Upwind Scheme used in Tutorial 1. You usuallyrequire a smaller timestep when using this model. You can also expect thesolution to take a higher number of iterations to converge when using thismodel.

See "Judging Convergence" on page 364 in the document "CFX-5 SolverModelling" for more details.

Procedure 1. Select Create > Flow Objects > Solver Control or click Solver Control

.

2. Apply the following settings

3. Click Apply.

4. Click Advanced Options.

5. Ensure that Global Dynamic Model Control is turned on.

See "Dynamic Model Control" on page 360 in the document "CFX-5Solver Modelling" for details.

6. Click OK.

2.B.7: Writing the Solver (.def) File.

Introduction: Once all boundaries are created we move from General Modeinto CFX-Solver.

Synopsis You are now ready to write the Definition file (which contains theinformation required by the CFX-Solver for this CFD analysis), save theSimulation file, shut down CFX-Pre and start CFX-Solver Manager.

Modify Set the following To this value

Advection Scheme Option High Resolution

Convergence Control Timescale Control Physical Timescale

Physical Timescale 0.5 [s]

Max. No. Iterations 150*

*. If your solution does not meet the convergence criteria after thisnumber of timesteps, CFX-Solver will stop.

Page 74: Tutorials

Flow in a Static Mixer (Refined Mesh)—Defining the Simulation using General Mode in CFX-Pre

Page 58 CFX-5 Tutorials

The Simulation file—StaticMixerRef.cfx—contains the simulation definitionin a format that can be loaded by CFX-Pre, allowing you to complete (ifapplicable), restore, and modify the simulation definition. The Simulationfile differs from the Definition file in two important ways:

• The Simulation file can be saved at any time while defining thesimulation.

• Mesh data is not contained in the Simulation file.The simulation file references the original mesh file(s).

Procedure 1. Select File > Write Solver (.def) File or click Write a Solver File

Write Solver File is displayed.

2. Apply the following settings

3. Click OK.

4. If you are notified the file already exists, click Overwrite.

This file is provided in the examples directory and may exist in yourworking folder if you have copied it there.

5. If prompted, click Yes to save StaticMixerRef.cfx.

The definition file (StaticMixerRef.def) and the simulation file(StaticMixerRef.cfx) are created. CFX-Solver Manager automaticallystarts and the definition file is set in the Definition File box ofDefine Run.

6. Proceed to "Obtaining a Solution Using Interpolation with CFX-Solver"

on page 61.

Set the following To this value

Filename StaticMixerRef.def

Operation Start Solver Manager

Report Summary of Interface Connections Off

Quit CFX–Pre*

*. If using CFX-Pre in Standalone Mode.

On

Page 75: Tutorials

Flow in a Static Mixer (Refined Mesh)—Defining the Simulation using General Mode in CFX-Pre

CFX-5 Tutorials Page 59

2.B.8: Playing the Session File

Introduction: If you have performed all the tasks in the previous steps,proceed directly to "Obtaining a Solution Using Interpolation withCFX-Solver" on page 61.

Synopsis Two procedures are documented. Depending on your installation of CFX-5follow either the Standalone procedure or the Workbench procedure.

Procedure inStandalone

1. If required, launch CFX-Pre.

2. Select Session > Play Session.

3. Select StaticMixerRef.pre, located in the examples directory.

4. Click Open.

A Definition file is written.

5. Select File > Quit.

6. Click Quit.

7. Click the CFX-Solver icon on the CFX Launcher.

8. Select File > Define Run.

9. Under Definition File, click Browse .

10. Select StaticMixerRef.def, located in the examples directory.

11. Proceed to "Obtaining a Solution Using Interpolation with CFX-Solver"

on page 61.

Procedure inWorkbench

1. If required, launch Workbench.

2. Click Empty Project.

3. Select File > Save or click Save.

4. Under Filename, type StaticMixerRef.

5. If required, set the path location to a different folder.

6. Click Save.

7. Click Start CFX-Pre.

8. Select Session > Play Session.

9. Select StaticMixerRef.pre, located in the examples directory.

10. Click Open.

A Definition file is written.

11. Click the CFX-Solver tab.

Page 76: Tutorials

Flow in a Static Mixer (Refined Mesh)—Defining the Simulation using General Mode in CFX-Pre

Page 60 CFX-5 Tutorials

12. Select File > Define Run.

13. Under Definition File, click Browse .

14. Select StaticMixerRef.def, located in the examples directory.

Page 77: Tutorials

Flow in a Static Mixer (Refined Mesh)—Obtaining a Solution Using Interpolation with

CFX-5 Tutorials Page 61

2.C: Obtaining a Solution Using Interpolationwith CFX-Solver

Introduction: Two windows are displayed when CFX-Solver Manager runs.There is an adjustable split between the windows which is oriented eitherhorizontally or vertically, depending on the aspect ratio of the entireCFX-Solver Manager window (also adjustable).

WorkflowOverview

Do not perform any of the following tasks now. For review purposes only thissection provides a brief summary of the topics to follow as a generalworkflow:

1. "Interpolating the Results" on page 61

2. "Using Define Run With Data From a Previous Run" on page 62

3. "Confirming Results" on page 63

4. "Moving from CFX-Solver to CFX-Post" on page 63

2.C.1: Interpolating the Results

Introduction: In the CFX-Solver Manager, Define Run is visible andDefinition File has automatically been set to the definition file fromCFX-Pre:StaticMixerRef.def. We wish to make use of the results fromTutorial 1, but the two meshes are not identical. The Initial Values Fileneeds to have its data interpolated onto the new mesh associated with theDefinition File.

The CFX-Solver supports automatic interpolation that will be used in thefollowing steps:

The values from StaticMixer_001.res will be interpolated onto thedefinition file’s mesh when the run is started. The results fromStaticMixer_001.res will be used as the initial guess for this

Page 78: Tutorials

Flow in a Static Mixer (Refined Mesh)—Obtaining a Solution Using Interpolation with

Page 62 CFX-5 Tutorials

simulation (rather than Solver defaults) because you have set theinitialisation for all variables in CFX-Pre to Automatic or Automatic withValue.

Tip: You may also carry out interpolation as a separate step using theInterpolate feature from the Tools menu. See "Interpolate" on page 34in the document "CFX- Solver Manager" for more details aboutinterpolating results.

Procedure 1. Under Initial Values File click Open .

2. Select the results file from Tutorial 1: StaticMixer_001.res.

If you did not complete the first tutorial, you can useStaticMixer_001.res from the examples directory.

3. Click Open.

4. Turn on Interpolate Initial Values onto Def File Mesh.

2.C.2: Using Define Run With Data From a Previous Run

Introduction: Define Run allows configuration of a run for processing byCFX-Solver.

Synopsis You have already made required changes to the information in Define Run.

Procedure 1. Ensure Define Run is displayed and configured properly based on the

last module.

2. Click Start Run.

Note: Once the second iteration appears data begins to plot. Plotting maytake a long time depending on the amount of data to process. Do not shutdown the process.

Page 79: Tutorials

Flow in a Static Mixer (Refined Mesh)—Obtaining a Solution Using Interpolation with

CFX-5 Tutorials Page 63

2.C.3: Confirming Results

Introduction: When interpolation is successful specific information appearsin the text screen of CFX-Solver.

Synopsis To confirm that the interpolation was successful, look in the text pane inCFX-Solver Manager. The following text appears before the convergencehistory begins:

+---------------------------------------------------------+| Initial Conditions Supplied by Fields in the Input Files+---------------------------------------------------------+

This lists the variables that were interpolated from the results file. After thefinal iteration a message similar to the following content appears:

CFD Solver finished: Tue Oct 19 08:06:45 2004CFD Solver wall clock seconds: 1.7100E+02

Execution terminating:all RMS residual AND global imbalanceare below their target criteria

This indicates that CFX-Solver has successfully calculated the solution forthe problem to the specified accuracy or has run out of coefficient loops.

Procedure 1. Click OK when CFX-Solver is finished.

2.C.4: Moving from CFX-Solver to CFX-Post

Introduction: Once CFX-Solver has finished you can use CFX-Post to reviewthe finished results.

Synopsis CFX-Solver is used to calculate a problem. In order to review the results ofthe calculation use CFX-Post.

Procedure 1. Select Tools > Post–Process Results or click Post–Process Results

.

2. If using CFX-Solver in Standalone Mode, select Shut down Solver

Manager.

This forces Standalone CFX-Solver to close when finished. This option isnot required in Workbench.

3. Click OK.

After a short pause, CFX-Post starts.

Page 80: Tutorials

Flow in a Static Mixer (Refined Mesh)—Viewing Results in CFX-Post

Page 64 CFX-5 Tutorials

2.D: Viewing Results in CFX-Post

Introduction: You compare results between this tutorial and Tutorial 1 tonote changes.

Synopsis When CFX-Post starts, the 3D Viewer and Objects Workspace display bydefault.

WorkflowOverview

Do not perform any of the following tasks now. For review purposes only thissection provides a brief summary of the topics to follow as a generalworkflow:

1. "Creating a Slice Plane" on page 65

2. "Colouring the Plane" on page 66

3. "Viewing the Surface Mesh" on page 66

4. "Looking at the Inflated Elements in Three Dimensions" on page 67

5. "Creating a Second Volume Object" on page 69

6. "Viewing the Surface Mesh on the Mixer Body" on page 69

7. "Viewing the Layers of Inflated Elements" on page 70

8. "Using the Mesh Calculator" on page 70

9. "Viewing the Mesh Elements with Largest Face Angle Using a Volume"

on page 71

10. "Viewing the Mesh Elements with Largest Face Angle Using a Point" on

page 72

In this tutorial, you also compare results between this tutorial and Tutorial 1.

Page 81: Tutorials

Flow in a Static Mixer (Refined Mesh)—Viewing Results in CFX-Post

CFX-5 Tutorials Page 65

2.D.1: Creating a Slice Plane

Introduction: More information exists for use by CFX-Post in this tutorial thanin Tutorial 1 the slice plane is more detailed when reviewed.

Synopsis Once a new slice plane is created it can be compared with Tutorial 1. Thereare three noticeable differences between the two slice planes.

• Around the edges of the mixer geometry there are several layers ofnarrow rectangles. This is the region where the mesh contains prismaticelements (which are created as inflation layers). The bulk of thegeometry contains tetrahedral elements.

• There are more lines on the Plane than there were in Tutorial 1. This isbecause the slice plane intersects with more mesh elements.

• The curves of the mixer are smoother than in Tutorial 1 because the finermesh better represents the true geometry.

Procedure 1. In the Viewing Tools toolbar, click Isometric View (Z Up) .

2. Select Create > Object > Plane or click Create Plane .

3. In the New Plane window type Slice.

4. Click OK.

The Geometry, Colour and Render tabs let you switch betweensettings.

5. Apply the following settings

6. Click Apply.

7. In the Viewing Tools toolbar, click View Toward -Z .

8. Click Zoom Box

9. Zoom in on the geometry to view it in greater detail.

Compare the onscreen image with the equivalent picture from"Rendering Slice Planes" on page 39. Notice the differences mentionedabove.

Modify Set the following To this value

Geometry > Definition Method Point and Normal

Point 0, 0, 1

Normal 0, 0, 1

Render Draw Faces Off

Draw Lines On

Page 82: Tutorials

Flow in a Static Mixer (Refined Mesh)—Viewing Results in CFX-Post

Page 66 CFX-5 Tutorials

10. In the Viewing Tools toolbar, click Isometric View (Z Up) .

2.D.2: Colouring the Plane

Introduction: Once colour is applied it can be compared with Tutorial 1. Thecolour variation across the plot is smoother than it was in Tutorial 1, and amore detailed resolution of the temperature field is displayed.

Procedure 1. Apply the following settings

2. Click Apply.

Hot water (red) enters from one inlet and cold water (blue) from theother. Compare the onscreen image with the equivalent picture from"Colouring the Plane" on page 66. Notice the differences mentionedabove.

3. In the bottom left of the Object Selector, deselect Visibility.

Since the Slice Plane is not required in the next module it will be hidden.

4. Click Apply.

2.D.3: Viewing the Surface Mesh

Introduction: At the end of this module, at the outside of the outlet, there willbe a white circle corresponding to the edge of the outlet wall (Rotate thegeometry to see where the outlet is located.). Within this, there are severalconcentric “circles”. This shows the five layers of inflated elements. Withinthe innermost of these circles are triangles. These are the faces of thetetrahedral elements contained in the bulk of the geometry.

Procedure 1. In the Viewing Tools toolbar, click Isometric View (Z Up) .

2. Under Objects, expand File Contents and expand Static Mixer.

Modify Set the following To this value

Render Draw Faces On

Draw Lines Off

Colour Mode Variable*

*. You can specify the variable (in this case, Temperature) used tocolour the object. Constant allows you to colour the Plane with afixed colour.

Variable Temperature

Page 83: Tutorials

Flow in a Static Mixer (Refined Mesh)—Viewing Results in CFX-Post

CFX-5 Tutorials Page 67

3. Under Static Mixer, double–click out.

The Object Editor displays the Colour and Render panels for this object.Geometry can not be edited since the boundary location was definedin CFX-Pre.

4. In the Object Editor, turn on Visibility.

5. Click Apply.

6. Apply the following settings

7. Click Zoom Box

8. Zoom in on the geometry to view out in greater detail.

9. Rotate the image as required to clearly see the mesh.

10. In the Viewing Tools toolbar, click Isometric View (Z Up) .

11. Select Viewer > Rotate or click on the Viewing Tools toolbar.

2.D.4: Looking at the Inflated Elements in Three Dimensions

Introduction: To show more clearly what effect inflation has on the shape ofthe elements, use a volume object to show individual elements.

Synopsis In this module, the first element is a normal tetrahedral element. The secondis an inflated prismatic element.

Modify Set the following To this value

Colour Mode Constant

Colour White

Render Draw Faces Off

Draw Lines On

Colour Mode User Specified

Line Colour (Select any light colour)

Page 84: Tutorials

Flow in a Static Mixer (Refined Mesh)—Viewing Results in CFX-Post

Page 68 CFX-5 Tutorials

Leave the surface mesh on the outlet visible to help see how surface andvolume meshes are related.

• A volume object consists of all the mesh elements that are entirelycontained in a defined volume (Inclusive turned off), or all the meshelements whose geometric centres are contained in a defined volume(Inclusive turned on).

• You will use a carefully placed Sphere volume to view a single meshelement by containing the centre of the element in the volume.When done, a red tetrahedral mesh element is displayed near the centreof the outlet. To see different mesh elements, adjust the Point andRadius values fractionally. Increasing the Radius value includes moreelements in the volume object. You can use a Point object to visualisethe sphere centre.

Procedure 1. Select Create > Object > Volume or click Create Volume .

2. In the New Volume window type Tet Volume.

3. Click OK.

4. Apply the following settings

5. Click Apply to create the volume object.

Modify Set the following To this value

Geometry > Definition Method Sphere

Point 0.08, 0, -2*

*. The z slider’s minimum value corresponds to the minimum z valueof the entire geometry, which, in this case, occurs at the outlet.

Radius 0.14 [m]

Mode Below Intersection

Inclusive Off†

†. Only elements that are entirely contained within the spherevolume will be included

Colour Colour Red

Render Transparency 0.3

Draw Lines On

Line Width 5.0

Line Colour Grey

Page 85: Tutorials

Flow in a Static Mixer (Refined Mesh)—Viewing Results in CFX-Post

CFX-5 Tutorials Page 69

2.D.5: Creating a Second Volume Object

Introduction: To show more clearly what effect inflation has on the shape ofthe elements, use a volume object to show individual elements.

Synopsis A second volume object will show an element in the inflation layers.

In addition to the tetrahedral element, a prismatic element will be visible.

Procedure 1. Right click Tet Volume and choose Duplicate or select Tet Volume

and click Duplicate Selected Object .

Duplicate Object is displayed.

2. In the New Volume window type Prism Volume.

3. Click OK.

4. Double click Prism Volume.

5. Apply the following settings

6. Click Apply.

2.D.6: Viewing the Surface Mesh on the Mixer Body

Introduction: You can see how the prismatic element was inflated from thesurface mesh.

Procedure 1. Double-click the StaticMixer Default object.

2. Apply the following settings

3. Turn on Visibility.

4. Click Apply.

Modify Set the following To this value

Geometry > Definition Point -0.22, 0.4, -1.85

Radius 0.206 [m]

Colour Colour Orange

Modify Set the following To this value

Render Draw Faces On

Draw Lines On

Line Width 2

Page 86: Tutorials

Flow in a Static Mixer (Refined Mesh)—Viewing Results in CFX-Post

Page 70 CFX-5 Tutorials

2.D.7: Viewing the Layers of Inflated Elements

Introduction: You will see the layers of inflated elements on the wall of themain body of the mixer. Within the body of the mixer, there will be manylines which are drawn wherever the face of a mesh element intersects theslice plane.

Procedure 1. Select Create > Object > Plane or click Create Plane .

2. In the New Plane window type Slice2.

3. Click OK.

4. Apply the following settings

5. Click Apply to create the plane.

6. Turn off the visibility of all objects except Slice2.

7. To see the plane clearly, click View Towards -X .

2.D.8: Using the Mesh Calculator

Introduction: You can use the Mesh Calculator to check the quality of yourmesh. For example, you can load a .def file into CFX-Post and check themesh quality before running the .def file in the solver.

The mesh calculator will display various information depending on theselected function. For example, you may want to check the element faceangles or element volume ratios. Results are calculated over all domains.

Procedure 1. Select Tools > Mesh Calculator or click Mesh Calculator .

2. Under Function, select Maximum Face Angle.

3. Click Calculate to see a summary of the mesh quality metrics.

A new variable, Maximum Face Angle, is created and will be used forfurther analysis in this tutorial.

4. Click Close.

For details about the Mesh Calculator, see "Mesh Calculator" on page146 in the document "CFX-Post".

Modify Set the following To this value

Geometry > Definition Method YZ Plane

Render Draw Faces Off

Draw Lines On

Page 87: Tutorials

Flow in a Static Mixer (Refined Mesh)—Viewing Results in CFX-Post

CFX-5 Tutorials Page 71

2.D.9: Viewing the Mesh Elements with Largest Face AngleUsing a Volume

Introduction: In the previous section, you used the Mesh Calculator tocalculate the maximum face angles of mesh elements. As a result, a newvariable, Maximum Face Angle, was created and stored at every node. Here,you will visualise the elements which contain at least one node having amaximal value of Maximum Face Angle by creating an Isovolume locatorbased on this variable. This technique can be used to visualise problemareas of a mesh, and can be used with other variables that are created byrunning the Mesh Calculator.

In the viewer, the mesh elements which meet the criteria will appear as partof the Isovolume object.

Procedure 1. Select Create > Object > Volume or click Create Volume .

2. In the New Volume window type Max Face Angle.

3. Click OK.

4. Apply the following settings

5. Click Apply.

You now see a small volume near the entrances of one of the inlets.

Modify Set the following To this value

Geometry > Definition Method Isovolume

Variable Maximum Face Angle

Value 69 [degree]

Mode Below Value

Inclusive On*

*. This will include any elements that have at least ONE node with avariable value greater than or equal to the given value. For details,see "Above/Below/Between/At Value and the Inclusive toggle" onpage 84 in the document "CFX-Post".

Page 88: Tutorials

Flow in a Static Mixer (Refined Mesh)—Viewing Results in CFX-Post

Page 72 CFX-5 Tutorials

2.D.10: Viewing the Mesh Elements with Largest Face AngleUsing a Point

Introduction: Next, we will create a Point Object to show the node(s) havingthe maximum value of Maximum Face Angle. The Point Object will berepresented by a 3-d yellow crosshair symbol. In order to avoid obscuringthe Point Object with the Isovolume Object, you may want to turn off thevisibility of the latter.

Procedure 1. Select Create > Point or click Create Point .

2. Click OK to use the default name.

3. Apply the following settings

4. Click Apply.

2.D.11: Exiting CFX-Post

Introduction: When finished with CFX-Post exit the current window.

Synopsis Two procedures are documented. Depending on your installation of CFX-5follow either the Standalone procedure or the Workbench procedure.

Procedure inStandalone

1. When you are finished, select File > Quit to exit CFX-Post.

2. Click No if prompted to save.

Procedure inWorkbench

1. Before quitting it is advised to return to the Project Page and save the

current project.

2. When you are finished, select File > Close to close the current file.

3. Click No if prompted to save.

Modify Set the following To this value

Geometry > Definition Method Variable Maximum

Location Assembly

Variable Maximum Face Angle

Page 89: Tutorials

CFX-5 Tutorials Page 73

CFX-5 Tutorials

Tutorial 3

Flow in a ProcessInjection Mixing Pipe

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• InjectMixer.pre

• InjectMixer_velocity_profile.csv

• InjectMixerMesh.gtm

Page 90: Tutorials

Flow in a Process Injection Mixing Pipe—Introduction

Page 74 CFX-5 Tutorials

3.A: Introduction

3.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• applying a Profile Boundary Condition using data stored in a file

• visualising the velocity on a boundary in CFX-Pre

• using the CFX Expression Language (CEL) to describe temperaturedependent fluid properties in CFX-Pre

• using the k-epsilon turbulence model

• using streamlines in CFX-Post to track flow through the domain

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Fluid Type General Fluid

Domain Type Single Domain

Turbulence Model k-Epsilon

Heat Transfer Thermal Energy

Boundary Conditions Boundary ProfileVisualization

Inlet (Profile)

Inlet (Subsonic)

Outlet (Subsonic)

Wall: No-Slip

Wall: Adiabatic

CEL (CFX Expression Language)

Timestep Physical Timescale

CFX-Post Plots Default Locators

Outline Plot (Wireframe)

Slice Plane

Streamline

Other Changing the colour range

Expression Editor

Legend

Viewing the Mesh

Page 91: Tutorials

Flow in a Process Injection Mixing Pipe—Introduction

CFX-5 Tutorials Page 75

3.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

3.A.3: Overview of the problem to solve

Introduction: In this tutorial you establish a general workflow for analysingthe flow of fluid into and out of an injection pipe. This tutorial is importantbecause it uses a specific problem to teach the general approach takenwhen working with an existing mesh.

The injection mixing pipe, common in the process industry, is composed oftwo pipes: one with a larger diameter than the other. Analysing andoptimising the mixing process is often critical for many chemical processes.CFD is useful not only in identifying problem areas (where mixing is poor),but also in testing new designs before they are implemented.

Page 92: Tutorials

Flow in a Process Injection Mixing Pipe—Introduction

Page 76 CFX-5 Tutorials

The geometry for this example consists of a circular pipe of diameter 1.0 mwith a 90� bend, and a smaller pipe of diameter 0.3 m which joins with themain pipe at an oblique angle.

Figure 1: Injection Mixing Pipe

φ=1.0 m

φ=0.3 m

5.0 m/s315.0 K

0.5 m/s285.0 K

Page 93: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

CFX-5 Tutorials Page 77

3.B: Defining a Simulation using General Modein CFX-Pre

Introduction: After having completed meshing, CFX-Pre is used as aconsistent and intuitive interface for the definition of complex CFDproblems.

Synopsis This section describes the step-by-step definition of the flow physics inCFX-Pre. As an alternative, you can play a session file to complete theCFX-Pre part of the tutorial.

WorkflowOverview

Do not perform any of the following tasks now. For review purposes only thissection provides a brief summary of the topics to follow as a generalworkflow:

1. "Creating a New Simulation" on page 78

2. "Importing a Mesh" on page 79

3. "Setting Temperature-Dependent Material Properties" on page 79

4. "Plotting an Expression" on page 82

5. "Evaluating an Expression" on page 82

6. "Modify Material Properties" on page 83

7. "Creating the Domain" on page 84

8. "Creating the Side Inlet Boundary Conditions" on page 85

9. "Creating the Main Inlet Boundary Conditions" on page 86

10. "Creating the Main Outlet Boundary Condition" on page 87

11. "Setting Initial Values" on page 88

12. "Setting Solver Control" on page 88

13. "Writing the Solver (.def) File." on page 88

14. As an alternative to these steps, you can also review "Playing the Session

File" on page 89

To begin this tutorial and create a new simulation in CFX-Pre, continue from"Creating a New Simulation" on page 78.

Page 94: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

Page 78 CFX-5 Tutorials

3.B.1: Creating a New Simulation

Introduction: Before importing and working with a mesh a simulation needsto be started using General Mode.

Synopsis Two procedures are documented. Depending on your installation of CFX-5follow either the Standalone procedure or the Workbench procedure. Formore information, refer to "CFX-5.7.1 in Workbench" on page 19.

Procedure inStandalone

1. If required, launch CFX-Pre.

2. Select File > New Simulation.

3. If required, set the path location to a different folder.

4. Under File name type InjectMixer.

5. Click Save.

The Mesh tab is displayed.

6. Proceed to "Importing a Mesh" on page 79.

Procedure inWorkbench

1. If required, launch Workbench.

2. Click Empty Project.

The Project Page will appear displaying an unsaved project.

3. Select File > Save or click Save.

4. If required, set the path location to a different folder.

5. Under Filename, type InjectMixer.

6. Click Save.

7. Click Start CFX-Pre under Advanced CFD on the left hand Task Bar.

8. Select File > New Simulation.

9. Under File name type InjectMixer.

10. If required, set the path location to a different folder.

11. Click Save.

The Mesh tab is displayed.

Page 95: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

CFX-5 Tutorials Page 79

3.B.2: Importing a Mesh

Introduction: An assembly is a group of mesh regions that are topologicallyconnected. Each assembly can contain only one mesh, but multipleassemblies are permitted.

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

Procedure 1. Select File > Import Mesh or click Import Mesh .

2. In the bottom left of the screen, under File click Browse .

3. From your working directory, select InjectMixerMesh.gtm.

4. Click Open.

5. Click OK, at the bottom left of the Object Editor.

The mesh is opened.

3.B.3: Setting Temperature-Dependent Material Properties

Introduction: You will create an expression for viscosity as a function oftemperature and then use this expression to modify the properties of thelibrary material: Water.

Viscosity will be made to vary linearly with temperature between thefollowing conditions:

• µ=1.8E-03 N s m-2 at T=275.0 K

• µ=5.45E-04 N s m-2 at T=325.0 K

The variable T (Temperature) is a CFX-5 System Variable recognised byCFX-Pre, denoting Static Temperature. All variables, expressions, locators,functions and constants can be viewed by right clicking in the Definitionpanel of the Expressions Editor.

All expressions must have consistent units. You should be careful if usingtemperature in an expression with units other than [K]. See "Use of OffsetTemperature" on page 50 in the document "CFX-5 Reference Guide" fordetails.

The Expressions Workspace lets you define, modify, evaluate, plot, copy,delete and browse through expressions used within CFX-Pre.

Page 96: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

Page 80 CFX-5 Tutorials

Procedure 1. Click Expressions or select Create > Library Objects > Expressions

Editor to open the Expressions Workspace.

2. In the Expressions Workspace, click New .

3. In the New Expression window type Tupper.

Page 97: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

CFX-5 Tutorials Page 81

4. Click OK.

The Definition Editor is displayed with the name of the newexpression.

5. Under Definition, type 325.0 [K].

6. Click Apply to create the expression.

The expression is added to the list of existing expressions.

7. Repeat steps 2. through 6. for Tlower, Visupper, Vislower and VisT using

the values seen below.

Page 98: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

Page 82 CFX-5 Tutorials

3.B.4: Plotting an Expression

Procedure 1. Double-click the expression VisT in the Expression Selector, or

single-click it, then click Edit .

The Expression Editor for VisT displays below the Expression Selector.

2. Select the Plot Tab and apply the following settings

3. Click Plot Expression.

A plot showing the variation of the expression VisT with the variable Tis displayed.

3.B.5: Evaluating an Expression

Procedure 1. Click the Evaluate tab.

2. In T type 300 [K].

This is between the start and end range defined in the last module.

Modify Set the following To this value

Plot Number of Points 10

T On

Start of Range 275 [K]

End of Range 325 [K]

Page 99: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

CFX-5 Tutorials Page 83

3. Click Evaluate Expression.

The value of VisT (0.0011725 [kg m^-1 s^-1]) for the given value of Tappears in the Value field.

3.B.6: Modify Material Properties

Introduction: Default material properties (such as those of Water) can bemodified when required.

Procedure 1. Click the Materials Tab.

2. Select Water then click or double click Water from the Materials

selector to display the Basic Settings.

3. Click Material Properties tab.

4. Expand Transport Properties.

5. Under Dynamic Viscosity click in Dynamic Viscosity.

The default content of 0.0008899 [kg m^-1 s^-1] is selected.

6. Click Enter Expression .

7. Enter the expression VisT into the data box.

8. Click OK.

Page 100: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

Page 84 CFX-5 Tutorials

3.B.7: Creating the Domain

Introduction: The domain will be set to use the Thermal Energy heat transfermodel, and the k-ε (k-epsilon) turbulence model.

Both General Options and Fluid Models are changed in this module. TheInitialisation Tab is for setting domain-specific initial conditions, which arenot used in this tutorial. Instead, Global initialisation is used to set thestarting conditions.

Procedure 1. Select Create > Flow Objects > Domain.

2. In the Name window type InjectMixer.

3. Click OK.

Edit Domain: InjectMixer appears.

Page 101: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

CFX-5 Tutorials Page 85

4. Apply the following settings

5. Click Fluid Models.

6. Apply the following settings

7. Click OK.

3.B.8: Creating the Side Inlet Boundary Conditions

Introduction: The side inlet boundary condition needs to be defined.

Procedure 1. Select Create > Flow Objects > Boundary Condition or click

Boundary Condition .

2. In the Name window type side inlet.

3. Click OK.

4. Apply the following settings

5. Click OK.

Modify Set the following To this value

Basic Settings Location Assembly

Fluids List Water

Domain Models > Pressure Ref. Pressure 0 [atm]

Modify Set the following To this value

Heat Transfer model Option Thermal Energy

Modify Set the following To this value

Basic Settings Boundary Type Inlet

Location side inlet

BoundaryDetails

Mass and Momentum > Option Normal Speed

Normal Speed 5.0 [m s^-1]

Turbulence > Option Medium (Intensity = 5%)

Heat Transfer > Option Static Temperature

Static Temperature 315 [K]

Page 102: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

Page 86 CFX-5 Tutorials

3.B.9: Creating the Main Inlet Boundary Conditions

Introduction: The main inlet boundary condition needs to be defined. Thisinlet is defined using a velocity profile found in the example directory.Profile data needs to be initialised before the boundary condition can becreated.

You will create a plot showing the velocity profile data, marked by highervelocities near the centre of the inlet, and lower velocities near the inletwalls.

Procedure 1. Select Tools > Initialise Profile Data.

2. Under Data File click Browse .

3. From your working directory, select

InjectMixer_velocity_profile.csv.

4. Click Open.

5. Click OK.

The profile data is read into memory.

6. Select Create > Flow Objects > Boundary Condition or click

Boundary Condition .

7. In the Name window type main inlet.

8. Click OK.

9. Apply the following settings

10. Click Generate Values.

This causes the profile values of U, V, W to be applied at the nodes on themain inlet boundary, and U, V, W entries to be made inBoundary Details. To later modify the velocity values at the main inletand reset values to those read from the BC Profile file, revisitBasic Settings for this boundary condition and click Generate Values.

Modify Set the following To this value

Basic Settings Boundary Type Inlet

Location main inlet

Use Profile Data On

Profile Name main inlet

Page 103: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

CFX-5 Tutorials Page 87

11. Apply the following settings

12. Click OK.

3.B.10: Creating the Main Outlet Boundary Condition

Introduction: In this module you create the outlet boundary condition. Allother surfaces which have not been explicitly assigned a boundarycondition will remain in the InjectMixer Default object, which is shown inthe Physics Selector. This boundary condition uses a No-Slip AdiabaticWall by default.

Procedure 1. Select Create > Flow Objects > Boundary Condition or click

Boundary Condition .

2. In the Name window type outlet.

3. Click OK.

4. Apply the following settings

5. Click OK.

Modify Set the following To this value

Boundary Details Flow Regime > Option Subsonic

Turbulence > Option Medium (Intensity = 5%)

Heat Transfer > Option Static Temperature

Static Temperature 285 [K]

Plot Options Boundary Contour On

Profile Variable W

Modify Set the following To this value

Basic Settings Boundary Type Outlet

Location outlet

Boundary Details Flow Regime > Option Subsonic

Mass and Momentum > Option Average Static Pressure

Relative Pressure 0 [Pa]

Page 104: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

Page 88 CFX-5 Tutorials

3.B.11: Setting Initial Values

Procedure 1. Select Create > Flow Objects > Global Initialisation, or click Global

Initialisation .

2. Select Turbulence Eddy Dissipation and leave Option set to

Automatic.

3. Click OK.

3.B.12: Setting Solver Control

Introduction: The advection scheme options are discussed in "AdvectionScheme Selection" on page 357 in the document "CFX-5 Solver Modelling".

Procedure 1. Select Create > Flow Objects > Solver Control or click Solver Control

.

2. Apply the following settings

3. Click OK.

3.B.13: Writing the Solver (.def) File.

Introduction: Once the problem has been defined you move from GeneralMode into CFX-Solver.

Procedure 1. Select File > Write Solver (.def) File or click Write a Solver File

Write Solver File is displayed.

Modify Set the following To this value

Advection Scheme Option Specified Blend Factor

Specified Blend Factor 0.75

ConvergenceControl

Timescale Control Physical Timescale

Physical Timescale 2.0

Max. No. Iterations 50

ConvergenceCriteria

Residual Type RMS

Residual Target 1.E-4*

*. An RMS value of at least 1.E-5 is usually required for adequateconvergence, but the default value is sufficient for demonstrationpurposes. See "Judging Convergence" on page 364 in thedocument "CFX-5 Solver Modelling" for more details.

Page 105: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

CFX-5 Tutorials Page 89

2. Apply the following settings

3. Click OK.

4. If you are notified the file already exists, click Overwrite.

This file is provided in the examples directory and may exist in yourworking folder if you have copied it there.

5. Click Yes if asked to save InjectMixer.cfx.

The definition file (InjectMixer.def), mesh file (InjectMixer.gtm) and thesimulation file (InjectMixer.cfx) are created. CFX-Solver Managerautomatically starts and the definition file is set in the Definition Filebox of Define Run.

6. Proceed to "Obtaining a Solution Using CFX-Solver" on page 91.

3.B.14: Playing the Session File

Introduction: If you have performed all the tasks in the previous steps,proceed directly to "Obtaining a Solution Using CFX-Solver" on page 91.

Synopsis Two procedures are documented. Depending on your installation of CFX-5follow either the Standalone procedure or the Workbench procedure.

Procedure inStandalone

1. If required, launch CFX-Pre.

2. Select Session > Play Session.

3. Select InjectMixer.pre, located in the examples directory.

4. Click Open.

A Definition file is written.

5. Quit CFX-Pre.

6. Click the CFX-Solver icon on the CFX Launcher.

7. Select File > Define Run.

8. Under Definition File, click Browse .

Set the following To this value

Filename InjectMixer.def

Operation Start Solver Manager

Report Summary of Interface Connections Off

Quit CFX–Pre*

*. If using CFX-Pre in Standalone Mode.

On

Page 106: Tutorials

Flow in a Process Injection Mixing Pipe—Defining a Simulation using General Mode in CFX-Pre

Page 90 CFX-5 Tutorials

9. Select InjectMixer.def, located in the examples directory.

10. Proceed to "Obtaining a Solution Using CFX-Solver" on page 91.

Procedure inWorkbench

1. If required, launch Workbench.

2. Click Empty Project.

The Project Page will appear displaying an unsaved project.

3. Select File > Save or click Save.

4. Under Filename, type InjectMixer.

5. If required, set the path location to a different folder.

6. Click Save.

7. Select Session > Play Session.

8. Select InjectMixer.pre, located in the examples directory.

9. Click Open.

A Definition file is written.

10. Go to Project Page

11. Click Start CFX-Solver under Advanced CFD on the left hand Task Bar.

12. Select File > Define Run.

13. Under Definition File, click Browse .

14. Select InjectMixer.def, created in the working directory.

Tip: Steps 12 - 14 can also be achieved by going to the Project Page anddouble clicking on InjectMixer.def.

Page 107: Tutorials

Flow in a Process Injection Mixing Pipe—Obtaining a Solution Using CFX-Solver

CFX-5 Tutorials Page 91

3.C: Obtaining a Solution Using CFX-Solver

3.C.1: Using Define Run With Data From a Previous Run

Introduction: Define Run allows the configuration of a run for processing byCFX-Solver.

Synopsis You have already set required options for the information in Define Run.

Procedure 1. Ensure Define Run is displayed and configured properly based on the

last module.

2. Click Start Run.

3. Click OK when CFX-Solver is finished.

3.C.2: Moving from CFX-Solver to CFX-Post

1. Select Tools > Post–Process Results or click Post–Process Results

.

2. If using CFX-Solver in Standalone Mode, select Shut down Solver

Manager.

3. Click OK.

Page 108: Tutorials

Flow in a Process Injection Mixing Pipe—Viewing Results in CFX-Post

Page 92 CFX-5 Tutorials

3.D: Viewing Results in CFX-Post

Introduction: When CFX-Post starts, the 3D Viewer and Objects Workspacedisplay by default.

WorkflowOverview

Do not perform any of the following tasks now. For review purposes only thissection provides a brief summary of the topics to follow as a generalworkflow:

1. "Modifying the Outline of the Geometry" on page 92

2. "Creating and Modifying Streamlines" on page 92

3. "Modifying Streamline Colour Ranges" on page 94

4. "Colouring Streamlines with a Constant Colour" on page 94

5. "Duplicating and Modifying a Streamline Object" on page 95

6. "Examining Turbulent Kinetic Energy" on page 95

3.D.1: Modifying the Outline of the Geometry

Introduction: Throughout this and the following examples, use your mouseand the Viewing Tools toolbar to manipulate the geometry as required atany time.

Procedure 1. In the Object Selector double click Wireframe.

2. Set the Edge Angle to 15 [degree].

3. Press Apply.

3.D.2: Creating and Modifying Streamlines

Introduction: When you complete this module you will see streamlines(mainly blue and green) starting at the main inlet of the geometry andproceeding to the outlet. Above where the side pipe meets the main pipe,there is an area where the flow re-circulates rather than flowing roughlytangent to the direction of the pipe walls.

Procedure 1. Select Create > Object > Streamline.

2. Under Name type MainStream.

3. Click OK.

Page 109: Tutorials

Flow in a Process Injection Mixing Pipe—Viewing Results in CFX-Post

CFX-5 Tutorials Page 93

4. Apply the following settings

5. Click Apply.

6. Click Isometric View (Y up) from the Viewing Tools toolbar.

The pipe is displayed with the main inlet in the top left of the viewer.

7. In the Object Selector double click main inlet.

8. Apply the following settings

9. Click Apply.

10. Zoom in on the main inlet so that it fills the Viewer.

You should see that each streamline starts from a node of a meshelement face on the main inlet, since you selected the main inlet as theStart From location.

11. Modify the streamline object MainStream by changing the Geometry

so that Reduction is equal to 3.

Streamlines now only originate from one in every three element facenodes at the main inlet. Fewer streamlines are therefore visible. You canset Reduction to produce a sensible number of streamlines if thestarting location has a fine mesh.

Modify Set the following To this value

Geometry Type 3D Streamline

Start From main inlet

Modify Set the following To this value

Render Draw Faces Off

Draw Lines On

Visibility On

Page 110: Tutorials

Flow in a Process Injection Mixing Pipe—Viewing Results in CFX-Post

Page 94 CFX-5 Tutorials

3.D.3: Modifying Streamline Colour Ranges

Introduction: You can change the appearance of the streamlines using theRange setting on the Colour panel.

Procedure 1. Apply the following settings

2. Click Apply.

The colour map is fitted to the range of velocities found along thestreamlines. The streamlines therefore collectively contain every colourin the colour map.

3. Apply the following settings

Note: Portions of streamlines that have values outside the range shown inthe legend are coloured according to the colour at the nearest end of thelegend. When using tubes or symbols (which contain faces), more accuratecolours are obtained with lighting turned off.

4. Click Apply.

The streamlines are coloured using the specified range of velocityvalues.

3.D.4: Colouring Streamlines with a Constant Colour

1. Apply the following settings

Colour can be set to green by selecting it from the colour pallet, or byrepeatedly clicking on the colour box until it cycles through to thedefault green colour.

2. Click Apply.

Modify Set the following To this value

Colour Range Local

Modify Set the following To this value

Colour Range User Specified

Min 0.2 [m s^-1]

Max 2.2 [m s^-1]

Modify Set the following To this value

Colour Mode Constant

Colour Green

Page 111: Tutorials

Flow in a Process Injection Mixing Pipe—Viewing Results in CFX-Post

CFX-5 Tutorials Page 95

3.D.5: Duplicating and Modifying a Streamline Object

Introduction: Any object can be duplicated to create a copy for modificationwithout altering the original.

Procedure 1. Select MainStream by clicking it once.

2. Click Duplicate Selected Object

3. In the Name window type SideStream.

4. Click OK.

5. Double click on the newly created streamline, SideStream.

6. Apply the following settings

7. Click Apply.

Red streamlines appear, starting from the side inlet.

8. For better view, click Isometric View Y up .

3.D.6: Examining Turbulent Kinetic Energy

Introduction: A common way of viewing various quantities within thedomain is to use a slice plane, as demonstrated in this module.

Note: This module has multiple changes compiled into single steps inpreparation for other tutorials that provide fewer specific instructions.

Procedure 1. Toggle visibility off for both the MainStream and the SideStream

objects.

2. Create a plane named Plane 1 that is normal to X (use the YZ Plane

method) and passing through the X = 0 Point.

To do so, specific instructions follow. If you are comfortable with theproduct and do not need to use them, proceed directly to step 3.

a. Select Create > Object > Plane

b. Click Apply.

Modify Set the following To this value

Geometry Start From side inlet

Colour Mode Constant

Colour Red

Page 112: Tutorials

Flow in a Process Injection Mixing Pipe—Viewing Results in CFX-Post

Page 96 CFX-5 Tutorials

3. Colour the plane using the variable Turbulence Kinetic Energy, to

show where energy is being dissipated.

To do so, apply the settings below. If you are comfortable with theproduct and do not need to use them, proceed directly to step 4.

4. Experiment with other variables to colour this plane.

Commonly used variables are in the drop-down menu. A full list ofavailable variables can be viewed by clicking next to the Variabledata box.

3.D.7: Exiting CFX-Post

Introduction: When finished with CFX-Post exit the current window.

Synopsis Two procedures are documented. Depending on your installation of CFX-5follow either the Standalone procedure or the Workbench procedure.

Procedure inStandalone

1. When you are finished, select File > Quit to exit CFX-Post.

2. Click No if prompted to save.

Procedure inWorkbench

1. Before quitting it is advised to return to the Project Page and save the

current project.

2. When you are finished, select File > Close to close the current file.

3. Click No if prompted to save.

Modify Set the following To this value

Colour Mode Variable

Variable Turbulence Kinetic Energy

Page 113: Tutorials

CFX-5 Tutorials Page 97

CFX-5 Tutorials

Tutorial 4

Flow from a Circular Vent

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• CircVent.pre

• CircVentIni.pre

• CircVentIni_001.res

• CircVentMesh.gtm

Page 114: Tutorials

Flow from a Circular Vent—Introduction

Page 98 CFX-5 Tutorials

4.A: Introduction

4.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• setting up a transient problem in CFX-Pre

• using an opening type boundary condition in CFX-Pre

• modelling smoke using Additional Variables in CFX-Pre

• visualising a smoke plume using an Isosurface in CFX-Post

• creating an image for printing, and generating an MPEG file in CFX-Post

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Transient

Fluid Type General Fluid

Domain Type Single Domain

Turbulence Model k-Epsilon

Heat Transfer None

Boundary Conditions Inlet (Subsonic)

Opening

Wall: No-Slip

Timestep Auto Timescale

Transient Example

Transient Results File

CFX-Solver Manager Power Syntax

CFX-Post Plots Animation

Isosurface

Other Auto Annotation

MPEG Generation

Printing

Timestep Selection

Title/Text

Transient Animation

Page 115: Tutorials

Flow from a Circular Vent—Introduction

CFX-5 Tutorials Page 99

4.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

4.A.3: Overview of the problem to solve

Introduction: In this example, a chimney stack releases smoke which isdispersed into the atmosphere with an oncoming side wind. Unlikeprevious tutorials, which were steady-state, this example istime-dependent. Initially, no smoke is being released and the flow is drivenpurely by the side wind. In the second part of the tutorial, the chimney startsto release smoke and it shows how the plume of smoke above the chimneydevelops with time.

Page 116: Tutorials

Flow from a Circular Vent—Defining the Steady-State Simulation in CFX-Pre

Page 100 CFX-5 Tutorials

4.B: Defining the Steady-State Simulation inCFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre for a steady-state simulation with no smoke being produced by thechimney. The results from this simulation will be used as the initial guess forthe transient simulation.

4.B.1: Playing the Session file

Instead of defining the steady-state simulation yourself, you can play asession file to do this. To define the simulation in CFX-Pre yourself, continuefrom Creating a New Simulation below.

1. Start CFX-Pre.

2. From the main menu, select Session > Play Session.

Play Session File is displayed.

3. Select CircVentIni.pre located in the examples

(<CFXROOT>/examples) directory and then click Open.

You can now continue with this tutorial from Obtaining a Solution to theSteady-State Problem (p. 107).

4.B.2: Creating a New Simulation

1. Start CFX-Pre.

2. Select File > New Simulation.

3. Select General mode.

4. Set File name to CircVentIni and then click Save.

4.B.3: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh file CircVentMesh.gtm, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. Click the Mesh tab.

Page 117: Tutorials

Flow from a Circular Vent—Defining the Steady-State Simulation in CFX-Pre

CFX-5 Tutorials Page 101

3. Right-click in the Mesh Selector, then select Import.

4. Leave Mesh Format set to CFX-5 GTM file.

5. Browse to select the file CircVentMesh.gtm.

6. Click OK to import the mesh.

4.B.4: Creating an Additional Variable

In this tutorial, an Additional Variable (non-reacting scalar component) willbe used to model the dispersion of smoke from the vent.

1. Click the Create an Additional Variable icon on the main toolbar.

Create Additional Variable appears.

2. Set Name to smoke and click OK.

3. On the Basic Settings panel:

a. Set Type to Volumetric.

b. Set Units to [kg m^-3].See "Volumetric and Specific Additional Variable" on page 20 in thedocument "CFX-5 Solver Modelling" for details.

c. Click OK to create the Additional Variable and close the panel.

4.B.5: Creating the Domain

The fluid domain will be created that includes the Additional Variable.

To Create aNew Domain

1. Click Create a Domain .

2. In Create Domain, set Name to CircVent and click OK.

Edit Domain: CircVent is displayed

3. On the General Options panel:

a. Set Location to Assembly.

b. Leave Domain Type set to Fluid Domain.

c. Set Fluids List to Air at 25 C.

d. Leave Coord Frame set to Coord 0.

e. Set Reference Pressure to 0 [atm].

f. Under Buoyancy, leave Option set to Non Buoyant.

g. Under Domain Motion, leave Option set to Stationary.

Page 118: Tutorials

Flow from a Circular Vent—Defining the Steady-State Simulation in CFX-Pre

Page 102 CFX-5 Tutorials

4. Click the Fluid Models tab and leave all options set to their respective

defaults except:

a. In the Additional Variable Details frame, turn on smoke and setOption to Transport Equation.

b. Turn on Kinematic Diffusivity and set Kinematic Diffusivity to1.0E-5 [m^2 s^-1].

Initialisation settings will be set using the Global Initialisation form, so thereis no need to visit the Initialisation panel.

5. Click OK to create the domain.

4.B.6: Creating the Boundary Conditions

To Create theInlet BoundaryCondition

1. Click Create a Boundary Condition on the main toolbar.

2. Set Name to Wind and Domain to CircVent, then click OK.

Edit Boundary is displayed.

3. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to Wind

4. Click the Boundary Details tab, then:

a. Under Flow Regime, leave Option set to Subsonic

b. Under Mass and Momentum, set:Option to Cart. Vel. ComponentsU to 1 [m s^-1]V to 0 [m s^-1]W to 0 [m s^-1]

c. Under Turbulence, set Option to Intensity and Length Scale,Fractional Intensity to 0.05, and Eddy Length Scale to 0.25[m].

Note: This is an example of external flow, since fluid is flowing over an objectand not through an enclosure such as a pipe network (which would be anexample of internal flow). In such problems, some inlets will be madesufficiently large that they do not affect the CFD solution. However, thelength scale values produced by the Default Intensity and AutoComputeLength Scale option for turbulence are based on inlet size. They areappropriate for internal flow problems and particularly, cylindrical pipes. Ingeneral, you need to set the turbulence intensity and length scale explicitlyfor large inlets in external flow problems. If you do not have a value for the

Page 119: Tutorials

Flow from a Circular Vent—Defining the Steady-State Simulation in CFX-Pre

CFX-5 Tutorials Page 103

length scale, you can use a length scale based on a typical length of theobject, over which the fluid is flowing. In this case, we have chosen aturbulence length scale which is one-tenth of the diameter of the vent.

5. In the section of the form labelled smoke (the Additional Variable in this

tutorial), set:

a. Option to Value

b. Value to 0 [kg m^-3] (to specify that no smoke will enter fromthis boundary)

6. Click OK to create the boundary condition.

7. Click View Towards -Z (access this by selecting the down arrow

icon in the Viewer toolbar next to the current view ):

Note: The boundary marker vectors used to display boundary conditions(Inlets, Outlets, Openings) are normal to the boundary surface regardless ofthe actual direction specification. To plot vectors in the direction of flow,turn on Boundary Vector under the Plot Options panel for the inletboundary condition (see "Plot Options" on page 298 in the document"CFX-Pre" for details) and turn off Show Inlet Markers on the BoundaryMarker Options panel of Labels and Markers (accessible by clickingLabel and Marker Visibility on the 3D Viewer toolbar).

For parts of the boundary where the flow direction changes, or is unknown,an opening boundary condition can be used. An opening boundarycondition allows flow to both enter and leave the fluid domain during thecourse of the solution.

To Create anOpeningBoundaryCondition

1. Click Boundary Condition .

2. Set Name to Atmosphere and Domain to CircVent, then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Opening

b. Location to Atmosphere

Page 120: Tutorials

Flow from a Circular Vent—Defining the Steady-State Simulation in CFX-Pre

Page 104 CFX-5 Tutorials

4. Click the Boundary Details tab, then:

a. Under Flow Regime, leave Option set to Subsonic.

b. Under Mass and Momentum, set Option to Pressure andDirection (stable) and Relative Pressure to 0 [Pa].For more information on pressure settings, see "Mass andMomentum" on page 62 in the document "CFX-5 Solver Modelling".

c. Under Flow Direction, set Option to Normal to BoundaryCondition.

d. Under Turbulence, set Option to Intensity and Length Scale,Fractional Intensity to 0.05, and Eddy Length Scale to0.25 [m].

5. In the section of the form labelled smoke, set:

a. Option to Value

b. Value to 0 [kg m^-3].This specifies that, if any air flows in through this opening, it willcontain no smoke.

6. Click OK to create the boundary condition.

To Create theInlet BoundaryCondition forthe Vent

1. Click Boundary Condition .

2. Set Name to Vent and Domain to CircVent, then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to Vent

4. Click the Boundary Details tab, then:

a. Under Flow Regime, leave Option set to Subsonic.

b. Under Mass and Momentum, set Option to Normal Speed andNormal Speed to 0.01 [m s^-1].

c. Under Turbulence, set Option to Intensity and Eddy ViscosityRatio, Fractional intensity to 0.05 and Eddy Viscosity Ratio to10.

5. In the section of the form labelled smoke, set:

a. Option to Value

b. Value to 0 [kg m^-3]No smoke enters until the second part of this tutorial.

6. Click OK to create the boundary condition.

Page 121: Tutorials

Flow from a Circular Vent—Defining the Steady-State Simulation in CFX-Pre

CFX-5 Tutorials Page 105

4.B.7: Setting Initial Values

1. Select Create > Flow Objects > Global Initialisation from the main

menu bar, or click Global Initialisation .

The Automatic initial conditions are suitable for this tutorial. See "Initial

Condition Modelling" on page 85 in the document "CFX-5 Solver

Modelling" for details.

2. Turn on Turbulence Eddy Dissipation and leave Option set to

Automatic.

3. Click OK to set the initialisation details.

4.B.8: Setting Solver Control

1. Select Create > Flow Objects > Solver Control, or click Solver Control

to open Solver Control.

The CFX-Solver has the ability to calculate physical time step size for steadystate problems. If you do not know the time step size to set for yourproblem, you can use the Auto Timescale option.

2. Under Advection Scheme, leave Option set to High Resolution.

3. Set Timescale Control to Auto Timescale

For more information on the behaviour of Auto Timescale, see

"Timestep Selection" on page 347 in the document "CFX-5 Solver

Modelling".

4. Set Max. No. Iterations to 75.

5. Leave Length Scale Option set to Conservative.

See "Length Scale Option" on page 351 in the document "CFX-5 Solver

Modelling" for details on this parameter.

Use defaults for all other Solver Control settings.

6. Click OK to set the solver control parameters.

4.B.9: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

Create Definition File is displayed.

2. Leave Operation set to Start Solver Manager.

Page 122: Tutorials

Flow from a Circular Vent—Defining the Steady-State Simulation in CFX-Pre

Page 106 CFX-5 Tutorials

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

Page 123: Tutorials

Flow from a Circular Vent—Obtaining a Solution to the Steady-State Problem

CFX-5 Tutorials Page 107

4.C: Obtaining a Solution to the Steady-StateProblem

When CFX-Pre has shut down and CFX-Solver Manager has started, you canobtain a solution to the CFD problem by using the following procedure:

1. Click Start Run.

The residual plots for six equations will appear: U - Mom, V - Mom, W -Mom, P - Mass, K-TurbKE and E-Diss.K (the three momentumconservation equations, the mass conservation equation and equationsfor the turbulence kinetic energy and turbulence eddy dissipation).

2. Click OK, to acknowledge the completion message.

3. Close the CFX-Solver Manager.

You will now reload the simulation into CFX-Pre to define the transientsimulation.

4. Start CFX-Pre.

Page 124: Tutorials

Flow from a Circular Vent—Defining the Transient Simulation in CFX-Pre

Page 108 CFX-5 Tutorials

4.D: Defining the Transient Simulation inCFX-Pre

In this part of the tutorial, you will alter the simulation settings used for thesteady-state calculation to set up the model for the transient calculation inCFX-Pre.

As an alternative, you can play a session file to complete the setup of thetransient simulation instead of setting up the simulation yourself. To definethe simulation in CFX-Pre yourself, continue from Opening the ExistingSimulation (p. 108) below.

To Play theSession file

1. Start CFX-Pre.

2. From the Main menu select Session > Play Session.

3. Select CircVent.pre located in the examples

(<CFXROOT>/examples) directory and then click Open.

You can now continue with this tutorial from Obtaining a Solution to theTransient Problem (p. 114).

4.D.1: Opening the Existing Simulation

1. Select File > Open Simulation.

2. Select the original simulation file: CircVentIni.cfx.

3. Click Open to load the database.

4.D.2: Modifying the Simulation Type

In this step you will make the problem transient. Later, we will set theconcentration of smoke to rise exponentially with time, so it is necessary toensure that the interval between the time steps is smaller at the beginningof the simulation than at the end.

1. Select Create > Flow Objects > Simulation Type from the main menu.

Simulation Type appears.

2. Set Option to Transient.

3. Under Time Duration:

• Set Option to Total Time, and Total Time to 30 [s].

Page 125: Tutorials

Flow from a Circular Vent—Defining the Transient Simulation in CFX-Pre

CFX-5 Tutorials Page 109

4. Under Time Steps:

a. Set Timesteps to: 4*0.25, 2*0.5, 2*1.0, 13*2.0

• Do NOT click the expression icon.

• Leave the units set to s. This gives you four time steps of 0.25 s,followed by two of 0.5 s, two of 1.0 s and then 13 time steps of 2.0 s,which totals 30 s (the Total Time that will be set below).

5. Under Initial Time, set Option to Automatic with Value and Time to

0 [s].

6. Click OK to save the new information.

4.D.3: Modifying the Boundary Conditions

The only boundary condition which needs altering is the vent boundarycondition. In the steady-state calculation, this boundary had a small amountof air flowing through it. In the transient calculation, more air passesthrough the vent and there is a time-dependent concentration of smoke inthe air. This is initially zero, but builds up to a larger value. The smokeconcentration will be specified using the CFX Expression Language.

To Modify theVent InletBoundaryCondition

1. In the Physics Workspace, expand the tree to Flow > CircVent > Vent >

Boundary Conditions, then double-click Boundary Conditions.

2. On the Boundary Details panel, under Mass and Momentum, set

Normal Speed to 0.2 [m s^-1].

We will divert temporarily from the boundary editor, but it should be leftopen for now.

3. Click the Expressions tab in the CFX-Pre Workspace.

• The Expressions Workspace appears.

• You are going to create an expression for smoke concentration. Theconcentration is zero for time t=0 and builds up to a maximum of1 kg m^-3.

4. Right-click in the Expression Selector, then select New.

New Expression appears.

5. Set Name to TimeConstant, then click OK.

6. In the Definition databox, enter 3 [s].

7. Click Apply to create the expression.

Page 126: Tutorials

Flow from a Circular Vent—Defining the Transient Simulation in CFX-Pre

Page 110 CFX-5 Tutorials

8. Create another expression named FinalConcentration with

Definition: 1 [kg m^-3], remembering to click Apply.

9. Create a third expression named ExpFunction with Definition:

FinalConcentration*abs(1-exp(-t/TimeConstant)),

remembering to click Apply.

When entering this function, you can select most of the required items byright-clicking in the Definition window in the Expression Editor instead oftyping them. The names of the existing expressions are under theExpressions > menu. The exp and abs functions are under Functions >CEL. The variable t is under Variables (although it would probably be easierto just type “t” from the keyboard).

Note: The abs function takes the modulus (or magnitude) of its argument.Even though the expression(1- exp (-t/TimeConstant)) can never be less than zero, the absfunction is included to ensure that the numerical error in evaluating it nearto zero will never make the expression evaluate to a negative number.

Next you will visualise how the expressions have scheduled theconcentration of smoke issued from the vent.

10. Double-click ExpFunction in the Expression Selector to ensure that it is

open in the Expression Editor.

Page 127: Tutorials

Flow from a Circular Vent—Defining the Transient Simulation in CFX-Pre

CFX-5 Tutorials Page 111

11. Click the Plot tab, then:

a. Leave Number of Points set to 100.You can plot an expression which depends upon any independentvariable. In this example, you will plot the value of smokeconcentration against time.

b. Turn on t.

c. Set Start of Range to 0 [s].

d. Set End of Range to 30 [s].

e. Click Plot Expression to view the plot.

As can be seen, the smoke concentration rises exponentially, andreaches 90% of its final value at around 7 seconds.

12. Click the Physics tab.

Edit Boundary: Vent in Domain: CircVent appears, ready to resume. In

the next step, you will apply the expression ExpFunction to the

Additional Variable smoke.

Page 128: Tutorials

Flow from a Circular Vent—Defining the Transient Simulation in CFX-Pre

Page 112 CFX-5 Tutorials

13. In Edit Boundary: Vent in Domain: CircVent, on the Boundary

Details panel, under smoke:

a. Ensure that Option is set to Value.

b. Click in the Value data box, then click Enter Expression to theright of the data box.The data box is now ready to accept an expression.

c. Enter ExpFunction into the Value data box.

14. Click OK to set the boundary condition.

4.D.4: Initialisation Values

The steady state solution that you have finished calculating is used tosupply the initial values to the CFX-Solver. You can leave all of theInitialisation data set to Automatic and the initial values will be readautomatically from the initial values file. Therefore, there is no need torevisit the initialisation panel.

4.D.5: Modifying the Solver Control

1. Click Solver Control .

2. Set Max Iter. Per Timestep to 3.

3. Leave the other settings at their default values.

4. Click OK to set the solver control parameters.

4.D.6: Output Control

To allow results to be viewed at different time steps, it is necessary to createtransient results files at specified times. The transient results files do nothave to contain all solution data; in this step, you will create minimaltransient results files.

To CreateMinimalTransientResults Files

1. Select Create > Flow Objects > Output Control from the main menu

bar.

2. Click the Transient Results tab.

3. Click Add New Item and then click OK to accept the default name

for the object.

This creates a new transient results object. Each object can result in theproduction of many transient results files.

Page 129: Tutorials

Flow from a Circular Vent—Defining the Transient Simulation in CFX-Pre

CFX-5 Tutorials Page 113

4. Under Transient Results 1:

a. Set Option to Minimal.

b. Leave File Compression Level set to Default.

c. Set Output Variables List to Pressure, Velocity, smoke.Use the <Ctrl> key when selecting multiple items.

d. Turn on Time List, then set Time List to 1,2,3 [s].

5. Click Add new item again to create a second object, and accept the

default name by clicking OK.

6. Click Transient Results 2 from the list, then:

a. Set Option to Minimal.

b. Leave File Compression Level set to Default.

c. Set Output Variables List to Pressure, Velocity, smoke.

d. Turn on Time Interval, then set Time Interval to 4 [s].

A transient results file will be produced every 4 s (including 0 s) and at 1 s,2 s and 3 s. The files will contain no mesh and data for only the threeselected variables. This reduces the size of the minimal results files. A fullresults file is always written at the end of the run.

7. Click OK.

4.D.7: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Change File name to CircVent.def.

3. Leave Operation set to Start Solver Manager with def file.

4. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

5. Click OK.

6. Click Yes when asked if you want to save the CFX file.

Page 130: Tutorials

Flow from a Circular Vent—Obtaining a Solution to the Transient Problem

Page 114 CFX-5 Tutorials

4.E: Obtaining a Solution to the TransientProblem

In this tutorial the solver will read the Initial Values for the problem from afile (see Setting Initial Values (p. 105)). You need to specify the file name.

Define Run will be displayed when the CFX-Solver Manager launches.Definition File will already be set to the name of the definition file justwritten.

1. Beside the box marked Initial Values File, click Browse .

2. Locate and selectCircVentIni_001.res, which is the results file of

the steady-state problem with no smoke issuing from the chimney.

3. Click Open.

4. Click Start Run.

Notice that the text output generated by CFX-Solver is more than you haveseen for steady-state problems. This is because each time step consists ofseveral inner (coefficient) iterations. At the end of each time step,information about various quantities is printed to the text output area.

For transient simulations, the plots show the values of residuals for eachcoefficient loop (not just the values at the last coefficient loop for each timestep) (see "Transient Residual Plotting" on page 59 in the document "CFX-Solver Manager"). Although the field values at the end of each time step willbe converged, the level of convergence from one time step to the next maybe different. This may result in a plot where residual values appear to rise.This is not generally an issue, as long as the residual values at the end ofeach time step are below their target convergence criteria.

5. When CFX-Solver has finished, click OK on the completion message.

6. Click Post-Process Results .

7. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 131: Tutorials

Flow from a Circular Vent—Viewing the Results

CFX-5 Tutorials Page 115

4.F: Viewing the Results

In this tutorial you will view the dispersion of smoke from the vent over time.When CFX-Post is loaded, the results which are immediately available arethose at the final time step, in this case at t = 30 s (this is nominallydesignated Final State).

4.F.1: Changing Time Step

1. From the Main menu select Tools > Timestep Selector, or click

Show Timestep Selector .

Timestep Selector appears.

The Timestep Selector shows the Time Step (outer loop) number, theTime Value (simulated time in seconds) and the Type of results file that wassaved at that time step. You can see that Partial results files were saved (asrequested in CFX-Pre) for all time steps except for the last one.

To view the smoke at a given time step you must load the results for thattime step. Time Step 0 represents the start of the simulation. The results atthis time step simply contain the initial conditions you specified in CFX-Pre.

2. Double-click Time Value 1 s.

After a short pause, the Current Timestep (located just below the title

bar of the Timestep Selector) will be updated with the new time step

number.

4.F.2: Creating an Isosurface

1. Click Create isosurface from the main toolbar.

An isosurface is a surface of constant value of a variable. For instance, itcould be a surface consisting of all points where the velocity is 1 m s^-1. Inthis case, you are going to create an isosurface of smoke density (smoke isthe additional variable which you specified earlier).

2. Accept the default name Isosurface 1 by clicking OK.

3. In the Objects Workspace, on the Geometry panel, set:

a. Domains to All Domains

b. Variable to smoke

c. Value to 0.005 [kg m^-3].

Page 132: Tutorials

Flow from a Circular Vent—Viewing the Results

Page 116 CFX-5 Tutorials

4. Ensure that Visibility is turned on and then click Apply.

• A bumpy surface will be displayed, showing the smoke starting toemerge from the vent.

• The surface is rough because the mesh is coarse. For a smoothersurface, you would re-run the problem with a smaller mesh lengthscale.

• The surface will be a constant colour as the default settings on theColour panel were used.

• When Colour Mode is set to either Constant or Use Plot Variablefor an Isosurface, it appears as one colour.

• You should not use the Local Range setting for an isosurface sincethe Local Range is zero.

5. On the Geometry panel, experiment with changing the isosurface

Value and with moving the geometry in the Viewer so that you can see

the shape of the plume more clearly. When you have finished, set the

Isosurface Value to 0.002 [kg m^-3].

4.F.3: Generating Output Files

You can produce hard copy output from CFX-Post. First, you will add a titleto the Viewer so that the printed output has a title.

1. From the Main menu, click Create >Object > Text or click Create text

.

2. Accept the default name Text 1 and click OK. The text object properties

are displayed in the Objects Workspace.

3. In the Text String box, enter “Isosurface showing smoke

concentration of 0.002 kg/m^3 after “(without the

quotes).

4. Turn on Embed Auto Annotation and set Type to Time Value.

In the text line, note that “<aa>” has been added to the end. This is

where the Time Value will be placed.

5. Click Apply to create the title.

6. The default settings for text objects centre text at the top of the screen.

To experiment with the position of the text, change the settings on the

Location panel.

Page 133: Tutorials

Flow from a Circular Vent—Viewing the Results

CFX-5 Tutorials Page 117

7. To change the colour, go to the Appearance tab, change Colour Mode

to User Specified and select a new colour.

CFX-Post can produce hard-copy output in several different forms. In thenext section we will print in JPEG format. Many other formats are alsosupported (see "Print" on page 67 in the document "CFX-Post" for moredetails).

To producecoloured JPEGoutput

1. From the Main menu select File > Print, or click Print to file .

Print appears.

2. Set Format to JPEG.

3. Click Browse next to the File data box.

4. Browse to the directory where you want the file saved.

5. Enter a name for the JPEG file.

The file extension “.jpg” will be added if you leave it out.

6. Click Save to set the file name and directory.

This will not save the image file.

7. To print to the file, click Print.

To view the file or make a hard copy, you will need to use an application thatsupports the JPEG format.

To View theResults atFurther TimeSteps

You have now looked at the results at time 1 s and produced a JPEG fileshowing some of these results. Now you are going to have a look at theresults for another time value.

1. Load the results for Time Value 2 s, as you did for the previous results, by

double-clicking the appropriate row in the Timestep Selector.

After a short pause, you will see the 3D Viewer update with the results

for the new time value. You should be able to see that the smoke has

now started to spread out a little more.

2. Load Time Value 4 s.

The smoke has now spread out even more, and is being carried by the

wind.

3. Double-click some more time values to see how the smoke plume

grows with time.

4. Finish by loading Time Value 0 s and turning off the visibility of the text

object.

Page 134: Tutorials

Flow from a Circular Vent—Viewing the Results

Page 118 CFX-5 Tutorials

To Generatean MPEG File

You can generate an MPEG file to show the transient flow of the plume ofsmoke. To generate a MPEG file, you use the Animation Editor in the sameway as in Tutorial 1. However, to animate the plume of smoke you need toanimate over several time steps.

1. Click Show Animation Editor .

The Animation Editor appears.

2. Position the geometry so that you will be able to see the plume of

smoke, then click New in the Animation Editor to create

KeyFrameNo1.

3. Load Time Value 28 s using the Timestep Selector.

4. Click New in the Animation Editor to create KeyframeNo2.

5. Click Options.

Animation appears.

During the production of a transient animation, various time steps will beloaded and all objects will be updated to use the results from that time step.Each frame of the animation must use one of the available time steps.

Page 135: Tutorials

Flow from a Circular Vent—Viewing the Results

CFX-5 Tutorials Page 119

In Animation, Timestep can be set to Timestep Interpolation, TimeValueInterpolation or Sequential Interpolation. This option determines themethod used to decide which time step is loaded for each frame. This willbecome clear when you produce the animation.

6. Set Timestep to TimeValue Interpolation.

This will cause each frame to use the transient file having the closest

time value.

You can also choose other types of interpolation. See "Animation Editor:

Options Dialog Box" on page 154 in the document "CFX-Post" for

details.

Note: On the Advanced panel of Animation, there is a check box optioncalled Keep Intermediate Graphics Files. By turning on this option, theJPEG or PPM files used to encode each frame of the MPEG will persist afterMPEG creation; otherwise they will be deleted.

7. Click OK.

Page 136: Tutorials

Flow from a Circular Vent—Viewing the Results

Page 120 CFX-5 Tutorials

8. Highlight KeyframeNo1, then set # of Frames to 27 in the separate

widget near the bottom.

The animation now contains a total of 29 frames (27 intermediate

frames plus the two Keyframes).

9. In the Animation Editor, turn on Save Animation Movie.

10. Click Browse next to the MPEG File data box to set a path and file

name for the MPEG file.

11. Click Save.

The MPEG file name (including path) will be set, but the MPEG will not

be created yet.

12. If Frame 1 is not loaded (shown in the top right corner of the Animation

Editor, beside F:), click To Beginning to load it.

13. Click Play Forward .

• The MPEG will be created as the animation proceeds.

• This will be slow, since a time step must be loaded and objects mustbe created for each frame.

• To view the MPEG file, you need to use a viewer that supports theMPEG format.

14. When you have finished, exit from CFX-Post.

Page 137: Tutorials

Flow from a Circular Vent—Continuing the Transient Run

CFX-5 Tutorials Page 121

4.G: Continuing the Transient Run

The CFX-Solver determines the initial field for a restart simulation accordingto the settings you made for initialisation.

In this tutorial, in order to set up the transient run correctly you set allvariables to Automatic, except Initial Time which you set to Automaticwith Value. This ensured that the transient run began from an Initial Timeof 0 s. Should you wish to continue your transient run, the Initial Time will beset automatically to the last value from your previous run. For moreinformation on Initialisation, see "Global Initialisation" on page 305 in thedocument "CFX-Pre".

Page 138: Tutorials

Flow from a Circular Vent—Continuing the Transient Run

Page 122 CFX-5 Tutorials

Page 139: Tutorials

CFX-5 Tutorials Page 123

CFX-5 Tutorials

Tutorial 5

Flow Around a Blunt Body

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• BluntBody.pre

• BluntBodyDist.cse

• BluntBodyMesh.gtm

Page 140: Tutorials

Flow Around a Blunt Body—Introduction

Page 124 CFX-5 Tutorials

5.A: Introduction

5.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• solving and post-processing a case where the geometry has beenomitted on one side of a symmetry plane

• using free slip wall boundaries on the sides of and above the domain asa compromise between accurate flow modelling and computationalgrid size

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Fluid Type Ideal Gas

Domain Type Single Domain

Turbulence Model Shear Stress Transport

Heat Transfer Isothermal

Boundary Conditions Inlet (Subsonic)

Outlet (Subsonic)

Symmetry Plane

Wall: No-Slip

Wall: Free-Slip

Timestep Physical Timescale

CFX-Solver Manager Restart

Parallel processing

CFX-Post Plots Default Locators

Outline Plot (Wireframe)

Sampling Plane

Streamline

Vector

Volume

Other Changing the colour range

Instancing Transformation

Lighting Adjustment

Symmetry

Viewing the Mesh

Page 141: Tutorials

Flow Around a Blunt Body—Introduction

CFX-5 Tutorials Page 125

• accurately modelling the near-wall flow using Shear Stress Transport(SST) turbulence model

• running the CFX-Solver in parallel (optional)

• creating vector plots in CFX-Post with uniform spacing between thevectors

• creating a macro using power syntax in CFX-Post

5.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

5.A.3: Overview of the problem to solve

This example demonstrates external air flow over a generic vehicle body.Since both the geometry and the flow are symmetric about a vertical plane,only half of the geometry will be used to find the CFD solution.

Figure 1: External Air Flow Over a Generic Vehicle Body

1.44 m

5.2 m

air speed15.0 m/s

Page 142: Tutorials

Flow Around a Blunt Body—Defining the Simulation in CFX-Pre

Page 126 CFX-5 Tutorials

5.B: Defining the Simulation in CFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file BluntBody.pre tocomplete this section for you and continue from Obtaining a Solution Usingthe CFX-5 Solver (p. 133). See any of the earlier tutorials for instructions onhow to do this.

5.B.1: Creating a New Simulation

1. Start CFX-Pre.

2. Select File > New Simulation.

3. Select General mode.

4. Set File name to BluntBody and then click Save.

5.B.2: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh file BluntBodyMesh.gtm, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. Click the Mesh tab to access the Mesh workspace.

3. Right-click in the Mesh Selector, then select Import.

4. Leave Mesh Format set to CFX-5 GTM file.

5. Set File to BluntBodyMesh.gtm.

6. Click OK to import the mesh.

5.B.3: Creating the Domain

The flow in the domain is expected to be turbulent and approximatelyisothermal. The Shear Stress Transport (SST) turbulence model withautomatic wall function treatment will be used because of its highlyaccurate predictions of flow separation. To take advantage of the SSTmodel, the boundary layer should be resolved with at least 10 mesh nodes.In order to reduce computational time, the mesh in this tutorial is muchcoarser than that.

Page 143: Tutorials

Flow Around a Blunt Body—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 127

See "The Shear Stress Transport (SST) k-w Based Model" on page 71 in thedocument "CFX-5 Solver Theory" and "Automatic Near-Wall Treatment fork-w Based Models" on page 90 in the document "CFX-5 Solver Theory" formore details.

To create anew domain

1. Click Domain .

2. Set Name to BluntBody.

3. Click OK.

Edit Domain: BluntBody is displayed with General Options selected.

4. Set Location to Assembly.

5. Leave Domain Type set to Fluid Domain.

6. Retain Fluids List as Air Ideal Gas.

7. Leave Coord Frame set to Coord 0.

8. Leave Reference Pressure set to 1 [atm].

Note: This tutorial uses an ideal gas as the fluid whereas previous tutorialshave used a General Fluid. When modelling a compressible flow using theideal gas approximation to calculate density variations, it is important to seta realistic Reference Pressure. This is because some fluid properties dependon the absolute fluid pressure (calculated as the static pressure plus thereference pressure).

One atmosphere is equal to 1.0E+5 Pa. You can enter pressure values in avariety of units in CFX-Pre. Valid formats for scientific notation numbersinclude 1e5, 1E5, 1e+5, 1E+05 and 1.0e+05. You should not use spacesbetween any of the characters.

9. Under Buoyancy, leave Option set to Non Buoyant.

10. Under Domain Motion leave Option set to Stationary.

11. Click the Fluid Models tab, then:

a. Under Heat Transfer Model, leave Option set to Isothermal andset Fluid Temperature to 288 [K].

b. Under Turbulence Model, set Option to Shear Stress Transport.

c. Under Turbulent Wall Functions, set Option to Automatic.

The Initialisation panel sets domain specific initial conditions, which arenot used in this tutorial. Global initialisation will be set later in the tutorial.

12. Click OK to create the domain.

Page 144: Tutorials

Flow Around a Blunt Body—Defining the Simulation in CFX-Pre

Page 128 CFX-5 Tutorials

5.B.4: Creating Composite Regions

An imported mesh may contain many 2D regions. For the purpose ofcreating boundary conditions, it can sometimes be useful to group several2D regions together and apply a single boundary condition to thecomposite 2D region. In this case, you are going to create a Union betweentwo regions that both require a free slip wall boundary condition.

1. Click the Regions tab.

2. Right-click in the Region Selector, then select New.

3. In the Create Region box, enter FreeWalls and click OK.

4. In the Region Editor, set Combination to Union.

Note: The Alias option can be used to re-name a region. This can be veryuseful if you wish to apply the physics from one simulation to another withdifferent region names.

5. Set Dimension to 2D.

6. In the Region List, hold down the <Ctrl> key and select Free1 and

Free2.

7. Click OK to create the new region.

The Region Editor closes. The Region Selector is updated to show that

the new region has been added.

5.B.5: Creating the Boundary Conditions

The simulation requires Inlet, Outlet, Wall (No Slip and Free Slip) andsymmetry plane boundary conditions. The regions for these boundaryconditions were defined when the mesh was created.

To Create theInlet BoundaryCondition

1. Click Boundary Condition .

2. In Create Boundary, set Name to Inlet and leave Domain set to

BluntBody.

3. Click OK.

Edit Boundary is displayed.

4. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to Inlet

Page 145: Tutorials

Flow Around a Blunt Body—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 129

5. Click the Boundary Details tab, then:

a. Under Flow Regime, confirm that Option is set to Subsonic.

b. Under Mass and Momentum, confirm that Option is set to NormalSpeed and set Normal Speed to 15 [m s^-1].

c. Under Turbulence set Option to Intensity and Length Scale,Fractional Intensity to0.05, and Eddy Length Scale to0.1 [m].

6. Click OK to create the boundary condition.

To Create theOutletBoundaryCondition

1. Click Boundary Condition .

2. Set Name to Outlet, leave Domain set to BluntBody, and then click

OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Outlet

b. Location to Outlet

4. Click the Boundary Details tab, then:

a. Under Flow Regime, confirm that Option is set to Subsonic.

b. Under Mass and Momentum set Option to Static Pressure andRelative Pressure to 0 [Pa].

5. Click OK to create the boundary condition.

To Create FreeSlip WallBoundaryCondition

The top and side surfaces of the rectangular region will use free slip wallboundary conditions.

• On Free Slip Walls the shear stress is set to zero so that the fluid isnot retarded.

• The velocity normal to the Wall is also set to zero.

• The velocity parallel to the Wall is calculated during the solution.

This is not an ideal boundary condition for this situation since the flowaround the body will be affected by the close proximity to the walls. If thiscase was modelling a wind tunnel experiment, the domain should modelthe size and shape of the wind tunnel and use no-slip walls. If this case wasmodelling a blunt body open to the atmosphere, a much larger domainshould be used to minimise the effect of the walls.

There are other possible ways of dealing with, or eliminating, wall effects,but these are beyond the scope of this tutorial.

Page 146: Tutorials

Flow Around a Blunt Body—Defining the Simulation in CFX-Pre

Page 130 CFX-5 Tutorials

You will apply a single boundary condition to both walls by using thecomposite region defined earlier.

1. Click Boundary Condition .

2. Set Name to FreeWalls, then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to FreeWalls

4. Click the Boundary Details tab, under Wall Influence on Flow, set

Option to Free Slip.

5. Click OK to create the boundary condition.

To Create theSymmetryPlaneBoundaryCondition

1. Click Boundary Condition .

2. Set Name to SymP, then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Symmetry

b. Location to SymP

4. Click OK to create the boundary condition.

To Create aWall BoundaryCondition onthe Blunt BodySurface

1. Click Boundary Condition .

2. Set Name to Body, then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to Body

4. Click the Boundary Details tab, then, under Wall Influence on Flow,

set Option to No Slip.

5. Click OK to create the boundary condition.

The remaining 2D regions (in this case, just the low Z face) will be assignedthe default boundary condition which is an adiabatic, no-slip wall condition.In this case, the name of the default boundary condition is BluntBodyDefault. Although the boundary conditions Body and BluntBody Defaultare identical (except for their locations), the Body boundary condition wascreated so that, during post-processing, its location can by convenientlydistinguished from the other adiabatic, no-slip Wall surfaces.

Page 147: Tutorials

Flow Around a Blunt Body—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 131

5.B.6: Setting Initial Values

1. Click Global Initialisation to display Global Initialisation.

2. Under Cartesian Velocity Components, set:

a. Option to Automatic with Value

b. U to 15 [m s^-1]

c. V to 0 [m s^-1]

d. W to 0 [m s^-1]

3. Under Static Pressure and Turbulence Kinetic Energy leave Option

set to Automatic.

4. Turn on Turbulence Eddy Dissipation and leave Option set to

Automatic.

5. Click OK to set the initialisation details.

5.B.7: Setting Solver Control

1. Click Solver Control .

Solver Control is displayed.

2. Under Advection Scheme, set Option to High Resolution.

3. Under Convergence Control, set:

a. Timescale Control to Physical Timescale

b. Physical Timescale to 2 [s]This is the approximate dynamic time for the flow and is anaggressive timestep for use with a turbulence model.

c. Max. No. Iterations to 60

4. Under Convergence Criteria, leave Residual Type set to RMS and set

Residual Target to 1e-05.

5. Click OK to set the solver control parameters.

5.B.8: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

Write Solver File is displayed.

2. Leave Operation set to Start Solver Manager.

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

Page 148: Tutorials

Flow Around a Blunt Body—Defining the Simulation in CFX-Pre

Page 132 CFX-5 Tutorials

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

Page 149: Tutorials

Flow Around a Blunt Body—Obtaining a Solution Using the CFX-5 Solver

CFX-5 Tutorials Page 133

5.C: Obtaining a Solution Using the CFX-5Solver

This tutorial introduces the parallel solver capabilities of CFX-5. If you do notwant to solve this tutorial in parallel (on more than one processor) or, do nothave a licence to run the CFX-Solver in parallel, you can continue with thistutorial from this point to solve it in serial (as you have for previous tutorials).

If you do not know if you have a license to run the CFX-Solver in parallel, youshould either ask your system administrator, or query the license server asdescribed below.

The results produced will be identical, whether produced by a parallel orserial run.

If you would like to solve this tutorial in parallel, continue with the tutorialfrom Obtaining a Solution in Parallel (p. 134). To solve it in serial, continuefrom Obtaining a Solution in Serial (p. 134).

Querying theLicense Serverfor CFX-5Parallel

This section explains how to find out whether you have any licenses to runCFX-5 in parallel, by using the CFX License Manager.

1. From the CFX-5 Launcher, select Tools > CFX License Manager to open

the CFX License Manager.

This is a tool for managing the licensing of CFX-5. The top of the windowdisplays information about the system and license setup. The bottom half isa message window.

2. If running using a Windows platform select

Query > Licenses Available.

3. If running using a Unix platform select

Licenses > Features > Available.

The message window will display information about available licenses onyour system, in the following form:

CFX-5-SOLVER 5.200 100 30-Sep-2003 CFDSCFX-5-NOLIMIT 5.200 100 30-Sep-2003 CFDSCFX-5-PAR-PROC 5.200 200 30-Sep-2003 CFDSCFX-5-PARALLEL 5.200 100 30-Sep-2003 CFDSCFX-5-COMBUSTION 5.200 100 30-Sep-2003 CFDSCFX-5-MULTIFLUID 5.200 100 30-Sep-2003 CFDSCFX-5-MFR 5.200 100 30-Sep-2003 CFDS

Page 150: Tutorials

Flow Around a Blunt Body—Obtaining a Solution Using the CFX-5 Solver

Page 134 CFX-5 Tutorials

Look for the presence ofCFX-5-PARALLEL type licenses. If you have thistype of license, you can run the CFX-5 Solver in parallel.

5.C.1: Obtaining a Solution in Serial

When the CFX-Solver Manager starts:

1. Click Start Run.

The CFX-Solver calculates the solution to your CFD problem.

2. When the CFX-Solver has finished, click OK in the message box.

To View theResults

3. Click Post-Process Results .

4. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Continue with this tutorial from Viewing the Results (p. 141).

5.C.2: Obtaining a Solution in Parallel

Using the parallel capability of the CFX-Solver allows you to divide a largeCFD problem so that it can run on more than one machine at once, savingtime and avoiding problems which arise when a CFD calculation requiresmore memory than a single machine has available. The partition (division)of the CFD problem is automatic but you need to set up the machines youwant to run on.

Page 151: Tutorials

Flow Around a Blunt Body—Obtaining a Solution Using the CFX-5 Solver

CFX-5 Tutorials Page 135

Background toParallelRunning inCFX-5

A number of events occur when you set up a parallel run and then ask theCFX-Solver to calculate the solution:

• Your mesh will be divided into the number of partitions that you havechosen.

• The CFX-Solver runs separately on each of the partitions on the selectedmachine(s).

• The results that one CFX-Solver process calculates affects the otherCFX-Solver processes at the interface between the different sections ofthe mesh.

• All of the CFX-Solver processes are required to communicate with eachother and this is handled by the master process.

• The master process always runs on the machine that you are loggedinto when the parallel run starts. The other CFX-Solver processes areslave processes.

• After the problem has been resolved, a single Results File is written. Itwill be identical to a Results File from the same problem run as a serialprocess, with one exception: an extra variable Real partition numberwill be available for the parallel run. This will be described later in thetutorial.

Setting Up toRun in Parallel

WindowsIf you are working on Windows, no set up is required if your systemadministrator has followed the instructions in "Windows Parallel Setup" onpage 60 in the document "CFX-5 Installation" as part of the installationprocedure. You can move straight to "To Define a Parallel Run" on page 136in the document "CFX-5 Tutorials".

UNIXFollow the procedure below prior to running in parallel for the first time onUNIX systems. Additional information can be found in "UNIX Parallel Setup"on page 47 in the document "CFX-5 Installation".

Note: The following procedure may not be needed for all systems. Yoursystem administrator will inform you if you need to create a.rhosts fileto run in parallel.

Page 152: Tutorials

Flow Around a Blunt Body—Obtaining a Solution Using the CFX-5 Solver

Page 136 CFX-5 Tutorials

You need to know the hostname of the machine that you are currentlylogged into. It will be used for the master process.

1. Type cfx5info -host in a UNIX terminal window.

The output should be used as the hostname.

2. Create a file named .rhosts in your home directory.

Do this using any text editor.

3. Put the following line into the .rhosts file:

<master> <user>

• Where <master> is the hostname found in step 1 above and<user> is your current user name.

• For example, your user name is smith, and you are logged onto amachine with the hostname of machine1. Then your .rhostsfile would contain the following line of text:machine1 smith

4. You now need to make this file readable by you only. This can be done

by typing the following in a UNIX terminal window:

chmod 600 ~/.rhosts

If you have a different home directory on a machine you want to use for aslave process, you will have to create a .rhosts file on it in the same way,using exactly the same text (for example, use the same hostname, not themachine’s own hostname, for <master>).

Note: If you do not have the same user name, you will be unable to run inparallel on this machine.

To Define aParallel Run

In CFX-Solver Manager, Define Run should already be open.

1. Set Definition File to BluntBody.def.

If you had wanted to run the problem as a serial run (as you have done inprevious tutorials) you could have clicked Start Run. However, you aregoing to run the problem in parallel instead.

2. Leave Type of Run set to Full.

If Type of Run was instead set to Partitioner Only, your mesh would be

split into a number of partitions but would not be run in the CFX-Solver

afterwards.

3. Set Run Mode to PVM Distributed Parallel.

Run Mode can be set to one of several options. See "Run Mode" on page12 in the document "CFX- Solver Manager" for details.

Page 153: Tutorials

Flow Around a Blunt Body—Obtaining a Solution Using the CFX-5 Solver

CFX-5 Tutorials Page 137

The name of the machine that you are currently logged into should be in theHost Name list. You are going to run with two partitions on two differentmachines, so another machine must be added.

Page 154: Tutorials

Flow Around a Blunt Body—Obtaining a Solution Using the CFX-5 Solver

Page 138 CFX-5 Tutorials

4. Click Insert Host to specify a new host machine.

• The Select Parallel Hosts panel is displayed. This is where youchoose additional machines to run your processes.

• Your system administrator should have set up a hosts filecontaining a list of the machines that are available to run the parallelCFX-5 Solver.

• The Host Name column displays names of available hosts.

• The second column shows the number of processors on thatmachine.

• The third shows the relative processor speed: a processor on amachine with a relative speed of 1 would typically be twice as fastas a machine with a relative speed of 0.5.

• The last column displays operating system information.

• This information is read from the hosts file; if any information ismissing or incorrect your system administrator should correct thehosts file.

Note: The # Processors, Rel. Speed and System information does not haveto be specified to be able to run on a host.

5. Select the name of another machine in the Host Name list

Select a machine that you can log into.

6. Click Add.

The name of the machine is added to the Host Name column.

Note: Ensure that the machine which you are currently logged into is in theHosts Name list in the Define Run window.

7. Close the Select Parallel Hosts window.

8. Enable Show Advanced Controls.

9. Click the Partitioner tab at the top of the panel.

10. Use the default MeTiS partitioner.

Your model will be divided into two sections, with each section running

in its own CFX-Solver process. The default is the MeTiS partitioner

because it produces more efficient partitions than either Recursive

Coordinate Bisection or User Specified Direction. See "Setting Up

and Running a Parallel Run" on page 45 in the document "CFX- Solver

Manager" for details of the other settings on this panel.

Page 155: Tutorials

Flow Around a Blunt Body—Obtaining a Solution Using the CFX-5 Solver

CFX-5 Tutorials Page 139

11. Click Start Run to begin the parallel run.

The Text Output Area will display information about the partitioning

job as below:+--------------------------------------------------------------------+ | Job Information | +--------------------------------------------------------------------+

Run mode: partitioning run

Host computer: fastmachine1 Job started: Wed Nov 28 15:18:40 2000

This tells you that the information following is concerned with thepartitioning. After the partitioning job has finished, you will find:

CPU-Time requirements:- Preparations 1.460E+00 seconds- Low-level mesh partitioning 1.000E-01 seconds - Global partitioning information 3.100E-01 seconds- Vertex, element and face partitioning information 1.600E-01 seconds - Element and face set partitioning information 5.000E-02 seconds - Summed CPU-time for mesh partitioning 2.080E+00 seconds

+--------------------------------------------------------------------+ | Job Information | +--------------------------------------------------------------------+

Host computer: fastmachine1 Job finished: Wed Nov 28 15:19:16 1998 Total CPU time: 1.143E+01 seconds or: ( 0: 0: 0: 11.428 ) ( Days: Hours: Minutes: Seconds )

This marks the end of the partitioning job. The CFX-5 Solver now beginsto solve your parallel run:

+--------------------------------------------------------------------+ | Job Information | +--------------------------------------------------------------------+

Run mode: parallel run (PVM)

Host computer: fastmachine1 Par. Process: Master running on mesh partition: 1 Job started: Thu Nov 28 15:19:20 2000

Host computer: slowermachine Par. Process: Slave running on mesh partition: 2 Job started: Thu Nov 28 15:24:55 2000

The machine which you are logged into runs the master process, and

Page 156: Tutorials

Flow Around a Blunt Body—Obtaining a Solution Using the CFX-5 Solver

Page 140 CFX-5 Tutorials

controls the overall simulation. The second machine selected will runthe slave process. If you had more than two processes, each additionalprocess is run as a slave process.The master process in this example is running on the mesh partitionnumber 1 and the slave is running on partition number 2. You can findout which nodes and elements are in each partition by using CFX-Postlater on in the tutorial.When the CFX-Solver finishes, the Output File displays the following:

+--------------------------------------------------------------------+ | Job Information | +--------------------------------------------------------------------+

Host computer: fastmachine1 Par. Process: Master running on mesh partition: 1 Job finished: Thu Nov 28 16:44:01 2000 Total CPU time: 9.025E+02 seconds or: ( 0: 0: 15: 2.517 ) ( Days: Hours: Minutes: Seconds )

Host computer: slowermachine Par. Process: Slave running on mesh partition: 2 Job finished: Wed Nov 28 16:54:30 2000 Total CPU time: 1.291E+03 seconds or: ( 0: 0: 21: 31.034 ) ( Days: Hours: Minutes: Seconds )--> Master-Partition Nr. 1 reaches final synchronization point! --> Slave-Partition Nr. 2 reaches final synchronization point!This run of the CFX-5 Solver has finished.

You may need to scroll up through the output file to view the regionshown above. More details on the contents of the Output File can befound in "The CFX-5 Output File" on page 87 in the document"CFX-Solver Manager".The CFX-Solver displays the following at the end of the run:

BluntBody_001 has completed normally. All RMS residuals and globalimbalance are below their target criteria.

12. Click OK.

13. Click Post-Process Results .

14. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 157: Tutorials

Flow Around a Blunt Body—Viewing the Results

CFX-5 Tutorials Page 141

5.D: Viewing the Results

In this tutorial, a vector plot is created in CFX-Post. This will let you see howthe flow behaves around the body. You will also use Symmetry Planes andlearn more about manipulating the geometry view in the 3D Viewer.

5.D.1: Using Symmetry Planes

Earlier in this tutorial you used a symmetry plane boundary conditionbecause the original blunt body had a symmetry plane. Due to thissymmetry, it was necessary to use only half of the full geometry to calculatethe CFD results. However, for visualisation purposes, it is helpful to use thefull blunt body. CFX-Post is able to recreate the full data set from the halfthat was originally calculated. This is done by creating an InstanceTransform object.

Manipulatingthe Geometry

You need to manipulate the geometry so that you will be able to see whathappens when you use the symmetry plane. The CFX-Post features that youhave used in earlier tutorials will not be described in detail. New features willbe described in detail.

1. Click View Toward +X by using the viewer icon drop-down menu.

Creating anInstanceTransform

Instance Transforms are used to visualise a full geometry representation incases where the simulation took advantage of symmetry to solve for onlypart of the geometry. There are three types of transforms that you can use:Rotation, Translation, Reflection. In this tutorial you will create a Reflectiontransform located on a plane.

1. Click Create plane .

2. Set Name to Reflection Plane, then click OK.

3. Under Geometry, set Method to ZX Plane and Y to 0.

4. Disable Visibility.

5. Click Apply.

This creates a Plane in the same location as the symmetry Plane defined inCFX-Pre. Now the instance transform can be created using this Plane:

6. Click Create instancing transformation and accept the default

name.

Page 158: Tutorials

Flow Around a Blunt Body—Viewing the Results

Page 142 CFX-5 Tutorials

7. On the Definition panel, fill in the settings as shown below.

8. Click Apply to create the Instance Transform.

Using theReflectionTransform

You can use the transform when creating or editing graphics objects. Forexample, you can modify the Wireframe view to use it as follows:

1. Edit the Wireframe object.

2. Set Transform to Instance Transform 1, retain the other settings as

their defaults and click Apply.

Zoom in so that the geometry fills the Viewer.

Page 159: Tutorials

Flow Around a Blunt Body—Viewing the Results

CFX-5 Tutorials Page 143

You will see the full blunt body. It is possible to select more than onesymmetry plane. More details can be found in "Instance Transform" on page120 in the document "CFX-Post".

5.D.2: Creating Vectors

You are now going to create a vector plot to show velocity vectors behindthe blunt body. You need to first create an object to act as a locator, which,in this case, will be a Sampling Plane. Then create the vector plot itself.

Creating theSamplingPlane

A Sampling Plane is a plane with evenly spaced sampling points on it.

1. Click Create Plane .

2. In New Plane, set Name to Sample, then click OK.

3. Under Geometry:

a. Set Method to Point and Normal.

b. The following (x, y, z) values must be entered into the Point boxesto define the centre of the Sampling Plane: 6, -0.001, 1.

c. For the Normal vector enter the values: 0, 1, 0.

d. Expand the Plane Bounds section of the form.

e. Set Type to Rectangular, X Size to 2.5 [m], and Y Size to2.5 [m].

f. Expand the Plane Type section of the form.

g. Turn on Sample and set X Samples and Y Samples to 20.

4. Click Apply to create the Sampling Plane.

5. Click View Toward +Y .

You will not see the location of the sampling points because Draw

Lines is turned off by default on the Render tab.

6. Click the Render tab:

a. Turn on Draw Lines.

b. Turn off Draw Faces.

7. Click Apply.

You can zoom in on the Sampling Plane to see the location of the samplingpoints (where lines intersect). One way to do this is to hold <Shift> whilemiddle clicking the area of interest. There are a total of 400 (20 * 20)sampling points on the plane. A vector can be created at each samplingpoint.

Page 160: Tutorials

Flow Around a Blunt Body—Viewing the Results

Page 144 CFX-5 Tutorials

8. Make the Sampling Plane invisible by turning off Visibility and then

clicking Apply.

Creating aVector PlotUsing theSamplingPlane

1. Click Create Vector Plot .

2. In New Vector, click OK to accept the default name.

3. Under Geometry, set:

a. Domains to All Domains

b. Locations to Sample

c. Variable to Velocity

4. Click the Colour tab, then set Mode to Use Plot Variable.

This colours the Vectors by the variable shown on the Geometry panel

(Velocity).

5. Click the Symbol tab, then set Symbol Size to 0.15.

This scales the length of the vectors.

6. Click Apply to create the Vector plot.

7. Zoom until the Vector plot is roughly the same size as the 3D Viewer.

The plot should look similar to the one below. (If you get lost, click View

Toward +Y and zoom in again.).

You should be able to see a region of recirculation behind the blunt body.

Note: In this example, you may want to increase the density of the vectors(by increasing the number of sampling points) to resolve the flow in thisregion. However, you could end up with poor results. This is because themesh has only 2-3 elements across the feature. This is insufficient to resolve

Page 161: Tutorials

Flow Around a Blunt Body—Viewing the Results

CFX-5 Tutorials Page 145

the vortex properly. You would need to decrease the size of the meshelements (decrease the mesh length scale in this region) in order to improvethe solution accuracy.

You can try the following before continuing to the next section.

1. Change the location of the Vector plot to SymP and click Apply.

2. Double-click the Body object. Set Mode to Variable and colour the

Body boundary object by Pressure and change the Transform (on the

Render panel) to the transformation previously created (Instance

Transform 1). Turn on Visibility

3. Try using different mouse methods of manipulating the geometry.

Examine the effect of Move Light (<Ctrl> plus <Shift> and use the

Arrow keys to move) and Zoom box .

4. Make the Body boundary object invisible and create a view of the

surface mesh on the SymP object by making it visible, turning on lines,

and turning off faces. You will be able to see the mesh around the blunt

body, with the mesh length scale decreasing near the body, but still

coarse in the region of recirculation. By zooming in, you will be able to

see the layers of inflated elements near the body and ground.

If you want to know more about any feature, select Help >Master Contents from the main menu.

5.D.3: Creating Surface Streamlines

In order to show the path of air along the surface of the blunt body, surfacestreamlines can be made as follows:

1. Click Create plane .

2. In New Plane, set Name to Starter, then click OK.

3. Under Geometry:

a. Set Method to YZ Plane.

b. Set X to -0.1 [m].

4. Click Apply.

The plane appears just upstream of the blunt body.

5. Turn off Visibility, then click Apply.

This hides the plane from view, although the plane still exists.

6. Click Create streamline .

Page 162: Tutorials

Flow Around a Blunt Body—Viewing the Results

Page 146 CFX-5 Tutorials

7. In New Streamline, accept the default Name by clicking OK.

8. On the Geometry panel:

a. Set Type to Surface Streamline.

b. Under Definition, set Surfaces to Body, Start From to Locations,Locations to Starter.

9. Click Apply.

The surface streamlines appear on the surface of the blunt body. They startnear the upstream end because the starting points were formed byprojecting nodes from the plane to the blunt body.

5.D.4: Creating a Surface Plot of y+

The velocity next to a no-slip Wall boundary changes rapidly from a value ofzero at the wall to the free stream value a short distance away from the wall.This layer of high velocity gradient is known as the boundary layer. Manymeshes are not fine enough near a wall to accurately resolve the velocityprofile in the boundary layer. Wall functions can be used in these cases toapply an assumed functional shape of the velocity profile. Other grids arefine enough that they do not require wall functions, and application of thelatter has little effect. The majority of cases fall somewhere in between thesetwo extremes, where the boundary layer is partially resolved by nodes nearthe wall and wall functions are used to supplement accuracy where thenodes are not sufficiently clustered near the wall.

One indicator of the closeness of the first node to the wall is thedimensionless wall distance y+. It is good practice to examine the values ofy+ at the end of your simulation. At the lower limit, a value of y+ less than orequal to 11 indicates that the first node is within the laminar sublayer of theboundary flow. Values larger than this indicate that an assumed logarithmicshape of the velocity profile is being used to model the boundary layerportion between the wall and the first node. Ideally you should confirm thatthere are several nodes (3 or more) resolving the boundary layer profile. Ifthis is not observed, it is highly recommended that more nodes be addednear the wall surfaces in order to improve simulation accuracy. In thistutorial, a coarse mesh is used to speed the run time. Thus the grid is far toocoarse to resolve any of the boundary layer profile, and the solution is nothighly accurate.

More related information can be found in "Modelling Flow Near the Wall" onpage 88 in the document "CFX-5 Solver Theory", including the differencebetween the solution Yplus and Solver Yplus.

Page 163: Tutorials

Flow Around a Blunt Body—Viewing the Results

CFX-5 Tutorials Page 147

Creating aSurface Plot ofy+

A surface plot is one which colours a surface according to the values of avariable: in this case, y+. A surface plot of y+ can be obtained as follows:

1. Turn off Visibility for all previous plots.

2. Click Perspective to enable a perspective view.

3. In the Objects Workspace, double-click the BluntBody Default object,

then:

a. On the Colour panel, set Mode to Variable.

b. Set Variable to Yplus.Click to the right of the Variable dropdown menu to view a fulllist of variables, including Yplus.

c. Set Range to Local.

d. Click the Render tab, then use the reflection transform you createdearlier (Instance Transform 1).

e. Turn on Visibility.

4. Click Apply.

5. Produce a plot of Yplus on the Body object in the same way.

5.D.5: Demonstrating Power Syntax

This section demonstrates a Power Syntax Macro used to evaluate thevariation of any variable in the direction of the X axis. This is an example ofPower Syntax programming in CFX-Post. For more information on PowerSyntax, please see "Power Syntax Overview" on page 238 in the document"CFX-Post". For information on CCL please see "Overview of the CFXCommand Language (CCL)" on page 200 in the document "CFX-Post".

1. Play the session file named BluntBodyDist.cse.

A macro containing CCL and power syntax is loaded. The macro tellsCFX-Post to create slice planes, normal to the X axis, at 20 evenly-spacedlocations from the beginning to the end of the BluntBody domain. On eachplane, it measures and prints the minimum, maximum, and average valuesfor a specified variable (using Conservative values). The planes are colouredusing the specified variable.

This macro will be executed by entering a line of power syntax in theCommand Editor.

Page 164: Tutorials

Flow Around a Blunt Body—Viewing the Results

Page 148 CFX-5 Tutorials

Note: The CFX-Post engine can respond to CCL commands issued directly,or to commands issued using the graphical user interface. The CommandEditor can be used to enter any valid CCL command directly. Please see"Command Editor" on page 169 in the document "CFX-Post" for moreinformation.

2. Position the geometry to look toward the -X axis.

3. From the Main menu click Tools > Command Editor.

4. Type the following line into the Command Editor (the quotation marks

and the semi-colon are required):

!BluntBodyDist("Velocity u");

5. Click Process.

The Minimum, Maximum and Average values of the variable at each X

location are written to the file BluntBody.txt. The results can be

viewed by opening the file in a text editor.

You can also run the macro with a different variable.

To view the content of the session file (which contains explanatorycomments), open the session file in a text editor. It contains all of the CCLand power syntax commands and will provide a better understanding ofhow the macro works.

5.D.6: Viewing the Mesh Partitions (Parallel Only)

If you solved this tutorial in parallel then an additional variable named Realpartition number will be available in CFX-Post

1. Create an Isosurface of Real partition number equal to 1.

2. Create a second Isosurface of Real partition number equal to 1.999.

The two Isosurfaces show the edges of the two partitions. The gap betweenthe two plots shows the overlap nodes. These were contained in bothpartitions 1 and 2.

When you have finished looking at the results, shut down CFX-Post.

Page 165: Tutorials

CFX-5 Tutorials Page 149

CFX-5 Tutorials

Tutorial 6

Buoyant Flow in aPartitioned Cavity

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• Buoyancy2D.geo

• Buoyancy2D.pre

Page 166: Tutorials

Buoyant Flow in a Partitioned Cavity—Introduction

Page 150 CFX-5 Tutorials

6.A: Introduction

6.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• using CFX-4 Mesh Import

• setting up a time dependent (transient) simulation

• modelling buoyant flow

6.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that you

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Transient

Fluid Type General Fluid

Domain Type Single Domain

Turbulence Model Laminar

Heat Transfer Thermal Energy

Buoyant Flow

Boundary Conditions Symmetry Plane

Outlet (Subsonic)

Wall: No-Slip

Wall: Adiabatic

Wall: Fixed Temperature

Output Control

Timestep Transient Example

Transient Results File

CFX-Solver Manager n/a n/a

CFX-Post Plots Default Locators

Other Timestep Selection

Transient Animation

Page 167: Tutorials

Buoyant Flow in a Partitioned Cavity—Introduction

CFX-5 Tutorials Page 151

perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

6.A.3: Overview of the problem to solve

Introduction: This tutorial demonstrates the capability of CFX-5 in modellingbuoyancy-driven flows which require the inclusion of gravitational effects.

The model is a 2D partitioned cavity containing air. The bottom of the cavityis kept at a constant temperature of 75°C, while the top is held constant at5°C. The cavity is also tilted at an angle of 30 degrees to the horizontal. Atransient simulation is set up to see how the flow develops starting fromstationary conditions. Since you are starting from stationary conditions,there is no need to solve a steady-state simulation for use as the initialguess.

The mesh for the cavity was created in CFX-4 and has been provided.

5�C

75�C

air

Page 168: Tutorials

Buoyant Flow in a Partitioned Cavity—Defining the Simulation in CFX-Pre

Page 152 CFX-5 Tutorials

6.B: Defining the Simulation in CFX-Pre

You are going to import a hexahedral mesh originally generated in CFX-4.The mesh contains labelled regions which will enable you to apply therelevant boundary conditions for this problem.

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file Buoyancy2D.pre tocomplete this section for you and continue from Obtaining a Solution(p. 159). See one of the first four tutorials for instructions on how to do this.

6.B.1: Creating a New Simulation

Start CFX-Pre and create a new simulation in General Mode calledBuoyancy2D using the same method as previous tutorials.

6.B.2: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh file Buoyancy2D.geo, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. Click the Mesh tab to access the Mesh workspace.

3. Right-click in the Mesh Selector and select Import.

4. In the Mesh Workspace, on the Definition panel, set:

a. Mesh Format to CFX-4

b. File to Buoyancy2D.geo

Note: See "CFX-4" on page 95 in the document "CFX-Pre" for further detailson importing CFX-4 meshes and how to use the options available on theAdvanced panel.

5. Click OK to import the mesh.

Page 169: Tutorials

Buoyant Flow in a Partitioned Cavity—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 153

6.B.3: Simulation Type

The default units and coordinate frame settings are suitable for this tutorial,but the simulation type needs to be set to transient.

1. Select Create > Flow Objects > Simulation Type from the main menu

bar.

2. Set Option to Transient.

3. Set Timesteps to 0.1 [s].

This is the interval from one step, in real time, to the next. The simulation

will continue, moving forward in time by 0.1 s, until the total time has

been reached.

4. Set Total Time to 2.0 [s].

This is the total duration, in real time, for the simulation.

5. Under Initial Time, leave Option set to Automatic with Value and set

Time to 0 [s].

6. Click OK.

You will notice Physics error messages in the Physics Editor as the case is setto Transient. These errors will be fixed in the later part of the tutorial.

Page 170: Tutorials

Buoyant Flow in a Partitioned Cavity—Defining the Simulation in CFX-Pre

Page 154 CFX-5 Tutorials

6.B.4: Creating the Domain

You are going to create a fluid domain where the flow is driven bybuoyancy. Two buoyancy models are available in CFX-5. They are invokedautomatically, depending on fluid density definition.

• The Boussinesq approximation, used for near constant density fluids isused in this tutorial, as the density does not vary appreciably over therange of conditions in the flow.

• The Full Buoyancy model may be needed if the density were to changesignificantly. See "Buoyancy" on page 11 in the document "CFX-5 SolverModelling" for more information.

In addition to modelling buoyant flow, you will model the cavity as if it wastilted at an angle of 30°. You can do this by specifying horizontal and verticalcomponents of the gravity vector, which are aligned with the defaultcoordinate axes, as shown in the diagram above.

To Create aNew Domain

1. Click Domain .

2. Set Name to Buoyancy2D then click OK.

y

x

gcos30�

30�

gsin30�30�

g

Page 171: Tutorials

Buoyant Flow in a Partitioned Cavity—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 155

3. On the General Options panel:

a. Leave Location set to Assembly.

b. Leave Domain Type set to Fluid Domain.

c. Set Fluids List to Air at 25 C.

d. Leave Coord Frame set to Coord 0.

e. Set Reference Pressure to 0 [Pa].

f. Under Buoyancy, set:

g. Under Domain Motion, leave Option set to Stationary.

4. Click the Fluid Models tab, then:

a. Under Heat Transfer Model set Option to Thermal Energy.

b. Under Turbulence Model set Option to None (Laminar).Leave the other options at their defaults.

Initialisation will be set up using the Global Initialisation Editor, so there isno need to visit the Initialisation tab.

5. Click OK to create the domain.

Set the following To this value

Option Buoyant

Gravity X Dirn. -4.905 [m s^-2]

Gravity Y Dirn. -8.49571 [m s^-2]

Gravity Z Dirn. 0.0 [m s^-2]*

*. This produces a gravity vector which simulates the tilt of thecavity

Buoyancy Ref. Temp. 40 [C]†

†. Do not forget to change the units. This is just an approximaterepresentative domain temperature.

Ref Location Automatic‡

‡. You can set the reference location using cartesian coordinates,but in this case, the automatic solver treatment (discussed in"Buoyancy" on page 25 in the document "CFX-5 Solver Theory"), issufficient

Page 172: Tutorials

Buoyant Flow in a Partitioned Cavity—Defining the Simulation in CFX-Pre

Page 156 CFX-5 Tutorials

6.B.5: Creating the Boundary Conditions

To Create Hotand Cold WallBoundaryConditions

You will create a wall boundary condition with a fixed temperature of 75 Con the bottom surface of the cavity, as follows:

1. Click Boundary Condition .

2. Set Name to hot.

3. Set Domain to Buoyancy2D and then click OK.

4. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to WALLHOT

5. Click the Boundary Details tab, then:

a. Under Wall Influence on Flow, set Option to No Slip.

b. Under Heat Transfer, set Option to Temperature and FixedTemperature to 75 [C] (change the units).

6. Click OK to create the boundary condition.

7. Use the same method to create a second wall boundary condition

named cold on the region WALLCOLD, with Temperature set to

5 [C] (change the units).

To Create theSymmetryPlaneBoundaryConditions

A single symmetry plane boundary condition can be used for the front andback of the cavity.

1. Click Boundary Condition .

2. Set Name to SymP and then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Symmetry

b. Location to SYMMET1 and SYMMET2(Use the <Ctrl> key to select more than one region.)

4. Click OK to create the boundary condition.

The default adiabatic wall boundary condition will automatically be appliedto the remaining boundaries.

Page 173: Tutorials

Buoyant Flow in a Partitioned Cavity—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 157

6.B.6: Setting Initial Values

1. Click Global Initialisation . On the Global Initialisation panel,

then:

a. Leave Velocity Type set to Cartesian.

b. Under Cartesian Velocity Components, set Option to Automaticwith Value.

c. Set U, V and W to 0 [m s^-1].

d. Under Static Pressure, set Option to Automatic with Value andRelative Pressure to 0 [Pa].

e. Under Temperature, set Option to Automatic with Value andTemperature to 5 [C] (check that you do not set 5 [K]).

2. Click OK to set the initialisation details.

Important: Automatic with Value is typically used when defining atransient model. The CFX-Solver checks the definition file for an existingsolution field at the beginning of the run. If the file is being used to restartthe CFX-Solver, then a solution field will be present and is used. If a solutionfield does not exist in the definition file, as is the case in this tutorial, theCFX-Solver uses the values that you have specified.

6.B.7: Setting Output Control

1. Click Output Control .

2. Click the Transient Results tab.

3. Click Add new item and then click OK to accept the default name

for the object.

4. Under Transient Results 1:

a. Set Option to Minimal.

b. Set Output Variables List to Pressure, Temperature, Velocity.(Use the <Ctrl> key when selecting multiple items).

c. Turn on Time Interval and enter a value of 0.1 [s].Transient results files will be written at this interval.

5. Click OK.

Page 174: Tutorials

Buoyant Flow in a Partitioned Cavity—Defining the Simulation in CFX-Pre

Page 158 CFX-5 Tutorials

6.B.8: Setting Solver Control

1. Click Solver Control .

2. On the Basic Settings panel:

a. Under Advection Scheme, set Option to Specified Blend Factorand leave Blend Factor set to 1.0.

b. Under Convergence Control, set Max. Iter. Per Timestep to 5.

c. Under Convergence Criteria, set Residual Type to RMS andResidual Target to 1e-04.An RMS value of at least 1e-05 is usually required for adequateconvergence, but the default value is sufficient for demonstrationpurposes. See "Judging Convergence" on page 364 in thedocument "CFX-5 Solver Modelling" for more details.

Use defaults for all other Solver Control settings.

3. Click OK to set the solver control parameters.

6.B.9: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

Page 175: Tutorials

Buoyant Flow in a Partitioned Cavity—Obtaining a Solution

CFX-5 Tutorials Page 159

6.C: Obtaining a Solution

When CFX-Pre has shut down and the CFX-Solver Manager has loaded, youwill be able to obtain a solution to the CFD problem by following theinstructions below.

1. Click Start Run.

Note: Recall from Tutorial that the output displayed in the Text Area of theCFX-Solver Manager is more complicated for transient problems than forsteady-state problems. Each timestep consists of several iterations, andafter the timestep, information about various quantities is printed.

When the CFX-Solver has finished:

2. Click OK.

3. Click Post-Process Results .

4. When Start CFX-Post appears, turn on Shut Down Solver Manager

then click OK.

Page 176: Tutorials

Buoyant Flow in a Partitioned Cavity—Viewing the Results

Page 160 CFX-5 Tutorials

6.D: Viewing the Results

Use CFX-Post to create plot variables on the symmetry planes of the cavity.

• Remember that when you open CFX-Post, the results at the Final Statetimestep will be available by default.

• Use Tools > Timestep Selector to load the results at a differenttimestep.

Use the animation feature to generate plots showing the transient rise intemperature and the motion of the fluid due to heating from the bottomsurface.

When you have finished, close CFX-Post.

Page 177: Tutorials

CFX-5 Tutorials Page 161

CFX-5 Tutorials

Tutorial 7

Free Surface Flow Over aBump

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• Bump2D.pre

• Bump2DExpressions.ccl

• Bump2Dpatran.out

Page 178: Tutorials

Free Surface Flow Over a Bump—Introduction

Page 162 CFX-5 Tutorials

7.A: Introduction

7.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• mesh import in PATRAN Neutral format

• setting up a 2D problem

• setting up appropriate boundary conditions for a free surfacesimulation

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Fluid Type General Fluid

Domain Type Single Domain

Turbulence Model k-Epsilon

Heat Transfer None

Buoyant Flow

Multiphase

Boundary Conditions Inlet (Subsonic)

Outlet (Subsonic)

Symmetry Plane

Wall: No-Slip

Wall: Free-Slip

CEL (CFX Expression Language)

Mesh Adaption

Timestep Physical Timescale

CFX-Solver Manager n/a n/a

CFX-Post Plots Default Locators

Isosurface

Polyline

Sampling Plane

Vector

Volume

Other Chart Creation

Title/Text

Viewing the Mesh

Page 179: Tutorials

Free Surface Flow Over a Bump—Introduction

CFX-5 Tutorials Page 163

(Free Surface simulations are more sensitive to incorrect boundary andinitial guess settings than other more basic models.)

• mesh adaption to refine the mesh where the volume fraction gradientis greatest(This aids in the development of a sharp interface between the liquidand gas.)

7.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

7.A.3: Overview of the problem to solve

This tutorial demonstrates the simulation of a free surface flow.

The geometry consists of a 2D channel in which the bottom of the channelis interrupted by a semi-circular bump of radius 30 mm. The flow upstreamof the bump is subcritical. The downstream conditions are not known butcan be estimated using an analytical 1D calculation or data tables for flowover a bump.

Page 180: Tutorials

Free Surface Flow Over a Bump—Defining the Simulation in CFX-Pre

Page 164 CFX-5 Tutorials

7.B: Defining the Simulation in CFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session fileBump2D.pre to completethis section for you and continue from Obtaining a Solution (p. 175). Seeone of the first four tutorials for instructions on how to do this.

7.B.1: Creating a New Simulation

Start CFX-Pre and create a new simulation named Bump2D using theGeneral Mode. You can refer to the introductory tutorials if you requireinstructions on how to do this.

7.B.2: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the file Bump2Dpatran.out from the examples directory

(<CFXROOT>/examples) to your working directory.

2. Click the Mesh tab to access the Mesh workspace.

3. Right-click in the Mesh Selector and select Import.

4. In the Mesh Workspace, on the Definition panel, set:

a. Mesh Format to PATRAN Neutral

b. File to Bump2Dpatran.out

5. Click OK to import the mesh.

6. Click View Toward -Z by using the viewer icon drop-down menu.

Viewing theRegion Labels

1. Click Label and Marker Visibility on the Viewer toolbar.

Labels and Markers appears.

2. Turn on Show Primitive3D Labels and Show Primitive2D Labels.

3. Click OK.

The CFX-Solver can solve any valid mesh containing hexahedral, prismatic,pyramidal or tetrahedral elements. It can also solve hybrid meshescontaining different element types. The imported mesh in this exampleconsists entirely of hexahedral elements.

Page 181: Tutorials

Free Surface Flow Over a Bump—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 165

7.B.3: Creating Expressions for Initial and BoundaryConditions

Simulation of free surface flows usually requires defining boundary andinitial conditions to set up appropriate pressure and volume fraction fields.You will need to create expressions using CEL (CFX Expression Language) todefine these conditions.

In this simulation, the following conditions are set and require expressions:

• An inlet boundary where the volume fraction above the free surface is 1for air and 0 for water and below the free surface is 0 for air and 1 forwater.

• A pressure-specified outlet boundary, where the pressure above thefree surface is constant and the pressure below the free surface is ahydrostatic distribution. This requires you to know the approximateheight of the fluid at the outlet. In this case, an analytical solution for 1Dflow over a bump was used. The simulation is not sensitive to the exactoutlet fluid height, so an approximation is sufficient. You will examinethe effect of the outlet boundary condition in the post-processingsection and confirm that it does not affect the validity of the results. It isnecessary to specify such a boundary condition to force the flowdownstream of the bump into the supercritical regime. See "ModellingAdvice for Free Surface Flow" on page 198 in the document "CFX-5Solver Modelling" for more details on setting boundary conditions forfree surface calculations.

• An initial pressure field for the domain with a similar pressuredistribution to that of the outlet boundary.

You can create the expressions by reading them in from a file or by typingthem into the Expression Editor. Follow only one of the two methodsdescribed below.

CreatingExpressionsUsing theExpressionEditor

1. On the main toolbar, click the Create New Expression icon .

2. Click New in the Expression Editor:

3. Set Name to UpH, then click OK.

4. Set Definition to 0.069 [m], then click Apply.

Page 182: Tutorials

Free Surface Flow Over a Bump—Defining the Simulation in CFX-Pre

Page 166 CFX-5 Tutorials

5. Use the same method to create the expressions listed in the table

below. These are expressions for the downstream free surface height,

the density of the fluid, the upstream volume fractions of air and water,

the upstream pressure distribution, the downstream volume fractions

of air and water and the downstream pressure distribution.

6. Proceed to Creating the Domain (p. 166).

ReadingExpressionsFrom a File

1. Copy the file Bump2DExpressions.ccl to your working directory

from the CFX-5 examples directory.

2. Select File > Import CCL.

3. When Import CCL appears, ensure that Append is selected.

For a discussion of this setting, please refer to "Append and Replace" on

page 33 in the document "CFX-Pre".

4. Select Bump2DExpressions.ccl and then click Open.

5. After the file has been imported, use the Expression Editor to view the

expressions that have been created.

7.B.4: Creating the Domain

1. Click Create a Domain .

2. Set Name to Bump2D and click OK.

Set the following To this value

DownH 0.022 [m]

DenH 998 [kg m^-3]

UpVFAir step((y-UpH)/1[m])

UpVFWater 1-UpVFAir

UpPres DenH*g*UpVFWater*(UpH-y)

DownVFAir step((y-DownH)/1[m])

DownVFWater 1-DownVFAir

DownPres DenH*g*DownVFWater*(DownH-y)

Page 183: Tutorials

Free Surface Flow Over a Bump—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 167

3. On the Edit Domain, General Options panel:

a. Set Location to Assembly.

b. Set Fluids List to Air at 25 C and Water.

c. Set Reference Pressure to 0 [Pa].

d. Under Buoyancy, set:

e. Under Domain Motion, leave Option set to Stationary.

4. Click the Fluid Models tab (The models selected here apply to all fluids

in the simulation.), then:

a. Turn on Homogeneous Model.The homogeneous model solves for a single solution field. This isonly appropriate in some simulations, see "Free Surface Flow" onpage 161 in the document "CFX-5 Solver Theory" for details.

b. Under Free Surface Model, set Option to Standard.

c. Under Heat Transfer Model, set Option to None.

d. Under Turbulence Model, set Option to k-Epsilon.

e. Under Turbulent Wall Functions, leave Option set to Scalable.

5. Click the Air at 25 C tab (The models selected here apply only to the Air

phase.), then:

a. Under Morphology, leave Option set to Continuous Fluid.

b. Leave Minimum Volume Fraction turned off.This will cause a default value to be used.

c. Under Fluid Buoyancy Model, leave Option set to DensityDifference.

Set the following To this value

Option Buoyant

Gravity X Dirn. 0 [m s^-2]

Gravity Y Dirn. -g*

*. You need to click the Enter Expression icon beside the field first.

Gravity Z Dirn. 0 [m s^-2]

Buoyancy Reference Density†

†. Always set Buoyancy Reference Density to the density of the leastdense fluid in free surface calculations, see "Buoyancy" on page 11in the document "CFX-5 Solver Modelling" for an explanation.

1.185 [kg m^-3]

Ref Location Automatic

Page 184: Tutorials

Free Surface Flow Over a Bump—Defining the Simulation in CFX-Pre

Page 168 CFX-5 Tutorials

6. Click the Water tab (The models selected here apply only to the Water

phase.), then:

a. Under Morphology, leave Option set to Continuous Fluid.

b. Leave Minimum Volume Fraction turned off.

c. Under Fluid Buoyancy Model, leave Option set to DensityDifference.

7. Click the Fluid Pairs tab (access by clicking the arrows to the right of the

tabs).

The models selected here describe how the fluids interact with each

other. The only phase-pair is Air at 25 C | Water which is highlighted.

No mass transfer between the phases occurs in this example and we do

not need to model surface tension, so the default settings are suitable.

Domain specific initial conditions are not used in this tutorial since globalinitialisation will be set later in the tutorial.

8. Click OK to create the domain.

7.B.5: Creating the Boundary Conditions

Creating theInlet BoundaryCondition

1. Click Create a Boundary Condition .

2. Set Name to inflow, then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to INFLOW

4. Click the Boundary Details tab, then:

a. Under Flow Regime, leave Option set to Subsonic.

b. Under Mass and Momentum, set Option to Normal Speed andNormal Speed to 0.26 [m s^-1].

c. Under Turbulence, set Option to Intensity and Length Scale,Fractional Intensity to 0.05, and Eddy Length Scale to theexpression UpH.To enter an expression, place the cursor in the data box and thenclick to the right of the data box.

Page 185: Tutorials

Free Surface Flow Over a Bump—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 169

5. Click the Fluid Values tab, then:

a. Select Air at 25 C, then under Volume Fraction, set Option toValue and Volume Fraction to UpVFAir.

b. Select Water, then set Option to Value and Volume Fraction toUpVFWater.

6. Click OK to create the boundary condition.

Creating theOutletBoundaryCondition

1. Click Boundary Condition .

2. Set Name to outflow, then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Outlet

b. Location to OUTFLOW

4. Click the Boundary Details tab, then:

a. Under Flow Regime, leave Option set to Subsonic.

b. Under Mass and Momentum, set Option to Static Pressure andRelative Pressure to DownPres.

5. Click OK to create the boundary condition.

Creating theSymmetryBoundaryConditions

1. Create a boundary condition namedfrontwith Boundary Type set to

Symmetry and Location set to FRONT.

2. Create a boundary condition named back with Boundary Type set to

Symmetry and Location set to BACK.

Creating theWall BoundaryConditions

1. Create a boundary condition named top.

2. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to TOP

3. Click the Boundary Details panel, then, under Wall Influence On Flow,

set Option to Free Slip.

4. Click OK to create the boundary condition.

Using a wall boundary condition for the top of the domain helps toconstrain the flow and improve convergence. As the water level dropsdownstream of the bump, air tries to flow in through the outlet to maintainconservation of mass. An outlet type boundary condition does not allowfluid to flow into the domain, so the CFX-Solver erects a temporary Wall on

Page 186: Tutorials

Free Surface Flow Over a Bump—Defining the Simulation in CFX-Pre

Page 170 CFX-5 Tutorials

the affected faces to prevent inflow through the outlet during the solverrun. This does not influence the flow of water, but changes the air flowabove the water.

If you want to model the air flow above the water, then you could usedifferent boundary conditions for the TOP or OUTFLOW boundaries. Anopening boundary condition for region TOP lets air flow into the domainwhen the water level drops. An opening for region OUTFLOW preventstemporary walls and lets air flow in through this boundary.

When both the TOP and OUTFLOW regions are openings, the true air flowfield is modelled, but this is the least robust option.

5. Create a boundary condition named bottom.

6. On the Basic Settings panel set Boundary Type to Wall and Location

to BOTTOM1, BOTTOM2, and BOTTOM3.

7. Click the Boundary Details panel, then:

a. Under Wall Influence On Flow, set Option to No Slip.

b. Under Wall Roughness, set Option to Smooth Wall.

8. Click OK to create the boundary condition.

7.B.6: Setting Initial Values

1. Click Global Initialisation from the main toolbar.

2. Leave Velocity Type set to Cartesian.

3. Under Cartesian Velocity Components, set:

a. Option to Automatic with Value

b. U to 0.26 [m s^-1]

c. V to 0 [m s^-1]

d. W to 0 [m s^-1]

4. Under Static Pressure, set Option to Automatic with Value and

Relative Pressure to UpPres.

5. Under Turbulence Kinetic Energy, leave Option set to Automatic.

6. Turn on Turbulence Eddy Dissipation and leave Option set to

Automatic.

Page 187: Tutorials

Free Surface Flow Over a Bump—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 171

7. Click the Fluid Settings tab, then:

a. Select Air at 25 C.

b. Turn on Air at 25 C.

c. Under Volume Fraction, set Option to Automatic with Value.

d. Set Volume Fraction to UpVFAir.

e. Click Water.

f. Turn on Water.

g. Under Volume Fraction, set Option to Automatic with Value.

h. Set Volume Fraction to UpVFWater.

8. Click OK to set the initialisation details.

Page 188: Tutorials

Free Surface Flow Over a Bump—Defining the Simulation in CFX-Pre

Page 172 CFX-5 Tutorials

7.B.7: Setting Mesh Adaption Parameters

1. Click Mesh Adaption from the main toolbar.

2. On the Basic Settings panel:

a. Turn on Activate Adaption.

b. Set Region List to Assembly.

c. Turn off Save Intermediate Files.

d. Under Adaption Criteria, set:

e. Under Adaption Method, set Option to Solution Variation andleave Minimum Edge Length set to 0.

f. Under Adaption Convergence Criteria, set Max. Iterations perStep to 100, leave Residual Type set to RMS and Target Residualset to 0.001.

Set the following To this value

Variables List Air at 25 C.Volume Fraction

Max. No. Steps*

*. See "Maximum Number of Adaption Steps" on page 318 in thedocument "CFX-Pre" for details on setting this parameter.

2

Option†

†. See "Option" on page 318 in the document "CFX-Pre" for detailson setting this value.

Multiple of Initial Mesh

Node Factor 4

Page 189: Tutorials

Free Surface Flow Over a Bump—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 173

3. Click the Advanced Options tab, then:

a. Set Node Allocation Param. to 1.6.

b. Set Number of Adaption Levels to 2.See "Advanced Mesh Adaption Parameters" on page 320 in thedocument "CFX-Pre" for details on setting the values on the AdvancedOptions panel.

4. Click OK to set the Mesh Adaption parameters.

7.B.8: Setting Solver Control

1. Click Solver Control .

2. Under Advection Scheme, leave Option set to High Resolution.

Page 190: Tutorials

Free Surface Flow Over a Bump—Defining the Simulation in CFX-Pre

Page 174 CFX-5 Tutorials

3. Under Convergence Control, set Timescale Control to Physical

Timescale, Physical Timescale to0.05 [s], and Max. No. Iterations

to 200.

Important: Setting Max No. Iterations to 200 and Number of AdaptionLevels to 2 with a maximum of 100 timesteps each, results in a totalmaximum number of timesteps of 400 (2*100+200=400).

Use the default Convergence Criteria settings.

4. Click the Advanced Options tab and ensure that Global Dynamic

Model Control is turned on.

5. Click OK to set the solver control parameters.

7.B.9: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

Page 191: Tutorials

Free Surface Flow Over a Bump—Obtaining a Solution

CFX-5 Tutorials Page 175

7.C: Obtaining a Solution

When CFX-Pre has shut down and the CFX-Solver Manager has started, youwill be able to get a solution to the CFD problem by following theinstructions below.

1. Click Start Run.

During the solution the following messages will be displayed:****** Notice ******

A wall has been placed at portion(s) of an OUTLET boundary condition (at69 % of the faces, 69 % of the area) to prevent fluid fromflowing into the domain.

The boundary condition name is: outflow.The fluid name is: Air at 25 C.If this situation persists, consider switching to an Opening type boundary

condition instead.

The reason for these messages is the choice of boundary conditions for theOUTFLOW and TOP regions. You can eliminate these messages by using anOpening boundary.

After 100 iterations, the first adaption step will be performed. Informationwill be written to the OUT file, containing the number of elements refinedand the size of the new mesh.

After mesh refinement, there will be a jump in the residual levels. This isbecause the solution from the old mesh is interpolated on to the new mesh.A new residual plot will also appear for the W-Mom-Bulk equation.Hexahedral mesh elements are refined orthogonally, so the mesh is nolonger 2D (it is more than 1 element thick in the z-direction).

When the CFX-Solver has finished:

2. Click OK.

Before Refinement After RefinementY

ZX

Page 192: Tutorials

Free Surface Flow Over a Bump—Obtaining a Solution

Page 176 CFX-5 Tutorials

Convergence to the target residual level has been achieved. It is commonfor convergence in a residual sense to be difficult to obtain in a free surfacesimulation. This is due to the presence of small waves at the surfacepreventing the residuals from dropping to the target level. This is morefrequently a problem in the subcritical flow regime, as the waves can travelupstream. In the supercritical regime, the waves tend to get carrieddownstream and out the domain.

To satisfy convergence in these cases, monitor the value of a globalquantity, (for example, drag for flow around a ships hull) to see when asteady state value is reached.

Where there is no obvious global quantity to monitor, you should view theresults to see where the solution is changing. You can do this by runningtransient for a few timesteps, starting from a results file that you think isconverged, or by writing some backup results files at different timesteps.

In both cases look to see where the results are changing (this could be dueto the presence of small transient waves). Also confirm that the value ofquantities that you are interested in (for example, downstream fluid heightfor this case) has reached a steady state value.

3. Click Post-Process Results .

4. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 193: Tutorials

Free Surface Flow Over a Bump—Viewing the Results

CFX-5 Tutorials Page 177

7.D: Viewing the Results

1. Click View Toward -Z , then zoom in so the geometry fills the

Viewer.

2. In the Object Selector, double-click the boundary called front to edit it.

3. On the Colour tab set the following:

a. Mode to Variable.

b. Variable to Water.Volume Fraction.

4. Turn on Visibility.

5. Click Apply.

CreatingVelocity VectorPlots

The next step involves creating a sampling plane to display velocity vectorsfor Water.

1. Turn off visibility for the boundary called Front.

2. Select Create > Object > Plane from the main menu bar.

3. Accept the default name Plane 1 and click OK.

4. Set Method to XY Plane.

5. Set Plane Bounds to Rectangular and:

a. X Size to 1.25 [m]

b. Y Size to 0.3 [m]

c. X Angle to 0 degree

Page 194: Tutorials

Free Surface Flow Over a Bump—Viewing the Results

Page 178 CFX-5 Tutorials

6. Set Plane Type to Sample and:

a. X Samples to 160

b. Y Samples to 40

7. Turn off Visibility.

There is no need to display the plane as it will obscure the subsequent

vector plot.

8. Click Apply to create the plane.

9. Click Create vector plot .

10. Click OK to accept the default name.

11. In the Object Editor, on the Geometry panel, set:

a. Locations to Plane 1

b. Variable to Water.Velocity

Note: Since fluids in a free-surface calculation share the same velocity field,only the velocity of the first non-vapour fluid is available. The other allowedvelocities are superficial velocities (see Further Post-processing (p. 186) formore information).

12. On the Symbol panel, set Symbol Size to 0.5.

Page 195: Tutorials

Free Surface Flow Over a Bump—Viewing the Results

CFX-5 Tutorials Page 179

13. Click Apply to create the plot.

The vector plot is shown twice below; the first shows an overview and

the second shows a close-up of the region near the bump.

During the solution stage you received warning messages about a wallplaced at portions of the outlet. As the water level drops, the volume of airabove the water must increase, so air tries to flow in through the outlet tomaintain conservation of mass. To prevent inflow through an outlet, a wallis placed at portions of the outlet. This results in a clear recirculation zone ofair near the outlet, as will be seen in the next vector plot.

14. On the Geometry panel, change Variable to Air at 25 C.Superficial

Velocity.

15. On the Symbol panel, change Symbol Size to 0.15 and turn on

Normalize Symbols.

Page 196: Tutorials

Free Surface Flow Over a Bump—Viewing the Results

Page 180 CFX-5 Tutorials

16. Click Apply.

The resulting vector field is shown below.

Viewing MeshRefinement

In this section, you will:

a. view the surface mesh on one of the Symmetry boundaries,

b. create Volume objects to show where the mesh was modified, and

c. create a vector plot to visualise the added mesh nodes.

1. Turn off Visibility of the vector plot.

2. In the Object Selector, double-click the boundary called front to edit its

properties.

3. On the Render panel:

a. Turn off Draw Faces.

b. Turn on Draw Lines.

c. Turn on Visibility.

Page 197: Tutorials

Free Surface Flow Over a Bump—Viewing the Results

CFX-5 Tutorials Page 181

4. Click Apply.

• The mesh has been refined near the free surface. See "Figure 1:Upstream End of Mesh" on page 181 and "Figure 2: DownstreamEnd of Mesh" on page 181.

• In the transition region between different levels of refinement,tetrahedral and pyramidal elements are used since it is not possibleto recreate hexahedral elements in CFX-5. Near the inlet, the aspectratio of these elements increases. See "Figure 1: Upstream End ofMesh" on page 181.

• Avoid performing mesh refinement on high-aspect-ratio hexmeshes, as this will produce high aspect ratio tetrahedral-elements,resulting in poor mesh quality.

Figure 1: Upstream End of Mesh

Figure 2: Downstream End of Mesh

5. Click Create volume .

6. Set Name to first refinement elements and click OK.

Page 198: Tutorials

Free Surface Flow Over a Bump—Viewing the Results

Page 182 CFX-5 Tutorials

7. On the Geometry panel, set:

a. Method to Isovolume

b. Variable to Refinement Level

c. Value to 1

d. Mode to At Value

8. On the Render panel:

a. Turn off Draw Faces.

b. Turn on Draw Lines.

c. Set Line Width to 2.

d. Set Line Colour to green by setting Colour Mode to User Specifiedand picking green from the colour pallet.

9. Click Apply.

You will see a band of green which indicates the elements that includenodes added during the first mesh adaption.

10. Click Create volume .

11. Set Name to second refinement elements and click OK.

12. On the Geometry panel, set:

a. Method to Isovolume

b. Variable to Refinement Level

c. Value to 2

d. Mode to At Value

13. On the Colour panel:

a. Leave Mode set to Constant.

b. Change Colour to white by clicking on the box that shows a coloursample.

14. On the Render panel:

a. Leave Draw Faces turned on.

b. Turn on Draw Lines.

c. Set Line Width to 4.

d. Set Line Colour to black by clicking on the box that shows a coloursample.

15. Click Apply.

Page 199: Tutorials

Free Surface Flow Over a Bump—Viewing the Results

CFX-5 Tutorials Page 183

You will see a band of white (with black lines) which indicates the elementsthat include nodes added during the second mesh adaption.

16. Zoom in to a region where the mesh has been refined.

The Refinement Level variable holds an integer value at each node, which iseither 0, 1 or 2 (since you used a maximum of two adaption levels).

The nodal values of refinement level will be visualised next.

17. Click Create vector plot .

18. Accept the default name and click OK.

19. On the Geometry panel:

a. Set Locations to Bump2D.

b. Set Variable to any vector variable (e.g. Air at 25 C.SuperficialVelocity.).The variable’s magnitude and direction do not matter since we willchange the vector symbol to a cube with a normalised size.

20. On the Colour panel, set:

a. Mode to Variable

b. Variable to Refinement Level

21. On the Symbol panel:

a. Set Symbol to Cube.

b. Set Symbol Size to 0.02.

c. Turn on Normalize Symbols.

22. Click Apply.

Page 200: Tutorials

Free Surface Flow Over a Bump—Viewing the Results

Page 184 CFX-5 Tutorials

Blue nodes (Refinement Level 0 according to the colour legend) are part ofthe original mesh. Green nodes (Refinement Level 1) were added during thefirst adaption step. Red nodes (Refinement Level 2) were added during thesecond adaption step. Note that some elements contain combinations ofblue, green, and red nodes.

Note: See "Volume" on page 82 in the document "CFX-Post" to betterunderstand how the volume objects were created, taking into account thatsome elements involved more than one refinement level via theirconstituent nodes.

Creating aChart

Next, you will create a Chart to show how the height of the free surfacevaries along the length of the channel. To do this, you will need a Polylinewhich follows the free surface. You can create the Polyline from theintersecting line between one of the Symmetry planes and an Isosurfacewhich shows the free surface. First you must create the Isosurface.

1. Turn off Visibility for all of the objects except Wireframe.

2. Click Create isosurface .

3. Click OK to accept the default name.

4. On the Geometry panel, set:

a. Variable to Water.Volume Fraction

b. Value to 0.5

5. Click Apply to create the Isosurface.

ClickIsometricView (Y Up)

from theViewertoolbar.Creating aPolyline toFollow theFree Surface

These steps explain creating a Polyline which follows the free surface:

1. Make the isosurface you created in the previous step invisible.

2. Click Create polyline .

3. Click OK to accept the default name.

4. On the Geometry panel, set:

a. Method to Boundary Intersection

b. Boundary List to front

c. Intersect With to Isosurface 1

5. Click Apply to create the Polyline.

A green line is displayed that follows the high-Z edge of the Isosurface.

Creating aChart to Showthe Height ofthe Surface

1. Click the Charts tab in the CFX-Post Workspace.

2. Right-click in the Chart Selector and select New.

Page 201: Tutorials

Free Surface Flow Over a Bump—Viewing the Results

CFX-5 Tutorials Page 185

3. Click OK to accept the default name.

4. On the Chart Line 1 panel:

a. Set Line Name to free surface height.

b. Ensure that Locator is set to Polyline 1.

c. Set X Axis to X

d. Set Y Axis to Y

e. In the Appearance frame, set Symbols to Rectangle.

5. Click the Chart tab, then:

a. Set Title to Free Surface Height for Flow over aBump.

b. Ensure that Type is set to XY.

c. Ensure that Use Data For Axis Labels is turned on.

6. Click Apply.

The chart will appear in the Chart Viewer. The name Chart Line 1 should

show in the Chart Selector under the Chart 1 object.

As discussed in Creating Expressions for Initial and Boundary Conditions(p. 165), an approximate outlet elevation is imposed as part of the boundarycondition, even though the flow is supercritical. The chart illustrates theeffect of this, in that the water level rises just before the exit plane. It isevident from this plot that imposing the elevation does not affect theupstream flow.

The chart shows a wiggle in the elevation of the free surface interface at theinlet. This is related to an overspecification of conditions at the inlet, sinceboth the inlet velocity and elevation were specified. For a subcritical inlet,only the velocity or the total energy should be specified. The wiggle is due

Page 202: Tutorials

Free Surface Flow Over a Bump—Viewing the Results

Page 186 CFX-5 Tutorials

to a small inconsistency between the specified elevation and the elevationcomputed by the solver to obtain critical conditions at the bump. Thewiggle is analogous to one found if pressure and velocity were bothspecified at a subsonic inlet, in a converging-diverging nozzle with chokedflow at the throat.

Further Post-processingYou may wish to create some plots using the <Fluid>.Superficial Velocityvariables. This is the fluid volume fraction multiplied by the fluid velocityand is sometimes called the volume flux. It is useful to use this variable forvector plots in separated multiphase flow, as you will only see a vectorwhere a significant amount of that phase exists.

Page 203: Tutorials

CFX-5 Tutorials Page 187

CFX-5 Tutorials

Tutorial 8

Supersonic Flow Over aWing

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• WingSPS.pre

• WingSPSMesh.out

Page 204: Tutorials

Supersonic Flow Over a Wing—Introduction

Page 188 CFX-5 Tutorials

8.A: Introduction

8.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• setting up a supersonic flow simulation

• using the Shear Stress Transport turbulence model to accurately resolveflow around the wing surface

• defining custom vector variables for use in visualising pressuredistribution

Component Feature Details

CFX-Pre User Mode Quick Setup Wizard

Simulation Type Steady State

Fluid Type Ideal Gas

Domain Type Single Domain

Turbulence Model Shear Stress Transport

Heat Transfer Total Energy

Boundary Conditions Inlet (Supersonic)

Outlet (Supersonic)

Symmetry Plane

Wall: No-Slip

Wall: Adiabatic

Wall: Free-Slip

Domain Interfaces Fluid-Fluid (No FrameChange)

Timestep Auto Timescale

CFX-Solver Manager n/a n/a

CFX-Post Plots Contour

Default Locator

Vector

Other Variable Editor

Page 205: Tutorials

Supersonic Flow Over a Wing—Introduction

CFX-5 Tutorials Page 189

8.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

8.A.3: Overview of the problem to solve

This example demonstrates the use of CFX-5 in simulating supersonic flowover a symmetric NACA0012 airfoil at 0o angle of attack. A 2D section of thewing is modelled. A 2D hexahedral mesh is provided that is imported intoCFX-Pre.

air speedu= 600 m/s

wing surface

outlet

70 [m]

30 [m]

1.25 [m]

Page 206: Tutorials

Supersonic Flow Over a Wing—Defining the Simulation in CFX-Pre

Page 190 CFX-5 Tutorials

8.B: Defining the Simulation in CFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file Wing.pre to completethis section for you and continue from Obtaining a Solution (p. 196). Thissession file sets up the model to produce an initial guess. See one of the firstfour tutorials for instructions on how to do this.

8.B.1: Creating a New Simulation

1. Start CFX-Pre and create a new simulation named Wing using the

General Mode.

8.B.2: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh file WingSPSMesh.out, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. Click the Mesh tab to access the Mesh workspace.

3. Right-click in the Mesh Selector and select Import.

4. In the Mesh Workspace, on the Definition panel, set:

a. Mesh Format to PATRAN Neutral

b. File to WingSPSMesh.out

5. Click OK to import the mesh.

The mesh will appear in the viewer.

6. Click Isometric View (Y up) from the Viewer toolbar.

8.B.3: Creating the Domain

Creating a newdomain

1. Click Domain .

2. Enter Wing in the Name box and click OK.

Page 207: Tutorials

Supersonic Flow Over a Wing—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 191

3. On the General Options panel:

a. Set Location to Assembly, Assembly 2 and Assembly 3.(Use the <Ctrl> key to select more than one region.)

b. Leave Domain Type set to Fluid Domain.

c. Set Fluids List to Air Ideal Gas.

d. Leave Coord Frame set to Coord 0.

e. Set Ref. Pressure to 1 [atm].When using an Ideal Gas, it is important to set an appropriatereference pressure since some properties depend on the absolutepressure level. See "Setting a Reference Pressure" on page 10 in thedocument "CFX-5 Solver Modelling" for details.

f. Under Buoyancy, leave Option set to Non Buoyant.

g. Under Domain Motion leave Option set to Stationary.

4. Click the Fluid Models tab.

a. Under Heat Transfer Model, set Option to Total Energy.The Total Energy model is appropriate for high speed flows since itincludes kinetic energy effects.

b. Under Turbulence Model, set Option to Shear Stress Transport.

c. Set Turbulent Wall Functions to Automatic.

d. Leave Reaction or Combustion Model and Thermal RadiationModel set to None.

The Initialisation panel sets domain specific initial conditions, which are notused in this tutorial. Global initialisation will be set later in the tutorial.

5. Click OK to create the domain.

8.B.4: Creating the Boundary Conditions

Creating theInlet BoundaryCondition

1. Create a boundary condition named Inlet.

2. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to INLET

Page 208: Tutorials

Supersonic Flow Over a Wing—Defining the Simulation in CFX-Pre

Page 192 CFX-5 Tutorials

3. Click the Boundary Details tab, then:

a. Under Flow Regime set Option to Supersonic.

b. Under Mass and Momentum set:

• Option to Cart. Vel. & Pressure

• U = 600 [m/s]

• V = 0 [m/s]

• W = 0 [m/s]

• Relative Static Pressure to 0 [Pa]

c. Under Turbulence, set Option to Intensity and Length Scale,Fractional Intensity to 0.01, and Eddy Len. Scale to 0.02 [m].

d. Under Heat Transfer, set Option to Static Temperature and StaticTemperature to 300 [K].

4. Click OK to create the boundary condition.

Creating theOutletBoundaryCondition

1. Create a boundary condition named Outlet.

2. On the Basic Settings panel, set:

a. Boundary Type to Outlet

b. Location to OUTLET

3. Click the Boundary Details tab, then, under Flow Regime set Option

to Supersonic.

4. Click OK to create the boundary condition.

Creating theRequiredSymmetryPlaneBoundaryConditions

1. Create a boundary condition named SymP1.

2. On the Basic Settings panel, set:

a. Boundary Type to Symmetry

b. Location to SIDE1

3. Click OK to create the boundary condition.

4. Create two more symmetry planes in the same way, using the names

and locations given below:

a. SymP2, at the location SIDE2.

b. Bottom, at the location BOTTOM.

Creating a FreeSlip BoundaryCondition forthe Top of theDomain

Create a free slip wall at the location TOP.

Page 209: Tutorials

Supersonic Flow Over a Wing—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 193

Creating aWall BoundaryCondition forthe Wing

1. Create a boundary condition named WingSurface.

2. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to WING

3. Click the Boundary Details tab, then:

a. Under Wall Influence On Flow, leave Option set to No Slip.

b. Under Heat Transfer, leave Option set to Adiabatic.

4. Click OK to create the boundary condition.

8.B.5: Creating Domain Interfaces

The imported mesh contains three regions which will be connected withdomain interfaces. To ensure a one-to-one connection between the threeregions, a translational periodic interface (with a zero translation in thiscase) will be created. See "One-to-one Connections" on page 127 in thedocument "CFX-5 Solver Modelling" for details.

1. Click Domain Interface .

2. Accept the default name by clicking OK.

3. Set Interface Type to Periodic.

4. Set Connection Type to Automatic.

5. Set Periodic Type to Translational.

6. For Side 1, leave Domain (Filter) set to -- All Domains --.

7. Set Region List 1 to Assembly 3D A External.

8. For Side 2, leave Domain (Filter) set to -- All Domains --.

9. Set Region List 2 to Assembly 3D B External A.

10. Click OK to create the domain interface.

The second domain interface is set up in a similar way:

1. Click Domain Interface .

2. Accept the default name by clicking OK.

3. Set Interface Type to Periodic.

4. Set Connection Type to Automatic.

5. Set Periodic Type to Translational.

6. For Side 1, leave Domain (Filter) set to -- All Domains --.

Page 210: Tutorials

Supersonic Flow Over a Wing—Defining the Simulation in CFX-Pre

Page 194 CFX-5 Tutorials

7. Set Region List 1 to Assembly 3D B External B.

8. For Side 2, leave Domain (Filter) set to -- All Domains --.

9. Set Region List 2 to Assembly 3D C External.

10. Click OK to create the domain interface.

8.B.6: Setting Initial Values

For high speed compressible flow, the CFX-Solver usually requires sensibleinitial conditions to be set for the velocity field.

1. Click Global Initialisation from the main toolbar.

2. Leave Velocity Type set to Cartesian.

3. Under Cartesian Velocity Components, set:

a. Option to Automatic with Value

b. U = 600 [m/s]

c. V = 0 [m/s]

d. W = 0 [m/s]

4. Under Temperature, set Option to Automatic with Value and

Temperature to 300 [K].

5. Use Automatic for all other variables.

6. Turn on Turbulence Eddy Dissipation and leave Option set to

Automatic

7. Click OK to set the initialisation details.

8.B.7: Setting Solver Control

1. Click Solver Control .

2. Under Advection Scheme, set Option to High Resolution.

The residence time for the fluid is approximately:

70 [m] / 600 [m s^-1] = 0.117 [s]

In the next step, you will start with a conservative timescale that graduallyincreases towards the fluid residence time as the residuals decrease. A userspecified maximum timescale can be combined with an Auto Timescale inCFX-Pre.

Page 211: Tutorials

Supersonic Flow Over a Wing—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 195

3. Under Convergence Control:

a. Set Timescale Control to Auto Timescale.

b. Set Max. No. Iterations to 100.

c. Set Length Scale Option to Conservative.

d. Turn on Maximum Timescale and set Maximum Timescale to0.1[s].

4. Under Convergence Criteria, set:

a. Residual Type to RMS

b. Residual Target to 1.0e-05

5. Click OK to set the solver control parameters.

8.B.8: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Turn on Report Summary of Interface Connections.

4. Click OK.

Since this tutorial uses domain interfaces and the Report Summary ofInterface Connections toggle was enabled, an information window isdisplayed that informs you of the connection type used for each domaininterface; see "Connection Types" on page 127 in the document "CFX-5Solver Modelling" for details.

5. Click OK in the information window.

6. Select File > Quit.

7. Click Yes when asked if you want to save the CFX file.

Page 212: Tutorials

Supersonic Flow Over a Wing—Obtaining a Solution

Page 196 CFX-5 Tutorials

8.C: Obtaining a Solution

When CFX-Pre has shut down, and the CFX-Solver Manager has started,obtain a solution to the CFD problem by following the instructions below.

1. Click Start Run.

When it has finished:

2. Click OK.

3. When the CFX-Solver has finished, click OK in the message window.

4. Click Post-Process Results .

5. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 213: Tutorials

Supersonic Flow Over a Wing—Viewing the Results

CFX-5 Tutorials Page 197

8.D: Viewing the Results

The following Plots are recommended:

1. Create a Contour plot on the SymP2 boundary.

a. Set the Variable to Mach Number.

b. Use a User Specified Range with a Min of 1 and Max of 2.

c. Set the # of Contours to 21.

You will see that the bulk of the flow has a Mach number which is very closeto the maximum. The velocity goes to zero on the wing surface.

Figure 1: Mach Number on SymP2

Page 214: Tutorials

Supersonic Flow Over a Wing—Viewing the Results

Page 198 CFX-5 Tutorials

2. Another recommended view of the results is a plot of Pressure on

SymP2, with a global range. You will be able to see that a bow wave has

formed, and the highest value of pressure is at the leading edge.

Figure 2: Pressure on SymP2

3. You can confirm that a significant energy loss occurs around the wing

leading edge by plotting Temperature on SymP2. The temperature at

the wing tip is approximately 180 K higher than the inlet temperature.

Figure 3: Temperature on SymP2

Page 215: Tutorials

Supersonic Flow Over a Wing—Viewing the Results

CFX-5 Tutorials Page 199

You can also try creating a user vector variable to show the pressuremagnitude and direction acting on points along the airfoil:

1. Select Create > Variable.

2. Accept the default name and click OK.

3. Turn on the Vector toggle, then enter the following expressions:

• X Expression: (Pressure+101325[Pa])*Normal X

• Y Expression: (Pressure+101325[Pa])*Normal Y

• Z Expression: (Pressure+101325[Pa])*Normal Z

4. Click Apply.

5. Click Create Vector Plot and accept the default name.

6. Set Locations to WingSurface and Variable to Variable 1.

7. Click the Symbol tab and set:

a. Symbol to Line Arrow

b. Symbol Size to 0.04

8. Click Apply.

The resulting vector plot shows the pressure acting against the surfaceof the wing.

Figure 4: Pressure acting on the Wing

When you have finished, quit CFX-Post.

Page 216: Tutorials

Supersonic Flow Over a Wing—Viewing the Results

Page 200 CFX-5 Tutorials

Page 217: Tutorials

CFX-5 Tutorials Page 201

CFX-5 Tutorials

Tutorial 9

Flow Through a ButterflyValve

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• PipeValve.pre

• PipeValve_inlet.F

• PipeValveMesh.gtm

• PipValveUserF.pre

Page 218: Tutorials

Flow Through a Butterfly Valve—Introduction

Page 202 CFX-5 Tutorials

9.A: Introduction

9.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• using a rough wall boundary condition in CFX-Pre to simulate thepipe wall

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Fluid Type General Fluid

Domain Type Single Domain

Turbulence Model k-Epsilon

Heat Transfer None

Particle Tracking

Boundary Conditions Inlet (Profile)

Inlet (Subsonic)

Outlet (Subsonic)

Symmetry Plane

Wall: No-Slip

Wall: Rough

CEL (CFX Expression Language)

User Fortran

Timestep Auto Timescale

CFX-Solver Manager Power-Syntax

CFX-Post Plots Animation

Default Locators

Particle Track

Point

Slice Plane

Other Changing the ColourRange

MPEG Generation

Particle Track Animation

Quantitative Calculation

Symmetry

Page 219: Tutorials

Flow Through a Butterfly Valve—Introduction

CFX-5 Tutorials Page 203

• creating a fully developed inlet velocity profile using either the CFXExpression Language or a User CEL Function

• setting up a Particle Tracking simulation in CFX-Pre to trace sandparticles

• animating particle tracks in CFX-Post to trace sand particles throughthe domain

• quantitative calculation of average static pressure in CFX-Post onthe outlet boundary

9.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

9.A.3: Overview of the problem to solve

In industry, pumps and compressors are commonplace. An estimate of thepumping requirement can be calculated based on the height differencebetween source and destination and head loss estimates for the pipe andany obstructions/joints along the way. Investigating the detailed flowpattern around a valve or joint however, can lead to a better understanding

Page 220: Tutorials

Flow Through a Butterfly Valve—Introduction

Page 204 CFX-5 Tutorials

of why these losses occur. Improvements in valve/joint design can besimulated using CFD, and implemented to reduce pumping requirementand cost.

Flows can also contain particulates that affect the flow and cause erosion topipe and valve components. The particle tracking capability of CFX-5 can beused to simulate these effects.

In this example, water flows through a 20 mm radius pipe with a roughinternal surface. The equivalent sand grain roughness is 0.2 mm. The flow iscontrolled by a butterfly valve, which is set at an angle of 55° to the verticalaxis. The velocity profile is assumed to be fully developed at the pipe inlet.The flow contains sand particles ranging in size from 50 to 500 microns.

Valve Plate

Max. Vel. 5.0 m/s288.0 K

r = 20.0 mm

Page 221: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 205

9.B: Defining the Simulation in CFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use a session file to complete this section. Seeany of the introductory tutorials for instructions on how to do this.

Two session files are available for this tutorial:

• PipeValve.pre sets the inlet velocity profile using a CEL (CFX-5Expression Language) expression.

• PipeValveUserF.pre sets the inlet velocity profile using aUser CEL Function which is defined by a FORTRAN subroutine. If youchoose this method, you will need to compile the FORTRANsubroutine before you run the CFX-Solver, see Compiling theSubroutine (p. 211).

See one of the first four tutorials for instructions on how to play session files.If you play either of these session files you can continue from Obtaining aSolution (p. 220), otherwise continue from this point.

9.B.1: Creating a New Simulation

Start CFX-Pre and create a new simulation named PipeValve using theGeneral Mode.

9.B.2: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh file PipeValveMesh.gtm, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. Select File > Import Mesh .

3. Leave Mesh Format set to CFX-5 GTM file.

4. Set File to PipeValveMesh.gtm.

5. Click OK to import the mesh.

Page 222: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

Page 206 CFX-5 Tutorials

9.B.3: Defining the Properties of Sand

The material properties of the sand particles used in the simulation need tobe defined. Heat transfer and radiation modelling are not used in thissimulation, so the only property that needs to be defined is the density ofthe sand.

To calculate the effect of the particles on the continuous fluid, between 100and 1000 particles are usually required. However, if accurate informationabout the particle volume fraction or local forces on wall boundaries isrequired, then a much larger number of particles needs to be modelled.

When you create the domain, choose either full coupling or one-waycoupling between the particle and continuous phase. Full coupling isneeded to predict the effect of the particles on the continuous phase flowfield but has a higher CPU cost than one-way coupling. One-way couplingsimply predicts the particle paths during post-processing based on the flowfield, but without affecting the flow field.

To optimise CPU usage, you can create two sets of identical particles. Thefirst set will be fully coupled and between 100 and 1000 particles will beused. This allows the particles to influence the flow field. The second set willuse one-way coupling but a much higher number of particles will be used.This provides a more accurate calculation of the particle volume fractionand local forces on walls.

1. Click the Materials tab to enter the Materials Workspace.

2. Right-click in the Material Selector and select New.

3. Set Name to Sand Fully Coupled.

4. In the Material Editor, on the Basic Settings panel, set Option to Pure

Substance.

5. Set Material Group to Particle Solids.

6. Turn on Thermodynamic State and set Thermodynamic State to

Solid.

7. Click the Material Properties tab.

8. Set Option to General Material.

Page 223: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 207

9. Under Equation of State:

a. Set Option to Value

b. Leave the Molar Mass setting at its default value (this value is notrequired for this simulation and will be ignored).

c. Set Density to 2300 [kg m^-3].

10. Turn on Specific Heat Capacity, then set:

a. Option to Value

b. Specific Heat Capacity to 0 [J kg^-1 K^-1]This is not the correct value for specific heat, but this property willnot be used in the CFX-Solver since heat transfer will not bemodelled in this simulation.

c. Reference Temperature to 25 [C]

11. Ensure that no Radiation Properties are enabled.

12. Click OK to create the material.

13. In the Material Selector, right-click Sand Fully Coupled then select

Duplicate.

14. Set the name of the duplicate to Sand One Way Coupled and click

OK.

Sand One Way Coupled will be created with properties identical to Sand

Fully Coupled.

9.B.4: Creating the Domain

Creating aNew Domain

1. Click Domain .

2. Set Name to PipeValve then click OK.

Page 224: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

Page 208 CFX-5 Tutorials

3. On the General Options panel:

a. Set Location to Assembly.

b. Leave Domain Type set to Fluid Domain.

c. Set Fluids List to Water.

d. Turn on Particle Tracking and set Particles List to Sand FullyCoupled and Sand One Way Coupled.

e. Set Ref. Pressure to 0 [atm].

f. Under Buoyancy, leave Option set to Non Buoyant.For details on modelling buoyancy, please refer to "Buoyancy" onpage 11 in the document "CFX-5 Solver Modelling".

g. Under Domain Motion leave Option set to Stationary.

4. Click the Fluid Models tab.

a. Under Heat Transfer Model, leave Option set to None.

b. Under Turbulence Model, set Option to k-Epsilon.The turbulence model only applies to the continuous phase and notthe particle phases.

c. Under Turbulent Wall Functions, ensure that Option is set toScalable.

d. Under Reaction or Combustion Model and Thermal RadiationModel set Option to None.

5. Click the Sand Fully Coupled tab (The models set on this panel relate

only to the Sand Fully Coupled phase.), then:

a. Under Morphology, set Option to Dispersed Particle TransportSolid.

b. Turn on Particle Diameter Distribution:

Set the following To this value

Option Normal in Diameter by Mass

Min. Diameter 50e-6 [m]*

*. 50 microns

Max. Diameter 500e-6 [m]†

†. 500 microns

Mean Diameter 250e-6 [m]

Std Deviation 70e-6 [m]

Page 225: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 209

6. Click the Sand One Way Coupled tab (use the right arrow as necessary).

The models set on this panel relate only to the Sand One Way Coupled

phase.

7. Set the same Morphology and Particle Diameter Distribution

settings as for the Sand Fully Coupled particles.

8. Click the Water tab, then, for Morphology, ensure that Option is set to

Continuous Fluid.

9. Click the Fluid Pairs tab (The models set on this panel relate to the

interaction of the water and sand.), then:

a. With Water | Sand Fully Coupled selected in the Fluid Pairs list, setParticle Coupling to Fully Coupled.

b. Select Water | Sand One Way Coupled from the Fluid Pairs list andset Particle Coupling to One-way Coupling.

c. Verify that the Drag Force is set to Schiller Naumann for both fluidpairs. This is the default drag model in CFX-5 and is described in"Schiller Naumann Drag Model" on page 159 in the document"CFX-5 Solver Modelling".

10. Click OK to create the domain.

9.B.5: Creating the Inlet Velocity Profile

In previous tutorials we have often defined a uniform velocity profile at aninlet boundary. This means that the inlet velocity near to the walls is thesame as that at the centre of the inlet. If you look at the results from thesesimulations, you will see that downstream of the inlet, a boundary layer willdevelop, so that the downstream near wall velocity is much lower than theinlet near wall velocity.

You can simulate an inlet more accurately by defining an inlet velocityprofile, so that the boundary layer is already fully developed at the inlet. Theone seventh power law will be used in this tutorial to describe the profile atthe pipe inlet. The equation for this is:

where Wmax is the pipe centreline velocity, Rmax is the pipe radius, and r isthe distance from the pipe centreline.

U Wmax 1 rRmax--------------–⎝ ⎠

⎛ ⎞17--

=

Page 226: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

Page 210 CFX-5 Tutorials

A non uniform (profile) boundary condition can be created by:

a. Creating an Expression using CEL that describes the inlet profile.

b. Creating a User CEL Function which uses a user subroutine todescribe the inlet profile. The subroutine is linked to the CFX-Solverduring execution.OR

c. Loading a BC profile file (a file which contains profile data).

Profiles created from data files are not used in this tutorial, but are used inthe tutorial:Flow in a Process Injection Mixing Pipe (p. 73). For additional details, see"Profile Boundary Conditions" on page 78 in the document "CFX-5 SolverModelling".

In this tutorial, you will use one of the first two methods listed above todefine the velocity profile for the inlet boundary condition. The results fromeach method will be identical.

Using a CEL expression is the easiest way to create the profile. The User CELFunction method is more complex but is provided as an example of how touse this feature. For more complex profiles, it may be necessary to use a UserCEL Function or a BC profile file.

To use the Expression method, continue with the tutorial from this point.

To use the User CEL Function method, continue with this tutorial from UserCEL Function Method for the Inlet Velocity Profile (p. 211). Note that you willneed access to a FORTRAN compiler to be able to complete the tutorial bythe User CEL Function method.

9.B.6: Expression Method for the Inlet Velocity Profile

Creating theVelocity ProfileExpression

1. Click the Expressions tab.

2. Right-click in the Expression Selector, then select New.

3. Set Name to Wmax, then click OK.

4. Set Definition to 5.0 [m s^-1], then click Apply.

5. Use the same method to create an expression named Rmax with

Definition set to 20 [mm] (note that the units are not metres).

Page 227: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 211

6. Create a third expression named Wprof with Definition set to

Wmax*(abs(1-r/Rmax)^0.143).

The variable r (radius) is a CFX-5 System Variable is defined as:

where x and y are defined as Directions 1 and 2 (X and Y for CartesianCoordinate Frames) respectively, in the selected Reference CoordinateFrame. See "Coordinate Frames" on page 23 in the document "CFX-5Solver Modelling" for more information on specifying coordinateframes.

You should now continue with the tutorial from Creating the BoundaryConditions (p. 214).

9.B.7: User CEL Function Method for the Inlet Velocity Profile

The FORTRAN subroutine has already been written for this tutorial.

Compiling theSubroutine

1. Copy the subroutine PipeValve_inlet.F to your working

directory. It is located in the <CFXROOT>/examples/ directory.

2. Examine the contents of this file in any text editor to gain a better

understanding of this subroutine.

This file was created by modifying the ucf_template.F file, which isavailable in the <CFXROOT>/examples/ directory.

You can compile the subroutine and create the required library files used bythe CFX-Solver at any time before running the CFX-Solver. The operation isperformed at this point in the tutorial so that you have a betterunderstanding of the values you need to specify in CFX-Pre when creating aUser CEL Function. The cfx5mkext command is used to create therequired objects and libraries as described below.

Important: To use the cfx5mkext command make sure that the FORTRANcompiler is in your path. See "Default FORTRAN Compilers" on page 433 inthe document "CFX-5 Solver Modelling" for a list of commands that shouldexecute the compiler on each platform.

3. From the Main menu select Tools > Command Editor.

r x2 y2+=

Page 228: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

Page 212 CFX-5 Tutorials

4. Type the following in the Command Editor (make sure you do not miss

the semi-colon at the end of the line):

! system ("cfx5mkext PipeValve_inlet.F") == 0 or die;

• This is equivalent to executing:cfx5mkext PipeValve_inlet.Fat an OS command prompt.

• The “!” indicates that the following line is to be interpreted aspower syntax and not CCL. Everything after the “!” symbol isprocessed as Perl commands.

• “system” is a Perl function to execute a system command.

• The “== 0 or die” will cause an error message to be returned if, forsome reason, there is an error in processing the command.

5. Click Process to compile the subroutine.

The output produced when this command is executed will be printed toyour terminal window.

Note: You can use the -double option (i.e. cfx5mkext -doublePipeValve_inlet.F) to compile the subroutine for use with doubleprecision.

A subdirectory will have been created in your working directory whosename is system dependent (e.g. on IRIX it is namedirix). This sub directorycontains the shared object library.

Note: If you are running problems in parallel over multiple platforms thenyou will need to create these subdirectories using the cfx5mkextcommand for each different platform.

• You can view more details about the cfx5mkext command byrunning cfx5mkext -help.

• You can set a Library Name and Library Path using the -name and-dest options respectively.

• If these are not specified, the default Library Name is that of yourFORTRAN file and the default Library Path is your current workingdirectory.

6. Close the Command Editor.

Page 229: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 213

Creating theInputArguments

Next, you will create some values that will be used as input arguments whenthe subroutine is called.

1. Click Expressions Editor .

2. Right-click in the Expression Selector, then select New.

3. Set Name to Wmax and then click OK.

4. Type 5 [m s^-1] into the Definition box and then click Apply.

The expression will be listed in the Expression Selector.

5. Use the same method to create an expression named Rmax defined to

be 20 [mm].

Creating theUser CELFunction

Two steps are required to define a User CEL Function that uses the compiledFORTRAN subroutine. First, a User Routine that points to the FORTRANsubroutine will be created. Then a User CEL Function that points to the UserRoutine will be created.

1. From the Main toolbar, click User Routine .

2. Set Name to Wprof, then click OK.

User Routine appears.

3. Set Option to User CEL Function.

4. Set Calling Name to inlet_velocity.

• This is the name of the subroutine within the FORTRAN file.

• Always use lower case letters for the Calling Name, even if thesubroutine name in the FORTRAN file is in upper case.

5. Set Library Name to PipeValve_inlet.

• This is the name passed to the cfx5mkext command by the-name option.

• If the -name option is not specified, a default is used.

• The default is the FORTRAN file name without the .F extension.

6. Set Library Path to the directory where the cfx5mkext command

was executed (usually the current working directory). For example:

• UNIX: /home/user/cfx5/tutorials/PipeValve.

• Windows: c:\user\cfx5\tutorials\PipeValve.This can be accomplished quickly by clicking Browse (next toLibrary Path), browsing to the appropriate folder in Select Directory(not necessary if selecting the working directory), and clicking OK (inSelect Directory).

Page 230: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

Page 214 CFX-5 Tutorials

7. Click OK to complete the definition of the User Routine.

8. Click User Function .

9. Set Name to Wprof, then click OK.

Function appears.

10. Set Option to User Function.

11. Set User Routine Name to Wprof.

Here, the same name was used for the function and the routine. This is

not a requirement, which is why the User Routine Name field (that you

just set) is provided.

12. Set Argument Units to [m s^-1, m, m]. These are the units for the

three input arguments: Wmax, r, and Rmax.

Set Result Units to [m s^-1], since the result will be a velocity for the inlet.

13. Click OK to complete the User Function specification.

You can now use the User Function (Wprof) in place of a velocity value byentering the expression Wprof(Wmax, r, Rmax) (although it onlymakes sense for the W component of the inlet velocity in this tutorial).

The variable r (radius) is a CFX-5 System variable defined as:

where x and y are defined as Directions 1 and 2 (X and Y for CartesianCoordinate Frames) respectively, in the selected Reference CoordinateFrame.

9.B.8: Creating the Boundary Conditions

Creating theInlet BoundaryCondition

1. Create a boundary condition named inlet.

2. On the Basic Settings panel:

a. Set Boundary Type to Inlet.

b. Set Location to inlet.

c. Leave the Coord Frame settings unchanged.

Note: If the pipe was not aligned with an existing coordinate frame, thenyou would have to define a new coordinate system to apply the inletvelocity profile correctly. In this case, the pipe is already aligned with thedefault coordinate system, Coord 0. Turning on Coord Frame and settingCoord Frame to Coord 0 is equivalent to leaving Coord Frame turned off.

r x2 y2+=

Page 231: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 215

3. Click the Boundary Details tab, then:

a. Under Flow Regime leave Option set to Subsonic.

b. Under Mass and Momentum set Option to Cart. Vel.Components (Cartesian Velocity Components).

c. Set U and V to 0 [m s^-1].

d. For W, enter either the expression Wprof (Expression method) orthe expression Wprof(Wmax, r, Rmax) (User CEL Functionmethod).

• To enter an expression you must click Enter Expression (clickin the field to show the latter).

• U, V and W are always with respect to the Reference CoordinateFrame for the boundary condition (called Coord Fame on the BasicSettings panel).

e. For Turbulence leave Option set to Medium (Intensity = 5%).

Page 232: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

Page 216 CFX-5 Tutorials

4. Click the Fluid Values tab, then:

a. Check that Sand Fully Coupled is selected in the list.

b. Turn on Define Particle Behaviour.

c. For Mass and Momentum, set:

d. Under Particle Position, set Option to Uniform Injection andNumber of Positions to 200.

e. Under Particle Mass Flow Rate, set Mass Flow Rate to0.01 [kg s^-1].Do NOT turn on Particle Diameter Distribution. The diameterdistribution was defined when creating the domain; this optionwould override those settings for this boundary only.

f. Select Sand One Way Coupled from the list.

g. Turn on Define Particle Behaviour.

h. Under Mass and Momentum, set:

i. Under Particle Position, set Option to Uniform Injection andNumber of Positions to 5000.

j. Under Particle Mass Flow Rate, set Mass Flow Rate to0.01 [kg s^-1].One-way coupled particles are tracked as a function of the fluid flowfield. The latter is not influenced by the one-way coupled particles.The fluid flow will therefore be influenced by the 0.01 [kg s^-1] flowof two-way coupled particles, but not by the 0.01 [kg s^-1] flow ofone-way coupled particles.

Set the following To this value

Option Cart. Vel. Components

U 0 [m s^-1]

V 0 [m s^-1]

W either Wprof or Wprof(Wmax, r, Rmax)*

*. as you did on Boundary Details

Set the following To this value

Option Cart. Vel. Components

U 0 [m s^-1]

V 0 [m s^-1]

W either Wprof or Wprof(Wmax, r, Rmax)*

*. as you did on Boundary Details

Page 233: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 217

5. Click OK to create the boundary condition.

CreatingOutletBoundaryCondition

1. Create a boundary condition named outlet.

2. On the Basic Settings panel, set:

a. Boundary Type to Outlet

b. Location to outlet

3. Click the Boundary Details tab, then:

a. Under Flow Regime set Option to Subsonic.

b. Under Mass and Momentum set Option to Average StaticPressure and Relative Pressure to 0 [Pa].

4. Click OK to create the boundary condition.

CreatingSymmetryPlaneBoundaryCondition

1. Create a boundary condition named symP.

2. On the Basic Settings panel, set:

a. Boundary Type to Symmetry

b. Location to symP

3. Click OK to create the boundary condition.

Creating thePipe WallBoundaryCondition

1. Create a boundary condition named pipe wall.

2. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to pipe wall

3. Click the Boundary Details tab, then:

a. Under Wall Influence on Flow, leave Option set to No Slip.

b. Under Wall Roughness, set Option to Rough Wall.

c. Set Roughness Height to 0.2 [mm].Make sure that you change the units to millimetres. The thickness ofthe first element should be of the same order as the roughnessheight. See "Wall Roughness" on page 72 in the document "CFX-5Solver Modelling" for details.

Page 234: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

Page 218 CFX-5 Tutorials

4. Click the Fluid Values tab, then:

a. Ensure that Sand Fully Coupled is selected.

b. Under Velocity, set:

c. Select Sand One Way Coupled and use the same settings as forSand Fully Coupled.

5. Click OK to create the boundary condition.

Editing theDefaultBoundaryCondition

1. In the Physics Selector, right-click PipeValve Default and select Edit.

Edit Boundary appears.

2. Click the Fluid Values tab, then, for both Sand Fully Coupled and Sand

One Way Coupled, set Perpendicular Coeff. to 0.9.

3. Click OK to change the default boundary (which, in this case, represents

the valve plate).

9.B.9: Setting Initial Values

1. Click Global Initialisation .

2. Under Cartesian Velocity Components, set:

a. Option to Automatic with Value

b. U to [0 m s^-1]

c. V to [0 m s^-1]

d. W to either the expression Wprof or Wprof(Wmax, r, Rmax)as you did for the inlet boundary condition

3. Turn on Turbulence Eddy Dissipation and leave Option set to

Automatic.

4. Click OK to set the initialisation details.

Set the following To this value

Option Restitution Coefficient

Perpendicular Coeff. 0.8

Parallel Coeff. 1.0

Page 235: Tutorials

Flow Through a Butterfly Valve—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 219

9.B.10: Setting Solver Control

1. Click Solver Control .

2. On the Basic Settings panel:

a. In the Advection Scheme frame, set Option to Specified BlendFactor and Blend Factor to 0.75.

b. In the Convergence Control frame:Leave Timescale Control set to Auto Timescale.Leave Max. No. Iterations set to 100.Leave Length Scale Option set to Conservative.See "Automatic Timescale Calculation" on page 49 in the document"CFX-5 Solver Theory" for detail on how a timestep is calculatedusing these options.

c. Leave the Convergence Criteria settings at their default values.An RMS value of at least 1e-05 is usually required for adequateconvergence, but the default value is sufficient for demonstrationpurposes. See "Judging Convergence" on page 364 in thedocument "CFX-5 Solver Modelling" for more details.

3. Click the Advanced Options tab, then:

a. Turn on Particle Control.

b. Turn on Particle Integration.

• The default settings are appropriate for this tutorial.

• See "Particle Solver Control" on page 243 in the document "CFX-5Solver Modelling" for details on these settings.

4. Click OK to set the solver control parameters.

9.B.11: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

Page 236: Tutorials

Flow Through a Butterfly Valve—Obtaining a Solution

Page 220 CFX-5 Tutorials

9.C: Obtaining a Solution

When CFX-Pre has shut itself down, and the CFX-Solver Manager hasopened up, you will be able to obtain a solution to the CFD problem byfollowing the instructions below.

Note: If you followed the User CEL Function method, and you wish to runthis tutorial in distributed parallel on machines with different architectures,you must first compile the PipeValve_inlet.F subroutine on all architectures.

1. Click Start Run.

When the solution has converged:

2. Click OK.

3. Click Post-Process Results .

4. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 237: Tutorials

Flow Through a Butterfly Valve—Viewing the Results

CFX-5 Tutorials Page 221

9.D: Viewing the Results

In this section, you will first plot wall stress on the valve surface and sidewalls due to the sand particles. You will then create an animation of particletracks through the domain. For more details on particle tracking, pleaserefer to "Particle Track" on page 108 in the document "CFX-Post".

Viewing theWall Stress dueto Sandparticles

An important consideration in this simulation is erosion to the pipe wall andvalve due to the sand particles. A good indication of erosion is given by theWall Stress parameter, which corresponds to pressure and shear stress dueto the flow.

1. Right-click the PipeValve Default object in the Object Selector and

select Edit.

2. On the Colour panel, set:

a. Mode to Variable

b. Variable to Sand One Way Coupled.Wall Stress (click to showa list of all variables)This is statistically better than the Sand Fully Coupled.Wall Stressvariable since many more particles were calculated for Sand OneWay Coupled.

c. Range to User Specified, Min to 0 [Pa] and Max to 50 [Pa]This range is used to gain a better resolution of the wall shear stressvalues around the edge of the valve surfaces.

3. Turn on Visibility.

4. Click Apply. See "Figure 1: " on page 221.

Figure 1:

Page 238: Tutorials

Flow Through a Butterfly Valve—Viewing the Results

Page 222 CFX-5 Tutorials

As can be seen, the highest values occur on the edges of the valve wheremost particles strike. Erosion of the low Z side of the valve would occur morequickly than for the high Z side.

ViewingParticle Tracks

Default particle track objects are created at the start of the session. Oneparticle track is created for each set of particles in the simulation. You aregoing to make use of the default object for Sand Fully Coupled.

1. Highlight the Res PT for Sand Fully Coupled object in the Object

Selector and select Edit.

The default object draws 10 tracks as lines from the inlet to the outlet.

The Info panel shows information about the total number of tracks,

index range and the track numbers which are drawn.

2. Change Maximum Number of Tracks to 20.

3. Turn on Visibility then click Apply. See "Figure 2: " on page 222.

Figure 2:

In "Figure 2: " on page 222, particles can be seen directly striking the surfaceof the valve.

Viewing Stresson the PipeWall

1. Make the Res PT for Sand Fully Coupled object invisible.

2. Make the PipeValve Default object invisible.

3. Highlight the pipe wall object in the Object Selector and select Edit.

Page 239: Tutorials

Flow Through a Butterfly Valve—Viewing the Results

CFX-5 Tutorials Page 223

4. On the Colour panel, set:

a. Mode to Variable

b. Variable to Sand One Way Coupled.Wall Stress

c. Range to User Specified

d. Min to 0 [Pa]

e. Max to 10 [Pa]

5. Turn on Visibility then click Apply.

See "Figure 3: " on page 223.

Figure 3:

The User Specified range is very small to resolve areas of small stress valueson the pipe wall downstream of the valve. It can clearly be seen that thestress on the pipe wall downstream of the valve is more significant thanbefore the pipe wall.

Creating aParticle TrackAnimation

1. Turn off visibility for all objects except the Wireframe.

2. Highlight the Res PT for Sand Fully Coupled object in the Object

Selector and select Edit.

3. Click the Colour tab and set:

a. Colour Mode to Variable

b. Variable to Sand Fully Coupled.Velocity w

Page 240: Tutorials

Flow Through a Butterfly Valve—Viewing the Results

Page 224 CFX-5 Tutorials

4. Click the Symbol tab, turn on Draw Symbols and set:

a. Min Time to 0 [s]

b. Max Time to 0 [s]Symbols will only appear at the beginning of the particle tracks. Thiswill form the first Keyframe of the animation. You will change thisvalue to create the final Keyframe.

c. Interval to 0.065This will have no effect until the Max Time value is changed.

d. Symbol to Fish3D

e. Symbol Size to 0.5

5. Turn off Draw Tracks.

6. Turn on Visibility then click Apply.

You should now see particles placed at the start of each track.

Creating theKeyframe forthe AnimationStart Point

The next task is to create a Keyframe for the start point of your animation.

1. From the Main menu select Tools > Animation.

2. On the Animation Editor panel click New to set the current Viewer

image as the first Keyframe.

3. Return to the Symbol panel for the Particle Track object in the Object

Editor. Change the following settings:

Max Time to 0.065 [s].This is high enough to allow most of the particles to pass completelythough the domain. The Max Time value should be approximately equalto the residence time of a particle in the domain for this type ofsimulation.Leave Interval set to 0.065 [s].Although this value is equal to the Max Time value you have set, therewill still be some particles that have not passed entirely through thedomain, and they will still be visible near the outlet.

4. Click Apply to update the Particle Track.

5. In the Animation Editor:

6. Click New to create a second Keyframe.

7. Highlight KeyframeNo1 and increase the # of Frames to 90.

8. Click To Beginning to set the animation to the first frame.

9. Turn on Save Animation Movie.

Page 241: Tutorials

Flow Through a Butterfly Valve—Viewing the Results

CFX-5 Tutorials Page 225

10. Click Browse and entering the tracks.mpg as the file name.

11. Click Play Forward to play the animation and create the MPEG.

• When the animation has finished, an MPEG file will have beencreated in the directory specified from the Save MPEG form.

• You can view the MPEG in any Media Player that supports the MPEGformat.

12. Close Animation Editor.

PerformingQuantitativeCalculations

On the outlet boundary condition you created in CFX-Pre, you set theAverage Static Pressure to 0.0 [Pa]. To see the effect of this:

1. From the Main menu select Tools > Calculator.

The Function Calculator window is displayed. It allows you to perform

a wide range of quantitative calculations on your results. A full

description of the Function Calculator can be found in "Calculator" on

page 135 in the document "CFX-Post".

Note: You should use Conservative variable values when performingcalculations and Hybrid values for visualisation purposes. By clickingConservative, all objects in CFX-Post are updated to use Conservativevalues. Conservative values are set by default in CFX-Post. See "Hybrid andConservative Variable Values" on page 29 in the document "CFX-Post" formore details.

2. Select maxVal function from the drop down Function list.

3. Set Location to outlet.

4. Set Variable to Pressure.

5. Click Calculate.

The result is the maximum value of pressure at the outlet.

6. Perform the calculation again using minVal to obtain the minimum

pressure at the outlet.

7. Select areaAve or massFlowAve and then click Calculate.

• Calculates the area weighted or mass flow weighted average ofPressure.

• The average pressure is approximately zero, as specified by theboundary condition.

Page 242: Tutorials

Flow Through a Butterfly Valve—Viewing the Results

Page 226 CFX-5 Tutorials

Other FeaturesThe geometry was created using a symmetry plane. You can display theother half of the geometry by creating a YZ Plane at X = 0 and then editingthe Default Transform object to use this plane as a Reflection plane.

1. When you have finished viewing the results, quit CFX-Post.

Page 243: Tutorials

CFX-5 Tutorials Page 227

CFX-5 Tutorials

Tutorial 10

Flow in a CatalyticConverter

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• CatConv.pre

• CatConvHousing.hex

• CatConvMesh.gtm

Page 244: Tutorials

Flow in a Catalytic Converter—Introduction

Page 228 CFX-5 Tutorials

10.A: Introduction

10.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• using multiple meshes and domains in CFX-Pre

• joining domains together using static fluid-fluid domain interfacesbetween the inlet/outlet flanges and the central catalyst body

• applying a source of resistance using a directional loss model

• creating a chart to show pressure drop through the domain in CFX-Post

• exporting data from a line locator to a file

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Fluid Type Ideal Gas

Domain Type Multiple Domain

Turbulence Model k-Epsilon

Heat Transfer Isothermal

Subdomains Resistance Source

Boundary Conditions Inlet (Subsonic)

Outlet (Subsonic)

Wall: No-Slip

Domain Interfaces Fluid-Fluid (No FrameChange)

Timestep Physical Timescale

CFX-Solver Manager n/a n/a

CFX-Post Plots Contour

Default Locators

Outline Plot (Wireframe)

Polyline

Slice Plane

Vector

Other Chart Creation

Data Export

Title/Text

Viewing the Mesh

Page 245: Tutorials

Flow in a Catalytic Converter—Introduction

CFX-5 Tutorials Page 229

10.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

10.A.3: Overview of the problem to solve

Catalytic converters are used on most vehicles on the road today. Theyreduce harmful emissions from internal combustion engines (such as oxidesof nitrogen, hydrocarbons, and carbon monoxide) that are the result ofincomplete combustion. Most new catalytic converters are the honeycombceramic type and are usually coated with platinum, rhodium, or palladium.The exhaust gases flow through the honeycomb structure and a pressuregradient is established between the inlet and outlet.

flange

catalyst material

exhaust gas25.0 m/s288.0 K

20 cm

Page 246: Tutorials

Flow in a Catalytic Converter—Introduction

Page 230 CFX-5 Tutorials

In this tutorial, a catalytic converter is modelled without chemical reactionsin order to determine the pressure drop. The inlet flange (joining the pipe tothe catalyst) is designed to distribute exhaust gas evenly across the catalystmaterial.

A hexahedral mesh for the housing, which was created in CFX-Hexa, isprovided.

The different meshes are connected together in CFX-Pre. You will importeach mesh then create a domain, which spans all of them. Within theconverter, a subdomain is added to model a honeycomb structure using adirectional loss model. Physics is then specified in the same way as for othertutorials.

Page 247: Tutorials

Flow in a Catalytic Converter—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 231

10.B: Defining the Simulation in CFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file CatConv.pre tocomplete this section for you and continue from Obtaining a Solution(p. 239). See one of the first four tutorials for instructions on how to do this.

10.B.1: Creating a New Simulation

1. Start CFX-Pre and create a new simulation named CatConv using the

General Mode.

10.B.2: Importing the Meshes

The catalytic converter is comprised of three distinct parts:

• The inlet section (pipe and flange).

• The outlet section (pipe and flange).

• The catalyst (or monolith).

Next you will import a generic inlet / outlet section and the catalyst housingfrom provided files.

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

HousingSection

The first mesh that you will import is the hexahedral mesh for the catalysthousing, created in CFX-Hexa, namedCatConvHousing.hex. This meshwas created using units of centimetres; however, the units are not storedwith the mesh file for this type of mesh. You must set the mesh import unitsto cm when importing the mesh into CFX-Pre so that the mesh remains theintended size.

1. Copy the mesh file CatConvHousing.hex, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. Click the Mesh tab to access the Mesh Workspace.

3. Right-click in the Mesh Selector, then select Import.

4. In the Mesh Workspace, on the Definition tab, set:

a. Mesh Format to ICEM CFD

b. File to CatConvHousing.hex

Page 248: Tutorials

Flow in a Catalytic Converter—Defining the Simulation in CFX-Pre

Page 232 CFX-5 Tutorials

5. Set Mesh Units to cm.

6. Click Apply to import the mesh while leaving the Import Mesh panel

open.

(Do not click OK, or you will have to re-open the Import Mesh panel to

import the next mesh.)

7. Click Isometric View (Y up) .

The imported mesh has a width in the x-direction of 21 cm and a length inthe z-direction of 20 cm.

Pipe andFlange Section

1. Copy the mesh file CatConvMesh.gtm, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. In the Mesh Workspace, on the Definition tab, set:

a. Mesh Format to CFX-5 GTM file

b. File to CatConvMesh.gtmThis mesh was created in units of centimetres. When importing GTMfiles, CFX-Pre uses the units used in the mesh file.

3. Click OK to import the mesh.

The pipe and flange geometry will display in the Viewer.

Figure 1: Pipe and Flange attached to Housing

Page 249: Tutorials

Flow in a Catalytic Converter—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 233

The pipe and flange are located at the outlet end of the housing. You will becopying and rotating the flange through 180 degrees in the next step tocreate the inlet side pipe and flange. The rotation is about an axis that pointsin the y-direction and is located at the centre of the housing.

1. In the Mesh Selector, right-click Assembly 2 in the tree, then select

Transform.

The Mesh Transformation Editor will appear.

2. Set Target Assemblies to Assembly 2 (the assembly for the flange).

3. Set Transformation to Rotation.

4. Set method for Rotation Option to Rotation Axis.

5. In the From boxes enter the values 0, 0, 0.16.

6. In the To boxes enter the values 0, 1, 0.16.

This specifies an axis located at the centre of the housing parallel to the

y-axis.

7. Set Rotation Angle Option to Specified and Rotation Angle to

180 degree.

8. Turn on Multiple Copies.

If this toggle were turned off, the original mesh would be deleted after

the transformation.

9. Leave # of Copies set to 1.

10. Ensure that Delete Original is turned off.

11. Click OK to transform the mesh.

10.B.3: Creating a Union Region

Three separate assemblies now exist, but since there is no relative motionbetween each assembly you only need to create a single domain. This canbe done by simply using all three assemblies in the domain Location list or,as in this case, by using the Region Editor to create a Union of the threeassemblies.

1. Click the Regions tab in the CFX-Pre Workspace.

2. Right-click in the Region Selector and select New.

3. Set Name to CatConverter.

4. Set Combination to Union.

Page 250: Tutorials

Flow in a Catalytic Converter—Defining the Simulation in CFX-Pre

Page 234 CFX-5 Tutorials

5. Set Dimension to 3D.

This will show the existing 3D Regions in the Regions list.

6. Hold down the <Ctrl> key and select the regions Assembly, Assembly

2 and

Assembly 3.

7. Click OK to create the new region.

10.B.4: Creating the Domain

For this simulation you will use an isothermal heat transfer model andassume turbulent flow.

1. Click the Physics tab.

2. Click Domain on the main toolbar.

3. Set Name to CatConv and then click OK.

4. On the General Options tab, set:

a. Location to CatConverter.

b. Domain Type to Fluid Domain.

c. Fluids List to Air Ideal Gas.

d. Coord Frame to Coord 0.

e. Reference Pressure to 1 [atm].

f. Under Buoyancy, set Option to Non Buoyant.

g. Under Domain Motion, set Option to Stationary.

5. Click the Fluid Models tab:

a. Under Heat Transfer Model, set Option to Isothermal and FluidTemperature to 600 [K].

b. Under Turbulence Model, set Option to k-Epsilon.

c. Leave Turbulent Wall Functions set to Scalable.

d. Under Reaction or Combustion Model and Thermal RadiationModel, leave Option set to None.

Initialisation will be carried out using the global initialisation form. There isno need to visit the Initialisation tab.

6. Click OK to create the domain.

Page 251: Tutorials

Flow in a Catalytic Converter—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 235

10.B.5: Creating the Subdomain

The catalyst-coated honeycomb structure will be modelled using asubdomain with a directional source of resistance.

For quadratic resistances, the pressure drop is modelled using:

where KQ is the quadratic resistance coefficient, Ui is the local velocity in thei direction,

and is the pressure drop gradient in the i direction.

For more information, see "Directional Loss Model" on page 27 in thedocument "CFX-5 Solver Modelling".

1. Click Subdomain from the main toolbar.

2. Set Name to catalyst, leave Domain set to CatConv and then click

OK.

3. On the Basic Settings tab, expand the regions list by clicking , and set

Location to LIVE.

This is the entire housing section.

4. Click the Sources tab.

The Sources tab lets you set sources of momentum, resistance and

mass for the subdomain (other sources are available for different

problem physics).

a. Turn on Sources, Momentum Source/Porous Loss Model, andDirectional Loss Model.

b. Under Streamwise Direction, set:Option to Cartesian ComponentsX Component to 0Y Component to 0Z Component to 1

c. Under Streamwise Loss, set Option to Linear and QuadraticCoefs.

d. Turn on Quadratic Resistance Coefficient and then set QuadraticCoefficient to 650 [kg m^-4].

5. Click OK to create the subdomain.

p∂xi∂------ KQ U Ui–=

p∂xi∂------

Page 252: Tutorials

Flow in a Catalytic Converter—Defining the Simulation in CFX-Pre

Page 236 CFX-5 Tutorials

10.B.6: Creating Boundary Conditions

Inlet BoundaryCondition

1. Click Boundary Condition from the main toolbar.

2. Set Name to inlet, leave Domain set to CatConv and then click OK.

3. On the Basic Settings tab, set:

a. Boundary Type to Inlet

b. Location to PipeEnd 2

4. On the Boundary Details tab:

a. Under Mass and Momentum, set Option to Normal Speed andNormal Speed to 25 [m s^-1].

b. Leave Turbulence set to Medium (Intensity = 5%).

5. Click OK to create the boundary condition.

OutletBoundaryCondition

1. Similarly, create an outlet boundary named outlet.

2. On the Basic Settings tab, set:

a. Boundary Type to Outlet

b. Location to PipeEnd

3. On the Boundary Details tab, under Mass and Momentum, set

Option to Static Pressure (not Average Static Pressure) and Relative

Pressure to 0 [Pa].

4. Click OK to create the boundary condition.

The remaining surfaces are automatically grouped into the default no slipwall boundary condition.

10.B.7: Creating the Domain Interfaces

Domain interfaces are used to define the connecting boundaries betweenmeshes where the faces do not match or when a frame change occurs.Meshes are ‘glued’ together using the General Grid Interface (GGI)functionality of CFX-5, see "Domain Interface Modelling" on page 123 in thedocument "CFX-5 Solver Modelling" for details. Different types of GGIconnections can be made. In this case, you require a simple Fluid-FluidStatic connection (no Frame Change). Other options allow you to changereference frame across the interface or create a periodic boundary withdissimilar meshes on each periodic face.

Two Interfaces are required, one to connect the inlet flange to the catalysthousing and one to connect the outlet flange to the catalyst housing.

Page 253: Tutorials

Flow in a Catalytic Converter—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 237

Inlet Pipe /HousingInterface

1. Click Domain Interface and set Name to InletSide.

2. On the Basic Settings tab:

a. Set Interface Type to Fluid Fluid

b. Under Side 1, set Domain (Filter) to -- All Domains --, and RegionList 1 to FlangeEnd 2.

c. Under Side 2, set Domain (Filter) to -- All Domains --, and RegionList 2 to INLET.

d. Under Interface Models, set Frame Change to None, and PitchChange to Automatic.

3. Click OK to create the interface.

Outlet Pipe /HousingInterface

1. Similarly, create a second interface named OutletSide by clicking

Domain Interface .

2. On the Basic Settings tab:

a. Set Interface Type to Fluid Fluid.

b. Under Side 1, set Domain (Filter) to -- All Domains --, and RegionList 1 to FlangeEnd.

c. Under Side 2, set Domain (Filter) to -- All Domains --, and RegionList 2 to OUTLET.

d. Under Interface Models, set Frame Change to None, and PitchChange to Automatic.

3. Click OK to create the interface.

10.B.8: Setting Initial Values

1. Click Global Initialisation .

A sensible guess for the initial velocity is to set it to the expected velocitythrough the catalyst housing. As the inlet velocity is 25 [m s^-1] and thecross sectional area of the inlet and housing are known, you can applyconservation of mass to obtain an approximate velocity of 2 [m s^-1]through the housing.

2. Under Cartesian Velocity Components, set:

a. Option to Automatic with Value

b. U to 0 [m s^-1]

c. V to 0 [m s^-1]

d. W to -2 [m s^-1]

Page 254: Tutorials

Flow in a Catalytic Converter—Defining the Simulation in CFX-Pre

Page 238 CFX-5 Tutorials

3. Turn on Turbulence Eddy Dissipation and leave Option set to

Automatic

4. Click OK to set the initialisation details.

10.B.9: Setting Solver Control

1. Click Solver Control .

Assuming velocities of 25 [m s^-1] in the inlet and outlet pipes, and2 [m s^-1] in the catalyst housing, an approximate fluid residence time of0.1 [s] can be calculated. A sensible timestep of 0.04 [s] (1/4 to 1/2 of thefluid residence time) will be applied.

2. Under Advection Scheme, leave Option set to High Resolution.

3. Under Convergence Control, set Timescale Control to Physical

Timescale and Physical Timescale to 0.04 [s].

4. Leave all other settings at their default values.

For the convergence criteria, an RMS value of at least 1e-05 is usually

required for adequate convergence, but the default value is sufficient

for demonstration purposes. See "Judging Convergence" on page 364

in the document "CFX-5 Solver Modelling" for more details.

5. Click OK to set the solver control parameters.

10.B.10: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Turn on Report Summary of Interface Connections.

4. Click OK.

Since this tutorial uses domain interfaces and the Report Summary ofInterface Connections toggle was enabled, an information window isdisplayed that informs you of the connection type used for each domaininterface; see "Connection Types" on page 127 in the document "CFX-5Solver Modelling" for details.

5. Click OK in the information window.

6. Select File > Quit.

7. Click Yes when asked if you want to save the CFX file.

Page 255: Tutorials

Flow in a Catalytic Converter—Obtaining a Solution

CFX-5 Tutorials Page 239

10.C: Obtaining a Solution

When CFX-Pre has shut down and the CFX-Solver Manager has started, youcan obtain a solution to the CFD problem by following the instructionsbelow:

1. Click Start Run.

When it has finished:

2. Click OK.

3. Click Post-Process Results .

4. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 256: Tutorials

Flow in a Catalytic Converter—Viewing the Results

Page 240 CFX-5 Tutorials

10.D: Viewing the Results

When CFX-Post opens, you will need to experiment with the Edge Anglesetting for the Wireframe object and the various rotation and zoomfeatures to put the geometry into a sensible position.

In the Objects Workspace, several interface boundaries are available. Thetwo connections for the catalyst housing mesh, between and the mesh forthe inlet and the outlet pipes, have two interface boundaries each (one foreach side of the connection).

1. Turn on the visibility of InletSide Side CatConv Part 1 in the Objects

Workspace. Double-click InletSide Side CatConv Part 1 to open the

object editor below the Objects Workspace.

2. On the Render tab, set:

a. Turn off Draw Faces, and turn on Draw Lines.

b. Set the Colour Mode to User Specified. Repeatedly click the LineColour bar to get the red colour.Alternatively, click the colour selector and use Select colour.

3. Click Apply.

4. Repeat the steps for InletSide Side CatConv Part 2 and set the Line

Colour to green.

5. Make the Wireframe invisible (uncheck it in the object list) and obtain

a clear view of the interface.

Figure 2:

Page 257: Tutorials

Flow in a Catalytic Converter—Viewing the Results

CFX-5 Tutorials Page 241

You should now have a clear view of the tetrahedral / prism and hexahedralmesh on each side of the interface. The General Grid Interface (GGI)capability of CFX-5 was used to produce a connection between these twodissimilar meshes before the solution was calculated. Notice that there aremore tetrahedral / prism elements than hexahedral elements and that theextent of the two meshes is not quite the same (this is most noticeable onthe curved edges). The extent of each side of the interface does not have tomatch to allow a GGI connection to be made.

Creating UserLocations andPlots

1. Turn off the Visibility of the interface boundaries.

2. Turn on the Visibility of the Wireframe.

Creating a sliceplane

3. Create a ZX Plane through Y = 0 and colour this slice plane by Pressure.

Click Apply.

The pressure falls steadily throughout the main body of the catalyticconverter. You can confirm this with a contour plot.

Creating aContour Plot

4. Now make this slice plane invisible.

5. Create a contour plot, using the plane for the Location, Pressure as the

Variable and 30 as the # of Contours.

6. Disable the Draw Faces toggle on the Render tab. Click Apply.

Creating aVector Plotusing the sliceplane

7. Create a Vector Plot, set Locations to slice plane and Variable to

Velocity. On the Symbol tab, set Symbol Size to 0.3 and turn on

Normalize Symbol. Click Apply.

Notice the flow separates from the walls, where the inlet pipe expands intothe flange, setting up a recirculation zone. The flow is uniform through thecatalyst housing.

Suppose for now that you want to see if the pressure drop is linear byplotting a line graph of pressure against the z-coordinate. In this case youwill use CFX-Post to produce the graph, but you could also export the data,then read it into any standard plotting package. Further information on dataexport can be found in "Export" on page 60 in the document "CFX-Post".

Graphs are produced using the chart object, but before you can create thechart you must define the points at which you require the data. To define aset of points in a line, you can use the polyline object.

Page 258: Tutorials

Flow in a Catalytic Converter—Viewing the Results

Page 242 CFX-5 Tutorials

Creating aPolyline

1. First, make the vector and contour plots invisible.

2. Click Create Polyline from the main toolbar and accept the default

name.

On the Geometry tab, the Method used to create the polyline can be FromFile, Boundary Intersection or From Contour. If you select From File youmust specify a file containing point definitions in the required format, see"POLYLINE Data Format" on page 64 in the document "CFX-Post" for moredetails.

In this tutorial, you will use the Boundary Intersection method. Thiscreates a polyline from the intersecting line between a boundary object anda location (e.g between a wall and a plane). The points on the polyline arewhere the intersecting line cuts through a surface mesh edge.

3. On the Geometry tab, set:

a. Method to Boundary Intersection.

b. Boundary List to CatConv Default, inlet and outlet.You can select multiple boundaries by clicking Location editornext to Boundary List and then holding down the <Ctrl> key whileclicking the items.

c. Intersect With to Plane 1 (or the name you gave the slice plane).

4. Click the Colour tab and choose a bright Constant colour for the

polyline.

5. Click the Render tab and increase the Line Width to 3 (the units are

pixels).

6. Click Apply.

Page 259: Tutorials

Flow in a Catalytic Converter—Viewing the Results

CFX-5 Tutorials Page 243

7. Click Isometric View (Y up) .

Figure 3:

8.

You will be able to see the polyline following the intersecting line betweenthe wall, inlet and outlet boundaries and the slice plane. Now that a polylinehas been defined, a chart can be created.

Creating aChart

1. Click Create chart from the main toolbar and accept the default

name.

2. In the Charts Workspace, on the Chart 1 panel, click the Chart tab, set:

a. Title to Pressure Drop Through a CatalyticConverter.

b. Turn off Use Data For Axis Labels.

c. X axis to Z.

d. Y axis to Pressure.

Charts are created by defining Chart Lines. Existing lines are listed in a treediagram in the Chart Workspace, attached to the name of the chart of whichthey are a part. Since you have not yet created any chart lines or charts, theChart Workspace appears blank.

Page 260: Tutorials

Flow in a Catalytic Converter—Viewing the Results

Page 244 CFX-5 Tutorials

3. To create a new Chart Line:

a. Click the Chart Line 1 tab in the Chart Editor.

b. Set Line Name to Pressure Drop.

c. Set Locator to Polyline 1.

d. Set X Axis to Z (to plot the z-coordinate values along the x axis ofthe graph).

e. Set Y Axis to Pressure (to plot Pressure values along the y axis ofthe graph).

4. Expand the Appearance frame:

a. The style and colour of the chart line is set with Line Style andAutomatically generate Line Colour. Leave these default settingunchanged.

b. Set Symbols to Rectangle.

5. Click Apply to create the chart line.

You will now see a tree diagram name showing a chart with one chart

line. Beside the chart line name is a visibility check box.

Through the main body of the catalytic converter you can see that thepressure drop is linear. This is in the region from approximately Z=0.05 toZ=0.25. The two lines show the pressure on each side of the wall. You cansee a noticeable difference in pressure between the two walls on the inletside of the housing (at around Z=0.25).

6. Click the Objects tab in the CFX-Post Workspace.

7. Turn on the visibility for the contour and vector plots again and then

click View Toward +Y .

You should now see that the flow enters the housing from the inlet pipe ata slight angle, producing a higher pressure on the high X wall of thehousing.

8. Click the Charts tab in the CFX-Post Workspace. Change the axis labels

under Labels, as necessary.

9. Try modifying axis variables on the tab Chart Line 1:

a. Under Axis Variables, set the variable for X Axis to Chart Count,instead of Z. Chart Count is simply the data point number (e.g.1,2,3,4...), it does NOT represent the distance between each pointalong the polyline.

10. Click Apply.

Page 261: Tutorials

Flow in a Catalytic Converter—Viewing the Results

CFX-5 Tutorials Page 245

Exporting Data 1. From the Main menu select File > Export.

Export appears.

2. Ensure that Export Geometry Information is turned on.

This will cause X, Y, and Z to be sent to the output file.

3. Set Locators to Polyline 1.

4. In the Select Variable(s) list, select Pressure.

5. Click the Formatting tab.

6. Set Precision to 3.

7. Click Save to export the selected results.

The file export.csv will be written to the current working directory. This filecan be opened in any text editor. You can use the exported data file to plotcharts in other software.

8. When finished, close CFX-Post.

Page 262: Tutorials

Flow in a Catalytic Converter—Viewing the Results

Page 246 CFX-5 Tutorials

Page 263: Tutorials

CFX-5 Tutorials Page 247

CFX-5 Tutorials

Tutorial 11

Non-Newtonian FluidFlow in an Annulus

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• NonNewton.pre

• NonNewtonMesh.gtm

Page 264: Tutorials

Non-Newtonian Fluid Flow in an Annulus—Introduction

Page 248 CFX-5 Tutorials

11.A: Introduction

11.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• using CFX Expression Language (CEL) to define the properties of ashear-thickening fluid(For more information, see "Non-Newtonian Flow" on page 22 in thedocument "CFX-5 Solver Modelling".)

• using the Moving Wall feature to apply a rotation to the fluid at a wallboundary

• examining the pressure distribution on either side of the region ofsmallest radius

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Fluid Type General Fluid

Domain Type Single Domain

Turbulence Model Laminar

Heat Transfer None

Boundary Conditions Symmetry Plane

Wall: No-Slip

Wall: Moving

CEL (CFX Expression Language)

Timestep Auto Timescale

CFX-Solver Manager n/a n/a

CFX-Post Plots Sampling Plane

Slice Plane

Vector

Page 265: Tutorials

Non-Newtonian Fluid Flow in an Annulus—Introduction

CFX-5 Tutorials Page 249

11.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

11.A.3: Overview of the problem to solve

In this example a non-Newtonian, shear-thickening liquid rotates in a 2Deccentric annular pipe gap. The motion is brought about solely by viscousfluid interactions caused by the rotation of the inner pipe.

Page 266: Tutorials

Non-Newtonian Fluid Flow in an Annulus—Defining the Simulation in CFX-Pre

Page 250 CFX-5 Tutorials

11.B: Defining the Simulation in CFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file NonNewton.pre tocomplete this section for you and continue from Obtaining a Solution(p. 255). See one of the first four tutorials for instructions on how to do this.

11.B.1: Creating a New Simulation

1. Start CFX-Pre and create a new simulation named NonNewton using

General mode.

11.B.2: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh file NonNewtonMesh.gtm, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. Click the Mesh tab to access the Mesh workspace.

3. Right-click in the Mesh Selector, then select Import.

4. Leave Mesh Format set to CFX-5 GTM file.

5. Set File to NonNewtonMesh.gtm.

6. Click OK to import the mesh.

11.B.3: Creating the Domain

Creating anExpression forShear RateDependentViscosity

You can use an expression to define the dependency of fluid properties onother variables. In this case, the fluid does not obey the simple linearNewtonian relationship between shear stress and shear strain rate. Thegeneral relationship for the fluid you will model is given by:

where g is the shear strain rate and K and n are constants. For your fluid,n=1.5 and this results in shear-thickening behaviour of the fluid, i.e. theviscosity increases with increasing shear strain rate. The shear strain rate isavailable as a CFX-Pre System Variable (sstrnr).

µ Kγn 1–=

Page 267: Tutorials

Non-Newtonian Fluid Flow in an Annulus—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 251

In order to describe this relationship using CEL, the dimensions must beconsistent on both sides of the equation. Clearly this means that K musthave dimensions and requires units to satisfy the equation. If the units ofviscosity are kg m^-1 s^-1, and those of g are s^-1, then the expression isconsistent if the units of K are kg m^-1 s^(-0.5).

1. Click Expressions .

2. Create the following expressions:

a. An expression named K, with a definition of10.0 [kg m^-1 s^-0.5].

b. An expression named n, with a definition of 1.5 (i.e.dimensionless).

We recommended that you bound the viscosity to ensure that it remainsphysically meaningful. To do so we will create two additional parametersthat will be used to guarantee the value of the shear strain rate.

3. Create the following upper and lower bounds:

a. An expression named UpperS, with a definition 100 [s^-1].

b. An expression named LowerS, with a definition of1.0E-3 [s^-1].

4. Finally, create an expression for the dynamic viscosity named

ViscEqn, using the following definition:

K*(min(UpperS,(sstrnr+LowerS))^(n-1))

Creating aNew Fluid

1. Select Create > Library Objects > Material from the main menu bar.

2. Set Name to myfluid.

3. Set Option to Pure Substance.

4. Set Material Group to User.

5. Turn on Thermodynamic State and set it to Liquid.

6. Click the Material Properties tab.

7. Set Option to General Material.

8. Under Equation of State:

a. Set Option to Value.

b. Molar Mass to 1 [kg kmol-1].This is not the correct Molar Mass value, but this material propertywill not be used by the CFX-Solver for this case. In other cases it will

Page 268: Tutorials

Non-Newtonian Fluid Flow in an Annulus—Defining the Simulation in CFX-Pre

Page 252 CFX-5 Tutorials

be used, see "Molar Mass" on page 46 in the document "CFX-5Solver Modelling" for a discussion on when the Molar Mass needs tobe set.

c. Define the Density to be constant (do not set a DensityDependency) with a value of 1.0E+4 [kg m^-3].

9. Under Specific Heat Capacity:

a. Set Option to Value.

b. Set Specific Heat Capacity to 0 [J kg^-1 K^-1].This is not the correct value for specific heat, but this property willnot be used in the CFX-Solver.

c. Leave Specific Heat Type at Constant Pressure.

d. Leave Reference Pressure at 1 [atm].

e. Leave Reference Temperature at 25 [C].

10. Expand the Transport Properties section of the panel, expand

Dynamic Viscosity and set Dynamic Viscosity to the expression

ViscEqn.

11. Click OK to complete the creation of myfluid.

Creating aNew Domain

1. Click Domain .

2. Set Name to NonNewton.

3. Click OK.

4. On the General Options panel:

a. Set Location to Assembly.

b. Set Domain Type to Fluid Domain.

c. Set Fluids List to myfluid.

d. Leave Coord Frame set to Coord 0.

e. Set Reference Pressure to 0 [atm].

f. Leave Buoyancy set to Non-Buoyant.

g. Leave Domain Motion set to Stationary.

5. Click the Fluid Models tab, then:

a. Under Heat Transfer Model, set Option to None.

b. Under Turbulence Model, set Option to None (Laminar).

c. Leave the remaining settings set to None.

6. Click OK to create the domain.

Page 269: Tutorials

Non-Newtonian Fluid Flow in an Annulus—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 253

Global initialisation will be set later, after creating the boundary conditions.

11.B.4: Creating the Boundary Conditions

Wall BoundaryCondition

1. Create a boundary condition named rotwall.

2. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to rotwall

3. Click the Boundary Details tab, then:

a. Under Wall Influence on Flow, set Option to No Slip.

b. Turn on Wall Velocity, then set Option to Rotating Wall andAngular Velocity to 31.33 [rev min^-1] (make sure youchange the units).

c. Under Axis Definition, leave Option set to Coordinate Axis andset Rotation Axis to Global Z.

4. Click OK to create the boundary condition.

To create thesymmetryplaneboundaryconditions

1. Create a boundary condition named SymP1.

2. On the Basic Settings panel, set:

a. Boundary Type to Symmetry

b. Location to SymP1

3. Click OK to create the boundary condition.

4. Create a second symmetry plane boundary condition named SymP2

with Location set to SymP2.

The outer annulus surfaces will default to the no-slip stationary wallboundary condition.

11.B.5: Setting Initial Values

A reasonable initial guess for the velocity field is a value of zero throughoutthe domain.

1. Click Global Initialisation .

2. Leave Velocity Type set to Cartesian.

Page 270: Tutorials

Non-Newtonian Fluid Flow in an Annulus—Defining the Simulation in CFX-Pre

Page 254 CFX-5 Tutorials

3. Under Cartesian Velocity Components set:

a. Option to Automatic with Value

b. U = 0 [m s^-1]

c. V = 0 [m s^-1]

d. W = 0 [m s^-1]

4. Under Static Pressure, leave Option set to Automatic.

5. Click OK to set the initialisation details.

11.B.6: Setting the Solver Control

1. Click Solver Control .

2. Under Advection Scheme, set Option to Specified Blend Factor and

Blend Factor to 1.0.

This is the most accurate but least robust advection scheme.

3. Under Convergence Control, set Timescale Control to Auto

Timescale and Max. No. Iterations to 50

4. Under Convergence Criteria, set Residual Type to RMS and Residual

Target to

1e-05

5. Click OK to set the solver control parameters.

11.B.7: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

Page 271: Tutorials

Non-Newtonian Fluid Flow in an Annulus—Obtaining a Solution

CFX-5 Tutorials Page 255

11.C: Obtaining a Solution

When CFX-Pre has shut itself down, and the CFX-Solver Manager hasopened up, you will be able to obtain a solution to the CFD problem byfollowing the instructions below.

1. Click Start Run.

When the solution has converged:

2. Click OK.

3. Click Post-Process Results .

4. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 272: Tutorials

Non-Newtonian Fluid Flow in an Annulus—Viewing the Results

Page 256 CFX-5 Tutorials

11.D: Viewing the Results

In this tutorial you have used CEL to create an expression for the dynamicviscosity. If you now perform calculations or colour graphics objects usingthe Dynamic Viscosity variable, its values will have been calculated from theexpression you defined in CFX-Pre.

1. Click View Toward -Z by using the viewer icon drop-down menu.

2. Create a Slice Plane which passes through the Point

(0, 0, 0.015) and is Normal to (0, 0, 1) (the z-direction).

3. Colour the Plane by Pressure and set Range to Global.

See if you can deduce which way the inner pipe is turning by looking at

this plot.

4. Verify your deduction by creating a Vector Plot of Velocity on a

Sampling Plane. Use the following settings to create the Sampling

Plane:

a. Use the same Point and Normal as for the previous Slice Plane.

b. Under Plane Bounds, set Type to Circular and Radius to0.3 [m].

c. Set Plane Type to Sample, Radial to 16, and Circumferential to12.

d. Turn off Visibility.

5. When creating the Vector Plot, increase the Symbol Size and set the

Colour Mode to Use Plot Variable.

6. Try creating some Plots of your own, including one that shows the

variation of Dynamic viscosity.

7. When you have finished, close CFX-Post.

Page 273: Tutorials

CFX-5 Tutorials Page 257

CFX-5 Tutorials

Tutorial 12

Flow in an AxialRotor/Stator

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• Axial.pre

• AxialIni.pre

• AxialIni_001.res

• stator.def

• rotor.grd

Page 274: Tutorials

Flow in an Axial Rotor/Stator—Introduction

Page 258 CFX-5 Tutorials

12.A: Introduction

12.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

Component Feature Details

CFX-Pre User Mode Turbo Wizard

Simulation Type Steady State

Transient

Fluid Type Ideal Gas

Domain Type Multiple Domain

Rotating Frame ofReference

Turbulence Model k-Epsilon

Heat Transfer Total Energy

Boundary Conditions Inlet (Subsonic)

Outlet (Subsonic)

Wall: No-Slip

Wall: Adiabatic

Domain Interfaces Frozen Rotor

Periodic

Transient Rotor Stator

Timestep Physical Timescale

Transient Example

Transient Results File

CFX-Solver Manager Restart

Parallel Processing

Page 275: Tutorials

Flow in an Axial Rotor/Stator—Introduction

CFX-5 Tutorials Page 259

You learn about:

• using the Turbo Wizard in CFX-Pre to quickly specify a turbomachineryapplication

• multiple Frames of Reference and Generalised Grid Interface

• using a Frozen Rotor interface between the rotor and stator domains

• modifying an existing simulation

• setting up a transient calculation

• using a Transient Rotor-Stator interface condition to replace a FrozenRotor interface

• creating a transient animation showing domain movement in CFX-Post

12.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

CFX-Post Plots Animation

Isosurface

Surface Group

Turbo Post

Other Changing the ColourRange

Chart Creation

Instancing Transformation

MPEG Generation

Quantitative Calculation

Timestep Selection

Transient Animation

Component Feature Details

Page 276: Tutorials

Flow in an Axial Rotor/Stator—Introduction

Page 260 CFX-5 Tutorials

12.A.3: Overview of the problem to solve

The following tutorial demonstrates the versatility of GGI and MFR inCFX-Pre by combining two dissimilar meshes. The first mesh to be imported(the rotor) was created in CFX-TurboGrid. This is combined with a secondDefinition File mesh (the stator).

The geometry to be modelled consists of a single stator blade passage andtwo rotor blade passages. The rotor rotates about the Z axis while the statoris stationary. Periodic boundaries are used to allow only a small section ofthe full geometry to be modelled.

Figure 1:

At the change in reference frame between the rotor and stator, twodifferent interface models are considered. First a solution is obtained usinga frozen rotor model. After viewing the results from this simulation, theCFX-Pre simulation is modified to use a transient rotor-stator interfacemodel. The frozen rotor solution is used as an initial guess for the transientrotor-stator simulation.

Hub

Rotor Blade

Outflow

Shroud

Stator Blade

Inflow

Page 277: Tutorials

Flow in an Axial Rotor/Stator—Introduction

CFX-5 Tutorials Page 261

The full geometry contains 60 stator blades and 113 rotor blades. To helpyou visualise how the modelled geometry fits into the full geometry, "Figure1: " on page 260 the image shows approximately half of the full geometry.The Inflow and Outflow labels show the location of the modelled section in"Figure 2: " on page 261.

Figure 2:

The modelled geometry contains two rotor blades and one stator blade.This is an approximation to the full geometry since the ratio of rotor bladesto stator blades is close to, but not exactly, 2:1. In the stator blade passage a6° section is being modelled (360°/60 blades), while in the rotor bladepassage a 6.372° section is being modelled (2*360°/113 blades). Thisproduces a pitch ratio at the interface between the stator and rotor of 0.942,where the pitch ratio is the area of side 1 divided by the area of side 2. As theflow crosses the interface it is scaled to allow this type of geometry to bemodelled. This results in an approximation of the inflow to the rotorpassage. Furthermore, the flow across the interface will not appearcontinuous due to the scaling applied.

The periodic boundary conditions will introduce an additionalapproximation since they cannot be periodic when a pitch change occurs.

Inflow

Outflow

Axis of Rotation

Page 278: Tutorials

Flow in an Axial Rotor/Stator—Introduction

Page 262 CFX-5 Tutorials

You should always try to obtain a pitch ratio as close to 1 as possible in yourmodel to minimise approximations, but this must be weighed againstcomputational resources. A full machine analysis can be performed(modelling all rotor and stator blades) which will always eliminate any pitchchange, but will require significant computational time. For this rotor/statorgeometry, a 1/4 machine section (28 rotor blades, 15 stator blades) wouldproduce a pitch change of 1.009, but this would require a model about 15times larger than in this tutorial example.

If you have already completed the frozen rotor part of this tutorial you cancontinue from Setting up the Transient Rotor-Stator Calculation (p. 276).Note that a converged results file from the frozen rotor section is requiredas an initial guess. You can use your own solution or use the results fileprovided in the examples directory. Further details are given in Obtaining aSolution to the Transient Rotor-Stator Model (p. 280). You must make surethat the boundary names used in the initial results file exactly match thoseused in the transient rotor-stator case.

Page 279: Tutorials

Flow in an Axial Rotor/Stator—Defining the Frozen-Rotor Simulation in CFX-Pre

CFX-5 Tutorials Page 263

12.B: Defining the Frozen-Rotor Simulation inCFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file AxialIni.pre tocomplete this section for you and continue from Obtaining a Solution to theFrozen Rotor Simulation (p. 269). See one of the first four tutorials forinstructions on how to do this.

12.B.1: Creating a New Simulation

This tutorial will use the Turbo Wizard in CFX-Pre. This pre-processing modeis designed to simplify the setup of turbomachinery simulations.

1. Start CFX-Pre.

2. Select File > New Simulation....

New Simulation File appears.

3. Click the Turbo icon in the area at right to highlight it.

4. Browse the folders as necessary, then enter the file name AxialIni.

5. Click Save.

The Turbo Wizard will appear in the User Mode workspace, which is

part of the general CFX-Pre workspace.

12.B.2: Component Definition

The first step is to define the rotational axis, machine type and simulationstate. The names of the turbo regions for the domains will also be set.

When the Turbo Wizard appears:

1. Set Rotational Axis to Z

2. Leave Simulation Type set to Steady State.

3. Expand the Turbo Regions frame.

This shows the regions that CFX-Pre attempts to automatically assign toappropriate boundary conditions. To do this it needs to know the regionnames to expect in the mesh files. The upper case Turbo Regions that areselected (e.g. HUB) correspond to the region names in the CFX-TASCflow“grd” file. CFX-TASCflow turbomachinery meshes use these namesconsistently. The lower case Turbo Regions correspond to the region namesin the CFX-5 Definition file. CFX-5 turbomachinery meshes may have

Page 280: Tutorials

Flow in an Axial Rotor/Stator—Defining the Frozen-Rotor Simulation in CFX-Pre

Page 264 CFX-5 Tutorials

different region names than these. In this case just leave the Turbo Regionsframe with its default settings; you will be able to assign regions toboundary conditions later.

4. Click Next >.

12.B.3: Importing the Meshes

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

The first step is to import the two different mesh files. One mesh filecontains the rotor mesh in a CFX-TASCflow “grd” file, while the other meshfile contains the stator in a CFX-5 Definition file.

1. Copy the filesrotor.grd andstator.def, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. On the Stage Definition form, click New .

3. Set Name to S2, then click OK.

4. Set Component Type to Stationary.

5. Click to the right of Select Mesh.

An Import Mesh form will appear beneath the Turbo Wizard.

6. On the Import Mesh form:

a. Set Mesh Format to CFX-5 Def/Res file.

b. Set File to stator.def.

c. Click OK to import the mesh.

7. In the Select Mesh drop-down list, ensure that Default is selected.

8. On the Stage Definition form, click New .

9. Set Name to R1, then click OK.

10. Set Component Type to Rotating.

11. Set Speed to 523.6 [radian s^-1].

12. Click to the right of Select Mesh.

Page 281: Tutorials

Flow in an Axial Rotor/Stator—Defining the Frozen-Rotor Simulation in CFX-Pre

CFX-5 Tutorials Page 265

13. On the Import Mesh form:

a. Set Mesh Format to CFX-TASCflow v2.

b. Set File to rotor.grd.

c. Click OK to import the mesh.You will receive a warning message when importing this mesh. Themessage will tell you the information that has been ignored duringimport. See "CFX-TASCflow v2" on page 91 in the document "CFX-Pre"for further details on this and importing CFX-TASCflow meshes.

14. Click OK on the warning message to continue.

15. Set Select Mesh to Assembly 3D.

16. Click Next > to continue.

12.B.4: Creating the Interfaces

Here, you will set up appropriate periodic interfaces on the rotor and stator.These are required since you are only modelling a small section of the truegeometry. An interface is also required to connect the two meshes togetheracross the frame change. See "Domain Interfaces" on page 299 in thedocument "CFX-Pre" for more details.

CFX-Pre will try to create appropriate interfaces using the Turbo Regionnames shown earlier. In this case, CFX-Pre has displayed the definition ofthree interfaces. The following steps will verify that the interface definitionsare correct.

Rotor PeriodicInterface

The first interface is named R1 to R1 Periodic.

1. Click the interface to display the Interface definition.

2. As expected, a periodic interface has been created for the rotor domain,

and the regions selected for the interface are correct.

3. These are the correct settings for the periodic interface, so no further

action is required.

Stator PeriodicInterface

1. Click the S2 to S2 Periodic interface.

2. The Interface Definition shows a periodic interface for the stator

domain showing the correct regions.

3. No further action is required for this interface.

Page 282: Tutorials

Flow in an Axial Rotor/Stator—Defining the Frozen-Rotor Simulation in CFX-Pre

Page 266 CFX-5 Tutorials

Frozen RotorDomainInterface

1. Click the R1 to S2 Stage interface.

2. The correct regions, INFLOW and out, have been selected for this

interface.

3. The intention is to use a Frozen Rotor interface in this tutorial, so change

Type to Frozen Rotor.

Note: If inappropriate interface conditions were created automatically, youcan highlight and delete them using the delete icon.

4. Click Next >.

12.B.5: General Physics

The General Physics form will now be displayed.

1. In the Fluid drop-down list, select Air Ideal Gas.

2. Under Model Data:

a. Set Reference Pressure to 0.25 [bar].Note the change in units from Pa to bar.

b. Leave Heat Transfer set to Total Energy.

c. Leave Turbulence set to k-Epsilon (scalable wall function).

3. Under Solver Parameters

a. Leave Advection Scheme set to High Resolution.

b. Set Convergence Control to Physical Timescale and PhysicalTimescale to 0.002 [s].This timescale is approximately equal to 1 / ω, which is oftenappropriate for rotating machinery applications.

4. Click Next > to continue.

12.B.6: Boundary Definition

CFX-Pre will now try to create appropriate boundary conditions using theTurbo Region names shown earlier. The Boundary Definition form willappear showing a list of boundary conditions. These were automaticallycreated, and can be viewed, edited and deleted in the same way as theinterface connections that were set up earlier.

Setting theStator InletBoundaryCondition

1. Click Inlet.

Location and Boundary Type are both correct, so there is no need tochange these settings.

Page 283: Tutorials

Flow in an Axial Rotor/Stator—Defining the Frozen-Rotor Simulation in CFX-Pre

CFX-5 Tutorials Page 267

2. Under Flow Specification, set Option to Stationary Frame Total

Pressure and Relative Pressure to 0 [Pa].

3. Leave Flow Direction set to Normal to Boundary.

4. Set Total Temperature to 340 [K].

To set therotor outletboundarycondition

1. Click Outlet.

Location and Boundary Type are both correct, so there is no need tochange these settings.

2. Under Flow Specification, set Option to Mass Flow Rate and Mass

Flow Rate to 0.06 [kg s^-1].

Checking theRotor BladeBoundaryCondition

Click Blade, a wall boundary specified on the BLADE region. Note that all ofthe details are correct for this boundary condition.

Wall boundary conditions are created relative to the local domain referenceframe by default, so this boundary is stationary relative to the rotatingdomain (i.e. rotating relative to the stationary domain).

Checking theRotor HubBoundaryCondition

Click Hub, a wall boundary on the HUB region. Note that all of the details arecorrect for this boundary condition.

Checking theRotor ShroudBoundaryCondition

Click Shroud, a wall boundary on the SHROUD region. Note that all of thedetails are correct for this boundary condition.

Checking theRemainingBoundaries

1. Click on the boundaries Blade 2, Hub 2 and Shroud 2. Wall boundaries

will be shown on the regions blade, hub and shroud respectively, and

need no editing.

Note: If inappropriate boundary conditions are created by CFX-Pre, or aremissing, you can delete and add them as appropriate.

2. Click Next > to continue.

Page 284: Tutorials

Flow in an Axial Rotor/Stator—Defining the Frozen-Rotor Simulation in CFX-Pre

Page 268 CFX-5 Tutorials

12.B.7: File Definition Options

The last form offers the following three options:

• Enter General Mode

• Start Solver: Write the Solver (.def) File, enter General Mode and startthe CFX-Solver.

• Start Solver and Quit: Write the Solver (.def) File, start the CFX-Solverand quit CFX-Pre.

1. Select Start Solver and Quit, then click Finish.

2. Answer Yes when asked if you want to save the CFX file.

Page 285: Tutorials

Flow in an Axial Rotor/Stator—Obtaining a Solution to the Frozen Rotor Simulation

CFX-5 Tutorials Page 269

12.C: Obtaining a Solution to the Frozen RotorSimulation

Compared to previous tutorials, the mesh for this tutorial contains manymore nodes (although it is still too coarse to perform a high quality CFDsimulation). This results in a corresponding increase in solution time for theproblem. We recommend solving this problem in parallel. It isrecommended that your machine has a minimum of 256MB of memory torun this tutorial.

Note: If you do not have a license to run CFX-5 in parallel you can run inserial by clicking the Start Run button when CFX-Solver Manager hasopened up. Solution time in serial is approximately 45 minutes on a 1GHzprocessor.

Instructions are provided below to run this tutorial in parallel. More detailedinformation about setting up CFX-5 to run in parallel is provided in " FlowAround a Blunt Body" on page 123 and in "Setting Up and Running a ParallelRun" on page 45 in the document "CFX- Solver Manager".

You can solve this example using either Local Parallel or Distributed Parallelas guidance is provided for both.

Solving UsingLocal Parallel

To run in Local Parallel, the machine you are on must have more than oneprocessor.

1. On the Define Run form, set Run Mode to PVM Local Parallel (this is

the recommended method for most applications: see "Run Mode" on

page 12 in the document "CFX- Solver Manager" for details on the other

options).

2. By default, 2 partitions are assigned. Click Add Partition to add

more partitions.

3. Click Start Run.

During convergence, data is written to an out file for each equation in

each fluid domain separately.

When the Solver has finished:

4. Click Post-Process Results .

5. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 286: Tutorials

Flow in an Axial Rotor/Stator—Obtaining a Solution to the Frozen Rotor Simulation

Page 270 CFX-5 Tutorials

Solving UsingDistributedParallel

1. On the Define Run form, set Run Mode to PVM Distributed Parallel.

1 partition should already be assigned to the host that you are logged

into.

2. Click Select Host to specify a new parallel host.

3. In Select Parallel Hosts, select another Host Name (this should be a

machine that you can log into using the same user name).

4. Click Add then Close.

The names of the two selected machines should be listed in the Host

Name column of the Define Run form.

5. Click Start Run.

Notice that the pitch ratio is written near the start of the OUT file for a

parallel run:+--------------------------------------------------------------------+| Total Number of Nodes, Elements, and Faces |+--------------------------------------------------------------------+......Domain Interface Name: Auto Interface 3

Non-overlap area fraction on side 1 = 0.0% Non-overlap area fraction on side 2 = 0.1% Area based pitch ratio (6.372 leg., 6.000 leg.) = 1.062

During convergence, data is written to an out file for each equation ineach fluid domain separately.

When the Solver has finished:

6. Click Post-Process Results .

7. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 287: Tutorials

Flow in an Axial Rotor/Stator—Viewing the Results

CFX-5 Tutorials Page 271

12.D: Viewing the Results

The Turbo-Post feature will be demonstrated in the following sections. Thisfeature is designed to greatly reduce the effort taken to post-processturbomachinery simulations. A number of turbo-specific features are alsoavailable; see "CFX-Post Turbo Menu" on page 171 in the document"CFX-Post" for more details.

InitialisingTurbo-Post

To initialise Turbo-Post, the properties of each component must be entered.This includes entering information about the inlet, outlet, hub, shroud,blade and periodic regions.

1. Select Turbo > Turbo Mode from the main menu.

The Turbo tab is automatically selected, and shows the two components indomains R1 and S2. In the next step, both of these components will beinitialised.

1. Double-click Component 2.

2. Under Definition, set:

a. Hub to Hub

b. Shroud to Shroud

c. Blade to Blade

d. Inlet to R1 to S2 Stage Side R1 Part 1This is the rotor side of the frozen rotor interface, so it is the inlet tothe rotor domain.

e. Outlet to Outlet

f. R1 to R1 Periodic Side R1 Part 1

g. R1 to R1 Periodic Side R1 Part 2

3. Click the Instancing tab, then, under Rotation, you will see that the

Angle From is set to Instances in 360, the # of Passages is set to 113,

and the Passages/Component is set to 2. These settings are correct for

this component.

4. Click Apply.

5. Double-click Component 1.

Page 288: Tutorials

Flow in an Axial Rotor/Stator—Viewing the Results

Page 272 CFX-5 Tutorials

6. Under Definition, set:

a. Hub to Hub 2

b. Shroud to Shroud 2

c. Blade to Blade 2

d. Inlet to Inlet

e. Outlet to R1 to S2 Stage Side S2 Part 2This is the stator side of the Frozen Rotor interface, so it is the outletfrom the stator domain.

f. Periodic 1 to S2 to S2 Periodic Side S2 Part 1

g. Periodic 2 to S2 to S2 Periodic Side S2 Part 2

7. Click the Instancing tab, where you will see that Angle From is set to

Instances in 360, # of Passages is 60 and Passages/Component is 1.

These are all correct for this component.

8. Click Apply

Colouring aSurface ofConstant Span

1. Open the Turbo Plotter by selecting Turbo > Turbo Plotter from the

main menu.

2. Click the Run Initial Setup button (located at the bottom right of the

Turbo Plotter form).

• Three objects are created in separate viewports when the InitialSetup option is chosen; Turbo 3D view, 2D Blade-to-Blade view and2D Meridional view.

• In this case, the meridional turbo surface will obscure part of theplots you will be creating in the next steps.

3. In the Object Selector, turn off the visibility for the Turbo Plotter Merid

Surface.

Page 289: Tutorials

Flow in an Axial Rotor/Stator—Viewing the Results

CFX-5 Tutorials Page 273

One of the default objects created when you ran the initial setup is ablade-to-blade turbo surface, drawn at a spanwise location of 0.5 (halfwaybetween the hub and shroud). For an explanation of turbo locations, pleasesee "Turbo Measurements" on page 187 in the document "CFX-Post". Here,you will colour the surface with pressure.

1. In the Object Selector, right-click the Turbo Plotter B2B Surface and

select Edit.

2. Click the Colour tab and set:

a. Mode to Variable

b. Variable to Pressure

c. Range to Global

3. Click Apply.

Viewing 3domainpassages

Next, you will create an instancing transformation to plot three bladepassages for the stator and six blade passages for the rotor.

The instancing properties of each domain have already been enteredduring Initialisation. In the next steps, you will create a surface group plot(see "Surface Group" on page 94 in the document "CFX-Post") to colour theblade and hub surfaces with the same variable. The number of instances offor each domain will then be changed.

1. Use the Object Selector to make all objects invisible.

2. Select Create > Object > Surface Group from the main menu.

3. Accept the default name and click OK.

4. Set Locations to Hub, Hub 2, Blade and Blade 2(use the icon to

open the Locations Selector).

5. On the Colour panel, set Mode to Variable and Variable to Pressure.

6. Click Apply.

7. In the Turbo Plotter, make sure Plot is set to Turbo 3D View.

8. Under Instancing, set # of Copies for the R1 domain to 3.

9. Click Apply.

Page 290: Tutorials

Flow in an Axial Rotor/Stator—Viewing the Results

Page 274 CFX-5 Tutorials

10. Carry out the same step for the S2 domain.

Creating aBlade LoadingChart

In this section, you will create a plot of pressure around the stator blade at agiven spanwise location. For more details on this functionality, please see"Turbo Plotter: Turbo Chart" on page 192 in the document "CFX-Post".

1. In the Turbo Plotter, set:

a. Plot to Turbo Chart

b. Type to Blade Loading

c. Domain to S2

d. Span to 0.5

e. X Variable to Z

f. Y Variable to Pressure

Page 291: Tutorials

Flow in an Axial Rotor/Stator—Viewing the Results

CFX-5 Tutorials Page 275

2. Click Apply.

A turbo line is automatically created in the viewer to show wherepressure values have been sampled.

The profile of the pressure curve is typical in turbomachinery applications.

This completes the frozen-rotor part of the tutorial. The next sectiondescribes how to use the solution to set up a transient rotor-statorcalculation.

Page 292: Tutorials

Flow in an Axial Rotor/Stator—Setting up the Transient Rotor-Stator Calculation

Page 276 CFX-5 Tutorials

12.E: Setting up the Transient Rotor-StatorCalculation

This section describes the step-by-step definition of the flow physics inCFX-Pre. The existing frozen-rotor simulation is modified to define thetransient rotor-stator simulation. If you wish, you can use the session fileAxial.pre to complete this section for you and continue from Obtaininga Solution to the Transient Rotor-Stator Model (p. 280). See one of the firstfour tutorials for instructions on how to do this.

Note: The session file creates a new simulation namedAxial.cfx and willnot modify the existing database. It also copies the required initial valuesfiles from the examples directory to the current working directory.

12.E.1: Opening the Existing Simulation

This step involves opening the original simulation and saving it to adifferent location.

1. Start CFX-Pre and select File > Open Simulation.

2. Select the original simulation file: AxialIni_001.res.

• You will need to change the import filter to show *.def and*.res files.

• If you have not completed the first part of the tutorial, this file canbe copied from the examples directory.

3. Select File > Save Simulation As.

4. Enter Axial and click OK.

The simulation will open in General Mode. The Turbo-Pre Wizard can beused to quickly create turbomachinery cases, but General Mode is alwaysused when re-opening a simulation.

Page 293: Tutorials

Flow in an Axial Rotor/Stator—Setting up the Transient Rotor-Stator Calculation

CFX-5 Tutorials Page 277

12.E.2: Modifying the Simulation Type

You need to modify the domain to define a transient simulation. You aregoing to run for a time interval such that the rotor blades pass through 1pitch (6.372o) using 10 timesteps. This is generally too few timesteps toobtain high quality results, but is sufficient for tutorial purposes. Thetimestep size is calculated as follows:

Rotational Speed = 523.6 rad/sRotor Pitch Modelled = 2*(2π/113) = 0.1112 radTime to pass through 1 pitch = 0.1112/523.6 = 2.124e-4 s

Since 10 timesteps are going to be used over this interval, then eachtimestep should be 2.124e-5 s.

1. Select Create > Flow Objects > Simulation Type from the main menu.

2. On the Basic Settings panel, set Option to Transient.

3. Under Time Duration:

a. Set Option to Total Time and Total Time to 2.124e-4 [s].This gives 10 timesteps of 2.124e-5 s.

b. Set Timesteps to 2.124e-5 and leave the units set to [s].This timestep will be used until the total time is reached.

4. Under Initial Time, set Option to Automatic with Value and Time to

0 [s].

5. Click OK.

Note: A transient rotor-stator calculation often runs through more than onepitch. In these cases, it may be useful to look at variable data averaged overthe time interval required to complete 1 pitch. You can then compare datafor each pitch rotation to see if a “steady state” has been achieved, or if theflow is still developing. See "Using Statistics with Transient Rotor-StatorCases" on page 335 in the document "CFX-Pre" for details on how to gettime averaged variable data.

12.E.3: Modifying the Domain Interface

1. In the Physics Workspace, double click R1 to S2 Stage.

2. Under Frame Change, set Option to Transient Rotor Stator, then click

OK.

Page 294: Tutorials

Flow in an Axial Rotor/Stator—Setting up the Transient Rotor-Stator Calculation

Page 278 CFX-5 Tutorials

12.E.4: Setting Initial Values

When defining a simulation using the Turbo Wizard, initial values are not setsince the default is Automatic for all variables. When the Simulation Typewas changed to Transient, CFX-Pre signalled a Physics Validation error, sinceinitial values are required for all transient runs. The initial values must eitherbe specified, or provided by selecting an Initial Values File in the CFX-SolverManager when defining the run. In this tutorial, the solution from the FrozenRotor simulation will be used as the Initial Values File.

Ignoring the Physics Validation warning and later specifying an initial valuesfile in the CFX-Solver would still allow the problem to run (because theCFX-Solver would still attempt to run the simulation with Automatic values),but in this tutorial the values will be explicitly set to Automatic to removethe Physics Validation warning.

1. Click Global Initialisation .

2. Change all of the options that are currently set to Automatic with

Value to Automatic.

3. Turn on Turbulence Eddy Dissipation and set Option to Automatic.

4. Click OK.

12.E.5: Modifying the Solver Control

1. Click Solver Control .

2. Set Max. Iter. Per Timestep to 3.

We do not generally recommend using a large number of iterations per

timestep, see "Transient Timestep Control" on page 352 in the

document "CFX-5 Solver Modelling" for details.

3. Click OK to set the solver parameters.

12.E.6: Creating Transient Results Files

1. Click Output Control .

2. Click the Transient Results tab.

3. Click Add new item and then click OK to accept the default name

for the object.

4. Leave Option set to Minimal.

Page 295: Tutorials

Flow in an Axial Rotor/Stator—Setting up the Transient Rotor-Stator Calculation

CFX-5 Tutorials Page 279

5. Set Output Variable List to Pressure, Velocity, and Velocity in Stn

Frame (use the <Ctrl> key to select more than one variable).

Note: Velocity is always defined in the local reference frame, so it will givethe rotating frame velocity in the rotor component.

6. Turn on Time Interval and set Time Interval to 2.124e-5 [s].

7. Click OK.

12.E.7: Writing the Solver (.def) File

1. Click Create Definition File .

2. Set File name to Axial.def.

3. Leave Operation set to Start Solver Manager with def file.

4. Turn on Report Summary of Interface Connections.

5. Click OK.

The Information window shows that the fluid-fluid interface is GGI, and

the two periodic interfaces are one-to-one.

6. Click OK in the information window.

7. Select File > Quit.

8. Click Yes when asked if you want to save the CFX file.

Page 296: Tutorials

Flow in an Axial Rotor/Stator—Obtaining a Solution to the Transient Rotor-Stator Model

Page 280 CFX-5 Tutorials

12.F: Obtaining a Solution to the TransientRotor-Stator Model

When the CFX-Solver Manager has started you will need to specify an InitialValues File before starting the CFX-Solver. Set Initial Values File toAxialIni_001.res (the Frozen Rotor solution).

12.F.1: Serial Solution

If you do not have a license, or do not want to run CFX-5 in parallel, you canrun in serial by clicking the Start Run button. Solution time in serial is similarto the first part of this tutorial.

12.F.2: Parallel Solution

You can solve this example using either Local Parallel or Distributed Parallel,in the same way as in the first part of this tutorial. See Obtaining a Solutionto the Frozen Rotor Simulation (p. 269) if you need further guidance.

12.F.3: Monitoring the Run

During the solution, look for the additional information that is provided fortransient rotor-stator runs. Each time the rotor is rotated to its next position,the number of degrees of rotation and the fraction of a pitch moved isgiven. You should see that after 10 timesteps the rotor has been movedthrough 1 pitch.

You will notice a jump in the residuals (to the order of 1.0E-2) for everytimestep. This is to be expected for a transient simulation under theseconditions, which in the interest of time has a large timestep. You will alsonotice that the problem does not converge to the convergence criteria in asingle timestep, and for accurate results reaching the convergence criteriais very important. Convergence is achieved by adjusting the length of thetimestep to an appropriate value. "Transient Timestep Control" on page 352in the document "CFX-5 Solver Modelling".

When the Solver has finished:

1. Click Post-Process Results .

2. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 297: Tutorials

Flow in an Axial Rotor/Stator—Viewing the Results

CFX-5 Tutorials Page 281

12.G: Viewing the Results

To examine the transient interaction between the rotor and stator, you aregoing to create a blade-to-blade animation of pressure. A turbo surface willbe used as the basis for this plot.

InitialisingTurbo-Post

To initialise Turbo-post, the properties of each domain must be entered.This includes entering information about the inlet, outlet, hub, shroud,blade and periodic regions. The instancing properties are set on theInstancing tab menu.

1. Select Turbo > Turbo Mode from the main menu bar.

The Turbo tab is automatically selected, and shows the two components indomains R1 and S2. In the next step, both of these components will beinitialised.

1. Double-click Component 2.

2. Under Definition, set:

a. Hub to Hub

b. Shroud to Shroud

c. Blade to Blade

d. Inlet to R1 to S2 Stage Side R1 Part 1This is the rotor side of the frozen rotor interface, so it is the inlet tothe rotor domain.

e. Outlet to Outlet

f. R1 to R1 Periodic Side R1 Part 1

g. R1 to R1 Periodic Side R1 Part 2

3. Click the Instancing tab, then, under Rotation, you will see that the

Angle From is set to Instances in 360, the # of Passages is set to 113,

and the Passages/Component is set to2. These settings are correct for

this component.

4. Click Apply.

5. Double-click Component 1.

Page 298: Tutorials

Flow in an Axial Rotor/Stator—Viewing the Results

Page 282 CFX-5 Tutorials

6. Under Definition, set:

a. Hub to Hub 2

b. Shroud to Shroud 2

c. Blade to Blade 2

d. Inlet to Inlet

e. Outlet to R1 to S2 Stage Side S2 Part 2This is the stator side of the Frozen Rotor interface, so it is the outletfrom the stator domain.

f. Periodic 1 to S2 to S2 Periodic Side S2 Part 1

g. Periodic 2 to S2 to S2 Periodic Side S2 Part 2

7. Click the Instancing tab, where you will see that Angle From is set to

Instances in 360, # of Passages is 60 and Passages/Component is 1.

These are all correct for this component.

8. Click Apply

9. As for the initial axial case, the meridional turbo surface will obscure part

of the plots you will be creating in the next steps. In the Object Selector,

uncheck the visibility for the Turbo Plotter Merid Surface.

Creating aTurbo SurfaceMidwayBetween theHub andShroud

1. Click View Toward -X (by using the viewer icon drop-down menu)

and zoom in so that the geometry fills the Viewer.

2. Make all existing plots invisible.

3. Select Turbo > Turbo Surface from the main menu bar.

4. On the Geometry panel, set:

a. Domains to All Domains

b. Method to Constant SpanConstant span specifies a fractional distance from the hub (0), to theshroud (1). In this case a plot is created at 0.5 (halfway between huband shroud). See "Turbo Measurements" on page 187 in thedocument "CFX-Post" for more details.

c. Value to 0.5

Page 299: Tutorials

Flow in an Axial Rotor/Stator—Viewing the Results

CFX-5 Tutorials Page 283

5. On the Colour panel set:

a. Mode to Variable

b. Variable to Pressure

c. Range to User Specified

d. Min to -12000 [Pa]

e. Max to -8000 [Pa]

6. Click Apply to create the turbo surface.

Setting upInstancingTransformations

Next, you will use instancing transformations to view a larger section of themodel. The properties for each domain have already been entered duringthe initialisation phase, so only the number of instances needs to be set.

1. In the Turbo Plotter, make sure that Plot is set to Turbo 3D View.

2. In the Instancing section of the form, set # of Copies for both domains

to 6 (For each domain, click Apply after you set # of Copies.).

Creating aTransientAnimation

Start by loading the first timestep:

1. Click Show Timestep Selector .

2. Select Time Value 0.

3. Click Apply to load the timestep.

The rotor blades move to their starting position. This is exactly 1 pitch

from the previous position so the blades will not appear to move.

4. Turn off visibility for the Wireframe object.

Page 300: Tutorials

Flow in an Axial Rotor/Stator—Viewing the Results

Page 284 CFX-5 Tutorials

5. Position the geometry as shown below, ready for the animation. During

the animation the rotor blades will move to the right. Make sure you

have at least two rotor blades out of view to the left side of the Viewer.

They will come into view during the animation.

6. Click Show Animation Editor .

7. In Animation Editor, click New .

8. Use the Timestep Selector to load Time Value 0.0002124.

9. In the Animation Editor, click New to create KeyframeNo2.

10. Highlight KeyframeNo1, then set # of Frames to 9.

11. Click Options and set Timestep to TimeValue Interpolation.

Playing theAnimation

The animation now contains a total of 11 frames (9 intermediate frames plusthe two Keyframes), one for each of the available time values.

1. On the Animation Editor form, turn on Save Animation Movie.

2. Click Browse , next to the MPEG File box and then set File name to

an appropriate file name (ending in .mpg).

3. If Frame 1 is not loaded (shown in the top right corner of the Animation

Editor), click To Beginning to load it.

Wait for CFX-Post to finish loading the objects for this frame before

proceeding.

4. Click Play Forward .

• It takes a while for the animation to complete.

• To view the MPEG file, you will need to use a media player thatsupports the MPEG format.

Page 301: Tutorials

Flow in an Axial Rotor/Stator—Viewing the Results

CFX-5 Tutorials Page 285

You will be able to see from the animation, and from the plots createdpreviously, that the flow is not continuous across the interface.

This is because a pitch change occurs. The relatively coarse mesh and thesmall number of timesteps used in the transient simulation also contributeto this. The movie was created with a narrow pressure range compared tothe global range which exaggerates the differences across the interface.

FurtherPostprocessing

You can use the Turbo Calculator to produce a report on the performanceof the turbine.

1. Select Turbo > Turbo Calculator from the main menu bar.

2. Set Macro to Gas Turbine Performance.

3. Set Ref Radius to 0.4575 and leave other settings at their default

values.

4. Click Calculate.

5. Click View Report.

The values calculated are defined in "Predefined Macros" on page 158 in thedocument "CFX-Post".

Page 302: Tutorials

Flow in an Axial Rotor/Stator—Viewing the Results

Page 286 CFX-5 Tutorials

Page 303: Tutorials

CFX-5 Tutorials Page 287

CFX-5 Tutorials

Tutorial 13

Reacting Flow in a MixingTube

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• Reactor.pre

• ReactorExpressions.ccl

• ReactorMesh.gtm

Page 304: Tutorials

Reacting Flow in a Mixing Tube—Introduction

Page 288 CFX-5 Tutorials

13.A: Introduction

13.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• creating and using a multicomponent fluid in CFX-Pre

• using CEL to model a reaction in CFX-Pre

• using an algebraic Additional Variable to model a scalar distribution

• using a subdomain as the basis for component sources

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Fluid Type Variable CompositionMixture

Domain Type Single Domain

Turbulence Model k-Epsilon

Heat Transfer Thermal Energy

Particle Tracking Component Source

Boundary Conditions Inlet (Subsonic)

Outlet (Subsonic)

Symmetry Plane

Wall: Adiabatic

Additional Variables

CEL (CFX Expression Language)

Timestep Physical Timescale

CFX-Solver Manager n/a n/a

CFX-Post Plots Isosurface

Slice Plane

Other Changing the ColourRange

Page 305: Tutorials

Reacting Flow in a Mixing Tube—Introduction

CFX-5 Tutorials Page 289

13.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

13.A.3: Overview of the problem to solve

Reaction engineering is one of the main core components in the chemicalindustry. Optimising reactor design leads to higher yields, lower costs and,as a result, higher profit.

This example demonstrates the capability of CFX-5 in modelling basicreacting flows using a multicomponent fluid model.

13.A.4: Outline of the Process

The model is a mixing tube into which acid and alkali are injected throughside holes. The reaction to be modelled is:

The tube is modelled as an axisymmetric section.

The reaction between acid and alkali is represented as a single stepirreversible liquid-phase reaction

Reagent A (dilute sulphuric acid) is injected through a ring of holes near thestart of the tube. As it flows along the tube it reacts with Reagent B (dilutesodium hydroxide) which is injected through a further two rings of holesdownstream. The product, C, remains in solution.

The composition and pH of the mixture within the tube are principalquantities of interest to be predicted by the model.

The flow is assumed to be fully turbulent and turbulence is assumed to havea significant effect on the process. The process is also exothermic.

2SO4 2NaOH+ Na2SO4 2H2+→

A B C→+

Page 306: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

Page 290 CFX-5 Tutorials

13.B: Defining the Simulation in CFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file Reactor.pre tocomplete this section for you and continue from Obtaining a Solution(p. 255). See one of the first four tutorials for instructions on how to do this.

13.B.1: Creating a New Simulation

1. Start CFX-Pre and create a new simulation named Reactor using

General Mode.

13.B.2: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh file ReactorMesh.gtm, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. Click the Mesh tab to access the Mesh workspace.

3. Right-click in the Mesh Selector and select Import.

4. Leave Mesh Format set to CFX-5 GTM file.

5. Set File to ReactorMesh.gtm.

6. Click OK to import the mesh.

7. Click Isometric View (Y up) .

13.B.3: Creating a Multicomponent Fluid

In addition to providing template fluids, CFX-5 allows you to create customfluids for use in all your CFX-5 models. These fluids may be defined as a PureSubstance, but may also be defined as a Mixture, consisting of a number oftransported fluid components. This type of fluid model is useful forapplications involving mixtures, reactions and combustion.

In order to define custom fluids, CFX-Pre provides the Material Editor. Thistool allows you to define your own fluids as Pure Substances, FixedComposition Mixtures or Variable Composition Mixtures using a range oftemplate property sets defined for common materials.

Page 307: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 291

For further information on the Material Editor, see "Materials andReactions" on page 125 in the document "CFX-Pre".

The mixing tube application requires a fluid made up from four separatematerials (or components). The components are the reactants and productsof a simple chemical reaction together with a neutral carrier liquid. You arefirst going to define the materials that take part in the reaction (acid, alkaliand product) as pure substances. The neutral carrier liquid is water; thismaterial is already defined since it is commonly used. Finally, you will createa Variable Composition Mixture consisting of these four materials. This is thefluid that you will use in your simulation. A Variable Composition Mixture (asopposed to a Fixed Composition Mixture) is required because theproportion of each component will change throughout the simulation dueto the reaction.

To define theproperties forthe acid

1. Click the Materials tab in the CFX-Pre Workspace.

2. Right-click in the Material Selector and select New to define a new

material.

Create Material will be displayed.

3. Set Name to acid, then click OK.

4. In the Material Editor, on the Basic Settings panel:

a. Set Option to Pure Substance.

b. Set Material Group to User

c. Turn on Thermodynamic State and set Thermodynamic State toLiquid.

Page 308: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

Page 292 CFX-5 Tutorials

5. Click the Material Properties tab, then:

a. Set Option to General Material.

b. Under Equation of State, set Option to Value, Molar Mass to19.52 [kg kmol-1], and Density to 1080.0 [kg m^-3].See "Molar Mass" on page 46 in the document "CFX-5 SolverModelling" for a discussion on the use of Molar Mass.

c. Under Specific Heat Capacity

d. Expand the Transport Properties frame.

e. Turn on Dynamic Viscosity, then set Option to Value andDynamic Viscosity to 0.001 [kg m^-1 s^-1].

f. Turn on Thermal Conductivity, then set Option to Value andThermal Conductivity to 0.6 [W m^-1 K^-1].

g. Leave the Buoyancy Properties and Radiation Properties turnedoff.

6. Click Apply to create the material.

The new material will appear in the list of materials in the Materials

Workspace.

To define theproperties forthe alkali

1. Right-click in the Material Selector and select New to define a new

material.

The Create Material dialog box will be displayed.

2. Set Name to alkali, then click OK.

3. In the Material Editor, on the Basic Settings panel:

a. Set Option to Pure Substance.

b. Set Material Group to User

c. Turn on Thermodynamic State and set Thermodynamic State toLiquid.

Set the following To this value

Option Value

Specific Heat Capacity 4190.0 [J kg^-1 K^-1]

Reference Pressure 1 [atm]

Reference Temperature 25 [C]

Page 309: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 293

4. Click the Material Properties tab, then:

a. Set Option to General Material.

b. Under Equation of State, set Option to Value, Molar Mass to20.42 [kg kmol-1], and Density to 1130.0 [kg m^-3].See "Molar Mass" on page 46 in the document "CFX-5 SolverModelling" for a discussion on the use of Molar Mass.

c. Under Specific Heat Capacity

d. Expand the Transport Properties frame.

e. Turn on Dynamic Viscosity, then set Option to Value andDynamic Viscosity to 0.001 [kg m^-1 s^-1].

f. Turn on Thermal Conductivity, then set Option to Value andThermal Conductivity to 0.6 [W m^-1 K^-1].

g. Leave the Buoyancy Properties and Radiation Properties turnedoff.

5. Click Apply to create the material. The new material will appear in the

list of materials in the Materials Workspace.

To define theproperties forthe product ofthe reaction

1. Right-click in the Material Selector and select New to define a new

material.

The Create Material dialog box will be displayed.

2. Set Name to product, then click OK.

3. In the Material Editor, on the Basic Settings panel:

a. Set Option to Pure Substance.

b. Set Material Group to User.

c. Turn on Thermodynamic State and set Thermodynamic State toLiquid.

Set the following To this value

Option Value

Specific Heat Capacity 4190.0 [J kg^-1 K^-1]

Reference Pressure 1 [atm]

Reference Temperature 25 [C]

Page 310: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

Page 294 CFX-5 Tutorials

4. Click the Material Properties tab, then:

a. Set Option to General Material.

b. Under Equation of State, set Option to Value, Molar Mass to21.51 [kg kmol-1], and Density to 1190.0 [kg m^-3].See "Molar Mass" on page 46 in the document "CFX-5 SolverModelling" for a discussion on the use of Molar Mass.

c. Under Specific Heat Capacity

d. Expand the Transport Properties frame.

e. Turn on Dynamic Viscosity, then set Option to Value andDynamic Viscosity to 0.001 [kg m^-1 s^-1].

f. Turn on Thermal Conductivity, then set Option to Value andThermal Conductivity to 0.6 [W m^-1 K^-1].

g. Leave the Buoyancy Properties and Radiation Properties turnedoff.

5. Click Apply to create the material. The new material will appear in the

list of materials in the Materials Workspace.

To create thefluid mixture

1. Right-click in the Material Selector and select New to define a new

material.

The Create Material dialog box will be displayed.

2. Set Name to Mixture, then click OK.

3. In the Material Editor, on the Basic Settings panel:

a. Set Option to Variable Composition Mixture.

b. Set Material Group to User and Water Data (use the <Ctrl> key).

c. Set Materials List to acid, alkali, product and Water (use the<Ctrl> key).

d. Turn on Thermodynamic State and set Thermodynamic State toLiquid.

4. Click OK to create the material and close the form.

Set the following To this value

Option Value

Specific Heat Capacity 4190.0 [J kg^-1 K^-1]

Reference Pressure 1 [atm]

Reference Temperature 25 [C]

Page 311: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 295

13.B.4: Creating the Domain

To create anew domain

1. Create a domain named Reactor.

2. On the General Options panel:

a. Set Location to Assembly.

b. Set Domain Type to Fluid Domain.

c. Set Fluids List to Mixture.

d. Set Coord Frame to Coord 0.

e. Set Reference Pressure to 0 [atm].

f. Under Buoyancy, leave Option set to Non Buoyant.

g. Under Domain Motion, leave Option set to Stationary.

3. Click the Fluid Models tab, then:

a. Under Heat Transfer Model, set Option to Thermal Energy.

b. Under Turbulence Model, set Option to k-Epsilon.

c. Under Turbulent Wall Functions, set Option to Scalable.

d. Under Reaction or Combustion Model and Thermal RadiationModel, leave Option set to None.

e. Under Component Details, select acid.

f. Under acid, set Option to Transport Equation.This sets the component to be solved using a general transportequation.

g. Turn on Kinematic Diffusivity, then set Kinematic Diffusivity to0.001 [m^2 s^-1].

h. Use the same Option and Kinematic Diffusivity settings for alkaliand product as you have just set for acid.

i. Select Water.

j. For Water, set Option to Constraint.One component must always use Constraint. This is the componentused to balance the mass fraction equation; the sum of the massfractions of all components of a fluid must equal unity.

4. Click OK to create the domain.

Page 312: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

Page 296 CFX-5 Tutorials

13.B.5: Defining the Reaction

Reactions and reaction kinetics can be modelled using CFX ExpressionLanguage (CEL), together with appropriate settings for Component sources.This section shows you how to develop an Eddy Break Up (EBU) type termusing CEL to simulate the reaction between acid and alkali.

ReactionSource Terms

The reaction and reaction rate are modelled using a basic eddy break upformulation for the component and energy sources, so that, for example,the transport equation for mass fraction of acid is

where mf is mass fraction, DA is the Kinematic Diffusivity (set above) and iis the stoichiometric ratio. The right hand side represents the source termapplied to the transport equation for the mass fraction of acid. The left handside consists of the transient, advection and diffusion terms.

For acid-alkali reactions, the stoichiometric ratio is usually based on volumefractions. To correctly model the reaction using an eddy break upformulation based on mass fractions, we must calculate the stoichiometricratio based on mass fractions.

In this tutorial the reaction is modelled by introducing source terms for theacid, alkali and product components. You can now also model this type offlow more easily using a reacting mixture as your fluid. See "Combustionand Radiation in a Can Combustor" on page 409 in the document "CFX-5Tutorials" for a tutorial example using a reacting mixture.

Technical Note (Reference Only)In CFX-5.7.1, a source is fully specified by an expression for its value S.

A source coefficient C is optional, but can be specified to provideconvergence enhancement or stability for strongly-varying sources. Thevalue of C may affect the rate of convergence but should not affect theconverged results.

If no suitable value is available for C, the solution timescale or timestep canstill be reduced to help improve convergence of difficult source terms.

Important: C must never be positive.

∂∂t---- ρmfacid( ) ρUmfacid( )∇•+ ρDA mfacid∇( ) 4ρε

k--min mfacid

mf alkalii

-------------------,⎝ ⎠⎛ ⎞–=∇•–d

Page 313: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 297

An optimal value for C when solving an individual equation for a positivevariable φ with a source S whose strength decreases with increasing φ is

Where this derivative cannot be computed easily:

may be sufficient to ensure convergence.

Another useful recipe for C is

where τ is a local estimate for the source timescale. Provided that the sourcetimescale is not excessively short compared to flow or mixing timescales,this may be a useful approach for controlling sources with positive feedback( ) or sources that do not depend directly on the solvedvariable φ.

Calculating pH The pH (or acidity) of the mixture is a function of the mass fraction of acid,alkali and product. For the purposes of this calculation, acid is assumed to bedilute and fully dissociated into its respective ions (H+ and X-); alkali isassumed to be dilute and fully dissociated into its respective ions (Y+ andOH-); product is assumed to be a salt solution including further H+ and OH-

ions in a stoichiometric ratio.

The concentrations of hydrogen and hydroxyl ions can be calculated fromthe mass fractions of the components using the following expressions:

where α and β are the X- ion and Y+ ion concentrations in the acid and alkalirespectively. For this problem, α is set to 1.0E-05 kmole X- per kg of acid, andβ=α/i.

Cφ∂

∂S=

C Sφ--=

C ρτ---–=

∂S ∂φ⁄ 0>

i i+ ]acid αρ mfacidmfprod1 i+

-----------------+⎝ ⎠⎛ ⎞ Xi –[= =

Hi i– ]alkali βρ mfalkaliimfprod1 i+

-------------------+⎝ ⎠⎛ ⎞ Yi +[= =

Page 314: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

Page 298 CFX-5 Tutorials

Applying charge conservation and equilibrium conditions,

gives the following quadratic equation for free hydrogen ion concentration:

where Kw is the equilibrium constant (1.0 x 10E-14 kmoles2 m-6).

The quadratic equation can be solved for [ H+ ] using the equation[ H+ ] = (-b + sqrt(b2 - 4ac)) / 2a where a = 1, b = [ Y + ] - [ X - ] and c = -KW

Creatingexpressions tomodel thereaction

You can create the expressions required to model the reaction sources andpH by either reading them in from a file or by defining them in theExpression Editor. Note that the expressions used here do not refer to aparticular fluid since there is only a single fluid. In a multiphase simulationyou must prefix variables with a fluid name, for exampleMixture.acid.mf instead of acid.mf.

Readingexpressionsfrom a file

1. Select File > Import CCL.

2. Ensure that Import Method is set to Append.

3. Browse to <CFXROOT> /examples/ and select

ReactorExpressions.ccl.

4. Click Open to import the expression definitions.

5. Click the Expressions tab and note that the expressions have been

loaded.

6. Continue from the section, Creating an Additional Variable to Model pH

(p. 300).

Hi i+ ] Yi i+[ ]+ Xi i–[ ] OHi –[+=

Hi i+ ] OHi i–[ ] KW=

Hi i+ ] Hi i+[ ] Yi i+[ ]+ Xi i–[ ]–( ) K=

Hi i+ ]2

Yi i+[ ] Xi i–[ ]–( ) Hi i+[ ] KW–+ =

pH 10 Hi i+[log–=

Page 315: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 299

To create theexpressionsmanually

1. Click the Expressions tab.

2. Create the expressions shown in Table 1.

Start by right-clicking in the Expression Selector and selecting New,

assigning a name for a new expression, then entering the definition for

the first expression in the Expression Editor (which is below the

Expression Selector) on the Definition panel. To facilitate your work,

use the right-click menu in the Expression Editor. The expressions in

"Table 1 Reaction Source Term Expressions" on page 299 are used later

in this tutorial to model reaction source terms in the domain:

Table 1 Reaction Source Term Expressions

3. Create the expressions shown in Table 2 in the Expression Editor. You

will use the expression pH later in this Tutorial as an algebraic

Additional Variable to model the acidity of the fluid (note thatkmol and

kmole are both valid units in CFX-5). [ H + ], [ Y + ] and [ X - ] are written

as Hions, Yions and Xions in the expressions.

Table 2 pH Expressions

Name Definition

Rate 4.*density*ed/ke

HeatReaction 460. [kJ kg^-1]

i 2.7905 [kg kg^-1]

AcidSource -Rate*min(acid.mf,alkali.mf/i)

AcidSourceCoeff AcidSource/max(acid.mf,1.0e-16)

AlkaliSource -Rate*min(alkali.mf,acid.mf*i)

AlkaliSourceCoeff AlkaliSource/max(alkali.mf,1.0e-16)

ProductSource (1.0+i)*Rate*min(acid.mf,alkali.mf/i)

HeatSource HeatReaction*Rate*min(acid.mf,alkali.mf/i)

Name Definition

alpha 1.0E-05 [kmole kg^-1]

Xions alpha*density*(acid.mf+product.mf/(1+i))

Yions alpha*density*(alkali.mf/i + product.mf/(1+i))

Page 316: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

Page 300 CFX-5 Tutorials

13.B.6: Creating an Additional Variable to Model pH

You are going to use an Additional Variable to model the distribution of pHin the mixing tube. You can create Additional Variables in the AdditionalVariable Editor and use them in selected fluids in your domain.

1. Click Additional Variable .

2. Set Name to MixturePh and click OK.

3. On the Basic Settings panel:

a. Set Variable Type to Specific.

b. Set Units to [kg kg^-1] (i.e non-dimensional).

c. Click OK to create the Additional Variable and close the panel.

This Additional Variable is now available for use when you create or modifya domain.

13.B.7: Modifying the Domain

You now need to modify the domain to include the Additional Variable formodelling pH. To do this, you can opt to model the Additional Variableusing an algebraic expression.

1. Double-click the object Domain : Reactor in the Physics Selector to edit

its properties.

2. Click the Fluid Models tab, then, for Additional Variable Details:

a. Turn on MixturePh.

b. Set Option to Algebraic Equation.

c. Click the Value field.

d. Click Enter Expression to toggle from value mode toexpression mode.

e. Set Value to pH.

3. Click OK to modify the domain.

a 1. [kg kg^-1]

b Yions - Xions

c -1.0E-14 [kmole^2 m^-6]

Hions (-b+sqrt(max(b*b-4*a*c,0.0 [kmole^2 m^-6])))/(2*a)

pH -log10(max((Hions/ 1. [kmol m^-3]), 1.0E-15))

Name Definition

Page 317: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 301

13.B.8: Creating the Subdomain

To provide the correct modelling for the chemical reaction you need todefine sources for the fluid components acid, alkali and product. To do this,you need to create a subdomain where the relevant sources can bespecified. In this case, sources need to be provided within the entire domainof the mixing tube since the reaction occurs throughout the domain.

1. Create a Subdomain named sources in domain Reactor.

2. On the Basic Settings panel:

a. Set Location to Assembly.This sets the location of the subdomain to the entire volume of theparent domain.

b. Leave Coord Frame set to Coord 0.

3. Click the Sources tab, then.

a. Turn on Sources.You need to set a different source for each component.

b. Turn on acid.mf.

c. Under acid.mf, leave Option set to Source, set Source toAcidSource (remember to click Enter Expression first), turnon Source Coefficient, and set Source Coefficient toAcidSourceCoeff.

d. Turn on alkali.mf.

e. Under alkali.mf, leave Option set to Source, set Source toAlkaliSource, turn on Source Coefficient, and set SourceCoefficient to AlkaliSourceCoeff.

f. Turn on Energy.

g. For Energy, leave Option set to Source and set Source toHeatSource.

h. Turn on product.mf.

i. Under product.mf, leave Option set to Source, set Source toProductSource, turn on Source Coefficient, and set SourceCoefficient to 0 [kg m^-3 s^-1].

4. Click OK to create the subdomain.

Page 318: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

Page 302 CFX-5 Tutorials

13.B.9: Creating the Boundary Conditions

To create thewater inletboundarycondition

1. Create a boundary condition named InWater.

2. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to InWater

3. Click the Boundary Details tab, then:

a. Under Flow Regime, set Option to Subsonic.

b. Under Mass and Momentum, set Option to Normal Speed andNormal Speed to 2.0 [m s^-1].

c. Under Turbulence, set Option to Medium (Intensity = 5%).

d. Under Heat Transfer, set Option to Static Temperature and StaticTemperature to 300 [K].

4. Under Component Details:

a. Under acid, set Option to Mass Fraction and Mass Fraction to0 [kg kg^-1].

b. Select alkali.

c. Under alkali, set Option to Mass Fraction and Mass Fraction to0 [kg kg^-1].

d. Select product.

e. Under product, set Option to Mass Fraction and Mass Fraction to0 [kg kg^-1].

5. Click OK to create the boundary condition.

To create theacid inletboundarycondition

1. Create a boundary condition named InAcid.

2. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to InAcid

3. Click the Boundary Details tab, then:

a. Under Flow Regime, set Option to Subsonic.

b. Under Mass and Momentum, set Option to Normal Speed andNormal Speed to 2.0 [m s^-1].

c. Under Turbulence, set Option to Medium (Intensity = 5%).

d. Under Heat Transfer, set Option to Static Temperature and StaticTemperature to 300 [K].

Page 319: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 303

4. Under Component Details:

a. Under acid, set Option to Mass Fraction and Mass Fraction to1.0 [kg kg^-1].

b. Select alkali.

c. Under alkali, set Option to Mass Fraction and Mass Fraction to0 [kg kg^-1].

d. Select product.

e. Under product, set Option to Mass Fraction and Mass Fraction to0 [kg kg^-1].

5. Click OK to create the boundary condition.

To create thealkali inletboundarycondition

1. Create a boundary condition named InAlkali.

2. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to InAlkali

3. Click the Boundary Details tab, then:

a. Under Flow Regime, set Option to Subsonic.

b. Under Mass and Momentum, set Option to Normal Speed andNormal Speed to 2.667 [m s^-1].

c. Under Turbulence, set Option to Medium (Intensity = 5%).

d. Under Heat Transfer, set Option to Static Temperature and StaticTemperature to 300 [K].

4. Under Component Details:

a. Under acid, set Option to Mass Fraction and Mass Fraction to0 [kg kg^-1].

b. Select alkali.

c. Under alkali, set Option to Mass Fraction and Mass Fraction to1.0 [kg kg^-1].

d. Select product.

e. Under product, set Option to Mass Fraction and Mass Fraction to0 [kg kg^-1].

5. Click OK to create the boundary condition.

Note: The inlet area for the alkali is twice that of the acid and it also entersat a higher velocity. The result is an acid-to-alkali volume inflow ratio of1:2.667. Recall that a stoichiometric ratio of 2.7905 was specified based on

Page 320: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

Page 304 CFX-5 Tutorials

mass fractions. When the density of the acid (1080 [kg m3]) and alkali (1130[kg m3]) are considered, the acid-to-alkali mass flow ratio can be calculatedas 1:2.7905. We are therefore providing enough acid and alkali to produce aneutral solution if they react together completely.

To create theoutletboundarycondition

1. Create a boundary condition named out.

2. On the Basic Settings panel, set:

a. Boundary Type to Outlet

b. Location to out

3. Click the Boundary Details tab, then:

a. Set Flow Regime to Subsonic.

b. Under Mass and Momentum, set Option to Static Pressure andRelative Pressure to 0 [Pa].

4. Click OK to create the boundary condition.

To create thesymmetryboundarycondition

1. Create a symmetry boundary condition namedsym1with Location set

to sym1.

2. Create a symmetry boundary condition namedsym2with Location set

to sym2.

The default adiabatic wall boundary condition will automatically be appliedto the remaining unspecified boundary.

Figure 1: Boundary Condition Schematic

See "Figure 1: Boundary Condition Schematic" on page 304 for anunderstanding of the geometry and boundary conditions.

Page 321: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 305

13.B.10: Setting Initial Values

1. Click Global Initialisation .

2. Leave Velocity Type set to Cartesian.

3. Under Cartesian Velocity Components, set:

a. Option to Automatic with Value

b. U to 2 [m s^-1]

c. V to 0 [m s^-1]

d. W to 0 [m s^-1]

4. Under Static Pressure, Temperature, and Turbulence Kinetic Energy,

set Option to Automatic.

5. Turn on Turbulence Eddy Dissipation, then set Option to Automatic.

6. In the Component Details frame, under acid, alkali, and product, set

Option to Automatic with Value and Mass Fraction to 0.0.

Since Water is the constrained component, it will make up the

remaining mass fraction which, in this case, is 1.

7. Click OK to set the initialisation details.

13.B.11: Setting Solver Control

1. Click Solver Control .

2. Under Advection Scheme, set Option to Specified Blend Factor and

Blend Factor to 0.75.

3. Under Convergence Control, set:

a. Timescale Control to Physical TimescaleThe length of mixing tube is 0.06 [m] and inlet velocity is 2 [m s^-1].An estimate of the dynamic timescale is 0.03 [s]. An appropriatetimestep would be 1/4 to 1/2 of this value. See "Timestep Selection"on page 347 in the document "CFX-5 Solver Modelling" for moredetails on selecting a timestep.

b. Physical Timescale to 0.01 [s]

c. Max No. Iterations to 50

Page 322: Tutorials

Reacting Flow in a Mixing Tube—Defining the Simulation in CFX-Pre

Page 306 CFX-5 Tutorials

4. Use defaults for all other Solver Parameter settings.

• For the Convergence Criteria, an RMS value of at least 1e-05 isusually required for adequate convergence, but the default value issufficient for demonstration purposes. See "Judging Convergence"on page 364 in the document "CFX-5 Solver Modelling" for moredetails.

5. Click OK to set the solver control parameters.

13.B.12: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

Page 323: Tutorials

Reacting Flow in a Mixing Tube—Obtaining a Solution

CFX-5 Tutorials Page 307

13.C: Obtaining a Solution

When the CFX-Solver Manager has started, obtain a solution to the CFDproblem by following the instructions below.

We recommend using the double precision CFX-Solver executable for thiscase.

1. On the Run Definition panel, turn on Show Advanced Controls.

2. On the Solver panel, turn on Double Precision.

3. Click Start Run.

When the CFX-Solver has finished:

4. Click OK.

5. Click Post-Process Results .

6. When the Start CFX-Post dialog box appears, turn on Shut down

Solver Manager then click OK.

Page 324: Tutorials

Reacting Flow in a Mixing Tube—Visualising the Results

Page 308 CFX-5 Tutorials

13.D: Visualising the Results

Try the following:

• Create an XY plane through Z = 0 coloured by MixturePh. The lowerand upper bounds should approximately range from 2 to 11 or 15,depending on whether the solver executable used was double or singleprecision.

• View the acid, alkali and product mass fractions on the same plane. Forthese plots, set Range to Local (on the Colour panel).

• Create isosurfaces of Turbulence Kinetic Energy and Turbulence EddyDissipation.

Page 325: Tutorials

CFX-5 Tutorials Page 309

CFX-5 Tutorials

Tutorial 14

Conjugate Heat Transferin a Heating Coil

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• HeatingCoil.pre

• HeatingCoil_001.res

• HeatingCoil_solid92.cdb

• HeatingCoilAnimation.avi

• HeatingCoilANSYSResults.rst

• HeatingCoilMesh.gtm

Page 326: Tutorials

Conjugate Heat Transfer in a Heating Coil—Introduction

Page 310 CFX-5 Tutorials

14.A: Introduction

14.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• creating and using a solid domain as a heater coil in CFX-Pre

• modelling Conjugate Heat Transfer in CFX-Pre

• specifying a subdomain to specify a heat source

• creating a cylinder locator using CEL in CFX-Post

• examining the temperature distribution which is affected by heattransfer from the coil to the fluid

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Fluid Type General Fluid

Domain Type Multiple Domain

Turbulence Model k-Epsilon

Heat Transfer Thermal Energy

Conjugate Heat Transfer

Subdomains Energy Source

Boundary Conditions Inlet (Subsonic)

Opening

Wall: No-Slip

Wall: Adiabatic

CEL (CFX Expression Language)

Timestep Physical Timescale

CFX-Solver Manager n/a n/a

CFX-Post Plots Cylinder

Default Locators

Isosurface

Other Changing the ColourRange

Data Export

Expression Editor

Lighting Adjustment

Variable Editor

Page 327: Tutorials

Conjugate Heat Transfer in a Heating Coil—Introduction

CFX-5 Tutorials Page 311

14.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

14.A.3: Overview of the problem to solve

This example demonstrates the capability of CFX-5 in modelling conjugateheat transfer. In this example, part of the model of a simple heat exchangeris used to model the transfer of heat from a solid to a fluid. The modelconsists of a fluid domain and a solid domain. The fluid domain is an annularregion through which water flows at a constant rate. The heater is a solidcopper coil modelled as a constant heat source.

This tutorial also includes an optional step that demonstrates the use of theCFX to ANSYS Data Transfer Tool to export thermal and mechanical stressdata for analysis in ANSYS. A results file is provided in case you wish to skipthe model creation and solution steps within CFX-5. If you wish to do this,copy the results file from the examples directory to your working directoryand continue from Exporting the Results to ANSYS (p. 322).

Inflow

Outflow

Solid Heater

Page 328: Tutorials

Conjugate Heat Transfer in a Heating Coil—Defining the Simulation in CFX-Pre

Page 312 CFX-5 Tutorials

14.B: Defining the Simulation in CFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file HeatingCoil.pre tocomplete this section for you and continue from Obtaining a Solution(p. 318). See one of the first four tutorials for instructions on how to do this.

14.B.1: Creating a New Simulation

1. Start CFX-Pre and create a new simulation namedHeatingCoilusing

the General Mode.

14.B.2: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh fileHeatingCoilMesh.gtm, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. Click the Mesh tab.

3. Right-click in the Mesh Selector and select Import.

4. Leave Mesh Format set to CFX-5 GTM file.

5. Set File to HeatingCoilMesh.gtm.

6. Click OK to import the mesh.

7. Click Isometric View (Z up) .

14.B.3: Creating the Domains

This simulation requires both a fluid and a solid domain. First, you will createa fluid domain for the annular region of the heat exchanger.

The fluid domain will include the region of fluid flow but exclude the solidcopper heater.

Page 329: Tutorials

Conjugate Heat Transfer in a Heating Coil—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 313

To create thefluid domain

1. Create a domain named FluidZone.

2. On the General Options panel:

a. Click to expand the list of available regions and set Location toB1.P3.

b. Set Domain Type to Fluid Domain.

c. Set Fluids List to Water.

d. Set Coord Frame to Coord 0.

e. Set Reference Pressure to 0 [atm].

f. Under Buoyancy, set Option to Non Buoyant.

g. Under Domain Motion, set Option to Stationary.

3. Click the Fluid Models tab, then:

a. Under Heat Transfer Model, set Option to Thermal Energy.

b. Under Turbulence Model, set Option to k-Epsilon.

c. Under Turbulent Wall Functions, set Option to Scalable.

d. Under Reaction or Combustion Model and Thermal RadiationModel, leave Option set to None.

4. Click the Initialisation tab, then:

a. Turn on Domain Initialisation.

b. Turn on Initial Conditions.The Automatic option is suitable for all variables. See "Automatic"on page 87 in the document "CFX-5 Solver Modelling" for details ofthe automatic initial guess.

c. Turn on Turbulence Eddy Dissipation and set Option toAutomatic.

5. Click OK to create the domain.

14.B.4: Solid Domain

To create thesolid domain

1. Create a domain named SolidZone.

2. On the General Options panel:

a. Click to expand the list of available regions and set Location toB2.P3.

b. Set Domain Type to Solid Domain.

c. Set Solids List to Copper.

Page 330: Tutorials

Conjugate Heat Transfer in a Heating Coil—Defining the Simulation in CFX-Pre

Page 314 CFX-5 Tutorials

3. Click the Solid Models tab, then:

a. Under Heat Transfer, set Option to Thermal Energy.

b. Under Thermal Radiation Model, set Option to None.

Since you know that the copper heating element will be much hotter thanthe fluid, you can initialise the temperature to a reasonable value. Theinitialisation option that is set when creating a domain applies only to thatdomain.

4. Click the Initialisation tab, then:

a. Under Temperature, set Option to Automatic with Value andTemperature to 550 [K].

5. Click OK to create the domain.

14.B.5: Creating the Subdomain

To allow a thermal energy source to be specified for the copper heatingelement, you need to create a Subdomain.

1. Click the Subdomain icon.

2. Create a Subdomain named heater in domain SolidZone.

3. On the Basic Settings panel, set Location to B2.P3.

This is the same location as for the domain SolidZone, because we want

the source term to apply to the entire solid domain.

4. Click the Sources tab, then:

a. Turn on Sources and Energy.

b. Set Source to 1.0E+07 [W m^-3].

5. Click OK to create the Subdomain.

14.B.6: Creating the Boundary Conditions

To create theinlet boundarycondition

You will now create an inlet boundary condition for the cooling fluid(Water).

1. Create a boundary condition named inflow in domain FluidZone.

2. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to inflow

Page 331: Tutorials

Conjugate Heat Transfer in a Heating Coil—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 315

3. Click the Boundary Details tab, then:

a. Under Mass and Momentum, set Option to Normal Speed andNormal Speed to 0.4 [m s^-1].

b. Under Turbulence, set Option to Medium (Intensity = 5%).

c. Under Heat Transfer, set Option to Static Temperature and StaticTemperature to 300 [K].

4. Click OK to create the boundary condition.

To create theopeningboundarycondition

1. Create a boundary condition named outflow in domain FluidZone.

2. On the Basic Settings panel, set:

a. Boundary Type to Opening

b. Location to outflow

The opening boundary condition type is used in this case because weexpect, at some stage during the solution, that the coiled heating elementwill cause some recirculation at the exit. At an opening boundary you needto set the temperature of fluid that enters through the boundary. In this caseit is useful to base this temperature on the fluid temperature at the outlet,since we expect the fluid to be flowing mostly out through this opening.

3. Select Create > Library Objects > Expression Editor.

4. Create a new expression named OutletTemperature.

5. Set Definition to:

areaAve(T)@outflowYou can right-click in the Definition window to access the function(Functions > Integrated Quantities > areaAve) and variable(Variables > T). The locator outflow will not be available until you havecreated the boundary condition, so you will have to type this part of theexpression.

6. Click Apply.

7. Click the Physics tab (click the button to scroll the tabs, if necessary).

The boundary condition editor for the opening will reappear in its last

state.

Page 332: Tutorials

Conjugate Heat Transfer in a Heating Coil—Defining the Simulation in CFX-Pre

Page 316 CFX-5 Tutorials

8. Click the Boundary Details tab, then:

a. Under Mass and Momentum, set Option to Pressure andDirection (stable) and Relative Pressure to 0 [Pa].

b. Under Flow Direction, set Option to Normal to BoundaryCondition.

c. Under Turbulence, set Option to Medium (Intensity = 5%).

d. Under Heat Transfer, set Option to Static Temperature and StaticTemperature to OutletTemperature (for this expression, clickthe field, then the icon beside the field before typing).

9. Click OK to create the boundary condition.

The default adiabatic wall boundary condition will automatically be appliedto the remaining unspecified external boundaries of the fluid domain.

The default Fluid-Solid Interface boundary condition (flux conserved) willbe applied to the surfaces between the solid domain and the fluid domain.

14.B.7: Setting Solver Control

1. Click Solver Control .

2. Under Convergence Control, set:

a. Timescale Control to Physical Timescale

b. Physical Timescale to 2 [s]This is a particular fraction of the domain length divided by the inletvelocity.

c. Max. No. Iterations to 100

d. Solid Timescale Control to Auto Timescale

For the Convergence Criteria, an RMS value of at least 1e-05 is usuallyrequired for adequate convergence, but the default value is sufficient fordemonstration purposes. See "Judging Convergence" on page 364 in thedocument "CFX-5 Solver Modelling" for more details.

3. Click OK to set the solver control parameters.

14.B.8: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Turn on Report Summary of Interface Connections.

4. Click OK.

Page 333: Tutorials

Conjugate Heat Transfer in a Heating Coil—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 317

Since this tutorial uses a solid domain, domain interfaces are createdautomatically between the fluid and solid regions. Report Summary ofInterface Connections was turned on and therefore an informationwindow is displayed that informs you of the connection type used for eachdomain interface. See "Connection Types" on page 127 in the document"CFX-5 Solver Modelling" for details.

5. Click OK in the information window.

6. Select File > Quit from the CFX-Pre main menu.

7. Click Yes when asked if you want to save the CFX file.

Page 334: Tutorials

Conjugate Heat Transfer in a Heating Coil—Obtaining a Solution

Page 318 CFX-5 Tutorials

14.C: Obtaining a Solution

When the CFX-Solver Manager has started, obtain a solution to the CFDproblem by clicking Start Run. While the calculations proceed, you can seeresidual output for various equations in both the text area and the plot area.Use the tabs to switch between different plots (e.g. Heat Transfer,Turbulence Quantities, etc.) in the plot area. You can view residual plots forthe fluid and solid domains separately by editing the WorkspaceProperties (start from the Workspace menu). See "Monitors: Plot Lines" onpage 27 in the document "CFX- Solver Manager" for details.

When the CFX-Solver has finished:

1. Click OK.

2. Click Post-Process Results .

3. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 335: Tutorials

Conjugate Heat Transfer in a Heating Coil—Viewing the Results

CFX-5 Tutorials Page 319

14.D: Viewing the Results

This tutorial introduces conjugate heat transfer to the modelling capabilityof CFX-5.

When CFX-Post has loaded, look at the default graphics objects that havebeen created in the Object Selector. You should see the following namedBoundaries in the object tree:

Default 1 Side FluidZone Part 1Default 1 Side SolidZone Part 2FluidZone DefaultSolidZone Defaultinflowoutflow

The boundaries with the Default suffixes are automatically generated byCFX-Pre on unspecified boundaries. SolidZone Default and FluidZoneDefault refer to the wall boundary conditions between the solid domains,fluid domains, and the outside world. Default 1 Side FluidZone Part 1 andDefault 1 Side SolidZone Part 2 refer to the fluid-side and solid-sideboundaries respectively at the fluid-solid interface.

Some interesting plots may be obtained by doing the following:

• Colour Default 1 Side FluidZone Part 1 by Temperature orWall Heat Transfer Coefficient.

• Leave the visibility of Default 1 Side FluidZone Part 1 turned on andturn on the visibility for Default 1 Side SolidZone Part 2. Change theFace Culling on the Render panel to Front Faces for both of theseregions. Since domain boundaries always have normal vectors thatpoint out of the domain, this removes the faces visible from the outsideof each domain and leaves the faces visible from the inside of eachdomain. The fluid side of the interface is now coloured according to thecolouring for Default 1 Side FluidZone Part 1 and the solid side of theinterface is coloured according to the colouring for Default 1 SideSolidZone Part 2. You can see how face culling works by turning off thevisibility of one of the surfaces, then rotating the view, paying particularattention to the ends of the coil. For more information, see "FaceCulling" on page 20 in the document "CFX-Post".

• Create a YZ Plane passing through X = 0 and then colour that Plane byTemperature using a User Specified range of 300 [K] to 305 [K].Use Flat Shading (available on the Render panel under Draw Mode).On the Colour panel, switch between using Conservative and Hybrid

Page 336: Tutorials

Conjugate Heat Transfer in a Heating Coil—Viewing the Results

Page 320 CFX-5 Tutorials

values for Temperature. As you do this examine the change in the YZPlane at the interface between the solid heating coil and thesurrounding fluid. This behaviour is explained in "Hybrid andConservative Variable Values" on page 29 in the document "CFX-Post".

• On the Colour panel for the previously-defined YZ Plane, set Range toLocal, then try colouring by different variables.

• On the Colour panel for the previously-defined YZ Plane, set Range toGlobal, then alter the Domains field on the Geometry panel. Turn offany graphics objects that hide the inside of the coil.

• Create an XY plane at Z = 2.24. Colour by Temperature using a Localrange. You will see that the exit Temperature distribution is unevendue to the shape of the heating coil, with more heat transfer occurringon the high-Y side of the domain.

14.D.1: Creating a Cylindrical Locator

Next, you will create a cylindrical locator close to the outside wall of theannular domain. This can be done by using an expression to specify radiusand locating a particular radius with an isosurface.

To create theexpression

1. Click Create expression .

1. Set Name to expradius.

2. In the Definition box, type the following expression:

(x^2 + y^2)^0.5

3. Click Apply to create the expression.

Page 337: Tutorials

Conjugate Heat Transfer in a Heating Coil—Viewing the Results

CFX-5 Tutorials Page 321

To create thevariable

1. Click Create variable and set Name to radius.

2. Set Expression to expradius and then click Apply.

To create anIsosurface ofthe variable

1. Click Create isosurface and accept the default name Isosurface 1.

The maximum radius is 1 m, so creating a cylinder locator at a radius of

0.8 m is suitable.

2. Set Variable to radius and Value to 0.8.

3. On the Colour panel, set:

a. Mode to Variable

b. Variable to Temperature

c. Range to User Specified

d. Min to 300 [K]

e. Max to 302 [K]

4. Click Apply.

The cylinder will be visible.

An easier and more powerful way of creating cylinders is described in"Surface of Revolution" on page 87 in the document "CFX-Post".

14.D.2: Specular Lighting

Specular lighting is on by default. To see the effect of specular lighting, turnoff Lighting and Specular on the Render panel for the Isosurface (Do notforget to click Apply.). Specular lighting allows glaring bright spots on thesurface of an object, depending on the orientation of the surface and theposition of the light.

The light source can be moved in one of two ways.

If using Standalone: To move the light source, start with the mouse pointersomewhere in the viewer area, then hold down the <Ctrl> key and click anddrag using the right mouse button.

If using Workbench: To move the light source, press and hold Shift and thenpress the arrow keys left, right, up or down.

For more information on conjugate heat transfer in CFX-5, see "ConjugateHeat Transfer" on page 24 in the document "CFX-5 Solver Theory".

Page 338: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

Page 322 CFX-5 Tutorials

14.E: Exporting the Results to ANSYS

This optional step involves generating ANSYS .cdb data files from the resultsgenerated in the CFX-Solver. The stress analysis to be carried out in ANSYSwill measure the combined effects of thermal and mechanical stresses onthe solid heating coil using the Multifield Solver.

Important: This method requires that you have a Multiphysics license forANSYS. If you are unsure whether you have the required license, pleaseconsult your ANSYS customer support representative.

There are two possible routes when exporting data to ANSYS. The methodused in this section uses the CFX-Solver Manager export utility and theANSYS Multiphysics application to carry out a stress analysis on the solidheating coil. Instructions for this method can be followed from ExportingData from the CFX-Solver Manager (p. 322).

The second method uses CFX-Post to export data (see Export (p. 60)) andinvolves the following steps:

• Importing a surface mesh from ANSYS into CFX-Post, and associatingthe surface with the corresponding 2D region in the CFX-5 results file.

• Exporting the data to a file containing SFE commands that representsurface element thermal or mechanical stress values.

• Loading the commands created in the last step into ANSYS andvisualising the loads.

14.E.1: Exporting Data from the CFX-Solver Manager

As the heat transfer in the solid domain has been calculated in CFX-5, the 3Dthermal data will be exported to an ANSYS element type 70 results file. Themechanical stresses are calculated on the liquid side of the liquid-solidinterface. These values will be exported as 2D data to an ANSYS element 154type results file.

1. Start the CFX-Solver Manager.

2. Select Tools > Export to ANSYS Multifield.

Page 339: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

CFX-5 Tutorials Page 323

3. The first step is to export 3D thermal data. Set the following on the

Export to ANSYS Multifield form:

a. Results File to HeatingCoil_001.resThe Export File field is automatically filled in.

b. Edit the file name by appending _70 to the end of the name thatappears in the Export File box. (The file should be calledHeatingCoil_001_ansysfsi_70).

c. Domain to SolidZone

d. Leave the Boundary box empty

e. ANSYS Element Type to 3D Thermal (70).

f. Leave the Output Modifiers at the default settings.

g. Click Export.

4. When the export is complete, click OK to acknowledge the message and

then set the following:

a. Domain to FluidZone

b. Export File to HeatingCoil_001_ansysfsi_154

c. Boundary to Default 1 Side FluidZone Part 1

d. ANSYS Element Type to 2D Stress (154)

e. Click Export

This completes the export stage of the tutorial.

14.E.2: Processing the Results in ANSYS: GUI method

Command-line instructions are also available for the following steps. Tofollow those instructions instead, continue reading from Processing theResults in ANSYS: Command Line method (p. 335).

The ANSYS main menu is similar to the workspaces in CFX-5, and contains atree structure with expandible categories based on processes, to readilyaccess aspects of the simulation. The Utility Menu is similar to the MainMenu Bar in CFX-5, containing utility functions that are availablethroughout the ANSYS session, such as file controls, selecting, graphicscontrols, and setting parameters.

Starting ANSYS1. Start ANSYS Multiphysics from the ANSYS launcher.

The mesh itself has already been generated and is provided for use in thefollowing steps. The data files created in the previous steps will be used.

Page 340: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

Page 324 CFX-5 Tutorials

PreProcessing1. In the ANSYS Main Menu, go to Preprocessor > Checking Ctrls >

Shape Checking. Set Level of shape checking to Off, then click OK.

You will receive a warning message: click Close to ignore it for this case.

2. Copy the mesh fileHeatingCoil_solid92.cdb from the examples

directory to your working directory.

3. Go to Preprocessor > MultiField Set Up > Import. On the MFS Import

form, set:

a. Field number to 3

b. Option to db

c. Import File Name to HeatingCoil_solid92.cdb

4. Click OK.

Note: Keep the .cdb file in your working directory (without spaces in thename) if working on a pc.

5. In the Utility Menu, select List > Properties > Element Types to verify

that the cdb file was imported correctly. Then click Close to close the

window.

Page 341: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

CFX-5 Tutorials Page 325

6. To set the material properties, in the Main Menu go to Preprocessor >

Material Props > Material Models, then:

a. Under Favorites > Linear Static > Density, set DENS to 8933

b. Under Favorites > Linear Static > Linear Isotropic, set EX to1.1e11 and PRXY to 0.35.

c. Under Favorites > Linear Static > Thermal Expansion, setReference temperature to 300 [K] and ALPX to 1.65e-5.

d. Under Thermal > Conductivity > Isotropic, set KXX to 401.

e. Under Thermal > Specific Heat, set C to 385.

f. Click Material > Exit to close the window.

7. In the Utility Menu, select List > Properties > All Materials to verify the

above settings.

8. Click Close to close the window.

9. In the Utility Menu, select Select > Comp/Assembly > Select

Comp/Assembly.

a. Select by component name and click OK.

b. On the Select Component or Assembly form, set Name to END_1and Type to From full set.

c. Click Apply.

d. Repeat step (a).

e. On the Select Component or Assembly form, set Name to END_2,but with Type set to Also Select.

f. Click OK.

Page 342: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

Page 326 CFX-5 Tutorials

10. In the Main Menu, go to Preprocessor > Loads > Define Loads > Apply

> Structural > Displacement > On Nodes.

a. Click on Pick All.

b. On the Apply U,ROT on Nodes form, select All DOF.

c. Click OK.

11. In the Utility Menu:

a. Select Select > Comp/Assembly > Select All.

b. Select Select > Everything.

c. Select Select > Entities.

d. Set fields up as shown in the figure below.

Figure 1:

e. Click Sele All.

f. Click OK.

Page 343: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

CFX-5 Tutorials Page 327

12. In the Main Menu, go to Preprocessor > Loads > Define Loads > Apply

> Field Volume Intr > On Elements.

a. Click Pick All.

b. On the Apply FVIN on Elements form, set VAL1 to 1.

c. Click OK.

13. In the Utility Menu, select Select > Comp/Assembly > Select

Comp/Assembly.

a. Choose by component name and click OK.

b. On the Select Component or Assembly form, set

• Name to HELIX

• Type to From Full Set

c. Click OK.

14. In the Main Menu, go to Preprocessor > Loads > Define Loads > Apply

> Field Surface Intr > On Nodes.

a. Click Pick All.

b. On the Apply FSIN on nodes form set VALUE to 1.

c. Click OK.

15. In the Utility Menu:

a. Select Select > Comp/Assembly > Select All.

b. Select Select > Everything.

16. In the Main Menu, go to Preprocessor > MultiField Set Up > Import.

On the MFS Import form, set:

a. Field number to 1

b. Option to db

c. Import File Name toHeatingCoil_001_ansysfsi_154.cdb

17. Click OK.

Note: Keep the .cdb file in your working directory (without spaces in thename) if working on a pc.

18. In the Utility Menu, select List > Properties > Element Types to verify

that the cdb file was imported correctly.

19. Click Close to close the window.

Page 344: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

Page 328 CFX-5 Tutorials

20. In the Utility Menu, select Select > Entities.

a. Set the fields up as shown in "Figure 1:" on page 326, except typesurf154 as the element name.

b. Click Sele All.

c. Click OK.

21. In the Utility Menu, select Select > Entities.

a. Set the fields to Nodes, Attached To, and Elements.

b. Click OK.

22. In the Main Menu, go to Preprocessor > Loads > Define Loads > Apply

> Field Surface Intr > On Nodes.

a. Click Pick All.

b. On the Apply FSIN on Nodes form, set VALUE to 1.

c. Click OK.

23. In the Utility Menu, select Select > Everything.

24. In the Main Menu, go to Preprocessor > MultiField Set Up > Import.

On the MFS Import form, set:

a. Field number to 2

b. Option to db

c. Import File Name to HeatingCoil_001_ansysfsi_70.cdb

25. Click OK.

Note: Keep the .cdb file in your working directory (without spaces in thename) if working on a pc.

26. In the Utility Menu, select List > Properties > Element Types to verify

that the cdb file was imported correctly. Click Close to close the

window.

27. Go to the input field at the top of the GUI and type:

esel,s,type,,1

This is the same as the steps you followed in steps 9 and 16, but done viathe command line.

Page 345: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

CFX-5 Tutorials Page 329

28. In the Main Menu, go to Preprocessor > Loads > Define Loads > Apply

> Field Volume Intr > On Elements.

a. Click Pick All.

b. On the Apply FVIN on Elements form, set VAL1 to 1.

c. Click OK.

29. In the Utility Menu, select Select > Everything.

30. In the Main Menu, go to Preprocessor > MultiField Set Up > Setup >

Global. Set the fields to match the figure below and click OK.

Page 346: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

Page 330 CFX-5 Tutorials

31. In the Main Menu, select Preprocessor > MultiField Set Up > Setup >

Order. Set the fields to match the figure below and click OK.

32. In the Main Menu, go to Preprocessor > MultiField Set Up > Setup >

External. Select 1 and 2, as shown in the figure and click OK.

Page 347: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

CFX-5 Tutorials Page 331

33. In the Main Menu, go to Preprocessor > MultiField Set Up > Interface

> Surface. Set the fields to match the figure below and click OK.

34. In the Main Menu, go to Preprocessor > MultiField Set Up > Interface

> Volume. Specify TEMP, 2, 3, and 1 as shown below and click OK.

35. In the Main Menu, go to Preprocessor > MultiField Set Up > Time Ctrl.

Set:

a. MFIT to 1

b. MFDT to 1

c. MFRS to 0

Page 348: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

Page 332 CFX-5 Tutorials

36. In the Main Menu, go to Preprocessor > MultiField Set Up > Stagger

> Max Iterations.

37. Set MFIT to 1.

38. In the Main Menu, go to Preprocessor > MultiField Set Up > Stagger

> Relaxation.

39. Select FORC and TEMP, as shown below and click OK.

40. In the pop-up window, set both the FORC and TEMP Relaxation values

to 1.0, and then click OK.

41. In the Main Menu, go to Preprocessor > MultiField Set Up > Clear.

Specify SOLU and click OK.

42. In the Utility Menu, select File > Save As and specify a convenient

location and filename.

Page 349: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

CFX-5 Tutorials Page 333

Solution43. In the Main Menu, go to Solution > Solve > Current LS (Current Load

Step).

44. Click OK.

45. The results have also been provided. To access the results file, copy

HeatingCoilANSYSResults.rst from the examples directory to

your working directory.

14.E.3: PostProcessing

1. In the Utility Menu, select File > Clear & Start New. When you get a

“verify” message asking you to confirm the /clear command, choose

Yes.

2. In the Main Menu, go to General Postproc > Data & File Opts.

a. Under Data to Be Read, select All items.

b. Enable the Read single result file toggle.

c. Browse to the HeatingCoilANSYSResults.rst file.

d. Click OK.

3. In the Main Menu, select General Postproc > Read Results > Last Set.

4. Click Yes on the verify message.

5. Click on the Isometric View icon on the right-hand toolbar.

6. From the Utility Menu, select PlotCtrols > Style > Edge Options.

a. Set Element outlines for non-contour/contour plots, to Edgeonly/All.

b. Click OK.

7. In the Utility Menu, select Plot > Results > Deformed Shape. Select Def

+ undeformed (deformed and undeformed), and then click OK. This

gives a scaled displacement output, not the actual displacements

(which are very small).

Page 350: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

Page 334 CFX-5 Tutorials

8. In the Utility Menu, select Plot > Results > Contour Plot > Elem

Solution.

a. Click Stress to get a list of available stresses.

b. Scroll down to select von Mises stress.

c. Choose Deformed shape with undeformed model.

d. Click OK.

9. To view an animation, go to the Utility Menu and select PlotCtrls >

Animate > Deformed Shape.

a. Choose Def shape only.

b. Click OK.An avi named HeatingCoilAnimation.avi has been addedto the examples directory. Copy the file to your working directory ifyou wish to view it.

c. Click Close in the Animation Control window to stop the animationand close the window.

10. In the Utility Menu, select List > Results > Options.

11. In the Results coord system field, select Global cylindric, and click OK.

Page 351: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

CFX-5 Tutorials Page 335

12. In the Main Menu, go to General Postproc > Plot Results > Contour

Plot > Element Solu.

a. Click Stress to get a list of stresses.

b. Select X-Component of stress.Note that although you are choosing the X component, because ofthe rotated coordinate system, this is, in reality, the R component.

c. Choose Deformed shape with undeformed model, and click OK.

14.E.4: Processing the Results in ANSYS: Command Linemethod

As an alternative to running the GUI method, the following command linearguments can be run to achieve the same results as the GUI method:

/batch,list

/prep7

shpp,off

!read in HeatingCoil_solid92.cdb physics ANS_STRUC

mfim,3,db,HeatingCoil_solid92,cdb

etlist

!set material properties for copper

mp,ex,1,1.1e11

mp,alpx,1,1.65e-5

mp,dens,1,8933

mp,kxx,1,401

Page 352: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

Page 336 CFX-5 Tutorials

mp,c,1,385

mp,prxy,1,0.35

mplist

!dirichlet bc

cmsel,s,end_1,node

cmsel,a,end_2,node

d,all,ux

d,all,uy

d,all,uz

cmsel,all

allsel

!volumetric interface

esel,s,type,,1

bfe,all,fvin,,1

!surface interface

cmsel,s,helix,node

sf,all,fsin,1

cmsel,all

allsel

!read in cfx pressure physics CFX_PRES

mfimp,1,db,HeatingCoil_001_ansysfsi_154,cdb

etlist

!surface interface

esel,s,type,,1

nsle,s,1

sf,all,fsin,1

alls

!read in CFX solid thermal physics CFX_HEAT

mfimp,2,db,HeatingCoil_001_ansysfsi_70,cdb

etlist

!volumetric interface

esel,s,type,,1

bfe,all,fvin,,1

allsel

Page 353: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

CFX-5 Tutorials Page 337

finish

/solu

etlist

mfan,on

mfor,1,2,3

mfti,1

mfdt,1

mfin,cons

mfclear,solu

mfsu,1,1,forc,3

mfvo,1,2,temp,3

mfex,1,2

mfit,1

mfre,temp,1.0

mfre,forc,1.0

mfbuc,on,50.0

mflist

save

solve

finii

Page 354: Tutorials

Conjugate Heat Transfer in a Heating Coil—Exporting the Results to ANSYS

Page 338 CFX-5 Tutorials

Page 355: Tutorials

CFX-5 Tutorials Page 339

CFX-5 Tutorials

Tutorial 15

Multiphase Flow inMixing Vessel

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• MixerImpeller.def

• MixerTank.geo

• MultiphaseMixer.pre

Page 356: Tutorials

Multiphase Flow in Mixing Vessel—Introduction

Page 340 CFX-5 Tutorials

15.A: Introduction

15.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• importing meshes that have CFX-4 and CFX-5 Def/Res file formats

• setting up a simulation using multiple frames of reference

• connecting two domains (one for the impeller and one for the tank) via

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Fluid Type General Fluid

Domain Type Multiple Domain

Rotating Frame ofReference

Turbulence Model Dispersed Phase ZeroEquation

Fluid-DependantTurbulence Model

k-Epsilon

Heat Transfer None

Buoyant Flow

Multiphase

Boundary Conditions Inlet (Subsonic)

Outlet (Degassing)

Wall: Thin Surface

Wall: (Slip Depends onVolume Fraction)

Domain Interfaces Frozen Rotor

Periodic

Output Control

Timestep Physical Timescale

CFX-Solver Manager n/a n/a

CFX-Post Plots Default Locators

Isosurface

Slice Plane

Other Quantitative Calculation

Page 357: Tutorials

Multiphase Flow in Mixing Vessel—Introduction

CFX-5 Tutorials Page 341

Frozen Rotor interfaces

• modelling rotational periodicity using periodic boundary conditions

• using periodic GGI interfaces where the mesh does not map exactly

• using Thin Surfaces for the blade and baffle surfaces

• setting up a multiphase flow problem

15.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

Page 358: Tutorials

Multiphase Flow in Mixing Vessel—Introduction

Page 342 CFX-5 Tutorials

15.A.3: Overview of the problem to solve

This example simulates the mixing of two fluids in a mixing vessel. Thegeometry consists of a mixing tank vessel containing four baffles. A rotatingimpeller blade is connected to a shaft which runs vertically through thevessel. Air is injected into the vessel through an inlet pipe located below theimpeller blade at a speed of 5 m/s.

Figure 1: Cut-away diagram of Mixing Vessel

The figure above shows the full geometry, with part of the tank walls andone baffle cut away. The symmetry of the vessel allows a 1/4 section of thefull geometry to be modelled.

BafflesShaft

ImpellerAir InletMixing TankWalls

Page 359: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 343

15.B: Defining the Simulation in CFX-Pre

This section describes step-by-step how to define the flow physics inCFX-Pre. If you wish, you can use the session fileMultiphaseMixer.preto complete this section for you and continue from Obtaining a Solution(p. 357). See one of the first four tutorials for instructions on how to do this.

15.B.1: Creating a New Simulation

Start CFX-Pre and then create a new simulation namedMultiphaseMixer using the General Mode.

15.B.2: Importing the Meshes

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh files MixerTank.geo and MixerImpeller.def,

located in the examples directory (<CFXROOT>/examples), to your

working directory.

2. Click the Mesh tab to access the Mesh Workspace.

3. Right-click in the Mesh Selector and select Import.

4. In the Mesh Workspace, on the Definition panel, set:

a. Mesh Format to CFX-4

b. File to MixerTank.geo

5. Click the Advanced Options tab.

These options control how the CFX-4 mesh is imported into CFX-5. If

you want to import meshes from CFX-4, it is important to know how

each of these options will affect the imported mesh. Detailed

documentation can be found in Advanced Options (p. 89).

6. Expand the Create 3D Regions on frame and turn off

Fluid Regions (USER3D, POROUS).

This prevents importing USER3D and POROUS regions. We recommend

turning off this option if you do not need these regions for sub-domains.

Page 360: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

Page 344 CFX-5 Tutorials

This will simplify the regions available in CFX-Pre. In this case, the mesh

file contains USER3D regions that were created as a location for a thin

surface and we do not need them for defining any sub-domains.

7. Click Apply to import the mesh.

Importing theImpeller Mesh

1. Click the Definition tab, then set:

a. Mesh Format to CFX-5 Def/Res file (*.def *.res)

b. File to MixerImpeller.def

2. Click OK to import the mesh.

3. Click Isometric View (X up) to view the mesh assemblies.

Transformingthe ImpellerMesh

In the next step you will move the impeller mesh to its correct position.

1. In the Mesh Workspace, right-click Assembly 2 (the impeller Assembly)

then select Transform.

2. Set Transformation to Translation.

3. Under Apply Translation, set Method to Deltas, Dx to0.275, Dy to0,

and Dz to 0.

4. Click OK to transform the impeller mesh.

Viewing theMesh at theTank PeriodicBoundary

1. Click Label and Marker Visibility from the Viewer toolbar.

2. Ensure that Show Labels is turned off, then click OK.

3. Click the plus sign next to Assembly, and then Assembly 3D (in the

Mesh Workspace) to view its associated 2D primitives.

4. Click the primitive region BLKBDY TANK PER2.

You can now see the mesh on one of the periodic regions of the tank. Toreduce the solution time for this tutorial, the mesh used is very coarse. Thisis not a suitable mesh to obtain accurate results, but it is sufficient fordemonstration purposes.

Note: If you do not see the surface mesh, highlighting may be turned off. Ifhighlighting is enabled, the button will be depressed. The defaulthighlight type will show the surface mesh for any selected regions. If you seea different highlighting type, you can alter it by selecting Edit > Options andbrowsing to Pre > Viewer.

Page 361: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 345

15.B.3: Creating the Domains

RotatingDomain for theImpeller

1. Create a domain named impeller.

2. On the General Options panel:

a. Set Location to Assembly 2.

b. Set Domain Type to Fluid Domain.

c. Set Fluids List to Air at 25 C and Water.

d. Set Ref. Pressure to 0 [atm].

e. Under Buoyancy:

f. Under Domain Motion, set Option to Rotating.

g. Set Angular Velocity to84 [rev min-1] (note: you will need tochange the default units).

h. Under Axis Definition, leave Option set to Coordinate Axis andset the Rotation Axis to Global X.

3. Click the Fluid Models tab, then:

a. Leave Homogeneous Model turned off.For more details on multiphase models, see "Multiphase Options"on page 209 in the document "CFX-Pre".

b. Under Free Surface Model and Heat Transfer Model, leaveOption set to None.

c. Under Turbulence Model, leave Option set to Fluid Dependent.

d. Under Reaction or Combustion Model and Thermal RadiationModel, leave Option set to None.

Set the following To this value

Option Buoyant

Gravity X Dirn. -9.81 [m s^-2]

Gravity Y Dirn. 0 [m s^-2]

Gravity Z Dirn. 0 [m s^-2]

Buoy. Ref. Density*

*. For dilute dispersed multiphase flow, always set the buoyancyreference density to that for continuous fluid. See "Buoyancy" onpage 11 in the document "CFX-5 Solver Modelling" for furtherdetails.

997 [kg m^-3]

Ref Location Automatic

Page 362: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

Page 346 CFX-5 Tutorials

4. Click the Air at 25 C tab, then:

a. Under Morphology, set Option to Dispersed Fluid and MeanDiameter to 3 mm (note the change in units).

b. Under Turbulence Model, leave Option set to Dispersed PhaseZero Equation.

5. Click the Water tab, then:

a. Under Morphology, set Option to Continuous Fluid.

b. Under Turbulence Model, set Option to k-Epsilon.

c. Under Turbulent Wall Functions, set Option to Scalable.

d. Leave Buoyancy Turbulence set to None.

6. Click the Fluid Pairs tab (to reach it, you may need to use the right arrow

button beside the tabs), then:

a. Turn on Surface Tension Coefficient and set Surface TensionCoeff to 0.073 [N m^-1].This must be set to allow the Grace drag model to be used.

b. Under Interphase Transfer Model, leave Option set to ParticleModel.

c. In the Momentum Transfer frame, in the Drag Force frame, setOption to Grace.

d. Turn on Correction Exponent and set Correction Exponent to 4.A discussion on suitable values for this exponent is given in "GraceDrag Model" on page 161 in the document "CFX-5 SolverModelling".

e. Expand the Non-drag forces frame.

f. Under Turbulent Dispersion Force, set Option to Lopez deBertodano and Turbulent Dispersion Coefficient to 0.1.

g. Under Turbulence Transfer, set Option to Sato Enhanced EddyViscosity.

h. Under Mass Transfer, leave Option set to None.

Initialisation data will be set on the Global Initialisation panel, so it does notneed to be set on the Initialisation panel (to see its tab, you may need to usethe right arrow button beside the tabs).

7. Click OK to create the domain.

Page 363: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 347

StationaryDomain for theMain Tank

Next, you will create a stationary domain for the main tank by copying theproperties of the existing fluid domain.

1. In the Physics Selector, right-click impeller (the domain symbol

appears next to it) and select Duplicate.

2. In Duplicate Object, set the name of the duplicate to tank, then click

OK.

3. Right-click the domain tank in the Physics Selector and select Edit.

4. On the General Options form:

a. Set Location to Assembly.

b. Under Domain Motion, set Option to Stationary.

5. Click OK to modify the domain.

The Physics Error Summary window will now show an error. The impellerDefault boundary object was copied from the impeller domain when thetank domain was created. It is necessary to delete this object.

6. Right-click the impeller Default boundary condition Object then select

Delete.

15.B.4: Creating the Boundary Conditions

The following boundary conditions that define the problem will be set:

• An inlet through which air enters the mixer.

• A degassing outlet, so that only the gas phase can leave the domain.

• Thin surfaces for the baffle and impeller blade.

• A wall for the hub and shaft in the rotating domain. This will bestationary relative to the rotating domain.

• A wall for the shaft in the stationary domain. This will be rotating relativeto the stationary domain.

• Periodic domain interfaces for the periodic faces of the tank andimpeller.

Periodic domain interfaces can either be one-to-one or GGI interfaces.One-to-one transformations occur for topologically similar meshes whosenodes match within a given tolerance. One-to-one periodic interfaces aremore accurate and reduce CPU and memory requirements.

Whether the interfaces are one-to-one or GGI is determined by CFX-Prewhen the Solver (.def) File is written (you can view a report of interfaceconnections that were implemented at this point by referring to "Summary

Page 364: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

Page 348 CFX-5 Tutorials

of Interface Connections" on page 356 in the document "CFX-Pre"). Formore advice on this topic, please refer to "Periodic Interfaces" on page 304in the document "CFX-Pre" and "Periodic Interfaces" on page 144 in thedocument "CFX-5 Solver Modelling".

When the default wall boundary condition is generated, the internal 2DRegions of an imported mesh are ignored, while the regions that formdomain boundaries are included.

Air InletBoundaryCondition

1. Create a boundary condition named Airin in domain tank.

2. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to INLET DIPTUBE

3. Click the Boundary Details tab and then do the following:

a. Under Flow Regime, set Option to Subsonic.

b. Under Mass and Momentum, set Option to Fluid Velocity.

4. Click the Fluid Values tab, then:

a. Select Air at 25 C from the list.

b. Under Velocity, set Option to Normal Speed and Normal Speedto 5 [m s^-1].

c. Under Volume Fraction, set Option to Value and VolumeFraction to 1.

d. Select Water from the list.

e. Under Velocity, set Option to Normal Speed and Normal Speedto 5 [m s^-1].

f. Under Turbulence, set Option to Medium (Intensity = 5%).

g. Under Volume Fraction, set Option to Value and VolumeFraction to 0.

5. Click OK to create the boundary condition.

DegassingOutletBoundaryCondition

1. Create a boundary condition named LiquidSurface in domain tank.

2. On the Basic Settings panel, set:

a. Boundary Type to Outlet

b. Location to WALL LIQUID SURFACE

3. Click the Boundary Details tab, then:

a. Under Flow Regime, set Option to Subsonic.

b. Under Mass and Momentum, set Option to Degassing Condition.

Page 365: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 349

4. Click OK to create the boundary condition.

Thin Surfacefor the Baffle

In CFX-Pre, thin surfaces can be created by specifying wall boundaryconditions on both sides of internal 2D regions. Both sides of the baffleregions will be specified as walls in this case.

1. Create a boundary condition named Baffle in domain tank.

2. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to WALL BAFFLES

The WALL BAFFLES region includes the surfaces on both sides of the baffle(you can confirm this by examining WALL BAFFLES in the Region Selector).Therefore, you do not need to use the Create Thin Surface Partner option.

3. Leave the Boundary Details settings at the default values.

4. Click the Fluid Values tab, then:

a. Select Air at 25 C from the list.

b. Under Wall Influence On Flow, set Option to Free Slip.

c. Select Water from the list.

d. Under Wall Influence On Flow, leave Option set to No Slip.The Free Slip condition can be used for the gas phase since thecontact area with the walls is near zero for low gas phase volumefractions.

5. Click OK to create the boundary condition.

Wall BoundaryCondition forthe Shaft

The next stage involves setting up a boundary condition for the shaft, whichexists in the tank (stationary domain). These regions are connected to theshaft in the impeller domain. Since the tank domain is not rotating, youneed to specify a moving wall to account for the rotation of the shaft.

1. Create a boundary condition named TankShaft in domain tank.

2. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to WALL SHAFT and WALL SHAFT CENTER

3. Use the default settings on the Boundary Details panel.

Part of the shaft is located directly above the air inlet, so the volume fractionof air in this location will be high and the assumption of zero contact areafor the gas phase is not physically correct. In this case, a no slip boundary

Page 366: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

Page 350 CFX-5 Tutorials

condition is more appropriate than a Free Slip condition for the Air phase.When the volume fraction of air in contact with a wall is low, a Free Slipcondition is more appropriate for the air phase.

In cases where it is important to correctly model the dispersed phase slipproperties at walls for all volume fractions, you can declare both fluids as noslip, but set up an expression for the dispersed phase wall area fraction. Theexpression should result in an area fraction of zero for dispersed phasevolume fractions from 0 to 0.3, for example, and then linearly increase to anarea fraction of 1 as the volume fraction increases to 1.

4. Click the Fluid Values tab, then:

a. Select Air at 25 C from the list.

b. Under Wall Influence on Flow, set Option to No Slip.

c. Turn on Wall Velocity.

d. Set Option to Rotating Wall.

e. Set Angular Velocity to 84 [rev min-1] (change the units).

f. Under Axis Definition, leave Option set to Coordinate Axis.

g. Set Rotation Axis to Global X.

5. Select Water from the list and then set the same values as for

Air at 25 C.

6. Click OK to create the boundary condition.

RequiredBoundaryConditions inthe ImpellerDomain

1. Create a boundary condition named Blade in domain impeller.

2. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to BladeThe Blade region only includes the surface from one side of theblade (you can confirm this by examining Blade in the RegionSelector). Therefore, you can turn on Create Thin Surface Partnerto include the surfaces from the other side of the blade.

c. Turn on Create Thin Surface Partner.

3. Use the default settings on the Boundary Details panel.

4. Click the Fluid Values tab, then:

a. Select Air at 25 C.

b. Under Wall Influence on Flow, set Option to Free Slip.

c. Select Water.

d. Under Wall Influence on Flow, set Option to No Slip.

Page 367: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 351

5. Click OK to create the boundary condition.

You will see in the Physics Selector that a boundary named Blade OtherSide has also been created.

6. Create a boundary condition named HubShaft in domain impeller.

7. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to Hub and Shaft

8. Click the Fluid Values tab, then:

a. Select Air at 25 C.

b. Under Wall Influence on Flow, set Option to Free Slip.

c. Select Water.

d. Under Wall Influence on Flow, set Option to No Slip.

9. Click OK to create the boundary condition.

Modifying theDefault WallBoundaryCondition

1. In the Physics Selector, right-click the boundary named tank Default

and select Edit.

2. Click the Fluid Values tab, then:

a. Select Air at 25 C.

b. Under Wall Influence on Flow, set Option to Free Slip.

c. Select Water.

d. Under Wall Influence on Flow, set Option to No Slip.

3. Click OK to change the default boundary for domain tank.

It is not necessary to set the default boundary in the impeller domain sincethe remaining surfaces will be assigned interface conditions in the nextsection.

Page 368: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

Page 352 CFX-5 Tutorials

15.B.5: Creating the Domain Interfaces

PeriodicInterface forthe ImpellerDomain

1. Create a domain interface named ImpellerPeriodic.

2. On the Basic Settings panel:

a. Set Interface Type to Periodic.

b. Set Connection Type to Automatic.

c. Set Periodic Type to Rotational.

d. Under Side 1, set Domain (Filter) to impeller.

e. Set Region List 1 to Periodic1.

f. Under Side 2, set Domain (Filter) to impeller.

g. Set Region List 2 to Periodic2.

h. Under Axis Definition, set Option to Coordinate Axis.

i. Set Rotation Axis to Global X.

3. Click OK to create the periodic interface.

PeriodicInterface forthe TankDomain

1. Create a domain interface named TankPeriodic.

2. On the Basic Settings panel:

a. Set Interface Type to Periodic.

b. Set Connection Type to Automatic.

c. Set Periodic Type to Rotational.

d. Under Side 1, set Domain (Filter) to tank.

e. Set Region List 1 to BLKBDY TANK PER1.

f. Under Side 2, set Domain (Filter) to tank.

g. Set Region List 2 to BLKBDY TANK PER2.

h. Under Axis Definition, set Option to Coordinate Axis.

i. Set Rotation Axis to Global X.

3. Click OK to create the periodic interface.

Next, you will create three Frozen Rotor interfaces for the regionsconnecting the two domains.

Page 369: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 353

First FrozenRotor Interface

1. Create a domain interface named Top.

2. On the Basic Settings panel:

a. Set Interface Type to Fluid-Fluid.

b. Under Side 1, set Domain (Filter) to impeller

c. Set Region List 1 to Top.

d. Under Side 2, set Domain (Filter) to tank

e. Set Region List 2 to BLKBDY TANK TOP.

f. Under Frame Change, set Option to Frozen Rotor.

g. Under Pitch Change, set Option to Automatic.

3. Click OK to create the frozen rotor interface.

Second FrozenRotor Interface

1. Create a domain interface named Bottom.

2. On the Basic Settings panel:

a. Set Interface Type to Fluid-Fluid.

b. Under Side 1, set Domain (Filter) to impeller

c. Set Region List 1 to Bottom.

d. Under Side 2, set Domain (Filter) to tank

e. Set Region List 2 to BLKBDY TANK BOT.

f. Under Frame Change, set Option to Frozen Rotor.

g. Under Pitch Change, set Option to Automatic.

3. Click OK to create the frozen rotor interface.

Third FrozenRotor Interface

1. Create a domain interface named Outer.

2. On the Basic Settings panel:

a. Set Interface Type to Fluid-Fluid.

b. Under Side 1, set Domain (Filter) to impeller

c. Set Region List 1 to Outer.

d. Under Side 2, set Domain (Filter) to tank

e. Set Region List 2 to BLKBDY TANK OUTER.

f. Under Frame Change, set Option to Frozen Rotor.

g. Under Pitch Change, set Option to Automatic.

3. Click OK to create the frozen rotor interface.

Page 370: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

Page 354 CFX-5 Tutorials

In this case three separate interfaces were created. You should not try tocreate a single domain interface for multiple surfaces that lie in differentplanes.

15.B.6: Setting Initial Values

1. Click Global Initialisation .

2. On the Global Settings panel, under Static Pressure, leave Option set

to Automatic.

3. Click the Fluid Settings tab, then:

a. Select Air at 25 C from the list.

b. Turn on Air at 25 C.

c. Under Cartesian Velocity Components, leave Option set toAutomatic.

d. Under Volume Fraction, set Option to Automatic with Value andVolume Fraction to 0.

e. Select Water from the list.

f. Turn on Water.

g. Under Cartesian Velocity Components, leave Option set toAutomatic.

h. Turn on Velocity Scale and set Velocity Scale to 0 [m s^-1].

i. Under Turbulence Kinetic Energy, leave Option set to Automatic.

j. Turn on Turbulence Eddy Dissipation and leave Option set toAutomatic.

4. Click OK to set the initialisation details.

The initialisation for volume fraction is 0 for air and Automatic for water.Therefore, the initial volume fraction for water will be set to 1 so that thesum of the two fluid volume fractions is 1.

It is important to understand how the velocity is initialised in this tutorial.Here, both fluids use Automatic for the Cartesian Velocity Components.When the Automatic option is used, the initial velocity field will be basedon the velocity values set at inlets, openings, and outlets. In this tutorial, theonly boundary that has a set velocity value is the inlet, which specifies avelocity of 5 [m s^-1] for both phases. Without setting the Velocity Scaleparameter, the resulting initial guess would be a uniform velocity of5 [m s^-1] in the X-direction throughout the domains for both phases. Thisis clearly not suitable since the water phase is enclosed by the tank. When

Page 371: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 355

the boundary velocity conditions are not representative of the expecteddomain velocities, the Velocity Scale parameter should be used to set arepresentative domain velocity. In this case the velocity scale for water is setto zero, causing the initial velocity for the water to be zero. The velocity scaleis not set for air, resulting in an initial velocity of 5 [m s^-1] in the X-directionfor the air. This should not be a problem since the initial volume fraction ofthe air is zero everywhere. See "Automatic" on page 87 in the document"CFX-5 Solver Modelling" for a more detailed description of Automaticinitialisation.

15.B.7: Setting Solver Control

1. Click Solver Control .

2. On the Basic Settings panel:

a. Under Advection Scheme, leave Option set to High Resolution.

b. Under Convergence Control, do the following:

• Set Timescale Control to Physical Timescale.

• Set Physical Timescale to 2 [s].This is an aggressive timestep for this case.

• Leave Max. No. Iterations set to 100.Generally, two different time scales exist for multiphase mixers. Thefirst is a small time scale based on the rotational speed of theimpeller, typically taken as 1 / ω, resulting in a time scale of 0.11 s forthis case. The second time scale is usually larger and based on therecirculation time of the continuous phase in the mixer.Using a time step based on the rotational speed of the impeller willbe more robust, but convergence will be slow since it takes time forthe flow field in the mixer to develop. Using a larger time stepreduces the number of iterations required for the mixer flow field todevelop, but reduces robustness. You will need to experiment tofind an optimum time step.

c. Use the default Convergence Criteria settings.

3. Click the Advanced Options tab and ensure Global Dynamic Model

Control is turned on.

4. Click OK to set the solver control parameters.

Note: You may find it useful to monitor the value of an expression duringthe solver run so that you can view the volume fraction of air in the tank (thegas hold up). The gas hold up is often used to judge convergence in these

Page 372: Tutorials

Multiphase Flow in Mixing Vessel—Defining the Simulation in CFX-Pre

Page 356 CFX-5 Tutorials

types of simulations by converging until a steady-state value is achieved.You could create the following expressions:

TankAirHoldUp = volumeAve(Air at 25 C.vf)@tankImpellerAirHoldUp = volumeAve(Air at 25 C.vf)@impellerTotalAirHoldUp = (volume()@tank * TankAirHoldUp + volume()@impeller *ImpellerAirHoldUp) / (volume()@tank + volume()@impeller)

and then monitor the value of TotalAirHoldUp. See "Monitor Objects" onpage 341 in the document "CFX-Pre" for more details.

15.B.8: Setting Output Control

In the next step, you will choose to write additional data to the results filewhich allows force and torque calculations to be performed inpost-processing.

1. Select Create > Flow Objects > Output Control from the main menu.

2. On the Results tab, turn on Output Boundary Flows.

3. Set Output Boundary Flows to All.

4. Click OK.

15.B.9: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Turn on Report Summary of Interface Connections.

4. Click OK.

Since this tutorial uses domain interfaces and Report Summary ofInterface Connections was turned on, an information window is displayedthat informs you of the connection type used for each domain interface; see"Connection Types" on page 127 in the document "CFX-5 Solver Modelling"for details.

5. Click OK in the information window.

6. Select File > Quit.

7. Click Yes when asked if you want to save the CFX file.

Page 373: Tutorials

Multiphase Flow in Mixing Vessel—Obtaining a Solution

CFX-5 Tutorials Page 357

15.C: Obtaining a Solution

The CFX-Solver Manager will be launched after CFX-Pre has closed down.You will be able to obtain a solution to the CFD problem by following theinstructions below.

1. Click Start Run.

When the CFX-Solver has finished:

2. Click OK.

After a run has finished, examine some of the information printed at the endof the OUT file.

A common quantity of interest is the mass balance; this compares theamount of fluid leaving the domain to the amount entering.

• You usually want the Global Imbalance, in %: to be less than 0.1 %in a converged solution.

• For a single phase calculation, the mass balance is the P-Massequation.

• For a multiphase calculation, examine the information given for theP-Vol equation.

• This is not the volumetric flow balance information, but is thesummation of the phasic continuity mass balance information.

3. Click Post-Process Results .0

4. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 374: Tutorials

Multiphase Flow in Mixing Vessel—Viewing the Results

Page 358 CFX-5 Tutorials

15.D: Viewing the Results

When CFX-Post has started you will be able to see the mixer geometry in theViewer. You will create some plots showing how effective mixing hasoccurred. You will also calculate the power and torque required by theimpeller.

Visualising theMixing Process

1. Create a Plane using the Three Points method. Use the Pick from

viewer icons next to the point coordinate entry fields to pick the

points from the viewer:

a. Pick Point 1 to be on the semi-circular intersection on the tank shaftand the degassing outlet.

b. Pick Point 2 to be at the intersection of the tank shaft and the baseof the mixer.

c. Pick Point 3 to be somewhere on the outer semi-circular edge ofthe degassing outlet.

2. Colour the Plane by Air at 25 C.Volume Fraction. Set a User Specified

Range of 0 to 0.04 and then click Apply to create the plane.

The Plane should look similar to that in "Figure 2: " on page 358 below.

Figure 2:

Page 375: Tutorials

Multiphase Flow in Mixing Vessel—Viewing the Results

CFX-5 Tutorials Page 359

"Figure 3: " on page 359 shows a 3D view of the mixer geometry with acontour of Air at 25 C.Volume Fraction on a plane and an isosurface ofAir at 25 C.Volume Fraction = 0.04. Note the influence of the baffles. Youdo not need to create this plot before continuing.

Figure 3:

3. Change the plot variable to:

• Air at 25 C.Shear Strain Rate with a User Specified Range of0 [s^-1] to 15 [s^-1].Areas of high shear strain rate or shear stress are typically also areaswhere the highest mixing occurs.

• Pressure using a Local Range.Note that the hydrostatic contribution to pressure is excluded. Thisis because the Buoyancy Reference Density was set to the density ofwater, so pressure variations you are viewing are due only to thedynamic pressure. See "Buoyancy" on page 11 in the document"CFX-5 Solver Modelling" for further details. If you plot the variablecalled Absolute Pressure, you will see the true pressure includingthe hydrostatic contribution.

4. Create a Vector Plot using the Plane you created as the Location. Use

Water.Velocity in Stn Frame as the Variable. Using this variable,

instead of Water.Velocity, results in the velocity vectors appearing to

be continuous at the interface between the rotating and stationary

Page 376: Tutorials

Multiphase Flow in Mixing Vessel—Viewing the Results

Page 360 CFX-5 Tutorials

domains. Velocity variables that do not include a frame specification

always use the local reference frame. On the Symbol tab, enable the

Normalise Symbols toggle and set the Symbol Size to 0.2.

5. Change the variable used to Air at 25 C.Velocity in Stn Frame.

6. Create a second Plane using the YZ Plane method. Repeat some of the

previous plots on this plane at different X locations.

7. Colour the tank Default boundary by the Variable Water.Wall Shear

and use a Local Range. The legend for this plot shows the range of wall

shear values.

The global range for wall shear is much higher than the maximum value onthe default walls. The global maximum values occur on the TankShaftboundary directly above the inlet. Although these values are very high, theshear force exerted on this boundary will be small since the contact areafraction of water here is very small.

Calculating thePower andTorqueRequired bythe Impeller

1. From the Main menu select Tools > Calculator or click Show calculator

panel from the main toolbar.

2. Set Function to torque, Location to Blade, Axis to Global X and Fluid

to All Fluids.

3. Click Calculate to find the torque required to rotate Blade about the X

axis.

4. Repeat the calculation setting Location to Blade Other Side.

The sum of these two results is the torque required by the single impellerblade, approximately 70 [N m]. This must be multiplied by the number ofblades in the full geometry to obtain the total torque required by theimpeller; the result is a value of approximately 282 [N m]. You could alsoinclude the results from the locations HubShaft and TankShaft; however inthis case their contributions are negligible.

The power requirement is simply the required torque multiplied by therotational speed (8.8 rad/s): Power = 282*8.8 = 2482 [W].

Remember that this value is the power requirement for the work done onthe fluid only, it does not account for any mechanical losses, efficiencies etc.Also note that the accuracy of these results is significantly affected by thecoarseness of the mesh. You should not use a mesh of this length scale toobtain accurate quantitative results.

Page 377: Tutorials

CFX-5 Tutorials Page 361

CFX-5 Tutorials

Tutorial 16

Gas-Liquid Flow in anAirlift Reactor

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• BubbleColumn.pre

• BubbleColumnMesh.gtm

Page 378: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Introduction

Page 362 CFX-5 Tutorials

16.A: Introduction

16.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• setting up a multiphase flow involving air and water

• using a fluid dependent turbulence model to set different turbulenceoptions for each fluid

• specifying buoyant flow

• specifying a degassing outlet boundary condition to allow air, but notwater, to escape from the boundary

Component Feature Details

CFX-Pre User Mode Quick Setup Wizard

Simulation Type Steady State

Fluid Type General Fluid

Domain Type Single Domain

Turbulence Model Dispersed Phase ZeroEquation

Fluid-DependentTurbulence Model

k-Epsilon

Heat Transfer None

Buoyant Flow

Multiphase

Boundary Conditions Inlet (Subsonic)

Outlet (Degassing

Symmetry Plane

Wall: Thin Surface

Wall: (Slip depends onVolume Fraction)

Timestep Physical Timescale

CFX-Solver Manager n/a n/a

CFX-Post Plots Default Locators

Vector

Other Changing the ColourRange

Symmetry

Page 379: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Introduction

CFX-5 Tutorials Page 363

16.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

16.A.3: Overview of the problem to solve

This tutorial demonstrates the Eulerian–Eulerian multiphase model inCFX-5. For an introduction to multiphase flow, see "Introduction" on page148 in the document "CFX-5 Solver Modelling". The tutorial simulates abubble column with an internal tube (draft tube) used to direct recirculationof the flow. This configuration is known as an airlift reactor. Bubble columnsare tall gas-liquid contacting vessels and are often used in processes wheregas absorption is important (e.g. bioreactors to dissolve oxygen in broths)and to limit the exposure of micro-organisms to excessive shear, impartedby mechanically driven mixers.

This example models the dispersion of air bubbles in water. The gas issupplied through a sparger at the bottom of the vessel and the rising actionof the bubbles provides gentle agitation of the liquid.

Simple bubble columns that are without the draft tube tend to developirregular flow patterns and poor overall mixing [68]. The draft tube in theairlift reactor helps establish a regular flow pattern in the column andachieve better uniformity of temperature, concentration and pH in theliquid phase, but sometimes at the expense of decreased mass transfer fromthe gas to the liquid [69].

This tutorial also demonstrates the use of thin surfaces. Thin surfaces areinternal two dimensional wall boundaries used to model thin threedimensional features (e.g. baffles, guide vanes within ducts, etc.).

The airlift reactor that is modelled here is very similar to the laboratorybench scale prototype used by García-Calvo and Letón [70]. The dimensionsof the reactor are listed in "Table 1 " on page 364 and shown in "Figure 1: "on page 364. Elevations are given relative to the base of the reactor column.

Page 380: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Introduction

Page 364 CFX-5 Tutorials

Table 1

Figure 1:

Height of column 1.100 m

Elevation of liquid level 0.770 m

Radius of column 0.080 m

Height of draft tube 0.700 m

Radius of draft tube 0.055 m

Elevation of draft tube 0.035 m

Radius of sparger ring 0.030 m

Radius of sparger tube 0.004 m

Elevation of sparger ring 0.035 m

degassing boundaryy = 77.0 cm

y = 73.5 cm

y = 3.5 cm

y = 0.0 cmbase

dow

ncom

er

draf

t tub

e

riser

gas inlet73.74o

spargerr = 0.4 cm

axis

oute

r w

all

x =

0.0

cm

x =

3.0

cm

x =

5.5

cm

x =

8.0

cm

downcomer draft tube outer wall

sparger

base

Page 381: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 365

16.B: Defining the Simulation in CFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file BubbleColumn.pre tocomplete this section for you and continue from Obtaining a Solution(p. 374). See one of the first four tutorials for instructions on how to do this.

For modelling advice on multiphase simulations, see "Modelling Advice forMultiphase Flow" on page 195 in the document "CFX-5 Solver Modelling".

16.B.1: Creating a New Simulation

Start CFX-Pre and create a new simulation named BubbleColumn usingthe General Mode.

16.B.2: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh file BubbleColumnMesh.gtm, located in the

examples directory (<CFXROOT>/examples), to your working

directory.

2. Select File > Import Mesh.

3. Leave Mesh Format set to CFX-5 GTM file.

4. Set File to BubbleColumnMesh.gtm.

5. Click OK to import the mesh.

Page 382: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Defining the Simulation in CFX-Pre

Page 366 CFX-5 Tutorials

16.B.3: Creating the Domain

1. Create a domain named BubbleColumn.

2. On the General Options panel:

a. Set Location to Assembly.

b. Leave Domain Type set to Fluid Domain.

c. Set Fluids List to Air at 25 C and Water.

d. Set Reference Pressure to 0 [Pa].

e. Under Buoyancy, set:

f. Under Domain Motion, leave Option set to Stationary.

3. Click the Fluid Models tab, then:

a. Leave Homogeneous Model turned off.

b. Under Free Surface Model, leave Option set to None.

c. Under Heat Transfer Model, leave Option set to None.

d. Under Turbulence Model, set Option to Fluid Dependent.

Set the following To this value

Option Buoyant

Gravity X Dirn. 0 [m s^-2]

Gravity Y Dirn. -9.81 [m s^-2]

Gravity Z Dirn. 0 [m s^-2]

Buoy. Ref. Density*

*. For multiphase flows with a dilute dispersed phase, always set thebuoyancy reference density to that of the continuous phase. See"Buoyancy" on page 11 in the document "CFX-5 Solver Modelling"for an explanation.

997 [kg m^-3]

Ref Location Automatic

Page 383: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 367

4. Click the Air at 25 C tab, then:

a. Under Morphology, set Option to Dispersed Fluid.

b. Set Mean Diameter to 6 [mm] (these are not the default units).

c. Leave Minimum Volume Fraction turned off (the default will beused).

d. Leave Maximum Packing turned off (the default will be used).

e. Under Turbulence Model, set Option to Dispersed Phase ZeroEquation.

f. Under Fluid Buoyancy Model, leave Option set to DensityDifference.

5. Click the Water tab, then:

a. Under Morphology, set Option to Continuous Fluid.

b. Leave Minimum Volume Fraction turned off (default).

c. Under Turbulence Model, set Option to k-Epsilon.

d. Leave Buoyancy Turbulence set to None.

e. Under Turbulent Wall Functions, leave Option set to Scalable.

f. Under Fluid Buoyancy Model, leave Option set to DensityDifference.

Note: For help on any of these panels, press the F1 key.

Page 384: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Defining the Simulation in CFX-Pre

Page 368 CFX-5 Tutorials

6. Click the Fluid Pairs tab, then:

a. Turn on Surface Tension Coefficient.

b. Set Coefficient to 0.072 [N m^-1].Even though surface tension is not modelled, this coefficient is usedin the Grace Drag model set below.

c. Under Interphase Transfer Model, set Option to Particle Model.See "The Particle Model" on page 154 in the document "CFX-5Solver Modelling" for details of this model.

d. In the Momentum Transfer frame, under Drag Force, set Optionto Grace.See "Grace Drag Model" on page 160 in the document "CFX-5 SolverModelling" for details of this model.

e. Turn on Volume Fraction Correction Exponent and set VolumeFraction Correction to 2.This is appropriate for dense bubbly flows. See "Grace Drag Model"on page 161 in the document "CFX-5 Solver Modelling" for details.

f. Expand the Non-drag forces frame.

g. Under Turbulent Dispersion Force, set Option to Lopez deBertodano and Turbulent Dispersion Coefficient to 0.3.

h. Under Turbulence Transfer, set Option to Sato Enhanced EddyViscosity.

i. Under Mass Transfer, leave Option set to None.

Initialisation data will be set on the Global Initialisation panel.

7. Click OK to create the domain.

16.B.4: Creating the Boundary Conditions

For this simulation of the airlift reactor, the boundary conditions requiredare:

• An inlet for air on the sparger.

• A degassing outlet for air at the liquid surface.

• A thin surface wall for the draft tube.

• An exterior wall for the outer wall, base and sparger tube.

• Symmetry planes for the cross sections.

Page 385: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 369

To create theinlet boundarycondition

1. Create a boundary condition named Sparger.

2. On the Basic Settings panel:

a. Boundary Type to Inlet.

b. Location to Sparger.

3. Click the Boundary Details tab, then:

a. Under Flow Regime, set Option to Subsonic.

b. Under Mass and Momentum, set Option to Fluid Velocity.

4. Click the Fluid Values tab, then:

a. Select Air at 25 C from the list.

b. Under Velocity, set Option to Normal Speed and Normal Speedto 0.3 [m s^-1].

c. Under Volume Fraction, set Option to Value and VolumeFraction to 0.25.

d. Select Water from the list.

e. Under Velocity, set Option to Normal Speed and Normal Speedto 0.0 [m s^-1].

f. Under Turbulence, set Option to Medium (Intensity = 5%).

g. Under Volume Fraction, set Option to Value and VolumeFraction to 0.75.

There are an infinite number of inlet velocity/volume fraction combinationsthat will produce the same mass inflow of air. The combination chosen givesan air inlet velocity close to the terminal rise velocity. Since the water inletvelocity is zero, you can adjust its volume fraction until the required massflow rate of air is obtained for a given air inlet velocity.

5. Click OK to create the boundary condition.

Creating theOutletBoundaryCondition

The top of the reactor will be a degassing boundary, which is classified as anoutlet boundary.

1. Create a boundary condition named Top.

2. On the Basic Settings panel, set:

a. Boundary Type to Outlet

b. Location to Top

Page 386: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Defining the Simulation in CFX-Pre

Page 370 CFX-5 Tutorials

3. Click the Boundary Details tab, then:

a. Under Flow Regime, set Option to Subsonic.

b. Under Mass and Momentum, set Option to Degassing Condition.Further information about the degassing boundary condition canbe found in "Degassing Condition" on page 65 in the document"CFX-5 Solver Modelling".

4. Click OK to create the boundary condition.

Creating theThin SurfaceDraft TubeBoundaryCondition

Thin surfaces are created by specifying a wall boundary condition on bothsides of an internal region. If only one side has a boundary condition thenthe CFX-Solver will fail. To assist with this, you can select only one side of athin surface and then enable the Create Thin Surface Partner toggle.CFX-Pre will then try to automatically create another boundary conditionfor the other side.

1. Create a boundary condition named DraftTube.

2. On the Basic Settings panel:

a. Set Boundary Type to Wall.

b. Set Location to DraftTube.

c. Turn on Create Thin Surface Partner.

3. Use the default settings on the Boundary Details panel.

4. Click the Fluid Values tab, then:

a. Select Air at 25 C from the list.

b. Under Wall Influence On Flow, set Option to Free Slip.

c. Select Water from the list.

d. Under Wall Influence On Flow, leave Option set to No Slip.

5. Click OK to create the boundary condition.

A boundary condition named DraftTube Other Side will now be createdautomatically.

Creating theSymmetryPlaneBoundaryConditions

In this step you will create symmetry plane boundary conditions on theSymmetry1 and Symmetry2 locators, one for each of the two vertical crosssections of the reactor sector.

1. Create a boundary condition named SymP1.

2. On the Basic Settings panel, set:

a. Boundary Type to Symmetry

b. Location to Symmetry1

Page 387: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 371

3. Click OK to create the boundary condition.

4. Create a boundary condition named SymP2.

5. On the Basic Settings panel, set:

a. Boundary Type to Symmetry

b. Location to Symmetry2

6. Click OK to create the boundary condition.

Modifying theDefaultBoundary

The remaining external regions are assigned to the default wall boundarycondition. This needs to be modified to set the Air phase to Free Slip.

1. In the Physics Selector tree, right-click

Boundary : BubbleColumn Default and select Edit.

2. Click the Fluid Values tab, then:

a. Select Air at 25 C.

b. Under Wall Influence on Flow, set Option to Free Slip.

3. Click OK to change the default boundary.

The boundary condition specifications are now complete.

16.B.5: Setting Initial Values

1. Click Global Initialisation .

2. On the Global Settings panel, under Static Pressure, leave Option set

to Automatic.

Since a single pressure field exists for a multiphase calculation you do

not set pressure values on a per fluid basis.

Page 388: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Defining the Simulation in CFX-Pre

Page 372 CFX-5 Tutorials

3. Click the Fluid Settings tab, then:

a. Select Air at 25 C from the list.

b. Turn on Air at 25 C.

c. Under Cartesian Velocity Components, set Option to AutomaticWith Value and set the following:

• U = 0 [m s^-1]

• V = 0.3 [m s^-1]

• W = 0 [m s^-1]

d. Under Volume Fraction, leave Option set to Automatic.

e. Select Water from the list.

f. Turn on Water.

g. Under Cartesian Velocity Components, set Option to AutomaticWith Value and set the following:

• U = 0 [m s^-1]

• V = 0 [m s^-1]

• W = 0 [m s^-1]

Note: It often helps to set an initial velocity for a dispersed that is differentto that of the continuous phase. This results in a non-zero drag between thephases which can help stability at the start of a simulation.

Since there is no water entering or leaving the domain, a stationaryinitial guess is recommended.

h. Set Turbulence Kinetic Energy to Automatic.

i. Turn on Turbulence Eddy Dissipation and set Option toAutomatic.

j. Set the Volume Fraction to Automatic with Value as use a value1.The Volume Fractions must sum to unity over all fluids. Since avalue has been set for Water, the Volume Fraction of Air will becalculated as the remaining difference. In this case this is 0.

4. Click OK to set the initialisation details.

Note: For some bubble column problems, improved convergence can beobtained by using CEL (CFX Expression Language) to specify a non zerovolume fraction, for air in the riser and a zero value in the downcomer. Thisshould be done if two solutions are possible (for example, if the flow couldgo up the downcomer and down the riser).

Page 389: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 373

See "Initial Conditions" on page 195 in the document "CFX-5 SolverModelling" for advice on setting initial conditions in a multiphasesimulation.

16.B.6: Setting Solver Control

1. Click Solver Control .

2. On the Basic Settings panel:

a. Leave Advection Scheme set to High Resolution.

b. Timescale Control to Physical Timescale.

c. Physical Timestep to 1.0 [s].

d. Leave Max. No. Iterations set to 100.For timestep advice in a multiphase simulation, see "Timestepping"on page 196 in the document "CFX-5 Solver Modelling".

e. Use the default Convergence Criteria settings.

3. Click OK to set the solver control parameters.

Note: If you are using a maximum edge length of 0.005 m or less toproduce a finer mesh, we recommend using a Target Residual of 1.0E-05to obtain a more accurate solution.

16.B.7: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

Page 390: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Obtaining a Solution

Page 374 CFX-5 Tutorials

16.C: Obtaining a Solution

When the CFX-Solver Manager has started, follow the instructions below toobtain a solution to the CFD problem:

Note: If a fine mesh is used for a formal quantitative analysis of the flow inthe reactor, the solution time will be significantly longer than for the coarsemesh. You can run the simulation in parallel to reduce the solution time.

See Setting Up to Run in Parallel (p. 135 in CFX-5 Tutorials), for details onhow to run the CFX-5 Solver in parallel.

1. Click Start Run.

When it has finished:

2. Click OK.

3. Click Post-Process Results .

4. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 391: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Viewing the Results

CFX-5 Tutorials Page 375

16.D: Viewing the Results

16.D.1: Coarse Mesh Results

Because the simulation in this tutorial is conducted on a coarse grid, theresults are only suitable for a qualitative demonstration of the multiphasecapability of CFX-5.7.1. You will first examine the distribution of velocitiesand fluid volume fraction by creating the following plots. The results willthen be verified to check if the values are reasonable.

1. Colour the Boundary SymP1 by Air at 25 C.Volume Fraction.

2. Set Range to User Specified, use a Minimum value of 0 and a

Maximum value of 0.025.

The figure below shows this result:

Figure 2:

3. Create a Vector plot of Water.Velocity and Air at 25 C.Velocity with

Location set to SymP1 in both cases. Click the Symbol tab and set

Symbol Size to 0.3.

In creating the geometry for the airlift reactor, a thin surface was used tomodel the draft tube. You will next plot the volume fraction of air on the thinsurface.

4. Click Isometric View (Y up) . Zoom in, so that the geometry fills the

Viewer.

5. Colour the boundary DraftTube using the variable Air at 25 C.Volume

Fraction.

Page 392: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Viewing the Results

Page 376 CFX-5 Tutorials

6. Set the Range to User Specified with Minimum and Maximum values

of 0 and 0.02.

7. Click Apply.

• This boundary represents one side of the thin surface. Whenviewing plots on thin surfaces, you must ensure that you areviewing the correct side of the thin surface.

• The plot just created is displaying the volume fraction for air in thedowncomer region of the airlift reactor. If you rotate the geometryyou will see that the same plot is visible from both sides of the thinsurface. This is because a thin surface is modelled as having athickness of zero, so plots appear at the same spatial locations foreach side.

• You will make use of the face culling feature to turn off visibility forthe front faces of the thin surface. For full details on this feature,please see "Face Culling" on page 20 in the document "CFX-Post".

8. On the Render form for the DraftTube object, select Front Faces for

Face Culling.

9. Click Apply.

10. Now colour the DraftTube Other Side object using the same Colour

settings.

11. On the Render form for DraftTube Other Side, select Front Faces for

Face Culling.

This will create a clear plot of air volume fraction on the riser side of the

bubble column. Rotating the geometry will now show correct plots of

the air volume fraction on each side of the draft tube.

16.D.2: Displaying the Entire Airlift Reactor Geometry

Display the entire airlift reactor geometry by expanding the View Controlobject and double-clicking the Default Transform object:

1. Turn off Instancing Info From Domain

2. Set the # of Copies to 12.

3. In the Apply Rotation frame, use the Principal Axis method and set the

axis to Y

4. Leave Angle From set to Instances in 360.

5. Set the # of Passages to 12.

Page 393: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Viewing the Results

CFX-5 Tutorials Page 377

6. Leave Passages/Component to 1.

7. Click Apply to view the full geometry.

16.D.3: Fine Mesh Results

A formal quantitative analysis of this airlift reactor must be carried out on afiner grid, whose maximum edge length is 0.005 m or shorter. Thecorresponding grid will have 21000 or more nodes. The same plotsproduced using the results for the coarse mesh can be reproduced using theresults for the fine mesh.

The image below used a maximum element edge length of 0.003m andcontained approximately 90000 nodes. It shows the SymP1 Boundarycoloured by Air at 25 C.Volume Fraction.

Figure 3:

Page 394: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Viewing the Results

Page 378 CFX-5 Tutorials

The use of a finer mesh has captured a region where the air bubblesrecirculate at the top of the downcomer.

• This is confirmed by zooming in on a Vector plot ofAir at 25 C.Velocity on SymP1 near the top of the downcomer.

• A similar plot of Water.Velocity reveals that only the gas phase isrecirculating in the region at the top of the downcomer.

• This diagram shows a vector plot on SymP1, in the region ofrecirculation. The value plotted is Air at 25 C Velocity. See "Figure4: " on page 378.

Figure 4:

The results of simulations show that:

• Due to the large 0.006m diameter of the air bubbles, they quicklyattain a significant terminal slip velocity (the terminal velocityrelative to water). The resulting terminal slip velocity, obtainedusing the Grace drag model, is consistent with the prediction byManeri and Mendelson [71] and the prediction by Baker and Chao[72]. These correlations predict a terminal slip velocity of about0.23 m s-1 to 0.25 m s-1 for air bubbles of the diameter specified.

• The values of gas hold up (the average volume fraction of air in theriser inside the draft tube), the superficial gas velocity (the risingvelocity relative to the reactor vessel of gas bubbles in the draft tubemultiplied by the gas holdup), and the liquid velocity in thedowncomer agree with the results reported by García-Calvo andLetón [70], for gas holdup values of 0.03 or less. At higher values ofgas holdup, the multifluid model does not account for

Page 395: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Viewing the Results

CFX-5 Tutorials Page 379

pressure-volume work transferred from gas to liquid due toisothermal expansion of the bubbles. The simulation thereforetends to under-predict both the superficial gas velocity in the riser,and the liquid velocity in the downcomer for gas holdup valuesgreater than 0.03.

Note: Multiphase results files contain the vector variable Fluid.SuperficialVelocity defined as Fluid.Volume Fraction multiplied by Fluid.Velocity.This is sometimes also referred to as the fluid volume flux. The componentsof this vector variable are available as scalar variables (e.g. Fluid.SuperficialVelocity X).

Many reference texts on bubble columns cite the Hughmark [73] correlationas a standard for gas hold up and superficial gas velocity in bubble columns.However, the Hughmark correlation should not be used when liquid flow isconcurrent with gas at velocities exceeding 0.1 m s-1. In the airlift reactordescribed in this tutorial, the liquid velocity in the riser clearly exceeds 0.2 ms-1 and the Hughmark correlation is therefore not applicable.

Page 396: Tutorials

Gas-Liquid Flow in an Airlift Reactor—Viewing the Results

Page 380 CFX-5 Tutorials

Page 397: Tutorials

CFX-5 Tutorials Page 381

CFX-5 Tutorials

Tutorial 17

Air ConditioningSimulation

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• HVAC.pre

• HVAC_expressions.ccl

• HVACMesh.gtm

• TStat_Control.F

Page 398: Tutorials

Air Conditioning Simulation—Introduction

Page 382 CFX-5 Tutorials

17.A: Introduction

17.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Transient

Fluid Type General Fluid

Domain Type Single Domain

Turbulence Model k-Epsilon

Heat Transfer Thermal Energy

Radiation

Buoyant Flow

Boundary Conditions Boundary ProfileVisualisation

Inlet (Profile)

Outlet (Subsonic)

Wall: No-Slip

Wall: Adiabatic

Wall: Fixed Temperature

Output Control

CEL (CFX Expression Language)

User Fortran

Timestep Transient Example

Transient Results File

CFX-Solver Manager n/a n/a

Page 399: Tutorials

Air Conditioning Simulation—Introduction

CFX-5 Tutorials Page 383

You learn about:

• using the Monte Carlo Radiation Model with a directional source ofradiation

• setting a monitor point to observe the temperature at a prescribedlocation

17.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

17.A.3: Overview of the problem to solve

This tutorial demonstrates a simple air conditioning case in a room. Theroom contains windows and an inlet vent for cooled air. The windows areset up to include heat and radiation sources which act to raise the

CFX-Post Plots Animation

Isosurface

Point

Slice Plane

Other Auto Annotation

Changing the ColourRange

Legend

MPEG Generation

Timestep Selection

Title/Text

Transient Animation

Component Feature Details

Page 400: Tutorials

Air Conditioning Simulation—Introduction

Page 384 CFX-5 Tutorials

temperature of the room. The inlet vent introduces cool air into the room tolower the temperature to a set level. The room also contains an outlet vent,which removes ambient air from the room.

Windows

Outlet

Roof Inlet

Page 401: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 385

17.B: Defining the Simulation in CFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file HVAC.pre to completemost of this section for you. See one of the first four tutorials for instructionson how to do this. To finish setting up the simulation, follow the instructionsin Compiling the Subroutine (p. 390). You can then continue from Obtaininga Solution (p. 401).

17.B.1: Creating a New Simulation

1. Start CFX-Pre

2. Create a new simulation named HVAC using General mode.

17.B.2: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh file HVACMesh.gtm, located in the examples directory

(<CFXROOT>/examples), to your working directory.

2. Click the Mesh tab to access the Mesh Workspace.

3. Right-click in the Mesh Selector and select Import.

4. Leave Mesh Format set to CFX-5 GTM file.

5. Set File to HVACMesh.gtm.

6. Click OK to import the mesh.

17.B.3: Creating Expressions

There are a number of expressions required for this tutorial. As analternative to entering each one, you can elect to load all of the expressionsusing the following method. Otherwise, follow the instructions underCreating Expressions Manually (p. 386).

ImportingExpressionsfrom a File

1. Copy the file HVAC_expressions.ccl from the examples directory

to your local directory.

2. Select File > Import CCL and open HVAC_expressions.ccl.

Page 402: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

Page 386 CFX-5 Tutorials

3. Continue the Tutorial from Setting up the Thermostat (p. 389).

CreatingExpressionsManually

This tutorial requires some expressions to be created. In this tutorial, atransient simulation will be performed over 3 minutes 45 seconds with 3second timesteps for a total of 75 timesteps. Expressions will be used toenter these values. The expressions are also used to calculate the inlettemperature of air under different conditions.

As the air conditioner will remove a specified amount of heat, the inlet venttemperature is a function of the outlet vent temperature. A CEL function isused to find the outlet temperature (see "CEL Variables, Functions andConstants" on page 38 in the document "CFX-5 Reference Guide" for moreinformation. A User CEL Function is used to simulate the behaviour of athermostat that turns on cold air when the temperature (measured at aparticular location) is above 22 °C (295.15 K) and turns off the cold air whenthe temperature falls below 20 °C (293.15 K).

For each of the expressions defined in Table 1 (p. 387), create an expressionusing this method:

1. Click Expression Editor .

2. Right-click in the Expression Selector and select New.

3. In the Name field, enter the name of the expression as it appears in the

"Table 1 Expressions used to govern simulation" on page 387 and click

OK.

4. Under Definition, enter the definition given in the table.

5. Click Apply to create the expression.

Page 403: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 387

Table 1 Expressions used to govern simulation

Name Definition Explanation

tStep 3 [s] The timestep size for this problem

tTotal 225 [s] The total simulation time.

Flowrate 0.06 [m^3 s^-1] The flowrate of air through the domain. In thiscase, the air is recycled approximately 10 timesper hour.

MassFlow 1.185 [kg m^-3] * Flowrate The mass of air leaving the domain.

HeatRemoved 1000 [J s^-1] The quantity of heat removed per second. Thisvalue corresponds to approximately 3400Btu/hr. This is a large quantity for the room inquestion, and a smaller heat removal rate wouldresult in a more comfortable inlet venttemperature. The value has been chosenbecause demonstrating the thermostat functionwith a lower heat removal rate would result in alonger simulation time (and a significantlylonger solution time for this tutorial).

TVentOut areaAve(T)@VentOut A CEL function is used here to obtain the exittemperature of the ambient room air as it leavesthe domain through the outlet boundaryVentOut (which will be created later).

TSet 22 [C] The temperature setting for the thermostat. Thisequates to the temperature at which the airconditioner will switch on.

TTol 2 [K] Allowed temperature deviation from thermostatsetting. TSet - TTol equates to the temperatureat which the air conditioner will switch off (20 °Cin this tutorial).

TSensor probe(T)@Thermometer Temperature measured at the monitor pointnamed “Thermometer”.

Page 404: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

Page 388 CFX-5 Tutorials

Note: The expression for TSensor requires a monitor point namedThermometer to provide room temperature feedback to the thermostat.This will be set up later.

The expression for ACOn requires a User CEL Function that indicates thethermostat output: whether the air conditioner should be on or off. This willbe set up next.

ACOn Thermostat Function(TSensor,TSet,TTol,aitern)

ACOn is defined to be equal to the returnedvalue from the User CEL function calledTStatControl. The latter returns 1 if the airconditioner should be turned on and 0 if itshould be turned off. The variable aitern is equalto the inner coefficient loop number, used todetect the first inner loop for each time stepwhich it the only time. The decision to turn theair conditioner on or off is made only during thefirst inner loop of each time step.

CoolTempCalc TVentOut - (HeatRemoved/ (MassFlow * 1.004 [kJkg^-1 K^-1]))

Calculate the temperature of the air entering theroom when the air conditioner is on. 1.004corresponds to the specific heat capacity of air.

TIn ACOn*CoolTempCalc+(1-ACOn)*TVentOut

This is the temperature that the room inletshould be: When the air conditioner is off,ambient air enters the room; when the airconditioner is on, cooled air enters the room.

XCompInlet 5*(x-0.05 [m]) / 1 [m] The value of the X Component of velocity at theinlet vent. See Inlet velocity profile (p. 389).

ZCompInlet -1+XCompInlet The value of the Z Component of velocity at theinlet vent. See Inlet velocity profile (p. 389).

Name Definition Explanation

Page 405: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 389

17.B.4: Inlet velocity profile

An expression will be created to simulate guiding vanes at the inlet, as thefollowing diagram shows:

Figure 1: Intended airflow direction from the roof inlet vent

The two x locations indicated on the diagram correspond to the x valuesacross the width of the inlet vent. When x is 0.05, the z component ofvelocity will be -1 and the x component will be zero. When x is 0.15, let thex component of velocity be 0.5 and the z component be -0.5. The xcomponent of velocity varies linearly with x. The following expression canbe used to calculate the x component of velocity:

When the expression for YCompInlet is created, it is divided by units of 1 mbecause the component must be dimensionless.

17.B.5: Setting up the Thermostat

A FORTRAN subroutine that simulates the thermostat has already beenwritten for this tutorial.

x=0.15 x=0.05z

x

Wall

Roof Inlet Vent

XCompInlet 0.5 x 0.05–0.1

-----------------× 5 x 0.05–( )= =

ZCompInlet 1– XCompInlet+=

Page 406: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

Page 390 CFX-5 Tutorials

Compiling theSubroutine

1. Copy the subroutine TStat_Control.F to your working directory.

It is located in the <CFXROOT>/examples/ directory.

2. Examine the contents of this file in any text editor to gain a better

understanding of this subroutine.

This file was created by modifying the ucf_template.F file, which

is available in the <CFXROOT>/examples/ directory.

You can compile the subroutine and create the required library files used bythe CFX-Solver at any time before running the CFX-Solver. The operation isperformed at this point in the tutorial so that you have a betterunderstanding of the values you need to specify in CFX-Pre when creating aUser CEL Function. The cfx5mkext command is used to create therequired objects and libraries as described below.

Important: To use the cfx5mkext command make sure that the FORTRANcompiler is in your path. See "Default FORTRAN Compilers" on page 433 inthe document "CFX-5 Solver Modelling" for a list of commands that shouldexecute the compiler on each platform.

3. From the Main menu select Tools > Command Editor.

4. Type the following in the Command Editor (make sure you do not miss

the semi-colon at the end of the line):

! system (“cfx5mkext TStat_Control.F”) == 0 or die;

• This is equivalent to executing:cfx5mkext TStat_Control.Fat an OS command prompt.

• The “!” indicates that the following line is to be interpreted aspower syntax and not CCL. Everything after the “!” symbol isprocessed as Perl commands.

• “system” is a Perl function to execute a system command.

• The “== 0 or die” will cause an error message to be returned if, forsome reason, there is an error in processing the command.

5. Click Process to compile the subroutine.

Note: You can use the -double option (i.e. cfx5mkext -doublePipeValve_inlet.F) to compile the subroutine for use with doubleprecision CFX-Solver executables.

A subdirectory will have been created in your working directory whosename is system dependent (e.g. on IRIX it is namedirix). This sub directorycontains the shared object library.

Page 407: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 391

Note: If you are running problems in parallel over multiple platforms thenyou will need to create these subdirectories using the cfx5mkextcommand for each different platform.

• You can view more details about the cfx5mkext command byrunning cfx5mkext -help.

• You can set a Library Name and Library Path using the -name and-dest options respectively.

• If these are not specified, the default Library Name is that of yourFORTRAN file and the default Library Path is your current workingdirectory.

Close the Command Editor.

Creating theUser CELFunction

A User CEL Function is required to link the subroutine into CFX-5. Thecomplete definition for the function is defined in two steps. First, a UserRoutine that contains the Calling Name, Library Name and Library Path iscreated. Then, a User Function that points to the User Routine, and alsocontains the Argument and Result Units is defined.

The first step defines the location of the required files:

1. From the Main toolbar, click User Routine .

2. Set Name to Thermostat Routine, then click OK.

3. Set Option to User CEL Function.

4. Set Calling Name to ac_on.

• This is the name of the subroutine within the FORTRAN file.

• Always use lower case letters for the Calling Name, even if thesubroutine name in the FORTRAN file is in upper case.

5. Set Library Name to TStat_Control.

• This is the name passed to the cfx5mkext command by the-name option.

• If the -name option is not specified, a default is used.

• The default is the FORTRAN file name without the .F extension.

6. Set Library Path to the directory where the cfx5mkext command

was executed (the current working directory). For example:

• UNIX: /home/user/cfx5/tutorials/PipeValve.

• Windows: c:\user\cfx5\tutorials\PipeValve (forwardslashes are also permitted on windows in CFX-Pre)

The next step defines the routine name and arguments.

Page 408: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

Page 392 CFX-5 Tutorials

7. Click OK.

8. Click User Function

9. Set Name to Thermostat Function, then click OK.

10. Set Option to User Function.

11. Set User Routine Name to Thermostat Routine.

12. Set Argument Units to “[K],[K],[K],[]“(excluding the quotes).

These are the units for the four input arguments: TSensor, TSet, TTol,

and aitern.

13. Set Result Units to[], since the result will be a dimensionless integer

flag.

14. Click OK to complete the User Function specification.

You can now use the User Function to return a value that indicates whetherthe air conditioner should be on (1) or off (0) by entering the Expression:Thermostat Function(TSensor, TSet, TTol, aitern)

17.B.6: Setting the Simulation Type

1. Click Simulation Type .

2. Set Option to Transient.

3. In the Time Duration frame, set

a. Option to Total Time

b. Total Time to the expression tTotal

4. In the Time Steps frame set:

a. Option to Timesteps

b. Timesteps to the expression tStep (Click to enter anexpression.)

5. Under Initial Time, set:

a. Option to Automatic with Value

b. Time to 0 [s]

6. Click OK.

Page 409: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 393

17.B.7: Creating the Domain

1. Create a domain named Room.

2. On the General Options panel:

a. Set Location to Assembly.

b. Set Domain Type to Fluid Domain.

c. Set Fluids List to Air at 25 C.

d. Set Reference Pressure to 1 [atm].

e. Under Buoyancy, set:

f. Under Domain Motion, leave Option set to Stationary.

g. Leave Mesh Deformation set to None.

3. Click the Fluid Models tab, then:

a. Under Heat Transfer Model, set Option to Thermal Energy.

b. Under Turbulence Model, leave Option set to k-Epsilon.

c. Under Turbulent Wall Functions, leave Option set to Scalable.

d. Under Reaction or Combustion Model, leave Option set to None.

e. Under Thermal Radiation Model, set Option to Monte Carlo.

4. Click OK to create the domain.

17.B.8: Setting Boundary Conditions

In this section you will define the locations and values of the boundaryconditions.

Inlet BoundaryCondition

1. Create a boundary condition named Inlet.

2. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to Inlet

Set the following To this value

Option Buoyant

Gravity X Dirn. 0 [m s^-2]

Gravity Y Dirn. 0 [m s^-2]

Gravity Z Dirn. the expression -g

Buoyancy Ref. Temp 298 [K]

Ref Location Automatic

Page 410: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

Page 394 CFX-5 Tutorials

3. Click the Boundary Details tab, then:

a. Under Flow Regime, set Option to Subsonic.

b. Under Mass and Momentum, set Option to Mass Flow Rate andMass Flow Rate to MassFlow.

c. Under Flow Direction, set Option to Cartesian VelocityComponents. Set the following components:

d. Under Turbulence, leave Option set to Medium (Intensity = 5%).

e. Under Heat Transfer, set Option to Static Temperature and StaticTemperature to TIn.

f. Under Thermal Radiation, set Option to Local Temperature.

• Now you can verify that the expressions to define the inlet cartesiancomponents are correct.

4. Click the Plot Options form, then:

a. Enable Boundary Vector

b. Set Profile Vector Components to Cartesian Components

5. Click OK.

Compare the components you see with Figure 1: (p. 389).

OutletBoundaryCondition

1. Create a boundary condition named VentOut.

2. On the Basic Settings panel, set:

a. Boundary Type to Outlet

b. Location to VentOut

3. Click the Boundary Details tab, then:

a. Under Flow Regime, set Option to Subsonic.

b. Under Mass and Momentum, set Option to Average StaticPressure and Relative Pressure to 0 [Pa].

c. Under Thermal Radiation, set Option to Local Temperature.

4. Click OK.

Set the following To this value

X Component XCompInlet

Y Component 0

Z Component ZCompInlet

Page 411: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 395

WindowBoundaryConditions

To model incoming radiation at the window boundaries, a directionalradiation source will be created. The windows will also contribute heat tothe room via a fixed temperature of 26 [C].

1. Create a boundary condition named Windows.

2. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to Window1, Window2

3. Click the Boundary Details tab, then:

a. Under Wall Influence On Flow, set Option to No Slip.

b. Under Wall Roughness, set Option to Smooth Wall.

c. Under Heat Transfer, set Option to Temperature and FixedTemperature to 26 [C].

d. Leave the Thermal Radiation settings at their default values.

Page 412: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

Page 396 CFX-5 Tutorials

4. Click the Sources tab, then:

a. Turn on Sources.

b. Click Add new item in the Radiation Source frame and acceptthe default name by clicking OK.

c. Under Radiation Source 1, set Option to Directional RadiationFlux, Radiation Flux to 600 [W m^-2].

d. Under Direction, set:

If Window 2 is assumed to be south-facing, then the radiationsource comes from the south-east at an inclination of 45°, as shownin "Figure 2: Direction of incoming radiation" on page 396.

Figure 2: Direction of incoming radiation

Set the following To this value

Option Cartesian Components

X Component 0.33

Y Component 0.33

Z Component -0.33

Window2Arrows showingdirection of theradiation source

Page 413: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 397

5. Click the Plot Options form, then:

a. Enable Boundary Vector

b. Set Profile Vector Components to Cartesian Components inRadiation Source 1.

6. Click OK to create the boundary condition. The directional source of

radiation is displayed, and should agree with "Figure 2: Direction of

incoming radiation" on page 396.

Default WallBoundaryConditions

The default boundary condition for any undefined surface in CFX-Pre is ano-slip, smooth, adiabatic wall. For radiation purposes, the default wall isassumed to be a perfectly absorbing and emitting surface (emissivity = 1),and this will be preserved when setting up the boundary condition.

In this tutorial, a fixed temperature of 26 °C will be assumed to exist at thewall during the simulation. A more detailed analysis would model heattransfer through the walls, but as this tutorial is designed only fordemonstration purposes, a fixed temperature wall is more simple.

1. Double-click the Room Default boundary in the Object Selector.

2. On the Boundary Details tab:

a. Set the Heat Transfer option to Temperature

b. Set Fixed Temperature to 26 [C].

3. Click OK.

This setting will include the Door region, which will be modelled as a wall(closed door) for simplicity. Since the region is part of the entire defaultboundary, it will not appear in the wireframe when the results file is openedin CFX-Post (but can still be viewed in the Regions list).

17.B.9: Setting Initial Values

1. Click Global Initialisation .

2. Leave Velocity Type set to Cartesian.

3. Under Cartesian Velocity Components, set:

a. Option to Automatic with Value

b. U to 0 [m s^-1]

c. V to 0 [m s^-1]

d. W to 0 [m s^-1]

Page 414: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

Page 398 CFX-5 Tutorials

4. Under Static Pressure, set Option to Automatic with Value and

Relative Pressure to 0 [Pa].

The room will be at an initial temperature of 22 [C].

5. Under Temperature, set Option to Automatic with Value and

Temperature to 22 [C].

6. Under Turbulence Kinetic Energy, set Option to Automatic with

Value. Turn on Fractional Intensity and set Fractional Intensity to

0.05.

7. Turn on Turbulent Eddy Dissipation, set Option to Automatic with

Value. Turn on Eddy Length Scale and set Eddy Length Scale to

0.25 [m].

8. Turn on Blackbody Temperature and set Blackbody Temperature to

22 [C].

9. Click OK to set the initialisation details.

17.B.10: Setting Solver Control

1. Click Solver Control .

2. Under Advection Scheme, leave Option set to High Resolution.

3. Under Transient Scheme, set Option to First Order Backward Euler.

4. Under Convergence Control, set Max Iter. Per Timestep to 3.

5. Use the default Convergence Criteria.

6. Click OK to set the solver control parameters.

Page 415: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

CFX-5 Tutorials Page 399

17.B.11: Setting Output Control

Transient results files will be set up to record transient values of a chosen setof variables. Monitor points will be created to show the on/off status of theair conditioner, the temperature at the inlet, the temperature at the outlet,and the temperature at a prescribed thermometer location.

1. Click Output Control .

2. Click the Transient Results tab, then:

a. Click Add new item .

b. Accept the default name and click OK.

c. Under Transient Results 1, set Option to Minimal.

d. In the Output Variables List, select Pressure, Temperature,Radiation Intensity and Velocity.

e. Turn on Time Interval then set Time Interval to the expressiontStep.

f. Turn on Output Variable Operators and set Output VariableOperators to All.This causes the gradients of the selected variables to be written tothe transient files, along with other information. See "OutputVariable Operators" on page 340 in the document "CFX-Pre" formore information.

Page 416: Tutorials

Air Conditioning Simulation—Defining the Simulation in CFX-Pre

Page 400 CFX-5 Tutorials

3. Click the Monitor tab, then:

a. Enable Monitor Options

b. In Monitor Points and Expressions, click Add New item .

c. Set Name to Temp at Inlet and click OK.

d. Set Option to Expression.

e. Set Expression Value to TIn.

f. Click Add New item .

g. Set Name to Thermometer and click OK.

h. Leave Option set to Cartesian Coordinates.

i. Set Output Variables List to Temperature.

j. Set the Cartesian Coordinates: (2.95,1.5,1.25).

k. Click Add New item .

l. Set Name to Temp at VentOut and click OK.

m. Set Option to Expression.

n. Set Expression Value to TVentOut.

o. Click Add New item .

p. Set Name to ACOnStatus and click OK.

q. Set Option to Expression.

r. Set Expression Value to ACOn.

4. Click OK.

17.B.12: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

Page 417: Tutorials

Air Conditioning Simulation—Obtaining a Solution

CFX-5 Tutorials Page 401

17.C: Obtaining a Solution

When CFX-Pre has shut down and the CFX-Solver Manager has started,obtain a solution to the CFD problem by following the instructions below.

1. Click Start Run and wait for the solver to finish.

2. Click the User Points tab to view the value of the temperature at

VentOut as the solution progresses. This gives the result only for the end

of each timestep or the outer loop (not the inner coefficient loops), as

the plotting of cloop data for each inner loop is turned off by default in

CFX-Solver Manager. See Global Plot Settings (p. 29) for setting details.

3. After the solver has finished, click Post-Process Results .

4. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 418: Tutorials

Air Conditioning Simulation—Viewing the Results

Page 402 CFX-5 Tutorials

17.D: Viewing the Results

17.D.1: Creating Graphics Objects

Plane locators will be placed vertically through the vents and horizontallyabove the floor.

Plane Locators 1. Load the res file (HVAC_001.res) if you did not elect to load the

results directly from the Solver Manager.

2. Position the view as shown:

3. Create a ZX Plane named Plane 1 with Y=1.5 [m]. Colour it by

Temperature using a User Specified Range from 19 [C] to 23 [C],

and turn off Lighting.

4. Create an XY Plane namedPlane 2with Z=0.35 [m]. Colour it using

the same settings as for the first plane, and turn off Lighting.

IsosurfaceLocator

1. Create an isosurface named Cold Plume which is a surface of

Temperature=19 [C]. Use conservative values for Temperature.

2. Colour the isosurface by Temperature and use the same range as for

the planes.

Although the colour of the isosurface will not change (by definition), it

will be consistent with the other graphic objects.

Page 419: Tutorials

Air Conditioning Simulation—Viewing the Results

CFX-5 Tutorials Page 403

3. On the Render panel for the isosurface, set Transparency to 0.5, and

turn off Lighting.

4. Click Apply.

Note: The isosurface will not be visible in some timesteps, but you will beable to see it when playing the animation (a step carried out later).

Adjusting theLegend

The Legend title should not name the locator of any particular object sinceall objects are coloured by the same variable and use the same range.

1. In the Object Selector, expand View Control, then double-click Default

Legend.

2. In the Object Editor, change Title Mode to Variable.

This removes the locator name from the Legend.

3. Click the Appearance tab, then:

a. Change Precision to 2, Fixed.

b. Change Text Height to 0.03.

4. Click Apply.

A label will be used to show the simulation time and the temperature of thethermometer which controls the thermostat. This will be especially usefulfor the animation which is created later in this tutorial.

Before creating the label, you will need to support the expression forTSensor by creating a point called Thermometer at the location of thesensor thermometer. This point will replace the monitor point calledThermometer which was used during the solver run, but no longer exists.

Note: The actual thermometer data generated during the run was stored inthe results file, but is not easily accessible, and cannot currently be used inan auto-annotation label.

Creating aPoint for theThermometer

1. Click Create point .

2. Set Name to Thermometer.

3. Set Point to (2.95,1.5,1.25).

4. Click Apply.

Now the expression TSensor will once again measure temperature at theprescribed location.

Creating theText Label

1. Click Create text .

2. Accept the default name and click OK.

Page 420: Tutorials

Air Conditioning Simulation—Viewing the Results

Page 404 CFX-5 Tutorials

3. Set Text String to “Time Elapsed:“

(without the quotes).

4. Turn on Embed Auto Annotation.

The full Text String should now be “Time elapsed: <aa>”. The

“<aa>“represents the location where the auto annotation will be

substituted.

5. Set Type to Time Value.

This will show the amount of simulated time that has passed in the

simulation.

6. Click More.

This adds a second line of text to the text object.

7. Set Text String to “Sensor Temperature:“

(without the quotes).

8. Turn on Embed Auto Annotation.

9. Set Type to Expression.

10. Set Expression to TSensor.

11. Click the Appearance tab, change Height to 0.03, then click Apply.

A label appears at the top of the figure. The large font is used so that the

text will be clearly visible in the animation which will be produced in the

next section.

Page 421: Tutorials

Air Conditioning Simulation—Viewing the Results

CFX-5 Tutorials Page 405

17.D.2: Creating an Animation

Figure 3: View of Room at an Oblique Angle

Introduction:

1. Position the view at an oblique angle, as shown in "Figure 3: View of

Room at an Oblique Angle" on page 405.

2. Click Show Timestep Selector .

The Timestep Selector appears.

3. Double-click Time Step 0 in the Timestep Selector.

4. Click Show Animation Editor .

The Animation Editor appears.

5. In the Animation Editor:

a. Click New to create KeyframeNo1.

b. Highlight KeyframeNo1 in the Keyframe Creation and Editinglist, then change # of Frames to 200 in the box labelled# of Frames.This will place 200 intermediate frames between the first and (yet tobe created) second key frames, for a total of 202 frames. This willproduce an animation lasting about 8.8 s since the frame rate will be24 frames per second. Since there are 76 unique frames, each framewill be shown at least once.

6. Load the last Time Value (225 s) using the Timestep Selector.

Page 422: Tutorials

Air Conditioning Simulation—Viewing the Results

Page 406 CFX-5 Tutorials

7. In the Animation Editor:

a. Click New to create KeyframeNo2.The # of Frames parameter has no effect for the last Keyframe, soleave it at the default value.

b. Click the Options... button.

c. In Animation, change Width to 704 and Height to 480.

d. Click the Advanced tab, and note the Quality setting.If your MPEG player does not play the MPEG, you can try using theLow or Custom quality settings.

e. Click OK.

f. In the Animation Editor, turn on Save Animation Movie.

g. Click Browse next to the MPEG File data box to set a path andfile name for the MPEG file in Save MPEG.The file extension “.mpg” will not be added if you leave it out.If the file path is not given, the file will be saved in the directory fromwhich CFX-Post was launched.

h. Click Save in Save MPEG.The MPEG file name (including path) will be set, but the MPEG willnot be created yet.

i. Frame 1 is not loaded (shown in the top right corner of theAnimation Editor, beside F:). Click To Beginning to load it.Wait a few seconds for the frame to load.

j. Click Save... and save the animation to a file. This will enable you toquickly restore the animation in case you want to make changes.Animations are not restored by loading ordinary state files (thosewith the .cst extension).

k. Click Play Forward .The MPEG will be created as the animation proceeds. This may takea few minutes, since a time step must be loaded and objects mustbe created for each frame. To view the MPEG file, you need to use aviewer that supports the MPEG format.

8. When you have finished, exit from CFX-Post.

Page 423: Tutorials

Air Conditioning Simulation—Viewing the Results

CFX-5 Tutorials Page 407

Further Steps1. This tutorial uses an aggressive value for the flow rate of air, a coarse

mesh, and the timesteps are too large for a satisfactory analysis.

Running this tutorial with a finer mesh, a flow rate of air that is closer to

5 changes of air per hour (0.03 m3 s-1), and smaller timesteps will

produce more accurate results.

2. Running the simulation for a longer total time period will allow you to

see more on/off cycles of the thermostat.

Page 424: Tutorials

Air Conditioning Simulation—Viewing the Results

Page 408 CFX-5 Tutorials

Page 425: Tutorials

CFX-5 Tutorials Page 409

CFX-5 Tutorials

Tutorial 18

Combustion andRadiation in a CanCombustor

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• CombustorEDM.pre

• CombustorFlamelet.pre

• CombustorMesh.gtm

Page 426: Tutorials

Combustion and Radiation in a Can Combustor—Introduction

Page 410 CFX-5 Tutorials

18.A: Introduction

18.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• creating thin surfaces for the inlet vanes

• using a Reacting Mixture

• using the Eddy Dissipation Combustion Model

• using the Flamelet Model

• changing the Combustion model in a simulation

• using the P1 Radiation Model in CFX-Pre

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Fluid Type Reacting Mixture

Domain Type Single Domain

Turbulence Model k-Epsilon

Heat Transfer Thermal Energy

Combustion

Radiation

Boundary Conditions Inlet (Subsonic)

Outlet (Subsonic)

Wall: No-Slip

Wall: Adiabatic

Wall: Thin Surface

Timestep Physical Timescale

CFX-Solver Manager n/a n/a

CFX-Post Plots Outline Plot (Wireframe)

Sampling Plane

Slice Plane

Vector

Other Changing the ColourRange

Colourmap

Legend

Quantitative Calculation

Page 427: Tutorials

Combustion and Radiation in a Can Combustor—Introduction

CFX-5 Tutorials Page 411

• using the Discrete Transfer Radiation Model in CFX-Pre

• using the NOx model in CFX-Pre

• changing object colour maps in CFX-Post to prepare a greyscale image

18.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

18.A.3: Overview of the problem to solve

The can combustor is a feature of the gas turbine engine. Arranged arounda central annulus, can combustors are designed to minimise emissions,burn very efficiently and keep wall temperatures as low as possible. This

Page 428: Tutorials

Combustion and Radiation in a Can Combustor—Introduction

Page 412 CFX-5 Tutorials

tutorial is designed to give a qualitative impression of the flow andtemperature distributions. The basic geometry is shown below with asection of the outer wall cut away.

Figure 1: Overview of Can Combustor Geometry

There are six side airinlets, each with asurface area of 2 cm2

The Outlet has a surfacearea of 150 cm2

There are six small fuelinlets, each with a surfacearea of 0.14 cm2.

Main air inlet. The inletis guided by vanes togive the air a swirlingvelocity component.Total surface area is57 cm2

Page 429: Tutorials

Combustion and Radiation in a Can Combustor—Using the Eddy Dissipation and P1 Models

CFX-5 Tutorials Page 413

18.B: Using the Eddy Dissipation and P1 Models

This tutorial demonstrates two different Combustion and Radiation modelcombinations. The first uses the Eddy Dissipation Combustion Model withthe P1 Radiation Model; the NOx model is also included. The second usesthe Laminar Flamelet Model with the Discrete Transfer Radiation Model. Ifyou wish to use the Flamelet Combustion Model and Discrete TransferRadiation Model, see Using the Laminar Flamelet and Discrete TransferModels (p. 429), otherwise continue from this point.

18.B.1: Defining the Simulation in CFX-Pre

The following sections describe the step-by-step definition of the flowphysics in CFX-Pre. If you wish, you can play the session fileCombustorEDM.pre to complete this section for you and continue fromObtaining a Solution (p. 422). See one of the first four tutorials forinstructions on how to do this.

You will define a domain that includes a Variable Composition Mixture.These mixtures are used to model combusting and reacting flows in CFX-5.In this tutorial you will choose one of the pre-defined reactions from theReaction Editor, but you can also define your own reactions, see "ReactionsEditor" on page 148 in the document "CFX-Pre" for details.

18.B.2: Creating a New Simulation

1. Start CFX-Pre

2. Create a new simulation named CombustorEDM using the General

mode.

18.B.3: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh file CombustorMesh.gtm, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. Click the Mesh tab to access the Mesh workspace.

3. Right-click in the Mesh Selector and select Import.

Page 430: Tutorials

Combustion and Radiation in a Can Combustor—Using the Eddy Dissipation and P1 Models

Page 414 CFX-5 Tutorials

4. Leave Mesh Format set to CFX-5 GTM file.

5. Set File to CombustorMesh.gtm.

6. Click OK to import the mesh.

Note: Normally, CFX-Pre uses the units you specify when you import amesh. The only exception occurs when importing a gtm mesh file, as in thistutorial, in which case the units in the mesh file are used.

18.B.4: Creating a Reacting Mixture

To allow combustion modelling, you must create a variable compositionmixture.

To create thevariablecompositionmixture

1. Click the Materials Tab

2. Click the Material .

3. Set Name to Methane Air Mixture and click OK.

4. In the Material Editor, set Option to Reacting Mixture.

5. Set Material Group to Gas Phase Combustion.

6. From the Reactions List, select Methane Air WD1 NO PDF.

The Methane Air WD1 NO PDF reaction specifies complete combustion ofthe fuel into its products in a single-step reaction. The formation of NO isalso modelled and occurs in an additional reaction step.

7. Click on Mixture Properties and enable the Mixture Properties

checkbox.

8. Expand Radiation Properties.

9. Turn on Refractive Index and set Refractive Index to 1.

10. Turn on Absorption Coefficient and set Absorption Coefficient to 1

[m^-1].

11. Turn on Scattering Coefficient and set Scattering Coefficient to 0

[m^-1].

Setting the radiation properties explicitly will significantly shorten thesolution time since the CFX-Solver will not have to calculate radiationmixture properties. See "Radiation Properties" on page 43 in the document"CFX-5 Solver Modelling" for more details.

12. Click OK to create the mixture.

Page 431: Tutorials

Combustion and Radiation in a Can Combustor—Using the Eddy Dissipation and P1 Models

CFX-5 Tutorials Page 415

To modify theMethaneOxygen WD1reaction

1. Click the Reactions tab to access the Reactions Selector, and

double-click the Methane Oxygen WD1 reaction.

The Reaction Editor will open.

2. Turn on Reaction or Combustion Model.

3. Set Option to Eddy Dissipation.

4. Turn on Eddy Dissipation Model Coefficient B.

5. Set EDM Coeff B to 0.5.

This turns on the Product Limiter (discussed in "Products Limiter" onpage 186 in the document "CFX-5 Solver Theory"). When it is turned on,non-zero initial values are required for the products (these will be setlater). The products limiter is not recommended for multi-step eddydissipation reactions, and so is set for this single step reaction only.

6. Click OK.

18.B.5: Creating the Domain

1. Create a domain named Combustor.

2. On the General Options panel:

a. Set Location to Assembly.

b. Leave Domain Type set to Fluid Domain.

c. Set Fluids List to Methane Air Mixture.

d. Set Reference Pressure to 1 [atm].It is important to set a realistic reference pressure in this tutorialbecause the components of Methane Air Mixture are ideal gases.See "Setting a Reference Pressure" on page 10 in the document"CFX-5 Solver Modelling" for details.

e. Under Buoyancy, leave Option set to Non-Buoyant.

f. Under Domain Motion, leave Option set to Stationary.

Page 432: Tutorials

Combustion and Radiation in a Can Combustor—Using the Eddy Dissipation and P1 Models

Page 416 CFX-5 Tutorials

3. Click the Fluid Models tab, then:

a. Under Heat Transfer Model, set Option to Thermal Energy.

b. Under Turbulence Model, leave Option set to k-Epsilon.

c. Under Turbulent Wall Functions, leave Option set to Scalable.

d. Under Reaction or Combustion Model, set Option to EddyDissipation.

e. Under Thermal Radiation Model, set Option to P1.

f. Under Component Details, set:

4. Click OK to create the domain.

18.B.6: Creating the Boundary Conditions

Fuel InletBoundaryCondition

1. Create a boundary condition named fuelin.

2. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to fuelin

3. Click the Boundary Details tab, then:

a. Under Mass and Momentum, set Option to Normal Speed andNormal Speed to 40 [m s^-1].

b. Under Turbulence, leave Option set to Medium (Intensity = 5%).

c. Under Heat Transfer, set Option to Static Temperature and StaticTemperature to 300 [K].

d. Under Thermal Radiation, set Option to Local Temperature.

e. Under Component Details, set:

Set the following To this value

CH4 Transport Equation

CO2 Transport Equation

H2O Transport Equation

N2 Constraint

NO Transport Equation

O2 Transport Equation

Set the following To this value

Mass Fraction of CH4 1

Mass Fraction (of all other components) 0

Page 433: Tutorials

Combustion and Radiation in a Can Combustor—Using the Eddy Dissipation and P1 Models

CFX-5 Tutorials Page 417

4. Click OK to create the boundary condition.

Bottom AirInlet BoundaryCondition

Two separate boundary conditions will be applied for the incoming air. Thefirst is at the base of the can combustor. The can combustor employs vanesdownstream of the fuel inlet to give the incoming air a swirling velocity.

1. Create a boundary condition named airin.

2. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to airin

3. Click the Boundary Details tab, then:

a. Under Mass and Momentum, set Option to Normal Speed andNormal Speed to 10 [m s^-1].

b. Under Turbulence, leave Option set to Medium (Intensity = 5%).

c. Under Heat Transfer, set Option to Static Temperature and StaticTemperature to 300 [K].

d. Under Thermal Radiation, set Option to Local Temperature.

e. Under Component Details, set:

The remaining mass fraction at the inlet will be made up from theConstraint component, N2.

4. Click OK to create the boundary condition.

Side Air InletBoundaryCondition

The secondary air inlets are located on the side of the vessel and introduceextra air to aid combustion.

1. Create a boundary condition named secairin.

2. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to secairin

Set the following To this value

Mass Fraction of O2 0.232

Mass Fraction (of all other components) 0

Page 434: Tutorials

Combustion and Radiation in a Can Combustor—Using the Eddy Dissipation and P1 Models

Page 418 CFX-5 Tutorials

3. Click the Boundary Details tab, then:

a. Under Mass and Momentum, set Option to Normal Speed andNormal Speed to 6 [m s^-1].

b. Under Turbulence, leave Option set to Medium (Intensity = 5%).

c. Under Heat Transfer, set Option to Static Temperature and StaticTemperature to 300 [K].

d. Under Thermal Radiation, set Option to Local Temperature.

e. Under Component Details, set:

4. Click OK to create the boundary condition.

OutletBoundaryCondition

1. Create a boundary condition named out.

2. On the Basic Settings panel, set:

a. Boundary Type to Outlet

b. Location to out

3. Click the Boundary Details tab, then:

a. Under Mass and Momentum, set Option to Static Pressure andRelative Pressure to 0 [Pa].

b. Under Thermal Radiation, set Option to Local Temperature.

4. Click OK to create the boundary condition.

VanesBoundaryCondition

The vanes above the main air inlet are to be modelled as thin surfaces. Tocreate a vane as a thin surface in CFX-Pre, you must specify a wall boundarycondition on each side of the vanes. The Create Thin Surface Partnerfeature in CFX-Pre will automatically match the other side of a thin surfaceif you pick just a single side.

You will first create a new region which contains one side of each of theeight vanes, then use the Create Thin Surface Partner feature to match theother side.

1. Select Create > Regions > Region.

2. Set Name to Vane Surfaces.

3. Leave Combination set to Union.

Set the following To this value

Mass Fraction of O2 0.232

Mass Fraction (of all other components) 0

Page 435: Tutorials

Combustion and Radiation in a Can Combustor—Using the Eddy Dissipation and P1 Models

CFX-5 Tutorials Page 419

4. Set Dimension to 2D.

This will filter out the 3D Regions, leaving only 2D Regions.

5. Select the regions from the drop-down list that represent one side of

each vane surface When you click a surface number in the Region list, it

is highlighted in the Viewer (if highlighting is enabled: check that the

highlighting icon in the toolbar is enabled). The surfaces to select

are: F1.B3.P3, F3.B3.P3, F48.B3.P3, F50.B3.P3, F52.B3.P3,

F53.B3.P3, F7.B3.P3, F9.B3.P3.

6. Click OK to complete the Region creation.

7. Create a boundary condition named vanes.

8. On the Basic Settings panel:

a. Set Boundary Type to Wall.

b. Set Location to Vane Surfaces.

c. Turn on Create Thin Surface Partner.This feature will attempt to match all primitives specified in thelocation list to create a thin surface boundary condition. See "CreateThin Surface Partner" on page 267 in the document "CFX-Pre".

9. On the Boundary Details panel, leave all settings at their default values.

10. Click OK to create the boundary condition.

Default WallBoundaryCondition

The default boundary condition for any undefined surface in CFX-Pre is ano-slip, smooth, adiabatic wall.

• For radiation purposes, the wall is assumed to be a perfectly absorbingand emitting surface (emissivity = 1).

• The wall is non-catalytic, i.e. it does not take part in the reaction.

Since this tutorial serves as a basic model, heat transfer through the wall isneglected. As a result, no further boundary conditions need to be defined.

18.B.7: Setting Initial Values

1. Click Global Initialisation .

2. Leave Velocity Type set to Cartesian.

Page 436: Tutorials

Combustion and Radiation in a Can Combustor—Using the Eddy Dissipation and P1 Models

Page 420 CFX-5 Tutorials

3. Under Cartesian Velocity Components, set:

a. Option to Automatic with Value

b. U = 0 [m s^-1]

c. V = 0 [m s^-1]

d. W = 5 [m s^-1]

4. Under Static Pressure, Temperature, Turbulence Kinetic Energy, and

Radiation Intensity, leave Option set to Automatic.

5. Turn on Turbulence Eddy Dissipation and set Option to Automatic.

The initial conditions assume that the domain consists entirely of air and thefraction of oxygen in air is 0.232.

6. Under Component Details:

a. Under CH4 and NO, set Option to Automatic.

b. Under CO2 and H2O, set Option to Automatic with Value andMass Fraction to 0.01.

c. Under O2, set Option to Automatic with Value and Mass Fractionto 0.232.

7. Click OK to set the initialisation details.

18.B.8: Setting Solver Control

1. Click Solver Control .

2. On the Basic Settings panel:

a. Under Advection Scheme, leave Option set to High Resolution.

b. Under Convergence Control, set Timescale Control to PhysicalTimescale, set Physical Timescale to0.025 [s], and leave Max.No. Iterations set to 100.

c. Use the default Convergence Criteria settings.

3. Click the Advanced Options tab and ensure Global Dynamic Model

Control is turned on.

4. Click OK to set the solver control parameters.

18.B.9: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

Page 437: Tutorials

Combustion and Radiation in a Can Combustor—Using the Eddy Dissipation and P1 Models

CFX-5 Tutorials Page 421

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

Page 438: Tutorials

Combustion and Radiation in a Can Combustor—Obtaining a Solution

Page 422 CFX-5 Tutorials

18.C: Obtaining a Solution

When CFX-Pre has shut down and the CFX-Solver Manager has started,obtain a solution to the CFD problem by following the instructions below.

1. Click Start Run.

When the CFX-Solver has finished:

2. Click OK.

3. Click Post-Process Results .

4. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

Page 439: Tutorials

Combustion and Radiation in a Can Combustor—Viewing the Results

CFX-5 Tutorials Page 423

18.D: Viewing the Results

When CFX-Post opens, you might need to experiment with the Edge Anglesetting for the Wireframe object and the various rotation and zoomfeatures in order to place the geometry in a sensible position.

ViewingTemperatureWithin theDomain

1. Create a ZX Slice Plane (accepting the default namePlane 1) through

a point with y = 0.

2. Colour the Plane by Temperature.

Notice the large area of high temperature through most of the vessel isdue to forced convection, as shown in "Figure 2: Temperature" on

page 423.Figure 2: Temperature

Viewing theNOconcentrationin theCombustor

In the next step you will colour Plane 1 by the mass fraction of NO to viewthe distribution of NO within the domain.

1. Edit Plane 1 and click the Colour tab.

2. Set the Variable to NO.Mass Fraction.

Page 440: Tutorials

Combustion and Radiation in a Can Combustor—Viewing the Results

Page 424 CFX-5 Tutorials

3. Click Apply.

The resulting plot of NO.Mass Fraction is shown in "Figure 3: NO Mass

Fraction" on page 424.

Figure 3: NO Mass Fraction

The NO concentration is highest in the high temperature region close to theoutlet of the domain.

Printing aGreyscaleGraphic

Here we will change the colour map (for Plane 1) to a greyscale map. Theresult will be a plot with different levels of grey representing different massfractions of NO. This technique is especially useful for printing, to a blackand white printer, any image that contains a colour map. Conversion togreyscale by conventional means (i.e. using graphics software, or letting theprinter do the conversion) will generally cause colour legends to change toa non-linear distribution of levels of grey, as shown in "Figure 4: RainbowMap converted to Greyscale (left) versus Inverse Greyscale Map (right)" onpage 425 (left).

1. Edit Plane 1 and click the Colour tab.

2. Change the Colour Map to Inverse Greyscale.

Page 441: Tutorials

Combustion and Radiation in a Can Combustor—Viewing the Results

CFX-5 Tutorials Page 425

3. Click Apply. "Figure 4: Rainbow Map converted to Greyscale (left) versus

Inverse Greyscale Map (right)" on page 425 (right) shows the resulting

plot.

Calculating NOMass Fractionat the Outlet

The emission of pollutants into the atmosphere is always a designconsideration for combustion applications. In the next step, you willcalculate the mass fraction of NO in the outlet stream.

1. Open the CFX-Post calculator by selecting Tools > Calculator.

2. When the Function Calculator opens, set:

a. Function to massFlowAve

b. Location to out

c. Variable to NO.Mass Fraction

3. Click Calculate.

A small amount of NO is released from the outlet of the Combustor. This

amount is lower than can normally be expected, and is mainly due to

the coarse mesh and the short residence times in the combustor.

Figure 4: Rainbow Map converted to Greyscale (left) versus Inverse Greyscale Map(right)

Page 442: Tutorials

Combustion and Radiation in a Can Combustor—Viewing the Results

Page 426 CFX-5 Tutorials

Viewing FlowField

To investigate the reasons behind the efficiency of the combustion process,you will next look at the velocity vectors to show the flow field.

1. Make Plane 1 invisible.

2. Create a vector Plot located on Plane 1. See "Figure 5: Velocity Vector

Field (initial coarse mesh solution)" on page 426.

Figure 5: Velocity Vector Field (initial coarse mesh solution)

Notice a small recirculation in the centre of the combustor. Running theproblem with a finer mesh would show this region to be a largerrecirculation zone. The coarseness of the mesh in this tutorial meansthat this region of flow is not accurately resolved. See "Figure 6: Velocity

Page 443: Tutorials

Combustion and Radiation in a Can Combustor—Viewing the Results

CFX-5 Tutorials Page 427

Vector Field (finer mesh solution)" on page 427 for an illustrationshowing the larger recirculation zone (mesh used had over 50000nodes).

Figure 6: Velocity Vector Field (finer mesh solution)

3. Plot vectors on a second plane, normal to the first, that is located just

above the fuel inlets.

4. Create a Plane (accepting the default name Plane 2) through a point

with z = 0.03, normal to the z-direction.

5. Under Plane Bounds, set Type to Rectangular, X size to 0.5 and Y

size to 0.5 [m].

6. Under Plane Type turn on Sample. Set X Samples and Y Samples to

30.

7. Turn off Visibility and then click Apply.

Page 444: Tutorials

Combustion and Radiation in a Can Combustor—Viewing the Results

Page 428 CFX-5 Tutorials

8. For Vector 1, set Location to Plane 1 and Plane 2 and then click Apply.

• The swirl component can now be seen clearly.

• To view of the swirling velocity field, click View Toward -Z .You may also want to turn off the Wireframe visibility, or set Locationfor the Vector plot to Plane 2 only. In the region near the fuel and airinlets, the swirl component of momentum (theta direction) results inincreased mixing with the surrounding fluid and a higher residencetime in this region. As a result, more fuel is burned.

9. Examine the distribution of Incident Radiation and Radiation Intensity

throughout the domain.

Page 445: Tutorials

Combustion and Radiation in a Can Combustor—Using the Laminar Flamelet and Discrete

CFX-5 Tutorials Page 429

18.E: Using the Laminar Flamelet and DiscreteTransfer Models

In this second part of the tutorial, you will start with the simulation from thefirst part of the tutorial and modify it to use the Laminar Flameletcombustion and Discrete Transfer radiation models.

18.E.1: Defining the Simulation in CFX-Pre

The following sections describe the step-by-step definition of the flowphysics in CFX-Pre.

If you wish, you can play the session file CombustorFlamelet.pre tocomplete this section for you and continue from Obtaining a Solution(p. 432). See any of the introductory tutorials for instructions on how to playa session file.

18.E.2: Creating a New Simulation

1. If you have not completed the first part of this tutorial, or otherwise do

not have the simulation file from the first part, start CFX-Pre and then

play the session file CombustorEDM.pre.

The simulation file CombustorEDM.cfx will be created and CFX-Pre

will exit.

2. Start CFX-Pre.

3. Load the simulation named CombustorEDM.cfx.

The simulation from the first part of this tutorial is loaded.

4. Save the simulation as CombustorFlamelet.cfx.

This creates a separate simulation file which will be modified to use the

Laminar Flamelet and Discrete Transfer models.

18.E.3: Importing the Mesh

No changes to the mesh are required.

Page 446: Tutorials

Combustion and Radiation in a Can Combustor—Using the Laminar Flamelet and Discrete

Page 430 CFX-5 Tutorials

18.E.4: Creating a Reacting Mixture

A flamelet library will be used to create the variable composition mixture.For more details on using the Flamelet model, please refer to "LaminarFlamelet with PDF Model" on page 270 in the document "CFX-5 SolverModelling".

Create thevariablecompositionmixture

1. Click the Materials tab.

2. In the Materials Selector, double-click Methane Air Mixture.

The Material Editor opens beneath the Material Selector.

3. In the Reactions List, select Methane Air FLL STP and NO PDF.

4. Click OK to modify the mixture.

18.E.5: Modifying the Domain

1. In the Physics Workspace, double-click the domain named Combustor.

Edit Domain: Combustor appears.

2. Under Reaction or Combustion Model, set Option to Laminar

Flamelet with PDF.

3. Under Thermal Radiation Model, set Option to Discrete Transfer.

4. Under Component Details, set:

a. N2 to Constraint

b. NO to Transport Equation (this instructs the solver not to use thechemistry library for the NO component)

c. all other components to Automatic (check every one)

5. Click OK to create the domain.

18.E.6: Creating the Boundary Conditions

Modifying theFuel InletBoundaryCondition

1. In the Physics Workspace, double-click the boundary condition named

fuelin.

2. Under Mixture, set Option to Fuel.

3. Under Component Details, set the Mass Fraction for NO to 0.

4. Click OK.

Page 447: Tutorials

Combustion and Radiation in a Can Combustor—Using the Laminar Flamelet and Discrete

CFX-5 Tutorials Page 431

Modifying theBottom AirInlet BoundaryCondition

1. In the Physics Workspace, double-click the boundary condition named

airin.

2. Under Mixture, ensure that Option is set to Oxidiser.

3. Under Component Details, set the Mass Fraction for NO to 0.

4. Click OK.

Modifying theSide Air InletBoundaryCondition

1. In the Physics Workspace, double-click the boundary condition named

secairin.

2. Under Mixture, ensure that Option is set to Oxidiser.

3. Under Component Details, set the Mass Fraction for NO to 0.

4. Click OK.

Modifying theOutletBoundaryCondition

No changes to the outlet boundary condition are required.

Modifying theVanesBoundaryConditions

No changes to the vanes boundary conditions are required.

18.E.7: Setting Initial Values

1. Click Global Initialisation .

2. Under Component Details, set the Mass Fraction for NO to Automatic

with Value, with a Value of 0.

3. Click OK.

18.E.8: Setting Solver Control

1. Click Solver Control .

2. Use the default Convergence Criteria settings.

To reduce the amount of CPU time required for solving the Radiationequations, you can select to solve them only every 10 iterations.

3. Click the Advanced Options tab, then:

a. Turn on Global Dynamic Model Control, Thermal RadiationControl and Iteration Interval.

b. Set Iteration Interval to 10.

Page 448: Tutorials

Combustion and Radiation in a Can Combustor—Using the Laminar Flamelet and Discrete

Page 432 CFX-5 Tutorials

4. Click OK to set the Solver Control.

18.E.9: Writing the Solver (.def) File

1. Click Create Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

18.E.10: Obtaining a Solution

When CFX-Pre has shut down and the CFX-Solver Manager has started,obtain a solution to the CFD problem by following the instructions below.

1. Click Start Run.

When the CFX-Solver has finished:

2. Click OK.

3. Click Post-Process Results .

4. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

18.E.11: Viewing the Results

ViewingTemperaturewithin theDomain

1. Create a ZX Slice Plane (accepting the default namePlane 1) through

a point with y = 0.

2. Colour the Plane by Temperature.

Page 449: Tutorials

Combustion and Radiation in a Can Combustor—Using the Laminar Flamelet and Discrete

CFX-5 Tutorials Page 433

"Figure 7: Temperature" on page 433 shows a different temperatureprediction than the Eddy Dissipation Model predicts (cf. Figure 2: (p. 423)).

Figure 7: Temperature

Viewing theNOconcentrationin theCombustor

1. Colour Plane 1 by NO Mass Fraction.

Compare Figure 8: (p. 433) with the results for the Eddy Dissipation Model(Figure 3: (p. 424)).

Figure 8: NO Mass Fraction

Page 450: Tutorials

Combustion and Radiation in a Can Combustor—Using the Laminar Flamelet and Discrete

Page 434 CFX-5 Tutorials

Calculating NOConcentration

Performing the same calculation as Calculating NO Mass Fraction at theOutlet (p. 425) shows nearly double the amount of NO at the outletcompared with the Eddy Dissipation Model.

Viewing COConcentration

The next plot will show the concentration of CO (carbon monoxide), whichis a by-product of incomplete combustion and is poisonous in significantconcentrations.

1. Edit Plane 1 and click the Colour tab.

2. Set Variable to CO.Mass Fraction.

3. Set Range to Local.

4. Click Apply.

Figure 9: CO Mass Fraction

As can be seen, the highest values are very close to the fuel inlet and in theregions of highest temperature.

Calculating COMass Fractionat the Outlet

In the next step, you will calculate the mass fraction of CO in the outletstream.

1. Open the CFX-Post calculator by selecting Tools > Calculator.

2. When the Function Calculator opens, set:

a. Function to massFlowAve

b. Location to out

c. Variable to CO.Mass Fraction

Page 451: Tutorials

Combustion and Radiation in a Can Combustor—Using the Laminar Flamelet and Discrete

CFX-5 Tutorials Page 435

3. Click Calculate.

There is approximately 0.4% CO by mass in the outlet stream.

Further Postprocessing1. Try putting some plots of your choice into the Viewer. You can plot the

concentration of other species and compare values to those found for

the Eddy Dissipation Model.

2. Examine the distribution of Incident Radiation and Radiation Intensity

throughout the domain.

Page 452: Tutorials

Combustion and Radiation in a Can Combustor—Using the Laminar Flamelet and Discrete

Page 436 CFX-5 Tutorials

Page 453: Tutorials

CFX-5 Tutorials Page 437

CFX-5 Tutorials

Tutorial 19

Cavitation Around aHydrofoil

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• Hydrofoil.pre

• HydrofoilExperimentalCp.csv

• HydrofoilGrid.grd

• HydrofoilIni.pre

• HydrofoilIni_001.res

• HydrofoilPostContour.cst

• HydrofoilPostFlowfield.cst

Page 454: Tutorials

Cavitation Around a Hydrofoil—Introduction

Page 438 CFX-5 Tutorials

19.A: Introduction

19.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• modelling flow with cavitation

• using vector reduction in CFX-Post to clarify a vector plot with manyarrows

• importing and exporting data along a polyline

• plotting computed and experimental results

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Steady State

Fluid Type General Fluid

Domain Type Single Domain

Turbulence Model k-Epsilon

Heat Transfer Isothermal

Multiphase

Boundary Conditions Inlet (Subsonic)

Outlet (Subsonic)

Symmetry Plane

Wall: No-Slip

Wall: Free-Slip

Timestep Physical Timescale

CFX-Solver Manager Restart

CFX-Post Plots Contours

Line Locator

Polyline

Slice Plane

Streamline

Vector

Other Chart Creation

Data Export

Printing

Title/Text

Variable Editor

Page 455: Tutorials

Cavitation Around a Hydrofoil—Introduction

CFX-5 Tutorials Page 439

19.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

19.A.3: Overview of the problem to solve

This example demonstrates cavitation in the flow of water around ahydrofoil. A two-dimensional solution is obtained by modelling a thin sliceof the hydrofoil and using two symmetry boundary conditions.

Figure 1: Hydrofoil and Flow Overview

In this tutorial, an initial solution with no cavitation is generated to providean accurate initial guess for a full cavitation solution, which is generatedafterwards.

16.91 m s^-1

cavitation zone

Page 456: Tutorials

Cavitation Around a Hydrofoil—Creating the Initial Simulation

Page 440 CFX-5 Tutorials

19.B: Creating the Initial Simulation

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file HydrofoilIni.pre tocomplete this section for you and continue from Obtaining theStarting-Point Solution Using the CFX-5 Solver (p. 445). See one of the firstfour tutorials for instructions on how to do this.

19.B.1: Defining the simulation.

1. Select File > New Simulation.

2. Select General Mode.

3. Set File name to HydrofoilIni and then click Save.

19.B.2: Importing the Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Copy the mesh file HydrofoilGrid.grd, located in the examples

directory (<CFXROOT>/examples), to your working directory.

2. Right-click in the Mesh Selector and select Import.

3. In the Mesh Workspace, on the Definition panel, set:

a. Mesh Format to CFX-TASCflow V2

b. File to HydrofoilGrid.grd

4. Click the Advanced Options tab.

5. Turn off Use GCI file.

6. Click OK.

Page 457: Tutorials

Cavitation Around a Hydrofoil—Creating the Initial Simulation

CFX-5 Tutorials Page 441

Viewing theMesh

1. Click View Toward -Z by using the viewer icon drop-down menu.

Alternatively, with the mouse focus on the viewer (hold mouse over

viewer area and, if using Windows, click the left button), press <Shift>

+ Z.

19.B.3: Creating the Domain

The fluid domain used for this simulation contains liquid water and watervapour. The volume fractions are initially set so that the domain is filledentirely with liquid.

1. Select the Materials tab

2. Create a domain named WaterTank.

3. On the General Options panel:

a. Set Location to Assembly.

b. Expand the list of available fluids by clicking the icon.

c. Select Water Vapour at 25 C and Water then click OK.

d. Set Ref. Pressure to 0 [atm].

4. Click the Fluid Models tab, then:

a. Under Multiphase Options, turn on Homogeneous Model.

b. Under Free Surface Model, leave Option set to None.

c. Under Heat Transfer Model, set Option to Isothermal and FluidTemperature to 300 [K].

Since Cavitation will not be turned on during the first solution, there is noneed to visit the remaining panels.

5. Click OK to create the domain.

19.B.4: Creating the Boundary Conditions

The simulation requires inlet, outlet, wall and symmetry plane boundaryconditions. The regions for these boundary conditions were imported withthe grid file.

Inlet BoundaryCondition

1. Create a boundary condition named inlet.

2. On the Basic Settings panel, set:

a. Boundary Type to Inlet

b. Location to IN

Page 458: Tutorials

Cavitation Around a Hydrofoil—Creating the Initial Simulation

Page 442 CFX-5 Tutorials

3. Click the Boundary Details tab, then:

a. Under Mass And Momentum, set Option to Normal Speed andNormal Speed to 16.91 [m s^-1].

b. Under Turbulence, set the Option to Intensity and Length Scale,Fractional Intensity to 0.03, and Eddy Length Scale to0.0076 [m].

4. Click the Fluid Values tab, then:

a. Select Water Vapour at 25 C.

b. Under Volume Fraction, set Volume Fraction to 0.

c. Select Water.

d. Under Volume Fraction, set Volume Fraction to 1.

5. Click OK to create the boundary condition.

OutletBoundaryCondition

1. Create a boundary condition named outlet.

2. On the Basic Settings panel, set:

a. Boundary Type to Outlet

b. Location to OUT

3. Click the Boundary Details tab and then, under Mass and Momentum,

set Option to Static Pressure and Relative Pressure to 51957 [Pa].

4. Click OK to create the boundary condition.

Free Slip WallBoundaryCondition

1. Create a boundary condition named slipwalls.

2. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to TOP and BOT

3. Click the Boundary Details tab and then, under Wall Influence on

Flow, set Option to Free Slip.

4. Click OK to create the boundary condition.

SymmetryPlaneBoundaryCondition

1. Create a boundary condition named symmetry.

2. On the Basic Settings panel, set:

a. Boundary Type to Symmetry

b. Location to SYM1 and SYM2

3. Click OK to create the boundary condition.

Page 459: Tutorials

Cavitation Around a Hydrofoil—Creating the Initial Simulation

CFX-5 Tutorials Page 443

19.B.5: Setting Initial Values

1. Click Global Initialisation .

2. On the Global Settings panel:

a. Under Cartesian Velocity Components, set:Option to Automatic with ValueU to 16.91 [m s^-1]V to 0 [m s^-1]W to 0 [m s^-1]

b. Under Static Pressure, and Turbulence Kinetic Energy, leaveOption set to Automatic.

c. Turn on Turbulence Eddy Dissipation and set Option toAutomatic.

3. Click the Fluid Settings tab, then:

a. Select Water Vapour at 25 C.

b. Turn on Water Vapour at 25 C.

c. Under Volume Fraction set Option to Automatic with Value andVolume Fraction to 0.

d. Select Water.

e. Turn on Water.

f. Under Volume Fraction set Option to Automatic with Value andVolume Fraction to 1.

4. Click OK to set the initialisation details.

19.B.6: Setting Solver Control

1. Click Solver Control .

2. Under Advection Scheme, leave Option set to High Resolution.

3. Under Convergence Control, set:

a. Timescale Control to Physical Timescale

b. Physical Timescale to 0.01 [s]

c. Max. No. Iterations to 35

4. Under Convergence Criteria, confirm that Residual Type is set to RMS

and that Residual Target is set to 0.0001.

5. Click OK to set the solver control parameters.

Page 460: Tutorials

Cavitation Around a Hydrofoil—Creating the Initial Simulation

Page 444 CFX-5 Tutorials

19.B.7: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

2. Leave Operation set to Start Solver Manager.

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the simulation under

HydrofoilIni.cfx.

Page 461: Tutorials

Cavitation Around a Hydrofoil—Obtaining the Starting-Point Solution Using the CFX-5 Solver

CFX-5 Tutorials Page 445

19.C: Obtaining the Starting-Point SolutionUsing the CFX-5 Solver

When the CFX-Solver Manager starts:

1. Click Start Run. The CFX-Solver will calculate the solution.

2. When the CFX-Solver has finished, click OK in the message box.

Page 462: Tutorials

Cavitation Around a Hydrofoil—Viewing the Results of the Starting-Point Solution

Page 446 CFX-5 Tutorials

19.D: Viewing the Results of the Starting-PointSolution

If the solvermanager is stillopen

1. With the solver still open, click Post-Process Results .

2. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

If you haveclosed thesolvermanagerbeforelaunchingCFX-Post

1. Start CFX-Post.

2. Load HydrofoilIni_001.res (the results file produced by the

solver).

VisualisingPressure andVelocity

"Figure 2: Pressure Field - No Cavitation" on page 446 (produced byrestoring the state file: HydrofoilPostFlowfield.cst, located inthe examples directory) shows a plane that passes between the symmetryplanes (Z=0.007 m), coloured by pressure. It also shows a vector plot ofvelocity (with a vector reduction of 5 applied to reduce the number ofvectors shown) on the same plane. In order to prevent the vector symbolsfrom being hidden by the coloured plane, Arrow3D vectors were used.

Figure 2: Pressure Field - No Cavitation

Page 463: Tutorials

Cavitation Around a Hydrofoil—Viewing the Results of the Starting-Point Solution

CFX-5 Tutorials Page 447

VisualisingLiquid andVapour Phases

"Figure 3: Water Vapour Volume Fraction- No Cavitation" on page 447(produced by restoring the state file: HydrofoilPostContour.cst,located in the examples directory) shows a contour plot of volume fractionof water vapour. Notice that there is no water vapour present anywhere inthe domain.

Figure 3: Water Vapour Volume Fraction- No Cavitation

The figure was produced by creating a line using theTwo-Pointsmethodand12 Samples. A streamline object was then produced using the line as alocator for the starting points. Streamline symbols of type Arrow3D arrowwere used with a Symbol Size of 0.3 and an Interval of 0.003 s. Thebackground is a contour plot using the XY Plane Z=0.007 m as a locator.

Page 464: Tutorials

Cavitation Around a Hydrofoil—Viewing the Results of the Starting-Point Solution

Page 448 CFX-5 Tutorials

PlottingPressureDistributionData

In this section, you will create a plot of the pressure coefficient distributionaround the hydrofoil. The data will then be exported to a file for latercomparison with data from the cavitating flow case, which will be run laterin this tutorial.

1. Create an XY plane called slice with Z=0.007 [m], then turn off its

visibility.

2. Click Create Polyline , then:

a. Set Name to Foil, then click OK.

b. Set Method to Boundary Intersection.

c. Boundary List to WaterTank Default.

d. Set Intersect With to slice.

e. On the Colour panel, change Colour so that the polyline can beseen around the hydrofoil. Do this by clicking repeatedly on theColour box.

f. Click Apply.

g. Manipulate the view to confirm that the polyline wraps around thehydrofoil.

So far, you have used a plane to create a polyline. In order to obtain pressurecoefficient data on the polyline, we first need to create a variable forpressure coefficient.

3. Click the Variables tab in the CFX-Post Workspace, then:

a. Right-click in the Variable Selector and select New.

b. Set Name to Pressure Coefficient, then click OK.

c. Set Expression to:“(Pressure-51957[Pa])/(0.5*996.2[kgm^-3]*16.91[m s^-1]^2)”(without the quotes).

d. Click Apply.The variable is created.

Since you will plot the pressure coefficient distribution versus chord forpoints on the polyline, you must create a variable for chord.

e. Right-click in the Variable Selector and select New.

f. Set Name to Chord, then click OK.

g. Set Expression to:“(X-minVal(X)@Foil)/(maxVal(X)@Foil-minVal(X)@Foil)”

Page 465: Tutorials

Cavitation Around a Hydrofoil—Viewing the Results of the Starting-Point Solution

CFX-5 Tutorials Page 449

(without the quotes).This creates a normalised chord, measured in the X direction,ranging from 0 at the leading edge to 1 at the trailing edge of thehydrofoil.

h. Click Apply.

Note: Although the variables that were just created are only needed atpoints along the Polyline, they exist throughout the domain.

Now that the variables Chord and Pressure Coefficient exist, they can beassociated with the previously defined Polyline (the locator) to form a chartline. This chart line will be added to the chart object, which is created next.

4. Click the Charts tab in the CFX-Post Workspace, then:

a. Right-click in the Chart Selector and select New.

b. In New Chart, set Name toPressure Coefficient Distribution, then click OK.

c. In the Chart Editor, on the Chart Line 1 panel, set Line Name toSolver Cp, Locator to Foil, X Axis to Chord and Y Axis toPressure Coefficient.

d. Click Apply.The chart line is created, added to the chart object, and displayed inthe Chart Viewer.

e. Click the Chart tab, then:

f. Set Title to Pressure Coefficient Distribution.

g. Turn off Use Data For Axis Labels.This feature labels the axes using the names of the correspondingaxis variables.

h. Set X Axis Label to Normalised Chord Position andY Axis Label to Pressure Coefficient.

i. Click the Ranges tab, then, under Ranges, set:Selection to ManualMinimum X to 0Maximum X to 1Minimum Y to 0.4Maximum Y to -0.5

j. Click Apply.

You will now export the chord and pressure coefficient data along thepolyline. This data will be imported and used in a chart later in this tutorialfor comparison with the results for when cavitation is present.

Page 466: Tutorials

Cavitation Around a Hydrofoil—Viewing the Results of the Starting-Point Solution

Page 450 CFX-5 Tutorials

ExportingPressureDistributionData

1. Select File > Export, or click Export to File .

Export appears.

2. Change File to NoCavCpData.csv.

3. Ensure that Type is set to Generic.

4. Ensure that Locators is set to Foil.

5. Ensure that Export Geometry Information is turned on.

This causes X, Y, Z data to be included in the export file.

6. In the Select Variable(s) list, select Chord and Pressure Coefficient.

(Hold the <Ctrl> key while multiple selecting.)

7. Click Save.

The file NoCavCpData.csv will be written in the working directory.

You will need to save the post-processing state for use later in this tutorial.

Saving thePost-Processing State

1. Select File > Save State As, or click Save State As .

Save State appears.

2. Set File name to Cp_plot, then click Save.

In the next part of this tutorial, the solver will be run with cavitation turnedon. Similar post-processing follows, and the effect of cavitation on thepressure distribution around the hydrofoil will be illustrated in a chart.

Page 467: Tutorials

Cavitation Around a Hydrofoil—Running the Simulation with Cavitation

CFX-5 Tutorials Page 451

19.E: Running the Simulation with Cavitation

Earlier in this tutorial, you ran a simulation without cavitation. The solutionfrom that simulation will serve as the starting point for the next simulation,which involves cavitation.

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file Hydrofoil.pre tocomplete this section for you and continue from Obtaining the CavitationSolution Using the CFX-5 Solver (p. 453). See one of the first four tutorials forinstructions on how to do this.

19.E.1: Modifying the Initial Simulation

1. Start CFX-Pre.

2. Load HydrofoilIni_001.res.

• Change the import filter to show *.def and *.res files.

• If you have not completed the first part of the tutorial, this file canbe copied from the examples directory.

3. Save the simulation as Hydrofoil.cfx.

4. Double-click WaterTank in the Physics Selector.

Edit Domain: WaterTank appears.

5. Click the Fluid Pairs tab (you may need to scroll right using the right

arrow in the upper right corner of the panel).

6. Under Mass Transfer change Option to Cavitation

7. Under Cavitation Model, ensure that Option is set to Rayleigh

Plesset.

8. Enable Saturation Pressure and set it to 3574 [Pa].

Although saturation pressure is optional, it must be set for this example.It is optional because saturation pressure can also be set by setting ahomogeneous binary mixture (see "Materials Editor: HomogeneousBinary Mixture" on page 143 in the document "CFX-Pre"), but one hasnot been used in this tutorial.

9. Click Solver Control .

10. Under Advection Scheme leave Option set to High Resolution.

Page 468: Tutorials

Cavitation Around a Hydrofoil—Running the Simulation with Cavitation

Page 452 CFX-5 Tutorials

11. Under Convergence Control, verify the following settings:

a. Timescale Control is set to Physical Timescale

b. Physical Timescale is set to 0.01 [s]

c. Max. No. Iterations to 185This allows at least 150 further iterations since the first simulationhas no more than 35 iterations.

12. Under Convergence Criteria, confirm that Residual Type is set to RMS

and that Residual Target is set to 1.E-4.

13. Click OK to set the solver control parameters.

14. Click Write Solver (.def) File .

15. Click OK.

16. Click Yes when asked if you want to save the simulation under

Hydrofoil.cfx.

Page 469: Tutorials

Cavitation Around a Hydrofoil—Obtaining the Cavitation Solution Using the CFX-5 Solver

CFX-5 Tutorials Page 453

19.F: Obtaining the Cavitation Solution Usingthe CFX-5 Solver

1. When the solver starts, set Initial Values File to

HydrofoilIni_001.res (the solution from the starting-point run).

2. Click Start Run. The CFX-Solver will calculate the solution.

3. When the CFX-Solver has finished, click OK in the message box.

Page 470: Tutorials

Cavitation Around a Hydrofoil—Viewing the Results of the Cavitation Solution

Page 454 CFX-5 Tutorials

19.G: Viewing the Results of the CavitationSolution

If the solvermanager is stillopen

1. With the solver still open, click Post-Process Results .

2. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

If you haveclosed thesolvermanagerbeforelaunchingCFX-Post

1. Start CFX-Post

2. Load Hydrofoil_001.res (the second results file produced by the

solver).

VisualisingPressure andVelocity

"Figure 4: Pressure Field - Cavitation Present" on page 454 shows thepressure and velocity fields using the same settings as in Figure 2: (p. 446).To produce this figure, you can restore the state file:HydrofoilPostFlowfield.cst, located in the examples directory.It is not necessary to turn off Load RES file because this particular state filewas manually edited to remove the part that loads a RES file. This plot showslittle evidence that there is cavitation present in the flow.

Figure 4: Pressure Field - Cavitation Present

VisualisingLiquid andVapour Phases

"Figure 5: Water Vapour Volume Fraction- Cavitation Present" on page 455shows a contour plot of volume fraction of water vapour, as in Figure 3:(p. 447). To produce this figure, you can restore the state file:

Page 471: Tutorials

Cavitation Around a Hydrofoil—Viewing the Results of the Cavitation Solution

CFX-5 Tutorials Page 455

HydrofoilPostContour.cst, located in the examples directory,with Load RES file not selected. Note that there is a region with watervapour (cavitation occurs here) over part of the suction side of the hydrofoil.

Figure 5: Water Vapour Volume Fraction- Cavitation Present

Importing andPlottingPressureDistributionData

You will restore the state file saved earlier in this tutorial while preventingthe first solution (which has no cavitation) from loading. This will cause theplot of pressure distribution to use data from the currently loaded solution(which has cavitation). Data from the first solution will be added to the chartobject by importing NoCavCpData.csv (the file that was exportedearlier). A file containing experimental data will also be imported and addedto the plot. The resulting chart will show all three sets of data (solver datawith cavitation, solver data without cavitation, and experimental data).

1. Click Load State .

Load State File is displayed.

2. Turn off Load RES file.

3. Select Cp_plot.cst, then click Open.

4. Click the Charts tab in the CFX-Post Workspace.

The Chart Viewer will automatically be displayed.

5. In the Charts Workspace, double-click the chart object

Pressure Coefficient Distribution.

A chart will appear in the Chart Viewer area.

6. Click the Chart Line 1 tab.

Page 472: Tutorials

Cavitation Around a Hydrofoil—Viewing the Results of the Cavitation Solution

Page 456 CFX-5 Tutorials

7. Change Line Name to Solver Cp - with cavitation.

This reflects the fact that the user-defined variable Pressure

Coefficient is now based on the current results.

8. Click Apply to update Chart Line 1.

You will now add the chart line from the first simulation.

9. Click Create polyline , then:

a. Set Name to NoCavCpPolyline, then click OK.

b. Set Method to From File.

c. Set Input File to NoCavCpData.csv.

d. Click Apply.The data in the file is used to create a polyline with values ofPressure Coefficient and Chord stored at each point on it.

10. Click the Charts tab in the CFX-Post Workspace.

11. Click the Chart Line 1 tab.

12. Click New Line.

A new panel entitled Chart Line 2 replaces the Chart Line 1 panel.

13. Change Line Name to Solver Cp - no cavitation, Locator to

NoCavCpPolyline, X Axis to Chord on NoCavCpPolyline and Y Axis

to Pressure Coefficient on NoCavCpPolyline.

14. Click Apply.

The chart line (containing data from the first solution) is created, added

to the chart object, and displayed in the Chart Viewer.

You will now add a chart line to show experimental results.

15. The experimental results are provided in the file

HydrofoilExperimentalCp.csv. Copy this file to your working

directory from the examples directory.

16. Click New Line.

A new panel entitled Chart Line 3 replaces the Chart Line 2 panel.

17. Set Type to From File.

18. Set Line Name to Experimental Cp - with cavitation.

19. Click Browse and open HydrofoilExperimentalCp.csv.

Page 473: Tutorials

Cavitation Around a Hydrofoil—Viewing the Results of the Cavitation Solution

CFX-5 Tutorials Page 457

20. Expand the Appearance frame, then set:

a. Line Style to None

b. Symbols to Rectangle

21. Click Apply.

The chart line (containing experimental data) is created, added to the

chart object, and displayed in the Chart Viewer.

If you wish to print the chart, select File > Print from the main menu whilethe Chart Viewer is visible (not when the 3D Viewer is visible). This will allowyou to print the chart to an image file.

Page 474: Tutorials

Cavitation Around a Hydrofoil—Viewing the Results of the Cavitation Solution

Page 458 CFX-5 Tutorials

Page 475: Tutorials

CFX-5 Tutorials Page 459

CFX-5 Tutorials

Tutorial 20

Fluid StructureInteraction and MeshDeformation

Sample files used in this tutorial can be copied to your workingdirectory from <CFXROOT>/examples. See Working Directory (p. 2)and Sample Files (p. 3) for more information.

Sample files referenced by this tutorial include:

• Valvefsi (folder)

• ValveFSI.pre

• ValveFSI_expressions.ccl

• ValveFSIUserF.pre

Page 476: Tutorials

Fluid Structure Interaction and Mesh Deformation—Introduction

Page 460 CFX-5 Tutorials

20.A: Introduction

20.A.1: Features explored in this tutorial

Introduction: This tutorial addresses the following features of CFX-5.

You learn about:

• Moving Mesh

• Fluid-Solid Interaction (without modelling solid deformation)

• MPEG creation

• Monitor Points

Component Feature Details

CFX-Pre User Mode General Mode

Simulation Type Transient

Fluid Type General Fluid

Domain Type Single Domain

Turbulence Model k-Epsilon

Heat Transfer None

Output Control

CEL (CFX Expression Language)

User Fortran

Boundary Conditions Inlet (Subsonic)

Outlet (Subsonic)

Wall: No-Slip

Wall: Adiabatic

Timestep Transient Example

Transient Results File

CFX-Solver Manager n/a n/a

CFX-Post Plots Animation

Point

Slice Plane

Vector

Other Opening

Symmetry Plane

Wall: No Slip

Wall: Moving

Page 477: Tutorials

Fluid Structure Interaction and Mesh Deformation—Introduction

CFX-5 Tutorials Page 461

20.A.2: Before beginning this tutorial

Introduction: It is necessary that you have a working directory and thatsample files have been copied to that directory. This procedure is detailedin "Introduction to the CFX-5 Tutorials" on page 1.

Unless you review the introductory materials and perform required stepsincluding setting up a working directory and copying related sample files,the rest of this tutorial may not work correctly. It is recommended that youperform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working withother tutorials as these three tutorials detail specific procedures that aresimplified in subsequent tutorials.

Page 478: Tutorials

Fluid Structure Interaction and Mesh Deformation—Introduction

Page 462 CFX-5 Tutorials

20.A.3: Overview of the problem to solve

This tutorial involves a moving mesh and a two-way fluid-structureinteraction (FSI) between a ball and a fluid in a check valve. The geometry,modelled as a 2-D slice (0.1 mm thick), is displayed in "Figure 1: Overview ofthe CheckValve Geometry" on page 462.

Figure 1: Overview of the CheckValve Geometry

Check valves are commonly used to allow uni-directional flow. Thecheck-valve in this tutorial is located on the top of a tank, and acts as apressure-relieving valve by moving to allow fluid to leave. The ball isconnected to a spring that acts to push the ball downward when the ball israised above the y=0 position. The forces on the ball are gravity, force dueto the spring, and force due to fluid flow. The ball is represented as a cavityregion in the mesh. The deformation of the ball is not modelled.

The ball ismodelled as acavity region witha simulatedspring forceactingdownwards.

Fluid flows up andaround the valve,acting againstgravity and theforce of the

4 mm

10 mm

4.5 mm

15 m

m

The ball is shownin thezero-displacement position. In thisposition, thespring applies noforce to the ball.

Gravity

x

y

Tank Region

Valve HousingRegion

Page 479: Tutorials

Fluid Structure Interaction and Mesh Deformation—Introduction

CFX-5 Tutorials Page 463

The tutorial is divided into two parts. In the first part, the motion of the ballis controlled by CEL expressions which account for the forces acting on theball, including the force imparted by the flow. In the second part of thetutorial, the motion of the ball is controlled by a Junction Box Routine thatupdates the ball position at the start of each time step by loading meshcoordinate files from a set of such files. The mesh coordinate files andrequired FORTRAN routines are provided with this tutorial.

Page 480: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using CEL Expressions to Govern Mesh

Page 464 CFX-5 Tutorials

20.B: Using CEL Expressions to Govern MeshDeformation

20.B.1: Setting up the Simulation in CFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session file ValveFSI.pre tocomplete this section for you and continue from Obtaining a Solution usingthe CFX-5 Solver (p. 472). See one of the first four tutorials for instructions onhow to do this.

20.B.2: Modelling the Ball Dynamics

When defining your own simulations, the mesh motion may already beknown. In such cases, it can be specified explicitly using the CEL. In thistutorial, the mesh motion is not known a-priori, and will be calculated usingthe forces that act on the ball. The dynamics equation that describes themotion of the ball is considered before setting up the simulation.

According to Newton’s Second Law, the time rate of change in the ball’slinear momentum is proportional to the net force acting on the ball. Indifferential form, the equation to be solved for the motion of the ball is:

where mBall is the mass of the ball (which is constant), velBall is thevelocity of the ball in the y coordinate direction, andFFlow, FSpring andFGrav are, respectively, the flow (viscous and drag), spring, andgravitational forces acting on the ball.

The left hand side of the equation is discretised to include an expression forthe new displacement of the ball (relative to the spring’s neutral position).The time derivative of the ball velocity is discretised as:

where velBallNew is further discretised as:

mBall*td

d velBall( ) FFlow FSpring– FGrav–=

d velBall( )dt

---------------------- velBallNew velBallOld–tStep

------------------------------------------------------=

velBallNew dBallNew dBallOld–tStep

-----------------------------------------------=

Page 481: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using CEL Expressions to Govern Mesh

CFX-5 Tutorials Page 465

The new displacement of the ball also appears in the expression for springforce:

The discrete form of the equation of motion for the ball is re-assembled, andthe ball displacement is isolated as:

No further substitutions are required because all of these quantities areavailable through the CFX Expression Language as presented below.

20.B.3: Preparing the Working Directory

1. Copy the mesh file ValveFSI.out from the examples/valvefsi

directory into your working directory.

1. Start CFX-Pre.

2. Select File > New Simulation.

3. Select General Mode.

4. Set File name to ValveFSI and then click Save.

20.B.4: Creating the Required Expressions

The expressions created in this step will determine the motion of the ball.

These expressions are provided in a CCL file. Alternatively, you can entereach of the expressions by hand.

To import theCCLexpressions

1. Copy ValveFSI_expressions.ccl from the examples directory

to your working directory.

2. Select File > Import CCL.

3. Select ValveFSI_expressions.ccl then click Open.

4. Continue from Importing the Initial Mesh (p. 466).

FSpring kSpring dBallNew×=

dBallNew

FFlow FGrav mBall velBallOld×tStep

------------------------------------------ mBall dBallOld×

tStep2---------------------------------------+ +–⎝ ⎠

⎛ ⎞

kSpring mBall

tStep2-------------+⎝ ⎠

⎛ ⎞-------------------------------------------------------------------------------------------------------------------------------------=

Page 482: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using CEL Expressions to Govern Mesh

Page 466 CFX-5 Tutorials

To enter theexpressionsindividually

1. Click Expressions Editor (or click the Expressions tab in the

CFX-Pre Workspace).

2. Click New .

3. Set Name to kSpring then click OK.

4. For the Definition, enter the following expression:

300 [N m^-1]

5. Click Apply.

6. In the same way, create the following new expressions:

Note: The areaAve function calls are evaluated using solution data from theend of the previous time step; These calls are not updated during thesolution of the mesh displacement equations. Thus, dBallOld and velBallOldrepresent the required ‘old’ values.

20.B.5: Importing the Initial Mesh

Tip: While we provide a mesh to use with this tutorial, you may want todevelop your own in the future. Instructions on how to create this meshin CFX-Mesh are available from the CFX Community Site. Please see"Mesh Generation" on page 3 for details.

1. Click the Mesh tab.

2. Right-click in the Mesh Selector and select Import.

Name Definition

tStep 5.0e-5 [s]

tTotal 7.5e-3 [s]

denBall 7800 [kg m^-3]

volBall pi * (2.0 [mm])^2 * 1e-4 [m]

mBall denBall * volBall

FFlow force_y()@Ball

FGrav mBall * 9.81 [m s^-2]

velBallOld areaAve(Mesh Velocity v)@Ball

dBallOld areaAve(Total Mesh Displacement y)@Ball

dBallNumer FFlow - FGrav + mBall*velBallOld/tStep +mBall*dBallOld/tStep^2

dBallDenom kSpring+mBall/tStep^2

dBallNew dBallNumer/dBallDenom

Page 483: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using CEL Expressions to Govern Mesh

CFX-5 Tutorials Page 467

3. Change the Mesh Format to PATRAN Neutral.

4. Select the file ValveFSI.out.

5. Change Mesh Units to mm, then click OK.

20.B.6: Setting the Simulation Type

The Mesh Deformation feature is only available for transient simulations.Therefore this simulation must be run as a transient simulation.

1. Click Simulation Type .

2. Set Option to Transient.

3. Under Time Duration, set:

a. Option to Total Time

b. Total Time to the expression, tTotal

4. Under Time Steps, set:

a. Option to Timesteps

b. Timesteps to the expression, tStep

5. Under Initial Time, set:

a. Option to Automatic with Value

b. Time to 0 [s]

6. Click OK.

1. Before creating the domain, click the Materials tab to load the Material

and Reaction libraries.

2. Click Domain .

3. Set Name to CheckValve then click OK.

4. On the General Options panel:

a. Set Location to Assembly.

b. Set Domain Type to Fluid Domain.

c. Click to expand the Fluids List and select Methanol CH4O.

d. Under Mesh Deformation, set Option to Regions of MotionSpecified.

e. Leave the other settings at their default values.

5. Click OK to create the domain.

Page 484: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using CEL Expressions to Govern Mesh

Page 468 CFX-5 Tutorials

Mesh motion specifications are applied to two and three dimensionalregions of the domain (i.e. boundaries and subdomains, respectively) asfollows:

• The mesh motion specification for the ball will be displacement they-direction according to the CEL expression dBallNew (which happensto be a single CEL variable).

• The mesh motion specification for the walls of the valve housing will beUnspecified.This settings allows the mesh nodes to move freely. The motion of themesh points on this boundary will be strongly influenced by the motionof the ball. Since the ball moves vertically, the surrounding mesh nodeswill also move vertically and will therefore remain on the valve housing.This mesh motion specification helps to preserve the quality of themesh on the upper surface of the ball.

• The mesh motion specifications for the tank opening and tank volumewill be Stationary.The stationary tank volume ensures that the mesh does not fold at thesharp corner that exists where the valve joins the tank. The stationarymesh for the tank opening prevents the mesh nodes from moving (If thetank opening had unspecified mesh motion, the mesh nodes on thisboundary would move vertically and separate from the non-verticalparts of the boundary.).

To create theboundarycondition forthe ball

1. Click Boundary Condition .

2. Set Name to Ball then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to BALL

4. Click the Boundary Details tab, then:

a. Set Wall Influence on Flow to No Slip.

b. Turn on Wall Velocity Relative To and set it to Mesh Motion.

5. On the Mesh Motion tab, set:

a. Option to Specified Displacement

b. Displacement X Component to 0 [m]

c. Displacement Y Component to dBallNew

d. Displacement Z Component to 0 [m]

6. Click OK to create the boundary condition.

Page 485: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using CEL Expressions to Govern Mesh

CFX-5 Tutorials Page 469

To create thesymmetryboundarycondition

Since a 2D representation of the flow field is being modelled (using a 3Dmesh with one element thickness in the Z direction) symmetry boundarieswill be created on the low and high Z 2D regions of the mesh.

1. Click Boundary Condition .

2. Set Name to Sym then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Symmetry

b. Location to SYMP1 and SYMP2

4. Click OK to create the boundary condition.

To create thevertical valvewall boundarycondition

1. Click Boundary Condition .

2. Set Name to ValveVertWalls, then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Wall

b. Location to VPIPE LOWX and VPIPE HIGHX

4. Click the Boundary Details tab:

a. Set Option for Wall Influence on Flow to No Slip.

b. Turn on Wall Velocity Relative To and set it to Boundary Frame.

5. Click the Mesh Motion tab, then set Option to Unspecified.

6. Click OK to create the boundary condition.

To create thetank openingboundarycondition

1. Click Boundary Condition .

2. Set Name to TankOpen, then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Opening

b. Location to BOTTOM

4. Click the Boundary Details tab, then set:

a. Mass and Momentum to Pressure and Direction (stable)

b. Relative Pressure to 6 [atm]Note the change in units from Pa to atm.

5. On the Mesh Motion panel, verify that the setting for Option is

Stationary.

6. Click OK to create the boundary condition.

Page 486: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using CEL Expressions to Govern Mesh

Page 470 CFX-5 Tutorials

To create thevalve openingboundarycondition

1. Click Boundary Condition .

2. Set Name to ValveOpen, then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Opening

b. Location to TOP

4. Click the Boundary Details tab, then set:

a. Mass and Momentum to Static Pressure

b. Relative Pressure to 0 [atm]

5. On the Mesh Motion panel, verify that the setting is Stationary.

6. Click OK to create the boundary condition.

Note: Opening boundary types are used to allow the flow to leave andre-enter the domain across the inflow and outflow boundaries. Thisbehaviour is expected due to the oscillatory motion of the ball and due tothe potentially large region of flow re-circulation that will occur on thedownstream side of the ball.

Verifying thatthe defaultboundary isset to astationaryspecification

The default boundary applies to all 2D boundary regions which have nototherwise been given a boundary condition. In this case, the defaultboundary is the tank wall.

1. In the Physics Selector, double-click CheckValve Default.

2. On the Mesh Motion tab, check that Option is set to Stationary.

3. Click OK.

20.B.7: Creating the Tank Subdomain

1. Click Subdomain .

2. Set Name to Tank then click OK.

3. On the Basic Settings panel, set Location to CV3D SUB.

4. Click the Mesh Motion tab, then set Option to Stationary.

5. Click OK to create the subdomain.

Page 487: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using CEL Expressions to Govern Mesh

CFX-5 Tutorials Page 471

20.B.8: Setting Initial Values

1. Click Global Initialisation .

Since a transient simulation is being modelled, initial values arerequired for all variables. The Global Initialisation form will appearwith each variable set to Automatic with Value.

2. Under Cartesian Velocity Components, set:

a. U to 0 [m/s]

b. V to 0 [m/s]

c. W to 0 [m/s]

3. Set Relative Pressure to 0 [Pa].

4. Turn on Turbulence Eddy Dissipation and set it to Automatic with

Value.

5. Click OK to set the Initial Values.

20.B.9: Setting Solver Control

1. Click Solver Control .

2. Under Advection Scheme, leave Option set to High Resolution.

3. Set Transient Scheme to Second Order Backward Euler.

4. Set Max Iter. Per Timestep to 5.

5. Turn on Minimum Number of Coefficient Loops and set the value to

2.

6. Leave the Convergence Criteria settings at their default values.

7. Click OK to set the Solver Control settings.

20.B.10: Setting Output Control

This step sets up transient results files to be written at set intervals.

1. Click Output Control .

2. Click the Transient Results tab.

3. Click New .

4. Accept the default name Transient Results 1 by clicking OK.

Page 488: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using CEL Expressions to Govern Mesh

Page 472 CFX-5 Tutorials

5. Under Transient Results 1:

a. Set Option to Minimal.

b. In the Output Variables List, select Pressure and Velocity.

c. Turn on Time Interval and set it to tStep.

6. Click the Monitor tab.

7. Turn on Monitor Options.

8. Under Monitor Points and Expressions:

a. Click New.

b. Set Name to Ball Displacement.

c. Set Option to Expression.

d. Set Expression Value, to dBallOld.

9. Click OK to set the Output Control settings.

20.B.11: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

Write Solver File is displayed.

2. Leave Operation set to Start Solver Manager.

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

20.B.12: Obtaining a Solution using the CFX-5 Solver

When the CFX-Solver Manager starts:

1. Click Start Run.

The CFX-Solver will calculate the solution.

2. Click the User Points tab and watch the value of the Ball Displacement

as the solution proceeds.

The largest value of the ball displacement occurs after about 0.001 s (20timesteps) and is approximately 0.00098 m (0.98 mm). After about 0.005 s(100 timesteps) the ball settles at a displacement of around 0.67 mm.

3. When the CFX-Solver has finished, click OK in the message box.

4. Click Post-Process Results .

Page 489: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using CEL Expressions to Govern Mesh

CFX-5 Tutorials Page 473

5. When Start CFX-Post appears, turn on Shut down Solver Manager

then click OK.

20.B.13: Viewing the Results in CFX-Post

Creating UserLocations andPlots

In the following steps, you will create an XY plane that lies midway betweenthe two symmetry planes. The plane will be used to show mesh movement;it will also serve as a locator for a vector plot that will be used in ananimation.

Creating a sliceplane

1. Click Create Plane .

2. Under Geometry, set:

a. Method to XY Plane

b. Z to 5e-05 [m]

3. Under Render:

a. Turn off Draw Faces.

b. Turn on Draw Lines.

4. Click Apply to create the plane.

Creating aPoint

5. Create a Point at (0, 0.0003, 0.0001) using the XYZ method.

This is a reference point for the low Y point of the ball at timestep 0. Click

Apply.

6. Open the Timestep selector and load the results for a few different

timesteps (for example: 0, 20, 45, 85, 125).

You will see the ball in different positions. The mesh deformation will

also be visible.

The maximum displacement occurs at around 20 timesteps (as was shownin the CFX-Solver Manager), which is before the ball reaches equilibrium.

20.B.14: Creating an animation with velocity vectors

1. Turn off the visibility of slice plane Plane 1.

Creating aVector Plotusing the sliceplane

2. Create a Vector Plot, set Locations to slice plane Plane 1 and Variable

to Velocity. Click Apply.

3. Using the Timestep Selector, load time value 0.

Page 490: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using CEL Expressions to Govern Mesh

Page 474 CFX-5 Tutorials

4. Click Show Animation Editor .

The Animation Editor appears.

5. In the Animation Editor:

a. Click New to create KeyframeNo1.

b. Highlight KeyframeNo1 in the Keyframe Creation and Editinglist, then change # of Frames to 148.This will produce an animation keyframe at each timestep, resultingin an MPEG that plays for just over six seconds.

6. Load the last Timestep (150) using the Timestep Selector.

7. In the Animation Editor:

a. Click New to create KeyframeNo2.The # of Frames parameter has no effect for the last Keyframe, soleave it at the default value.

b. Click the Options tab, then, in Animation, change Width to 704and Height to 480.

c. Click the Advanced tab, then set Quality to Custom.

d. Turn off Variable Bit Rate and set Bit Rate to 3000000.This limits the bit rate so that the movie will play in most players.You can lower this value if your player cannot handle this bit rate.

e. Click OK.

f. Turn on Save Animation Movie.

g. Click Browse next to the MPEG File data box to set a path andfile name for the MPEG file.The file extension “.mpg” will NOT be added if you leave it out. If thefile path is not given, the file will be saved in the directory fromwhich CFX-Post was launched.

h. Click Save in Save MPEG.The MPEG file name (including path) will be set, but the MPEG willnot be created yet.

i. Frame 1 is not loaded (The loaded frame is shown in the top rightcorner of the Animation Editor, beside F:). Click To Beginningto load it then wait a few seconds for the frame to load.

j. Click Play Forward .The MPEG will be created as the animation proceeds. This will beslow, since a time step must be loaded and objects must be createdfor each frame. To view the MPEG file, you need to use a viewer thatsupports the MPEG format.

Page 491: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using CEL Expressions to Govern Mesh

CFX-5 Tutorials Page 475

8. When you have finished, exit from CFX-Post.

Page 492: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using a Junction Box Routine to Govern

Page 476 CFX-5 Tutorials

20.C: Using a Junction Box Routine to GovernMesh Deformation

In this part of the tutorial, a Junction Box Routine will be used to read in asequence of meshes, causing a sinusoidal motion of the ball. The meshesare provided for convenience; they were generated based on the followingexpression for displacement of the ball in the y direction as a function oftime:1[mm] * (1-cos(2*pi*t/(20.*tStep)))

This is an alternative to using CEL expressions to govern mesh deformation.

20.C.1: Setting up the Simulation in CFX-Pre

This section describes the step-by-step definition of the flow physics inCFX-Pre. If you wish, you can use the session fileValveFSIUserF.pre tocomplete this section for you and continue from Obtaining a Solution usingthe CFX-5 Solver (p. 484). See one of the first four tutorials for instructions onhow to do this.

Important: If using a Linux platform, the Portland Group Fortran compiler isrequired for this tutorial. See Defining the Junction Box Routine (p. 479).

Preparing theWorkingDirectory

To prepare the working directory, copy the files and sub-directoriescontained in <CFXROOT> /examples/valvefsi into your workingdirectory.

The working directory should now contain the initial mesh file(ValveFSI.out), plus two sub-directories. The meshes sub-directorycontains meshes for one period of ball motion, with an amplitude of 1 mm,in the sequence of files CheckValve.0 to CheckValve.19. The

Page 493: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using a Junction Box Routine to Govern

CFX-5 Tutorials Page 477

juncbox sub-directory contains the Fortran source files that are used in theJunction Box Routine that will read the sequence of mesh files. Thesubroutines contained in these files are summarized as:

• update_mesh_user: Highest level Junction Box Routine that isresponsible for replacing the mesh coordinates inside CFX-5 with theupdated coordinates read in or defined by the low level routine,set_mesh_user.

• set_mesh_user: Low level routine that defines the updated meshcoordinates. In this tutorial, this is done by reading mesh files. In otherapplications, however, this could be done by using a set of Fortrancommands that directly modify the existing mesh coordinates.

• update_crdvx_user and upd_crdvx_user: Routines to call for thegeneration of a node map between the initial mesh and the firstuser-defined mesh, and to repeatedly use this map to replace the meshinside CFX-5 with the remaining sequence of user-defined meshes.

Two important attributes of the sequence of meshes read by theSET_MESH_USER routine warrant highlighting:

1. The coordinates of the first mesh in the sequence must be identical to

the initial solver-internal mesh coordinates. This ensures that a node

map between the user and initial solver-internal mesh coordinates can

be generated.

2. The topology (i.e. connectivity) of all meshes in the sequence does not

change. This ensures that the map between the user and solver-internal

mesh coordinate can be re-used.

20.C.2: Creating a New Simulation

1. Start CFX-Pre.

2. Select File > New Simulation.

3. Select General Mode.

4. Set File name to ValveFSIUserF and then click Save.

20.C.3: Creating the Required Expressions

The expressions created in this step are used for the simulation setup andfor monitoring values during the solution process.

Page 494: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using a Junction Box Routine to Govern

Page 478 CFX-5 Tutorials

To create anexpression forforce on theball due tofluid flow

The creation of this expression is very simple, as CFX Expression Language(CEL) provides a way to calculate directional force on any region. For moreinformation, please refer to "CFX Expression Language" on page 33 in thedocument "CFX-5 Reference Guide".

1. Click Expressions Editor (or click the Expressions tab in the

CFX-Pre Workspace).

2. Click New .

3. Set Name to FFlow then click OK.

4. For the Definition, enter the following expression:

force_y()@Ball

5. Click Apply.

To create anexpression forthe totalsimulationtime

The period of oscillation for the ball will be 1e-3 s (20 timesteps of 5e-5[s]each), and a total of two periods will be simulated.

1. Click New .

2. Set Name to tTotal then click OK.

3. For the Definition, enter the following expression:

2e-3 [s].

4. Click Apply.

To create anexpression forthe time step

1. Click New .

2. Set Name to tStep then click OK.

3. For the Definition, enter the following expression: 5.e-5 [s]

4. Click Apply.

20.C.4: Importing the Initial Mesh

1. Click the Mesh tab.

2. Click Import Mesh .

3. Change the Mesh Format to PATRAN Neutral.

4. Select the file ValveFSI.out.

5. Change Mesh Units to mm.

6. Click OK.

Page 495: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using a Junction Box Routine to Govern

CFX-5 Tutorials Page 479

20.C.5: Defining the Junction Box Routine

You must compile and link the provided FORTRAN routines before theCFX-Solver is started. The cfx5mkext command is used to create therequired objects and libraries as described below.

Important: The user FORTRAN routine performs file input/outputoperations. On Linux platforms, the Portland Group compiler must be used(not g77). Information on obtaining this compiler is found in "UserSubroutines" on page 32 in the document "CFX-5 Installation". If you are notsure which FORTRAN compiler is used, check the output from the cfx5mkextcommand (which is run in the next step) and ensure that a path to thePortland Group compiler is used.

Important: To use the cfx5mkext command make sure that the FORTRANcompiler is in your path. See "Default FORTRAN Compilers" on page 433 inthe document "CFX-5 Solver Modelling" for a list of commands that shouldexecute the compiler on each platform.

1. Select Tools > Command Editor .

2. Type the following in the Command Editor (make sure you do not miss

the semi-colon at the end of the line):

! system ("cfx5mkext -name meshread juncbox/*.F") == 0 or die;

• This is equivalent to executing:cfx5mkext -name meshread juncbox/*.Fat an OS command prompt.

• The “!” indicates that the following line is to be interpreted aspower syntax and not CCL. Everything after the “!” symbol isprocessed as Perl commands.

• “system” is a Perl function to execute a system command.

• The “== 0 or die” will cause an error message to be returned if, forsome reason, there is an error in processing the command.

3. Click Process to compile the subroutine.

A subdirectory whose name is system dependent will be created in yourworking directory (For example, on IRIX a subdirectory named irixwill becreated in your working directory.). This subdirectory contains the sharedobject library named meshread.

Note: You can introduce the -double option to compile the subroutinesfor use with double precision CFX-Solver executables.

Page 496: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using a Junction Box Routine to Govern

Page 480 CFX-5 Tutorials

Note: If you are running problems in parallel over multiple platforms thenyou will need to create these subdirectories using the cfx5mkextcommand for each different platform.

The following steps create a CCL object that specifies the path to themeshes directory and the number of meshes. The FORTRAN subroutinelater looks up the values contained in this object so that it can determinewhere the meshes are located, and how many exist.

4. Type the following CCL into the Command Editor window, replacing

<filepath> with the path to your current directory.USER: MeshDir = <filepath>/meshes NMeshes = 20END

If you are working on windows, substitute the forward slash with abackslash. For example:

• UNIX: MeshDir =/home/user/cfx5/tutorials/ValveFSI/meshes

• Windows: MeshDir =c:\user\cfx5\tutorials\ValveFSI\meshes

5. Click Process to apply the settings.

The next step sets up the Junction Box Routine.

6. Click User Routine .

7. Set Name to Mesh Read then click OK.

8. Set Option to Junction Box Routine.

9. Set Calling Name to the name of the highest level routine:

update_mesh_user.

10. Set Library Name to meshread.

11. Set Library Path to the current working directory. For example:

• UNIX: /home/user/cfx5/tutorials/valvefsi

• Windows: c:\user\cfx5\tutorials\valvefsi

12. Set Junction Box Location to Start of Time Step.

13. Click OK.

20.C.6: Setting the Simulation Type

This tutorial must be run as a transient simulation in order to use the MeshDeformation feature.

Page 497: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using a Junction Box Routine to Govern

CFX-5 Tutorials Page 481

Click Simulation Type .

1. Set Option to Transient.

1. Under Time Duration, set:

a. Option to Total Time

b. Total Time to the expression, tTotal

2. Under Time Steps, set:

a. Option to Timesteps

b. Timesteps to the expression, tStep

3. Under Initial Time, set:

a. Option to Automatic with Value

b. Time to 0 [s]

4. Click OK.

20.C.7: Creating the Domain

To create thedomain

1. Click Domain .

2. Set Name to CheckValve then click OK.

3. On the General Options panel:

a. Set Location to Assembly

b. Set Domain Type to Fluid Domain

c. Set Fluids List to Methanol CH4O.

d. Under Mesh Deformation, set Option to Junction Box Routine.

e. Set Junction Box Routine to Mesh Read.

4. Click OK to create the domain.

20.C.8: Creating the Boundary Conditions

To create theboundarycondition forthe ball

1. Click Boundary Condition .

2. Set Name to Ball then click OK.

3. On the Basic Settings panel, set:

a. Type to Wall

b. Set Location to BALL

Page 498: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using a Junction Box Routine to Govern

Page 482 CFX-5 Tutorials

4. Click the Boundary Details tab, then:

a. Set Wall Influence on Flow to No Slip.

b. Turn on Wall Velocity Relative To and set it to Mesh Motion.

5. Click OK to create the boundary condition.

To create thesymmetryboundarycondition

Since a 2D representation of the flow field is being modelled (using a 3Dmesh with one element thickness in the Z direction) symmetry boundarieswill be created on the low and high Z 2D regions of the mesh.

1. Click Boundary Condition .

2. Set Name to Sym then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Symmetry

b. Location to SYMP1 and SYMP1

4. Click OK to create the boundary condition.

To create thetank openingboundarycondition

1. Click Boundary Condition .

2. Set Name to TankOpen then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Opening

b. Location to BOTTOM

4. Click the Boundary Details tab, then set:

a. Mass and Momentum to Pressure and Direction (stable)

b. Relative Pressure to 6 [atm]Note the change in units from Pa to atm.

5. Click OK to create the boundary condition.

To create thevalve openingboundarycondition

1. Click Boundary Condition .

2. Set Name to ValveOpen then click OK.

3. On the Basic Settings panel, set:

a. Boundary Type to Opening

b. Location to TOP

4. Click the Boundary Details tab, then set:

a. Mass and Momentum to Static Pressure

b. Relative Pressure to 0 [atm]

Page 499: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using a Junction Box Routine to Govern

CFX-5 Tutorials Page 483

5. Click OK to create the boundary condition.

Note: Opening boundary types are used to allow the flow to leave andre-enter the domain across the inflow and outflow boundaries. Thisbehaviour is expected due to the oscillatory motion of the ball and due tothe potentially large region of flow re-circulation that will occur on thedownstream side of the ball.

To create theremaining wallboundaryconditions

1. In the Physics Selector, double-click CheckValve Default.

2. Click the Boundary Details tab, then:

a. Set Wall Influence on Flow to No Slip.

b. Turn on Wall Velocity Relative To and set it to Boundary Frame.

3. Click OK to create the boundary condition.

20.C.9: Setting Initial Values

1. Click Global Initialisation .

Since a transient simulation is being modelled, initial values arerequired for all variables. The Global Initialisation form will appearwith each variable set to Automatic with Value.

2. Under Cartesian Velocity Components, set:

a. U to 0 [m/s]

b. V to 0.1 [m/s]

c. W to 0 [m/s]

3. Set Relative Pressure to 0 [Pa].

4. Turn on Turbulence Eddy Dissipation and set it to Automatic with

Value.

5. Click OK to set the Initial Values.

20.C.10: Setting Solver Control

1. Click Solver Control .

2. Under Advection Scheme, leave Option set to High Resolution.

3. Set Transient Scheme to Second Order Backward Euler.

4. Set Max Iter. Per Timestep to 5.

5. Turn on Minimum Number of Coefficient Loops and set the value to 2.

6. Leave the Convergence Criteria settings at their default values.

Page 500: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using a Junction Box Routine to Govern

Page 484 CFX-5 Tutorials

7. Click OK to set the Solver Control settings.

20.C.11: Setting Output Control

A Monitor Point will be used to monitor the values of FFlow at each timestep.

1. Click Output Control .

2. Click the Monitor tab.

3. Turn on Monitor Options.

4. Under Monitor Points and Expressions:

a. Click New.

b. Set Name to force on ball due to flow.

c. Set Option to Expression.

d. Set Expression Value to FFlow.

5. Click OK to set the Output Control settings.

20.C.12: Writing the Solver (.def) File

1. Click Write Solver (.def) File .

Write Solver File is displayed.

2. Leave Operation set to Start Solver Manager.

3. Leave Report Summary of Interface Connections turned off and Quit

CFX-Pre turned on.

4. Click OK.

5. Click Yes when asked if you want to save the CFX file.

20.C.13: Obtaining a Solution using the CFX-5 Solver

When the CFX-Solver Manager starts:

1. Click Start Run. The CFX-Solver will calculate the solution.

2. When the CFX-Solver has finished, click OK in the message box.

20.C.14: Analysing the Fluid Flow Force on the Ball

In the Solver Manager, click the User Points tab and observe the plot for themonitored value of FFlow (force imparted on the ball by the flow) as thesolution develops. Using the mouse, click on various points on the curve.

Page 501: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using a Junction Box Routine to Govern

CFX-5 Tutorials Page 485

Note: By default, the CFX-Solver Manager will not plot a point for each innerloop iteration. To include these points in the plot, selectWorkspace > Workspace Properties. On the Global Plot Settings tab,turn on Plot Coefficient Loop Data and click OK.

Page 502: Tutorials

Fluid Structure Interaction and Mesh Deformation—Using a Junction Box Routine to Govern

Page 486 CFX-5 Tutorials

Page 503: Tutorials

CFX-5 Tutorials Page i

CFX-5 TutorialsIndex

A

additional variables 101to model pH

creating 300airlift reactor, example 361animation

plot animation 405auto annotation 116, 404automotive catalytic converter tutorial227axi-symmetric modelling example 287

B

baffles 342blade, impeller 342boundary conditions

for free surface flows 165modify 109

buoyancyexample 149

butterfly valve example 201

C

catalytic converterautomotive 227example 227

cavity example 149changing

timestep 115

chemical reaction example 287CHT

example 309CHT example 309circular vent example 97conjugate heat transfer

example 309continuing the transient run 121contours

adding to surface plot 41contours, adding 41create

boundary conditions 128, 314fluid domain 234isosurface 115pressure and volume fraction ex-

pressions 165subdomain 235surface plot of y+ 146vectors 143

creating and modifying streamlines 92

D

defaultlegend 34

domaincreating 295modifying 300

Page 504: Tutorials

Page ii CFX-5 Tutorials

E

energymodel

thermal 155total 191

examples 1airlift reactor 361axi-symmetric 287buoyancy 149butterfly valve 201catalytic converter 227cavity 149chemical reaction 287CHT 309circular vent 97conjugate heat transfer 309free surface 161gas-liquid flow in an airlift reactor

361heat exchanger 309mixing tube 287multicomponent flow 287multiphase flow 361solid region 309static mixer 7steady state simulation 287, 309supersonic flow 187transient simulation 149two-dimensional 149valve 201vent 97wing 187

expression languageshear rate dependent viscosity 250velocity profile 210

expression method for inlet velocityprofile 210expressions to model the reaction

creating 298

F

face culling 319file

generating output 116flow example

gas-liquid 361multicomponent 287multiphase 361supersonic 187

fluid subdomaincreating 301

free surfaceexample 161setting boundary conditions 165

G

gas-liquid flow example 361generating output files 116greyscale 424

H

heat exchanger example 309

I

impeller blade 342inlet (supersonic) 191

M

method for the inlet velocity profile, ex-pression 210mixer

static mixer example 7

Page 505: Tutorials

CFX-5 Tutorials Page iii

with refined mesh 49mixing tank walls 342mixing tube example 287model

creating 52thermal energy 155total energy 191

modellingexample

axi-symmetric 287two-dimensional 149

modifystreamlines 92

monitoring the run 280multicomponent flow example 287multiphase

flow example 361mixer example 339

O

obtaining a solutionin parallel 134in serial 134

opening 103existing simulation 108

outlet (supersonic) 192outline plot 29output files

generating 116

P

parallelrunning 135solution 280

pH, calculating 297power syntax 147Print

Greyscale Graphic 424problem definition 263

R

reactiondefining 296

runin parallel 135monitoring 280

S

Saving 42serial solution 280set

boundary conditions 393, 416, 430buoyancy reference density 167initial values 194to run in parallel 135transient rotor-stator calculation

276simulation example

steady state 287, 309transient 149

solidregion example 309

staticmixer example 7

refined mesh 49steady state simulation example 287,309streamlines

creating and modifying 92superficial velocity 379supersonic flow

example 187surface plot 147symmetry planes 253

Page 506: Tutorials

Page iv CFX-5 Tutorials

syntax, power 147

T

textauto annotation 116, 404

thermal energy model 155total energy model 191transient simulations

example 97, 149tutorial examples 1

<italic>see also examplestwo-dimensional modelling example149

U

usingcfx5mkext command 212, 390, 479symmetry planes 141

V

valveexample 201

variablesuser vector 199

velocitysuperficial 379

vent example 97viewing

inflated elements 67mesh partitions (parallel only) 148results 177

W

wallboundary conditions 397, 419free slip 129

wing example 187writing

definition file 268