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

CFX-5 Tutorials

Notice
This document and the CFX software products described or referred to in it are confidential and proprietary products of ANSYS Canada Ltd. or its licensors. They are provided under, and are subject to, the terms and conditions of a written license agreement between ANSYS Canada Ltd. or its licensors, and their customers, and must not be transferred, disclosed or otherwise provided to third parties unless otherwise permitted by that agreement. CFX is a registered trademark of CFX Ltd. CFX is a trademark of Sony Corporation in Japan, which has been licensed by CFX Ltd. All product names mentioned in this document are trademarks or registered 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 Drive Waterloo, Ontario Canada N2L 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 by email to cfx-ino-na@ansys.com.

Table of Contents
CFX-5 Tutorials

CFX-5 Tutorials Table of Contents


CFX-5 Tutorials Introduction to the CFX-5 Tutorials
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sample Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 3 3

Helpful Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 File Housekeeping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 List of Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Flow in a Static Mixer


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

CFX-5 Tutorials

Page iii

Table of Contents

Defining a Simulation Using Quick Setup Mode in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . 10 Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Defining Basic Settings of General Physics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Importing a Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Setting Zoom Values Using the Viewing Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Setting Rotated or Isometric View Values Using the Viewing Tools . . . . . . . . . . . . . . 14 Defining Model Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Defining Solver Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Defining Boundaries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Setting Boundary Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Setting Flow Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Setting Temperature Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Reviewing Boundary Conditions Definition for Accuracy . . . . . . . . . . . . . . . . . . . . . . . . 19 Creating the Second Inlet Boundary Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Creating the Outlet Boundary Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Moving to General Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Playing the Session File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Obtaining a Solution Using CFX-Solver Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Using Define Run With Data From a Previous Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Moving from CFX-Solver to CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Viewing Results in CFX-Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Setting the Edge Angle for a Wireframe Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Creating a Point for the Origin of the Streamline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Creating a Streamline Originating from a Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Rearranging the Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Configuring a Default Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Creating a Slice Plane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Defining Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Configuring Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Rendering Slice Planes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Colouring the Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Moving the Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Adding Contours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Saving and Restoring Views Using Cameras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Working with Animations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Showing the Animation Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Creating the First Keyframe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Creating the Second Keyframe. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Viewing the Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Modifying the Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Saving to MPEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Exiting CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Page iv CFX-5 Tutorials

Table of Contents

Flow in a Static Mixer (Refined Mesh)


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Defining the Simulation using General Mode in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Importing a Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Importing CCL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Viewing Domain Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Viewing the Boundary Condition Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Defining Solver Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Playing the Session File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Obtaining a Solution Using Interpolation with CFX-Solver . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Interpolating the Results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Using Define Run With Data From a Previous Run. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Confirming Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Moving from CFX-Solver to CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Viewing Results in CFX-Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Creating a Slice Plane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Colouring the Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Viewing the Surface Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Looking at the Inflated Elements in Three Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Creating a Second Volume Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Viewing the Surface Mesh on the Mixer Body. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Viewing the Layers of Inflated Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Using the Mesh Calculator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Viewing the Mesh Elements with Largest Face Angle Using a Volume . . . . . . . . . . . 71 Viewing the Mesh Elements with Largest Face Angle Using a Point. . . . . . . . . . . . . . 72 Exiting CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Flow in a Process Injection Mixing Pipe


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

CFX-5 Tutorials

Page v

Table of Contents

Defining a Simulation using General Mode in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Importing a Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Setting Temperature-Dependent Material Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Plotting an Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Evaluating an Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Modify Material Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Creating the Side Inlet Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Creating the Main Inlet Boundary Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Creating the Main Outlet Boundary Condition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Playing the Session File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Obtaining a Solution Using CFX-Solver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Using Define Run With Data From a Previous Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Moving from CFX-Solver to CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Viewing Results in CFX-Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Modifying the Outline of the Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Creating and Modifying Streamlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Modifying Streamline Colour Ranges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Colouring Streamlines with a Constant Colour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Duplicating and Modifying a Streamline Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Examining Turbulent Kinetic Energy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Exiting CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Flow from a Circular Vent


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Features explored in this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Before beginning this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Defining the Steady-State Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Playing the Session file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Creating an Additional Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Page vi CFX-5 Tutorials

Table of Contents

Obtaining a Solution to the Steady-State Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Defining the Transient Simulation in CFX-Pre. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Opening the Existing Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Modifying the Simulation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Modifying the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Initialisation Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Modifying the Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Obtaining a Solution to the Transient Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Changing Time Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Creating an Isosurface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Generating Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Continuing the Transient Run. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Flow Around a Blunt Body


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Creating Composite Regions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Obtaining a Solution Using the CFX-5 Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Obtaining a Solution in Serial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Obtaining a Solution in Parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Using Symmetry Planes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Creating Vectors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Creating Surface Streamlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Creating a Surface Plot of y+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Demonstrating Power Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Viewing the Mesh Partitions (Parallel Only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
CFX-5 Tutorials Page vii

Table of Contents

Buoyant Flow in a Partitioned Cavity


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Features explored in this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Before beginning this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Simulation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Setting Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

Free Surface Flow Over a Bump


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Features explored in this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Before beginning this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Creating Expressions for Initial and Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . 165 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Setting Mesh Adaption Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

Page viii

CFX-5 Tutorials

Table of Contents

Supersonic Flow Over a Wing


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 Creating Domain Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

Flow Through a Butterfly Valve


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 Defining the Properties of Sand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 Creating the Inlet Velocity Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Expression Method for the Inlet Velocity Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 User CEL Function Method for the Inlet Velocity Profile . . . . . . . . . . . . . . . . . . . . . . . . 211 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

CFX-5 Tutorials

Page ix

Table of Contents

Flow in a Catalytic Converter


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 Features explored in this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 Before beginning this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 Importing the Meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 Creating a Union Region. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 Creating the Subdomain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 Creating Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 Creating the Domain Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

Non-Newtonian Fluid Flow in an Annulus


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Features explored in this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Before beginning this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 Setting the Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

Page x

CFX-5 Tutorials

Table of Contents

Flow in an Axial Rotor/Stator


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Defining the Frozen-Rotor Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 Component Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 Importing the Meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Creating the Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 General Physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 Boundary Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 File Definition Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 Obtaining a Solution to the Frozen Rotor Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Setting up the Transient Rotor-Stator Calculation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 Opening the Existing Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 Modifying the Simulation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 Modifying the Domain Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 Modifying the Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 Creating Transient Results Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 Obtaining a Solution to the Transient Rotor-Stator Model. . . . . . . . . . . . . . . . . . . . . . . . . . 280 Serial Solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 Parallel Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 Monitoring the Run. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

Reacting Flow in a Mixing Tube


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

CFX-5 Tutorials

Page xi

Table of Contents

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

Conjugate Heat Transfer in a Heating Coil


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 Features explored in this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 Before beginning this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 Creating the Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 Solid Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 Creating the Subdomain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 Creating a Cylindrical Locator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 Specular Lighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 Exporting the Results to ANSYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 Exporting Data from the CFX-Solver Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 Processing the Results in ANSYS: GUI method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 PostProcessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 Processing the Results in ANSYS: Command Line method. . . . . . . . . . . . . . . . . . . . . . 335

Page xii

CFX-5 Tutorials

Table of Contents

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


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 Importing the Meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 Creating the Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Creating the Domain Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 Setting Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

Gas-Liquid Flow in an Airlift Reactor


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Creating a New Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 Writing the Solver (.def) File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 Coarse Mesh Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 Displaying the Entire Airlift Reactor Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 Fine Mesh Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377

CFX-5 Tutorials

Page xiii

Table of Contents

Air Conditioning Simulation


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 Features explored in this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 Before beginning this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Creating Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Inlet velocity profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 Setting up the Thermostat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 Setting the Simulation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Setting Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 Setting Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 Creating Graphics Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 Creating an Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405

Combustion and Radiation in a Can Combustor


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 Features explored in this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 Before beginning this tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 Using the Eddy Dissipation and P1 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 Defining the Simulation in CFX-Pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 Creating a Reacting Mixture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 Obtaining a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Page xiv CFX-5 Tutorials

Table of Contents

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

Cavitation Around a Hydrofoil


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 Creating the Initial Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 Defining the simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 Importing the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 Setting Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 Writing 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 Modifying 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 Features explored in this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 Before beginning this tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 Overview of the problem to solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
CFX-5 Tutorials Page xv

Table of Contents

Using CEL Expressions to Govern Mesh Deformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 Setting up the Simulation in CFX-Pre. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 Modelling the Ball Dynamics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 Preparing the Working Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 Creating the Required Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 Importing the Initial Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 Setting the Simulation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 Creating the Tank Subdomain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 Setting Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 Obtaining a Solution using the CFX-5 Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 Viewing the Results in CFX-Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 Creating an animation with velocity vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 Using a Junction Box Routine to Govern Mesh Deformation . . . . . . . . . . . . . . . . . . . . . . . 476 Setting up the Simulation in CFX-Pre. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 Creating a New Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 Creating the Required Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 Importing the Initial Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 Defining the Junction Box Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 Setting the Simulation Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 Creating the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 Creating the Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 Setting Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 Setting Solver Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 Setting Output Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 Writing the Solver (.def) File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 Obtaining a Solution using the CFX-5 Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 Analysing the Fluid Flow Force on the Ball . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484

Page xvi

CFX-5 Tutorials

CFX-5 Tutorials

Introduction to the CFX-5 Tutorials

CFX-5 Tutorials

Page 1

Introduction to the CFX-5 TutorialsIntroduction

Introduction
The tutorials have been designed to introduce the general techniques used in CFX-5 and provide tips on advanced modelling. Note: Before working with any of the tutorials you must set a working directory and copy the sample files provided with your software. For more information refer to "Working Directory" on page 2 and to "Sample Files" on page 3. Tutorials 1 through 4 introduce general principles used in CFX-5, including setting up the physical models, running CFX-5 Solver and visualising the results. They are designed to allow for your increasing experience. As you work through each tutorial, you will find the documentation details decrease. The remaining tutorials highlight specific functionality within CFX-5, including methods to import the mesh from other packages and running CFD problems in parallel. They assume familiarity with CFX-5 gained by working through the introductory tutorials. We recommend that you read the "List of Tutorials" on page 6 in the document "CFX-5 Tutorials" before beginning the tutorials. The files required to complete the tutorials are located in the subdirectory named examples, which is under the CFX-5.7.1 directory where CFX-5.7.1 was installed. See "CFX-5 Tutorials Table of Contents" on page i in the document "CFX-5 Tutorials" 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 working directory. The working directory is the default location that files used by a project are stored in. This directory is also the default location that is referenced 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 to determine the working directory. See "Working Directory" on page 22 in the document "CFX-5 Reference Guide" for more information. Standalone: The location is displayed in CFX-5.7.1 Launcher

Page 2

CFX-5 Tutorials

Introduction to the CFX-5 TutorialsIntroduction

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 reused as required. It also prevents corruption of the source files. It is generally recommended that sample files be copied into your working directory. To copy files from the default installation location to a working directory ensure you know the path to both the working directory and to the examples. 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 only copying the files specifically required in a tutorial.

Mesh Generation
The tutorials begin by importing meshes, all of which are supplied with CFX-5. Most meshes can be created using CFX-Mesh, a new geometry and meshing tool that replaces CFX-Build. CFX-CAD-Mesh version 1.0 uses ANSYS Design Modeler to create the geometry and ICEM CFD 4.CFX to generate the mesh. Instructions to generate meshes using CFX-CAD-Mesh version 1.0 are available for the Static 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 Mesher in ANSYS Workbench. Mesh generation instructions are available for all tutorials that import GTM files. CFX-CAD-Mesh tutorials can be found by browsing to the CFX Community Site 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 obtain a 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 customer support representative. A list of contact details are available in "CFX Offices" on page 149 in the document "Introduction to CFX-5".

CFX-5 Tutorials

Page 3

Introduction to the CFX-5 TutorialsHelpful Hints

Helpful Hints
File Housekeeping
We recommend that you run a new problem in a new directory. All the files created by CFX-Pre, CFX-Solver and CFX-Post are written to the working/project directory. Defining a Simulation The following is a brief overview of a typical problem setup in CFX-Pre: Running a Definition File in CFX-Solver 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

The CFX-Solver calculates a solution to the problem. The CFX-Solver Manager displays the solution progress in the form of residual plots and displays the out file, which is a text file containing the physics definition and the values of solution variables at each iteration, as well as other pertinent solution data. CFX-Post is the post-processing module that is used to view the results of your CFD model. A number of powerful plotting and calculation features are utilised in the tutorials to gain an understanding of the physics involved with each simulation. 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 of CFX-5 Launcher. To print a hard copy of the manual go to the Help menu and click Printable Books, then select CFX-5 Tutorials in the PDF file that opens. Select Print from the File menu and choose the pages to print. Note that some files are large; you may not want to print all of the pages.
CFX-5 Tutorials

Analysing Results in CFX-Post

Working Through the Tutorials Online Printing the Tutorials

Page 4

Introduction to the CFX-5 TutorialsHelpful Hints

Changing the If viewing objects in CFX-5 becomes difficult due to contrast with the Background background the background can be altered for improved viewing. Colour 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"

CFX-5 Tutorials

Page 5

Introduction to the CFX-5 TutorialsList of 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 by holding 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 6

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 1

Flow in a Static Mixer


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: StaticMixerMesh.gtm StaticMixer.pre

CFX-5 Tutorials

Page 7

Flow in a Static MixerIntroduction

1.A:
1.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Boundary Conditions Details Quick Setup Wizard Steady State General Fluid Single Domain k-Epsilon Thermal Energy Inlet (Subsonic) Outlet (Subsonic) Wall: No-Slip Wall: Adiabatic Physical Timescale Animation Contour Outline Plot (Wireframe) Point Slice Plane Streamline Camera Object Legend MPEG Generation Object Drag and Drop

Timestep CFX-Post Plots

Other

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

Page 8

CFX-5 Tutorials

Flow in a Static MixerIntroduction

1.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

1.A.3:

Overview of the problem to solve


Introduction: In this tutorial, a static mixer consisting of two offline inlet pipes delivering water into a mixing vessel is used. You establish a general workflow for analysing the flow of fluid into and out of a mixer. This tutorial is important because it uses a simple problem to teach the general approach taken when working with an existing mesh. Water enters through both pipes at the same rate but at different temperatures. The first entry is at a rate of 2.0m/s and a temperature of 315.0K and the second entry is at a rate of 2.0 m/s at a temperature of 285.0K. The radius of the mixer is 2m. Your goal in this tutorial is to understand how to use CFX-5 to determine the speed and temperature of the water when it exits the static mixer.
r=2.0m 2.0 m/s 285.0 K

2.0 m/s 315.0 K

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

CFX-5 Tutorials

Page 9

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre

1.B:

Defining a Simulation Using Quick Setup Mode in CFX-Pre


Introduction: After having completed meshing CFX-Pre is used as a consistent and intuitive interface for the definition of complex CFD problems.

Synopsis

Quick Setup Mode provides a simple wizardlike interface for setting up simple cases. This is useful for getting familiar with the basic elements of a CFD problem setup. This section describes using Quick Setup to develop a simulation in CFX-Pre. Do not perform any of the following tasks now. For review purposes only this section provides a brief summary of the topics to follow as a general workflow: 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

Workflow Overview

Page 10

CFX-5 Tutorials

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre

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 skip the manual process of creating a flow physics simulation, you can play a 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 needs to be started using Quick Setup.

Synopsis

By entering information in the User Mode Workspacewhich contains forms designed to guide you through setting up a simple simulationyou can define a simulation quickly. More information on Quick Setup can be found in "Quick Setup Mode" on page 19 in the document "CFX-Pre". After filling out forms in the User Mode Workspace some simulations are ready to be solved. However, other simulations require further changes using General Mode (the normal mode of operation). In Tutorial 2 you continue working with this simulation in General Mode. Two procedures are documented. Depending on your installation of CFX-5 follow either the Standalone procedure or the Workbench procedure. For more information, refer to "CFX-5.7.1 in Workbench" on page 19.

Procedure in Standalone

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 in Workbench

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.

CFX-5 Tutorials

Page 11

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre

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:
Synopsis

Defining Basic Settings of General Physics


Introduction: You need to define the properties of fluids used in simulations. A variety of fluids are already defined as library materials. This tutorial uses a prepared fluidWater which is a General Fluid whose properties are that of water at 25C. 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". 1. Ensure Basic Settings is displayed.

Procedure

2. Under Domain Name type StaticMixer. 3. Under Fluid select Water.

Page 12

CFX-5 Tutorials

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre

1.B.3:

Importing a Mesh
Introduction: At least one mesh must be imported before physics are applied.

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 to develop your own in the future. Instructions on how to create this mesh in 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.

CFX-5 Tutorials

Page 13

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre

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 manipulate the 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 greater resolution. 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 the Viewing Tools


Introduction: If the geometry is rotated or quickly needs to be viewed from a 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 manipulate the display in the Viewer, the Viewing Tools toolbar is used.

Page 14

CFX-5 Tutorials

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre 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 or from 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 be found 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 fluid domain 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 heat transfer using the thermal energy model. The k-epsilon turbulence model is a commonly used model and is suitable for a wide range of applications. The thermal energy model neglects high speed energy effects and is therefore suitable for low speed flow applications. 1. Ensure Model Data is displayed.

Procedure

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.
CFX-5 Tutorials Page 15

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre

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

1.B.7:

Defining Solver Parameters


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

Synopsis

While upwind is less accurate it is also more robust than other advection schemes. This is suitable for obtaining an initial set of results, but in general should not be used to obtain final accurate results. For more information refer to "Advection Scheme Selection" on page 357 in the document "CFX-5 Solver Modelling". 1. Ensure Solver Parameters is displayed.

Procedure

Tip: If required, click the + or the next to a setting to expand or collapse the 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 the boundaries of the domain.

Synopsis

Based on "Figure 1: Static Mixer with 2 Inlet Pipes and 1 Outlet Pipe" on page 9 we know there are two inlet boundaries and one outlet boundary that need to be defined.
CFX-5 Tutorials

Page 16

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre 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 the boundary are displayed.

1.B.9:

Setting Boundary Data


Introduction: Once boundaries are created you need to create associated data.

Synopsis

Based on "Figure 1: Static Mixer with 2 Inlet Pipes and 1 Outlet Pipe" on page 9 we know the first inlet boundary condition consists of a velocity of 2.0 m/s and a temperature of 315.0 K at one of the side inlets. 1. Ensure Boundary Data is displayed.

Procedure

2. Set Boundary Type to Inlet.


CFX-5 Tutorials Page 17

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre

3. Set Location to in1.

1.B.10:

Setting Flow Specification


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

Synopsis

Setting flow specification includes selecting an option and defining additional parameters based on the selection. The first inlet boundary condition consists of a velocity of 2.0 m/s at one of the 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 have temperature assigned

Synopsis

Setting temperature specifications includes selecting an option and defining additional parameters based on the selection. The first inlet boundary condition consists of a temperature of 315.0 K at one of the side inlets.

Page 18

CFX-5 Tutorials

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre Procedure

1. Ensure Temperature Specification is displayed.

2. Set Static Temperature to 315 K.

1.B.12:

Reviewing Boundary Conditions Definition for Accuracy


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

Synopsis

By reviewing what we have done in the previous modules we can follow the procedure used to create a boundary condition. There are two more boundary conditions to create and this review summarizes what has been done to prepare you to create boundary conditions on your own. Based on "Figure 1: Static Mixer with 2 Inlet Pipes and 1 Outlet Pipe" on page 9 we know the first inlet boundary condition consists of a velocity of 2.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.

CFX-5 Tutorials

Page 19

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre

3. Review and compare for accuracy the following settings:


Modify Boundary Data Flow Specification Temperature Specification Set the following Boundary Type Location Option Normal Speed Static Temperature To this value Inlet in1 Normal Speed 2 [m s^-1] 315.0 K

1.B.13:

Creating the Second Inlet Boundary Definition


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

Synopsis

Based on "Figure 1: Static Mixer with 2 Inlet Pipes and 1 Outlet Pipe" on page 9 we know the second inlet boundary condition consists of a velocity of 2.0 m/s and a temperature of 285.0 K at one of the side inlets. 1. Ensure Boundary Definition is displayed. 2. Create a new boundary named in2 with these settings:
Modify Boundary Data Flow Specification Temperature Specification Set the following Boundary Type Location Option Normal Speed Static Temperature To this value Inlet in2 Normal Speed 2 [m s^-1] 285.0 K

Procedure

1.B.14:

Creating the Outlet Boundary Definition


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

Synopsis

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

Page 20

CFX-5 Tutorials

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre Procedure

1. Ensure Boundary Definition is displayed. 2. Create a new boundary named out with these settings:
Modify Boundary Data Flow Specification Set the following Boundary Type Location Option Relative Pressure To this value Outlet out Average Static Pressure 0 [Pa]

3. Click Next.

1.B.15:

Moving to General Mode


Introduction: Once boundaries are created we can move to General Mode and 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 exterior regions that have not been assigned a boundary condition are automatically assigned the default boundary condition, named StaticMixer Default. The boundary condition for unassigned regions is normally a no-slip adiabatic wall, but can be changed to a different wall type. For more information, see "Default Boundary Conditions" on page 263 in the document "CFX-Pre".

CFX-5 Tutorials

Page 21

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre Procedure

1. Click Finish to enter General Mode. The three boundary conditions are displayed in the viewer as sets of arrows at the boundary surfaces. Inlet boundary arrows are directed into the domain. Outlet boundary arrows are directed out of the domain.

1.B.16:

Writing the Solver (.def) File.


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

Synopsis

The Simulation fileStaticMixer.cfxcontains the simulation definition in a format that can be loaded by CFX-Pre, allowing you to complete (if applicable), restore, and modify the simulation definition. The Simulation file differs from the Definition file in two important ways: The Simulation file can be saved at any time while defining the simulation. Mesh data is not contained in the Simulation file. The simulation file references the original mesh file(s).

Page 22

CFX-5 Tutorials

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre 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 been written. 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 your working 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 starts and 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" on page 25.

Synopsis

A session file can be created and played at a later date to avoid having to recreate all the events configured when using CFX-Pre. Session files can be created as required. Two procedures are documented. Depending on your installation of CFX-5 follow either the Standalone procedure or the Workbench procedure.

Procedure in Standalone

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.

CFX-5 Tutorials

Page 23

Flow in a Static MixerDefining a Simulation Using Quick Setup Mode in CFX-Pre

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 in Workbench

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 Definition file 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 24

CFX-5 Tutorials

Flow in a Static MixerObtaining a Solution Using CFX-Solver Manager

1.C:

Obtaining a Solution Using CFX-Solver Manager


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

Synopsis

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

One window shows the convergence history plots and the other displays text output from CFX-Solver. The text lists physical properties, boundary conditions and various other parameters used or calculated in creating the model. All the text is written to the Output File automatically (in this case StaticMixer_001.out). More detail on the contents of the Output File can be found in "The CFX-5 Output File" on page 87 in the document "CFX-Solver Manager".

CFX-5 Tutorials

Page 25

Flow in a Static MixerObtaining a Solution Using CFX-Solver Manager

1.C.1:

Using Define Run With Data From a Previous Run


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

Synopsis

When the CFX-Solver Manager is launched automatically from CFX-Pre, all of the information required to perform a new Serial run (on a single processor) is entered automatically. You do not need to alter the information in the Define Run window. This is a very quick way to launch into CFX-Solver without having to define settings and values. Numerous settings can be configured when using CFX-Solver Define Run with data from CFX-Pre. For more information refer to "Run Definition" on page 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 displays the results of the run graphically and the right pane displays the information as text. The panes continue to build as CFX-Solver Manager operates.

Page 26

CFX-5 Tutorials

Flow in a Static MixerObtaining a Solution Using CFX-Solver Manager

Note: Once the second iteration appears data begins to plot. Plotting may take a long time depending on the amount of data to process. Do not shut down 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 review the finished results.

Synopsis

CFX-Solver is used to calculate a problem. In order to review the results of the calculation use CFX-Post. 1. Select Tools > PostProcess Results or click PostProcess 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 has been written. This option is not required in Workbench. 3. Click OK. After a short pause, CFX-Post starts and CFX-Solver Manager closes.

Procedure

CFX-5 Tutorials

Page 27

Flow in a Static MixerViewing Results in CFX-Post

1.D:

Viewing Results in CFX-Post


Introduction: When CFX-Post starts, the 3D 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 appears beneath the Object Selector after double-clicking an object in the Object Selector or; right-clicking an object in the Object Selector and selecting Edit from the pop-up menu or; highlighting an object in the Object Selector and clicking Edit Selected Object Button or; creating a new object by clicking Create New Object in the Object Selector Note: There are other workspaces (e.g. for Variables, Expressions and Charts).

Page 28

CFX-5 Tutorials

Flow in a Static MixerViewing Results in CFX-Post

Some objects are automatically created in CFX-Post. These include boundary objects corresponding to each boundary condition specified in CFX-Pre. In this tutorial, the two inlets and the outlet have their own boundary objects. The remaining surfaces of the geometry are grouped together into the Default boundary object. A Wireframe object is also automatically created, and contains the surface mesh for the geometry.
Workflow Overview

Do not perform any of the following tasks now. For review purposes only this section provides a brief summary of the topics to follow as a general workflow: 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 outline plot.

Synopsis

CFX-Post only displays some of the surface mesh by default. This sometimes means that when you first load your Results file, the geometry outline is not displayed clearly. The amount of the surface mesh shown can be modified by editing the Wireframe object listed in the Object Selector. The check boxes next to each object name in the Object Selector control the visibility of each object. Currently only the Wireframe and Default Legend (View Control) objects have their visibility turned on.

CFX-5 Tutorials

Page 29

Flow in a Static MixerViewing Results in CFX-Post

The edge angle determines how much of the surface mesh is visible. If the angle between two adjacent faces is greater than the edge angle, then that edge is drawn. If the edge angle is set to 0 degrees, the entire surface mesh is drawn. If the edge angle is large, then only the most significant corner edges of the geometry are drawn. For this geometry, a setting of approximately 15 degrees lets you view the model location without displaying an excessive amount of the surface mesh. 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 do so to explore the practical uses of this feature. 2. Click Isometric View specific view. in the Viewing Tools toolbar to select a

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 the appearance consistent between modules of the tutorials. 11. Click Isometric View specific view. in the Viewing Tools toolbar to select a

Page 30

CFX-5 Tutorials

Flow in a Static MixerViewing Results in CFX-Post

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 would follow 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. Later modules 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.

CFX-5 Tutorials

Page 31

Flow in a Static MixerViewing Results in CFX-Post

1.D.3:

Creating a Streamline Originating from a Point


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

Synopsis

In this module you create a streamline that moves forward from the point you created. 1. Click Create > Object > Streamline. You can also use the toolbars to create a variety of objects. Later modules 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, click the ellipsis icon to the right of the Start From box. This displays the Location Selector, where <Ctrl> and <Shift> keys can be used to pick multiple locators. 5. Click the Colour tab. 6. Set Mode to Variable. 7. Set Variable to Temperature. 8. Set Range to Local.

Procedure

Page 32

CFX-5 Tutorials

Flow in a Static MixerViewing Results in CFX-Post

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

1.D.4:

Rearranging the Point


Introduction: Once created, a point can be rearranged manually or by setting specific coordinates. Tip: In this module, you may choose to display various views and zooms from the Viewing Tools toolbar (such as Isometric View (Z Up) or View Towards -x and so on as well as the Zoom Box) if you prefer to change 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.).

CFX-5 Tutorials

Page 33

Flow in a Static MixerViewing Results in CFX-Post

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 is redrawn at the new location. The point moves normal in relation to the viewing 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 toggle between Picking Mode and Viewing Mode. A way to pick objects from Viewing Mode, is to hold down <Ctrl> + <Shift> while clicking on an object 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 View Towards -X. in the Viewing Tools toolbar and select

1.D.5:
Synopsis

Configuring a Default Legend


Introduction: The appearance of the default legend can be modified. The Default Legend appears whenever a plot is created which is coloured by a variable. The streamline colour was based on temperature, therefore the legend shows the temperature range. The colour pattern on the legends colour bar is banded in accordance with the bands in the plot1. Various properties can be modified, including orientation, location and the visibility of units. You can also change the appearance of text. For full details, please see "Legend" on page 116 in the document "CFX-Post". The default legend displays values for the last eligible plot that was opened in the Object Editor. To maintain a legend definition during a CFX-Post session, you can create a new legend by clicking Create legend .

1. An exception occurs when one or more bands in a contour plot represent values beyond the legends range. In this case, such bands are coloured using a colour that is extrapolated slightly past the range of colours shown in the legend. This can happen only when a user-specified range is used for the legend. Page 34 CFX-5 Tutorials

Flow in a Static MixerViewing Results in CFX-Post

Since there are many settings that can be customized for the legend, this module allows you the freedom to experiment with them. The last steps set up the legend to a default with a minor modification to the position. Tip: When editing values, you can click Reset at any time before clicking Apply 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 they started before your edits. Note: If using Defaults when modifying the legend, settings for both Definition and Appearance are reset. Use this setting cautiously as you may 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 all values to the original default values.
CFX-5 Tutorials Page 35

Flow in a Static MixerViewing Results in CFX-Post

5. Apply the following settings


Modify Definition Set the following Title Mode Title Vertical/Horizontal Location Y Justification To this value User Specified Streamline Temp. Horizontal Bottom

6. Click Apply. The appearance and position of the legend changes based on the settings specified. 7. Modify various settings in Definition and click Apply after each change. 8. Select Appearance.

Page 36

CFX-5 Tutorials

Flow in a Static MixerViewing Results in CFX-Post

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 exact location of the legend by using the slider or typing values between 0 and 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 longer displays.

1.D.6:

Creating a Slice Plane


Introduction: Defining a slice plane allows you to obtain a crosssection of the geometry.

Synopsis

In CFX-Post you often view results by colouring a graphics object. The graphics 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 a variable. You already have some objects defined by default (listed in the Object Selector). You can view results on the boundaries of the Static Mixer by colouring each boundary object by a variable. To view results within the geometry (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 a normal vector to the plane. YZ Plane, ZX Plane and XY Plane: similar to Point and Normal except that 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 is normal to the Z axis.
Procedure

1. Select Create > Object > Plane or click Create Plane 2. In the New Plane window type Slice.

CFX-5 Tutorials

Page 37

Flow in a Static MixerViewing Results in CFX-Post

3. Click OK. The Geometry, Colour and Render tabs let you switch between settings. 4. In the Object Editor, click the Geometry tab.

1.D.7:
Synopsis

Defining Geometry
Introduction: You need to choose the vector normal to the Plane. You want the Plane to lie in the x-y plane, hence its normal vector points along the z-axis. Any vector which points in the z-direction can be specified, the most obvious being (0,0,1). 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 is not visible in the 3D Viewer due to the current view configuration.

Procedure

1.D.8:

Configuring Views
Introduction: Depending on the view of the geometry various objects may not appear visible because they fall in a two dimensional space that can not be seen.

Synopsis

In order to display the plane the view needs to be modified. Several settings must be changed to display the plane clearly. 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. .

Procedure

6. Click and drag the mouse pointer down slightly to rotate the geometry towards you. 7. Click Perspective
Page 38

.
CFX-5 Tutorials

Flow in a Static MixerViewing Results in CFX-Post

8. Click Orthographic from the Viewing Tools toolbar. Orthographic does not consider depth when plotting an image in the Viewer and is the default setting. 9. Click Isometric View (Z Up) in the Viewing Tools toolbar.

1.D.9:
Synopsis

Rendering Slice Planes


Introduction: Render settings determine how the Plane is drawn. You can alter shading and lighting properties and display or hide the faces and lines on the Plane. See "Object Editor: Render Panel" on page 18 in the document "CFX-Post" for more details. 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 the Select 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 mesh element faces. The end points of each line segment are located where the plane intersects mesh element edges. 9. In the Viewing Tools toolbar, click View Toward -Z .

Procedure

1.D.10:

Colouring the Plane


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

Synopsis

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

CFX-5 Tutorials

Page 39

Flow in a Static MixerViewing Results in CFX-Post 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 colour the object. The Constant mode allows you to colour the Plane with a fixed colour. 7. Set Variable to Temperature. 8. Click Apply. Hot water (red) enters from one inlet and cold water (blue) from the other.

1.D.11:
Synopsis

Moving the Plane


Introduction: The plane can be moved to different locations. In order to move the plane from one location to another Picking Mode is used. For more information refer to "Picking Mode" on page 75 in the document "CFX-Pre". 1. In the Viewing Tools toolbar, click Isometric View (Z Up) .

Procedure

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 Selection Tools. in the

4. Click and drag the plane to a new location that intersects the domain. When you release the mouse button, the Object Editor and Viewer update 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 8. Turn off visibility for Slice. 9. Click Apply. on the Viewing Tools toolbar.

Page 40

CFX-5 Tutorials

Flow in a Static MixerViewing Results in CFX-Post

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 and gradients.

Synopsis

Coloured bands fill the spaces between contour lines. Each band is coloured by the average colour of its two bounding contour lines (even if the latter are not displayed). Important: The colours of 3D graphics object faces are slightly altered when lighting is on. To view colours with highest accuracy, turn off Lighting in the Draw 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.

CFX-5 Tutorials

Page 41

Flow in a Static MixerSaving and Restoring Views Using Cameras

1.E:

Saving and Restoring Views Using Cameras


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

Synopsis

Working with camera views is particularly useful when working with difficult geometry, or in situations when you repeatedly switch between 2 or more views. 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 and is 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 42

CFX-5 Tutorials

Flow in a Static MixerWorking with Animations

1.F:

Working with Animations


Introduction: Animations build transitions between views for development of video files.

Workflow Overview

Do not perform any of the following tasks now. For review purposes only this section provides a brief summary of the topics to follow as a general workflow: 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 export content 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:
Synopsis

Creating the First Keyframe


Introduction: Keyframes are required in order to produce an animation. In this module we define the first viewer state which will be connected to a second viewer state by interpolated intermediate frames. 1. In the Viewing Tools toolbar, click View Towards -Z .

Procedure

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 the current image displayed in the 3D Viewer.
CFX-5 Tutorials Page 43

Flow in a Static MixerWorking with Animations

1.F.3:
Synopsis

Creating the Second Keyframe


Introduction: Keyframes are required in order to produce an animation. In this module we define the second viewer state which will be connected to the first viewer state by interpolated intermediate frames. 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 the Viewer. 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 from KeyframeNo1 to KeyframeNo2. This number is displayed in the Frames 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 the animation. KeyframeNo2 is at Frame # 22 since you have 20 intermediate frames (frames 2 to 21) in between KeyframeNo1 and KeyframeNo2. 8. Click Previous Keyframe located at the top of the Animation Editor panel. The slice plane in the Viewer returns to its original position.

Procedure

Page 44

CFX-5 Tutorials

Flow in a Static MixerWorking with Animations

1.F.4:

Viewing the Animation


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

Synopsis

The controls previously greyed-out in the Animation Editor are now available. The number of intermediate frames between keyframes is listed beside the keyframe having the lowest number of the pair. The number of keyframes listed beside the last keyframe is ignored. The Looping option determines what happens when the animation reaches the last keyframe. When it is set to Loop, the animation repeats itself the number of times defined by Cycles. In this case only one Cycle is played. When Looping is set to Bounce, every other cycle is played in reverse order, starting with the second. See "Animation Editor" on page 150 in the document "CFX-Post" for more details on the Animation Editor.

Procedure

1. Click Play Forward . The animation plays from Frame # 1 to Frame # 22. It plays relatively slowly because the slice plane must be updated for each frame.

1.F.5:
Synopsis

Modifying the Animation


Introduction: The animation can be reconfigured as required. To make the plane sweep through the whole geometry, you set the starting position of the plane to be at the top of the mixer. You also modify the Range properties of the plane so that it shows the temperature variation better. As the animation is played, you can see the hot and cold water entering the mixer. Near the bottom of the mixer (where the water flows out) you can see that the temperature is quite uniform. The new temperature range lets you view the mixing process more accurately than the global range used in the first animation. When the animation has finished, the MPEG file is written to the directory specified. The MPEG can be played back in any Media Player that supports the MPEG format.

CFX-5 Tutorials

Page 45

Flow in a Static MixerWorking with Animations Procedure

1. Apply the following settings


Modify Slice > Geometry Slice > Colour Set the following Point Range Min Max To this value 0, 0, 1.99 User Specified 295 [K] 305 [K]

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 states would have been redefined according to the stored settings for KeyFrameNo1. If this happens, click Undo and try again to select the keyframe. 4. Click Set Keyframe . The image in the Viewer replaces the one previously associated with KeyframeNo1. 5. Double-click KeyframeNo2. The object properties for the slice plane are updated according to the settings in KeyFrameNo2. 6. Apply the following settings
Modify Slice > Colour Set the following Range Min Max To this value User Specified 295 [K] 305 [K]

7. Click Apply. 8. In the Animation Editor, click KeyframeNo2. 9. Click Set Keyframe to save the new settings to KeyframeNo2.

Page 46

CFX-5 Tutorials

Flow in a Static MixerWorking with Animations

1.F.6:

Saving to MPEG
Introduction: By defining the geometry and then saving to MPEG the results can 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 be automatically 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 24 frames per second was used to create the animation. The animation you produced contains a total of 22 frames, so it takes just under 1 second 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 the document "CFX-Post".

10. Click Cancel to close the form. 11. Click Close to close the Animation Editor.

1.F.7:
Synopsis

Exiting CFX-Post
Introduction: When finished with CFX-Post exit the current window. Two procedures are documented. Depending on your installation of CFX-5 follow either the Standalone procedure or the Workbench procedure. 1. When you are finished, select File > Quit to exit CFX-Post. 2. Click No if prompted to save.
Page 47

Procedure in Standalone CFX-5 Tutorials

Flow in a Static MixerWorking with Animations

3. Review the animation in thirdparty software as required.


Procedure in Workbench

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 thirdparty software as required.

Page 48

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 2

Flow in a Static Mixer (Refined Mesh)


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: StaticMixer.def StaticMixer_001.res StaticMixerRef.pre StaticMixerRefMesh.gtm

CFX-5 Tutorials

Page 49

Flow in a Static Mixer (Refined Mesh)Introduction

2.A:
2.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Boundary Conditions Details General Mode Steady State General Fluid Single Domain k-Epsilon Thermal Energy Inlet (Subsonic) Outlet (Subsonic) Wall: No-Slip Wall: Adiabatic Physical Timescale Planevolume Slice Plane Spherevolume Viewing the Mesh

Timestep CFX-Post Plots

Other

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 the current simulation viewing the mesh with a Sphere volume locator and a Surface Plot using a Plane Volume locator and the Mesh Calculator to analyse mesh quality

Page 50

CFX-5 Tutorials

Flow in a Static Mixer (Refined Mesh)Introduction

2.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

2.A.3:

Overview of the problem to solve


Introduction: In this tutorial you use a refined mesh to obtain a better solution to the Static Mixer problem created in Tutorial 1. You establish a general workflow for analysing the flow of fluid into and out of a mixer. This tutorial is important because it uses a specific problem to teach the general approach taken when working with an existing mesh. You start a new simulation in CFX-Pre and import the refined mesh. This tutorial introduces General Modethe mode used for most tutorialsin CFX-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 save time.

CFX-5 Tutorials

Page 51

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

2.B:

Defining the Simulation using General Mode in CFX-Pre


Introduction: After having completed meshing CFX-Pre is used as a consistent and intuitive interface for the definition of complex CFD problems.

Synopsis

This section describes the step-by-step definition of the flow physics in CFX-Pre. As an alternative, you can play a session file to complete the CFX-Pre part of the tutorial. Do not perform any of the following tasks now. For review purposes only this section provides a brief summary of the topics to follow as a general workflow: 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.

Workflow Overview

2.B.1:

Creating a New Simulation


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

Synopsis

Two procedures are documented. Depending on your installation of CFX-5 follow either the Standalone procedure or the Workbench procedure. For more information, refer to "CFX-5.7.1 in Workbench" on page 19. 1. If required, launch CFX-Pre. 2. Select File > New Simulation.
CFX-5 Tutorials

Procedure in Standalone

Page 52

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

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 in Workbench

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 are applied.

Synopsis

An assembly is a group of mesh regions that are topologically connected. Each assembly can contain only one mesh, but multiple assemblies are permitted. 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

CFX-5 Tutorials

Page 53

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

region shows the 2D regions associated with it. The check box next to each item in the Mesh tree indicates the visibility status of the object in the viewer; you can click these to toggle visibility. Tip: While we provide a mesh to use with this tutorial, you may want to develop your own in the future. Instructions on how to create this mesh in 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 for the first tutorial, you can save time by importing the settings used in the latter.

Synopsis

The CCL contains settings that reference mesh regions. For example the outlet boundary condition references the mesh region named out. In this tutorial, the name of the mesh regions are the same as in Tutorial 1, so you can import the CCL without error. The physics for a simulation can be saved to a CCL (CFX Command Language) file at any time by selecting File > Export CCL. However, a number 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 will get errors.

Page 54

CFX-5 Tutorials

Flow in a Static Mixer (Refined Mesh)Defining the Simulation using General Mode in CFX-Pre 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 to update 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 a tree structure. Some items may be recognized from Tutorial 1for example the boundary condition objects in1, in2 and out. See "Physics Selector" 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 available in General Mode.

Synopsis

Various domain settings can be set. These include: General Options Fluid Models Initialisation

General Options General Options specify the location of the domain, coordinate frame settings and the fluids/solids that are present in the domain. You also reference Pressure, Buoyancy and whether the domain is Stationary or Rotating. Mesh motion can also be set. Fluid Models Fluid Models set models that apply to the fluid(s) in the domain, such as heat transfer, turbulence, combustion and radiation models. An option absent 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-epsilon turbulence model, you should always use scalable wall functions. See "Modelling Flow Near the Wall" on page 88 in the document "CFX-5 Solver Theory" for more details.

CFX-5 Tutorials

Page 55

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

Initialisation Initialisation sets the initial conditions for the current domain only. This is generally used when multiple domains exist to allow setting different initial conditions in each domain, but can also be used to initialise single-domain simulations such as this case. Global Initialisation allows all domains to be initialised 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:
Synopsis

Viewing the Boundary Condition Setting


For the k-epsilon turbulence model you must specify the turbulent nature of the flow entering through the inlet boundary. For this simulation, the default setting of Medium (Intensity = 5%) is used. This is a sensible setting 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". 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.

Procedure

2.B.6:

Defining Solver Parameters


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

Synopsis

In Tutorial 1 you set some solver control parameters, such as Advection Scheme and Timescale Control, while other parameters were set automatically by CFX-Pre. This was done in "Defining Solver Parameters" on page 16.

Page 56

CFX-5 Tutorials

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

In this tutorial we use High Resolution for the advection scheme. This is more accurate than the Upwind Scheme used in Tutorial 1. You usually require a smaller timestep when using this model. You can also expect the solution to take a higher number of iterations to converge when using this model. See "Judging Convergence" on page 364 in the document "CFX-5 Solver Modelling" for more details.
Procedure

1. Select Create > Flow Objects > Solver Control or click Solver Control . 2. Apply the following settings
Modify Advection Scheme Convergence Control Set the following Option Timescale Control Physical Timescale Max. No. Iterations *. To this value High Resolution Physical Timescale 0.5 [s] 150*

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

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-5 Solver Modelling" for details. 6. Click OK.

2.B.7:

Writing the Solver (.def) File.


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

Synopsis

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

CFX-5 Tutorials

Page 57

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

The Simulation fileStaticMixerRef.cfxcontains the simulation definition in a format that can be loaded by CFX-Pre, allowing you to complete (if applicable), restore, and modify the simulation definition. The Simulation file differs from the Definition file in two important ways: The Simulation file can be saved at any time while defining the simulation. 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
Set the following Filename Operation Report Summary of Interface Connections Quit CFXPre* *. If using CFX-Pre in Standalone Mode. To this value StaticMixerRef.def Start Solver Manager Off On

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 your working 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 automatically starts and the definition file is set in the Definition File box of Define Run. 6. Proceed to "Obtaining a Solution Using Interpolation with CFX-Solver" on page 61.

Page 58

CFX-5 Tutorials

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

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 with CFX-Solver" on page 61.

Synopsis

Two procedures are documented. Depending on your installation of CFX-5 follow either the Standalone procedure or the Workbench procedure. 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 .

Procedure in Standalone

10. Select StaticMixerRef.def, located in the examples directory. 11. Proceed to "Obtaining a Solution Using Interpolation with CFX-Solver" on page 61.
Procedure in Workbench

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.

CFX-5 Tutorials

Page 59

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

12. Select File > Define Run. 13. Under Definition File, click Browse .

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

Page 60

CFX-5 Tutorials

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

2.C:

Obtaining a Solution Using Interpolation with CFX-Solver


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

Workflow Overview

Do not perform any of the following tasks now. For review purposes only this section provides a brief summary of the topics to follow as a general workflow: 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 and Definition File has automatically been set to the definition file from CFX-Pre: StaticMixerRef.def. We wish to make use of the results from Tutorial 1, but the two meshes are not identical. The Initial Values File needs to have its data interpolated onto the new mesh associated with the Definition File. The CFX-Solver supports automatic interpolation that will be used in the following steps: The values from StaticMixer_001.res will be interpolated onto the definition files mesh when the run is started. The results from StaticMixer_001.res will be used as the initial guess for this

CFX-5 Tutorials

Page 61

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

simulation (rather than Solver defaults) because you have set the initialisation for all variables in CFX-Pre to Automatic or Automatic with Value. Tip: You may also carry out interpolation as a separate step using the Interpolate feature from the Tools menu. See "Interpolate" on page 34 in the document "CFX- Solver Manager" for more details about interpolating 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 use StaticMixer_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 by CFX-Solver.

Synopsis Procedure

You have already made required changes to the information in Define Run. 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 may take a long time depending on the amount of data to process. Do not shut down the process.

Page 62

CFX-5 Tutorials

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

2.C.3:

Confirming Results
Introduction: When interpolation is successful specific information appears in the text screen of CFX-Solver.

Synopsis

To confirm that the interpolation was successful, look in the text pane in CFX-Solver Manager. The following text appears before the convergence history begins:

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

This lists the variables that were interpolated from the results file. After the final iteration a message similar to the following content appears:
CFD Solver finished: Tue Oct 19 08:06:45 2004
CFD Solver wall clock seconds: 1.7100E+02

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

This indicates that CFX-Solver has successfully calculated the solution for the 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 review the finished results.

Synopsis

CFX-Solver is used to calculate a problem. In order to review the results of the calculation use CFX-Post. 1. Select Tools > PostProcess Results or click PostProcess 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 is not required in Workbench. 3. Click OK. After a short pause, CFX-Post starts.

Procedure

CFX-5 Tutorials

Page 63

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

2.D:

Viewing Results in CFX-Post


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

Synopsis

When CFX-Post starts, the 3D Viewer and Objects Workspace display by default. Do not perform any of the following tasks now. For review purposes only this section provides a brief summary of the topics to follow as a general workflow: 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.

Workflow Overview

Page 64

CFX-5 Tutorials

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

2.D.1:

Creating a Slice Plane


Introduction: More information exists for use by CFX-Post in this tutorial than in 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. There are three noticeable differences between the two slice planes. Around the edges of the mixer geometry there are several layers of narrow rectangles. This is the region where the mesh contains prismatic elements (which are created as inflation layers). The bulk of the geometry contains tetrahedral elements. There are more lines on the Plane than there were in Tutorial 1. This is because the slice plane intersects with more mesh elements. The curves of the mixer are smoother than in Tutorial 1 because the finer mesh 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 between settings. 5. Apply the following settings
Modify Geometry > Definition Set the following Method Point Normal Render Draw Faces Draw Lines To this value Point and Normal 0, 0, 1 0, 0, 1 Off On

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 mentioned above.
CFX-5 Tutorials Page 65

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

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. The colour variation across the plot is smoother than it was in Tutorial 1, and a more detailed resolution of the temperature field is displayed.

Procedure

1. Apply the following settings


Modify Render Colour Set the following Draw Faces Draw Lines Mode Variable *. To this value On Off Variable* Temperature

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

2. Click Apply. Hot water (red) enters from one inlet and cold water (blue) from the other. Compare the onscreen image with the equivalent picture from "Colouring the Plane" on page 66. Notice the differences mentioned above. 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 will be a white circle corresponding to the edge of the outlet wall (Rotate the geometry to see where the outlet is located.). Within this, there are several concentric circles. This shows the five layers of inflated elements. Within the innermost of these circles are triangles. These are the faces of the tetrahedral 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.

Page 66

CFX-5 Tutorials

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

3. Under Static Mixer, doubleclick out. The Object Editor displays the Colour and Render panels for this object. Geometry can not be edited since the boundary location was defined in CFX-Pre. 4. In the Object Editor, turn on Visibility. 5. Click Apply. 6. Apply the following settings
Modify Colour Render Set the following Mode Colour Draw Faces Draw Lines Colour Mode Line Colour To this value Constant White Off On User Specified (Select any light colour)

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 of the elements, use a volume object to show individual elements.

Synopsis

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

CFX-5 Tutorials

Page 67

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

Leave the surface mesh on the outlet visible to help see how surface and volume meshes are related. A volume object consists of all the mesh elements that are entirely contained in a defined volume (Inclusive turned off), or all the mesh elements whose geometric centres are contained in a defined volume (Inclusive turned on). You will use a carefully placed Sphere volume to view a single mesh element by containing the centre of the element in the volume. When done, a red tetrahedral mesh element is displayed near the centre of the outlet. To see different mesh elements, adjust the Point and Radius values fractionally. Increasing the Radius value includes more elements in the volume object. You can use a Point object to visualise the 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
Modify Geometry > Definition Set the following Method Point Radius Mode Inclusive Colour Render Colour Transparency Draw Lines Line Width Line Colour *. .

To this value Sphere 0.08, 0, -2* 0.14 [m] Below Intersection Off Red 0.3 On 5.0 Grey

The z sliders minimum value corresponds to the minimum z value of the entire geometry, which, in this case, occurs at the outlet. Only elements that are entirely contained within the sphere volume will be included

5. Click Apply to create the volume object.

Page 68

CFX-5 Tutorials

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

2.D.5:

Creating a Second Volume Object


Introduction: To show more clearly what effect inflation has on the shape of the 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
Modify Geometry > Definition Colour Set the following Point Radius Colour To this value -0.22, 0.4, -1.85 0.206 [m] Orange

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 the surface mesh.

Procedure

1. Double-click the StaticMixer Default object. 2. Apply the following settings


Modify Render Set the following Draw Faces Draw Lines Line Width To this value On On 2

3. Turn on Visibility. 4. Click Apply.

CFX-5 Tutorials

Page 69

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

2.D.7:

Viewing the Layers of Inflated Elements


Introduction: You will see the layers of inflated elements on the wall of the main body of the mixer. Within the body of the mixer, there will be many lines which are drawn wherever the face of a mesh element intersects the slice 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
Modify Geometry > Definition Render Set the following Method Draw Faces Draw Lines

To this value YZ Plane Off On

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 your mesh. For example, you can load a .def file into CFX-Post and check the mesh quality before running the .def file in the solver. The mesh calculator will display various information depending on the selected function. For example, you may want to check the element face angles 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 for further analysis in this tutorial. 4. Click Close. For details about the Mesh Calculator, see "Mesh Calculator" on page 146 in the document "CFX-Post".

Page 70

CFX-5 Tutorials

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

2.D.9:

Viewing the Mesh Elements with Largest Face Angle Using a Volume
Introduction: In the previous section, you used the Mesh Calculator to calculate the maximum face angles of mesh elements. As a result, a new variable, Maximum Face Angle, was created and stored at every node. Here, you will visualise the elements which contain at least one node having a maximal value of Maximum Face Angle by creating an Isovolume locator based on this variable. This technique can be used to visualise problem areas of a mesh, and can be used with other variables that are created by running the Mesh Calculator. In the viewer, the mesh elements which meet the criteria will appear as part of 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
Modify Geometry > Definition Set the following Method Variable Value Mode Inclusive *. To this value Isovolume

Maximum Face Angle 69 [degree] Below Value On*

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

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

CFX-5 Tutorials

Page 71

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

2.D.10:

Viewing the Mesh Elements with Largest Face Angle Using a Point
Introduction: Next, we will create a Point Object to show the node(s) having the maximum value of Maximum Face Angle. The Point Object will be represented by a 3-d yellow crosshair symbol. In order to avoid obscuring the Point Object with the Isovolume Object, you may want to turn off the visibility 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
Modify Geometry > Definition Set the following Method Location Variable

To this value Variable Maximum Assembly Maximum Face Angle

4. Click Apply.

2.D.11:
Synopsis

Exiting CFX-Post
Introduction: When finished with CFX-Post exit the current window. Two procedures are documented. Depending on your installation of CFX-5 follow either the Standalone procedure or the Workbench procedure. 1. When you are finished, select File > Quit to exit CFX-Post. 2. Click No if prompted to save. 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.

Procedure in Standalone

Procedure in Workbench

Page 72

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 3

Flow in a Process Injection Mixing Pipe


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: InjectMixer.pre InjectMixer_velocity_profile.csv InjectMixerMesh.gtm

CFX-5 Tutorials

Page 73

Flow in a Process Injection Mixing PipeIntroduction

3.A:
3.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Boundary Conditions Details General Mode Steady State General Fluid Single Domain k-Epsilon Thermal Energy Boundary Profile Visualization Inlet (Profile) Inlet (Subsonic) Outlet (Subsonic)

CFX-Post

Wall: No-Slip Wall: Adiabatic CEL (CFX Expression Language) Timestep Physical Timescale Plots Default Locators Outline Plot (Wireframe) Slice Plane Streamline Changing the colour range Expression Editor Legend Viewing the Mesh

Other

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 temperature dependent fluid properties in CFX-Pre using the k-epsilon turbulence model using streamlines in CFX-Post to track flow through the domain

Page 74

CFX-5 Tutorials

Flow in a Process Injection Mixing PipeIntroduction

3.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

3.A.3:

Overview of the problem to solve


Introduction: In this tutorial you establish a general workflow for analysing the flow of fluid into and out of an injection pipe. This tutorial is important because it uses a specific problem to teach the general approach taken when working with an existing mesh. The injection mixing pipe, common in the process industry, is composed of two pipes: one with a larger diameter than the other. Analysing and optimising 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.

CFX-5 Tutorials

Page 75

Flow in a Process Injection Mixing PipeIntroduction

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

=1.0 m

0.5 m/s 285.0 K

=0.3 m

5.0 m/s 315.0 K

Figure 1: Injection Mixing Pipe

Page 76

CFX-5 Tutorials

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

3.B:

Defining a Simulation using General Mode in CFX-Pre


Introduction: After having completed meshing, CFX-Pre is used as a consistent and intuitive interface for the definition of complex CFD problems.

Synopsis

This section describes the step-by-step definition of the flow physics in CFX-Pre. As an alternative, you can play a session file to complete the CFX-Pre part of the tutorial. Do not perform any of the following tasks now. For review purposes only this section provides a brief summary of the topics to follow as a general workflow: 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.

Workflow Overview

CFX-5 Tutorials

Page 77

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

3.B.1:

Creating a New Simulation


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

Synopsis

Two procedures are documented. Depending on your installation of CFX-5 follow either the Standalone procedure or the Workbench procedure. For more information, refer to "CFX-5.7.1 in Workbench" on page 19. 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 in Standalone

Procedure in Workbench

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 78

CFX-5 Tutorials

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

3.B.2:

Importing a Mesh
Introduction: An assembly is a group of mesh regions that are topologically connected. Each assembly can contain only one mesh, but multiple assemblies are permitted. Tip: While we provide a mesh to use with this tutorial, you may want to develop your own in the future. Instructions on how to create this mesh in 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 of temperature and then use this expression to modify the properties of the library material: Water. Viscosity will be made to vary linearly with temperature between the following 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 by CFX-Pre, denoting Static Temperature. All variables, expressions, locators, functions and constants can be viewed by right clicking in the Definition panel of the Expressions Editor. All expressions must have consistent units. You should be careful if using temperature in an expression with units other than [K]. See "Use of Offset Temperature" on page 50 in the document "CFX-5 Reference Guide" for details. The Expressions Workspace lets you define, modify, evaluate, plot, copy, delete and browse through expressions used within CFX-Pre.

CFX-5 Tutorials

Page 79

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre 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 80

CFX-5 Tutorials

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

4. Click OK. The Definition Editor is displayed with the name of the new expression.

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.

CFX-5 Tutorials

Page 81

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

3.B.4:
Procedure

Plotting an Expression
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


Modify Plot Set the following Number of Points T Start of Range End of Range To this value 10 On 275 [K] 325 [K]

3. Click Plot Expression. A plot showing the variation of the expression VisT with the variable T is displayed.

3.B.5:
Procedure

Evaluating an Expression
1. Click the Evaluate tab. 2. In T type 300 [K]. This is between the start and end range defined in the last module.

Page 82

CFX-5 Tutorials

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

3. Click Evaluate Expression. The value of VisT (0.0011725 [kg m^-1 s^-1]) for the given value of T appears in the Value field.

3.B.6:

Modify Material Properties


Introduction: Default material properties (such as those of Water) can be modified 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.

CFX-5 Tutorials

Page 83

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

3.B.7:

Creating the Domain


Introduction: The domain will be set to use the Thermal Energy heat transfer model, and the k- (k-epsilon) turbulence model. Both General Options and Fluid Models are changed in this module. The Initialisation Tab is for setting domain-specific initial conditions, which are not used in this tutorial. Instead, Global initialisation is used to set the starting conditions.

Procedure

1. Select Create > Flow Objects > Domain. 2. In the Name window type InjectMixer. 3. Click OK. Edit Domain: InjectMixer appears.

Page 84

CFX-5 Tutorials

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

4. Apply the following settings


Modify Basic Settings Domain Models > Pressure Set the following Location Fluids List Ref. Pressure To this value Assembly Water 0 [atm]

5. Click Fluid Models. 6. Apply the following settings


Modify Heat Transfer model Set the following Option To this value Thermal Energy

7. Click OK.

3.B.8:
Procedure

Creating the Side Inlet Boundary Conditions


Introduction: The side inlet boundary condition needs to be defined. 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
Modify Basic Settings Boundary Details Set the following Boundary Type Location Mass and Momentum > Option Normal Speed Turbulence > Option Heat Transfer > Option Static Temperature To this value Inlet side inlet Normal Speed 5.0 [m s^-1] Medium (Intensity = 5%) Static Temperature 315 [K]

5. Click OK.

CFX-5 Tutorials

Page 85

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

3.B.9:

Creating the Main Inlet Boundary Conditions


Introduction: The main inlet boundary condition needs to be defined. This inlet is defined using a velocity profile found in the example directory. Profile data needs to be initialised before the boundary condition can be created. You will create a plot showing the velocity profile data, marked by higher velocities near the centre of the inlet, and lower velocities near the inlet walls.

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
Modify Basic Settings Set the following Boundary Type Location Use Profile Data Profile Name To this value Inlet main inlet On main inlet

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

Page 86

CFX-5 Tutorials

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

11. Apply the following settings


Modify Boundary Details Set the following Flow Regime > Option Turbulence > Option Heat Transfer > Option Static Temperature Plot Options Boundary Contour Profile Variable To this value Subsonic Medium (Intensity = 5%) Static Temperature 285 [K] On W

12. Click OK.

3.B.10:

Creating the Main Outlet Boundary Condition


Introduction: In this module you create the outlet boundary condition. All other surfaces which have not been explicitly assigned a boundary condition will remain in the InjectMixer Default object, which is shown in the Physics Selector. This boundary condition uses a No-Slip Adiabatic Wall 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
Modify Basic Settings Set the following Boundary Type Location Boundary Details Flow Regime > Option Relative Pressure To this value Outlet outlet Subsonic 0 [Pa]

Mass and Momentum > Option Average Static Pressure

5. Click OK.

CFX-5 Tutorials

Page 87

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

3.B.11:
Procedure

Setting Initial Values


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 "Advection Scheme 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
Modify Advection Scheme Convergence Control Set the following Option Specified Blend Factor Timescale Control Physical Timescale Max. No. Iterations Convergence Criteria *. Residual Type Residual Target To this value Specified Blend Factor 0.75 Physical Timescale 2.0 50 RMS 1.E-4*

An RMS value of at least 1.E-5 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.

3. Click OK.

3.B.13:

Writing the Solver (.def) File.


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

Procedure

1. Select File > Write Solver (.def) File or click Write a Solver File Write Solver File is displayed.
CFX-5 Tutorials

Page 88

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

2. Apply the following settings


Set the following Filename Operation Report Summary of Interface Connections Quit CFXPre *.
*

To this value InjectMixer.def Start Solver Manager Off On

If using CFX-Pre in Standalone Mode.

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 your working 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 the simulation file (InjectMixer.cfx) are created. CFX-Solver Manager automatically starts and the definition file is set in the Definition File box 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-5 follow either the Standalone procedure or the Workbench procedure. 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 .
Page 89

Procedure in Standalone

CFX-5 Tutorials

Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre

9. Select InjectMixer.def, located in the examples directory. 10. Proceed to "Obtaining a Solution Using CFX-Solver" on page 91.
Procedure in Workbench

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 and double clicking on InjectMixer.def.

Page 90

CFX-5 Tutorials

Flow in a Process Injection Mixing PipeObtaining a Solution Using CFX-Solver

3.C:
3.C.1:

Obtaining a Solution Using CFX-Solver


Using Define Run With Data From a Previous Run
Introduction: Define Run allows the configuration of a run for processing by CFX-Solver.

Synopsis Procedure

You have already set required options for the information in Define Run. 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 > PostProcess Results or click PostProcess Results . 2. If using CFX-Solver in Standalone Mode, select Shut down Solver Manager. 3. Click OK.

CFX-5 Tutorials

Page 91

Flow in a Process Injection Mixing PipeViewing Results in CFX-Post

3.D:

Viewing Results in CFX-Post


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

Workflow Overview

Do not perform any of the following tasks now. For review purposes only this section provides a brief summary of the topics to follow as a general workflow: 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 mouse and the Viewing Tools toolbar to manipulate the geometry as required at any 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 and proceeding to the outlet. Above where the side pipe meets the main pipe, there is an area where the flow re-circulates rather than flowing roughly tangent to the direction of the pipe walls.

Procedure

1. Select Create > Object > Streamline. 2. Under Name type MainStream. 3. Click OK.

Page 92

CFX-5 Tutorials

Flow in a Process Injection Mixing PipeViewing Results in CFX-Post

4. Apply the following settings


Modify Geometry Set the following Type Start From To this value 3D Streamline main inlet

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
Modify Render Set the following Draw Faces Draw Lines Visibility To this value Off On On

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 mesh element face on the main inlet, since you selected the main inlet as the Start 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 face nodes at the main inlet. Fewer streamlines are therefore visible. You can set Reduction to produce a sensible number of streamlines if the starting location has a fine mesh.

CFX-5 Tutorials

Page 93

Flow in a Process Injection Mixing PipeViewing Results in CFX-Post

3.D.3:

Modifying Streamline Colour Ranges


Introduction: You can change the appearance of the streamlines using the Range setting on the Colour panel.

Procedure

1. Apply the following settings


Modify Colour Set the following Range To this value Local

2. Click Apply. The colour map is fitted to the range of velocities found along the streamlines. The streamlines therefore collectively contain every colour in the colour map. 3. Apply the following settings
Modify Colour Set the following Range Min Max To this value User Specified 0.2 [m s^-1] 2.2 [m s^-1]

Note: Portions of streamlines that have values outside the range shown in the legend are coloured according to the colour at the nearest end of the legend. When using tubes or symbols (which contain faces), more accurate colours are obtained with lighting turned off. 4. Click Apply. The streamlines are coloured using the specified range of velocity values.

3.D.4:

Colouring Streamlines with a Constant Colour


1. Apply the following settings
Modify Colour Set the following Mode Colour To this value Constant Green

Colour can be set to green by selecting it from the colour pallet, or by repeatedly clicking on the colour box until it cycles through to the default green colour. 2. Click Apply.
Page 94 CFX-5 Tutorials

Flow in a Process Injection Mixing PipeViewing Results in CFX-Post

3.D.5:

Duplicating and Modifying a Streamline Object


Introduction: Any object can be duplicated to create a copy for modification without 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
Modify Geometry Colour Set the following Start From Mode Colour To this value side inlet Constant Red

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 the domain is to use a slice plane, as demonstrated in this module. Note: This module has multiple changes compiled into single steps in preparation 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 the product and do not need to use them, proceed directly to step 3. a. Select Create > Object > Plane b. Click Apply.

CFX-5 Tutorials

Page 95

Flow in a Process Injection Mixing PipeViewing Results in CFX-Post

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 the product and do not need to use them, proceed directly to step 4.
Modify Colour Set the following Mode Variable To this value Variable Turbulence Kinetic Energy

4. Experiment with other variables to colour this plane. Commonly used variables are in the drop-down menu. A full list of available variables can be viewed by clicking next to the Variable data box.

3.D.7:
Synopsis

Exiting CFX-Post
Introduction: When finished with CFX-Post exit the current window. Two procedures are documented. Depending on your installation of CFX-5 follow either the Standalone procedure or the Workbench procedure. 1. When you are finished, select File > Quit to exit CFX-Post. 2. Click No if prompted to save. 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.

Procedure in Standalone

Procedure in Workbench

Page 96

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 4

Flow from a Circular Vent


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: CircVent.pre CircVentIni.pre CircVentIni_001.res CircVentMesh.gtm

CFX-5 Tutorials

Page 97

Flow from a Circular VentIntroduction

4.A:
4.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Boundary Conditions Details General Mode Steady State Transient General Fluid Single Domain k-Epsilon None Inlet (Subsonic) Opening Wall: No-Slip Auto Timescale Transient Example CFX-Solver Manager CFX-Post Transient Results File Power Syntax Plots Other

Timestep

Animation Isosurface Auto Annotation MPEG Generation Printing Timestep Selection Title/Text Transient Animation

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

Page 98

CFX-5 Tutorials

Flow from a Circular VentIntroduction

4.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

4.A.3:

Overview of the problem to solve


Introduction: In this example, a chimney stack releases smoke which is dispersed into the atmosphere with an oncoming side wind. Unlike previous tutorials, which were steady-state, this example is time-dependent. Initially, no smoke is being released and the flow is driven purely by the side wind. In the second part of the tutorial, the chimney starts to release smoke and it shows how the plume of smoke above the chimney develops with time.

CFX-5 Tutorials

Page 99

Flow from a Circular VentDefining the Steady-State Simulation in CFX-Pre

4.B:

Defining the Steady-State Simulation in CFX-Pre


This section describes the step-by-step definition of the flow physics in CFX-Pre for a steady-state simulation with no smoke being produced by the chimney. The results from this simulation will be used as the initial guess for the transient simulation.

4.B.1:

Playing the Session file


Instead of defining the steady-state simulation yourself, you can play a session file to do this. To define the simulation in CFX-Pre yourself, continue from 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 the Steady-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 to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file CircVentMesh.gtm, located in the examples directory (<CFXROOT>/examples), to your working directory. 2. Click the Mesh tab.

Page 100

CFX-5 Tutorials

Flow from a Circular VentDefining the Steady-State Simulation in CFX-Pre

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) will be used to model the dispersion of smoke from the vent. 1. Click the Create an Additional Variable 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 the document "CFX-5 Solver Modelling" for details. c. Click OK to create the Additional Variable and close the panel. icon on the main toolbar.

4.B.5:
To Create a New Domain

Creating the Domain


The fluid domain will be created that includes the Additional Variable. 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.

CFX-5 Tutorials

Page 101

Flow from a Circular VentDefining the Steady-State Simulation in CFX-Pre

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 set Option to Transport Equation. b. Turn on Kinematic Diffusivity and set Kinematic Diffusivity to 1.0E-5 [m^2 s^-1]. Initialisation settings will be set using the Global Initialisation form, so there is no need to visit the Initialisation panel. 5. Click OK to create the domain.

4.B.6:
To Create the Inlet Boundary Condition

Creating the Boundary Conditions


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. Components U 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 object and not through an enclosure such as a pipe network (which would be an example of internal flow). In such problems, some inlets will be made sufficiently large that they do not affect the CFD solution. However, the length scale values produced by the Default Intensity and AutoCompute Length Scale option for turbulence are based on inlet size. They are appropriate for internal flow problems and particularly, cylindrical pipes. In general, you need to set the turbulence intensity and length scale explicitly for large inlets in external flow problems. If you do not have a value for the

Page 102

CFX-5 Tutorials

Flow from a Circular VentDefining the Steady-State Simulation in CFX-Pre

length scale, you can use a length scale based on a typical length of the object, over which the fluid is flowing. In this case, we have chosen a turbulence 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 from this 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 of the actual direction specification. To plot vectors in the direction of flow, turn on Boundary Vector under the Plot Options panel for the inlet boundary condition (see "Plot Options" on page 298 in the document "CFX-Pre" for details) and turn off Show Inlet Markers on the Boundary Marker Options panel of Labels and Markers (accessible by clicking Label 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 boundary condition allows flow to both enter and leave the fluid domain during the course of the solution.
To Create an Opening Boundary Condition

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

CFX-5 Tutorials

Page 103

Flow from a Circular VentDefining the Steady-State Simulation in CFX-Pre

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 and Direction (stable) and Relative Pressure to 0 [Pa]. For more information on pressure settings, see "Mass and Momentum" on page 62 in the document "CFX-5 Solver Modelling". c. Under Flow Direction, set Option to Normal to Boundary Condition. d. Under Turbulence, set Option to Intensity and Length Scale, Fractional Intensity to 0.05, and Eddy Length Scale to 0.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 will contain no smoke. 6. Click OK to create the boundary condition.
To Create the Inlet Boundary Condition for the 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 and Normal Speed to 0.01 [m s^-1]. c. Under Turbulence, set Option to Intensity and Eddy Viscosity Ratio, Fractional intensity to 0.05 and Eddy Viscosity Ratio to 10. 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 104

CFX-5 Tutorials

Flow from a Circular VentDefining the Steady-State Simulation in CFX-Pre

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 steady state problems. If you do not know the time step size to set for your problem, 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.

CFX-5 Tutorials

Page 105

Flow from a Circular VentDefining the Steady-State Simulation in CFX-Pre

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 106

CFX-5 Tutorials

Flow from a Circular VentObtaining a Solution to the Steady-State Problem

4.C:

Obtaining a Solution to the Steady-State Problem


When CFX-Pre has shut down and CFX-Solver Manager has started, you can obtain 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 momentum conservation equations, the mass conservation equation and equations for 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 transient simulation. 4. Start CFX-Pre.

CFX-5 Tutorials

Page 107

Flow from a Circular VentDefining the Transient Simulation in CFX-Pre

4.D:

Defining the Transient Simulation in CFX-Pre


In this part of the tutorial, you will alter the simulation settings used for the steady-state calculation to set up the model for the transient calculation in CFX-Pre. As an alternative, you can play a session file to complete the setup of the transient simulation instead of setting up the simulation yourself. To define the simulation in CFX-Pre yourself, continue from Opening the Existing Simulation (p. 108) below.

To Play the Session 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 the Transient 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 the concentration of smoke to rise exponentially with time, so it is necessary to ensure that the interval between the time steps is smaller at the beginning of 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 108

CFX-5 Tutorials

Flow from a Circular VentDefining the Transient Simulation in CFX-Pre

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 boundary condition. In the steady-state calculation, this boundary had a small amount of air flowing through it. In the transient calculation, more air passes through the vent and there is a time-dependent concentration of smoke in the air. This is initially zero, but builds up to a larger value. The smoke concentration will be specified using the CFX Expression Language.

To Modify the Vent Inlet Boundary Condition

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 left open 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. The concentration is zero for time t=0 and builds up to a maximum of 1 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.

CFX-5 Tutorials

Page 109

Flow from a Circular VentDefining the Transient Simulation in CFX-Pre

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 by right-clicking in the Definition window in the Expression Editor instead of typing them. The names of the existing expressions are under the Expressions > menu. The exp and abs functions are under Functions > CEL. The variable t is under Variables (although it would probably be easier to 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 abs function is included to ensure that the numerical error in evaluating it near to zero will never make the expression evaluate to a negative number. Next you will visualise how the expressions have scheduled the concentration 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 110

CFX-5 Tutorials

Flow from a Circular VentDefining the Transient Simulation in CFX-Pre

11. Click the Plot tab, then: a. Leave Number of Points set to 100. You can plot an expression which depends upon any independent variable. In this example, you will plot the value of smoke concentration 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, and reaches 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.

CFX-5 Tutorials

Page 111

Flow from a Circular VentDefining the Transient Simulation in CFX-Pre

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 right 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. to the

4.D.4:

Initialisation Values
The steady state solution that you have finished calculating is used to supply the initial values to the CFX-Solver. You can leave all of the Initialisation data set to Automatic and the initial values will be read automatically from the initial values file. Therefore, there is no need to revisit 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 create transient results files at specified times. The transient results files do not have to contain all solution data; in this step, you will create minimal transient results files.

To Create Minimal Transient Results Files

1. Select Create > Flow Objects > Output Control from the main menu bar. 2. Click the Transient Results tab. 3. Click Add New Item for the object. and then click OK to accept the default name

This creates a new transient results object. Each object can result in the production of many transient results files.
Page 112 CFX-5 Tutorials

Flow from a Circular VentDefining the Transient Simulation in CFX-Pre

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 three selected variables. This reduces the size of the minimal results files. A full results 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.

CFX-5 Tutorials

Page 113

Flow from a Circular VentObtaining a Solution to the Transient Problem

4.E:

Obtaining a Solution to the Transient Problem


In this tutorial the solver will read the Initial Values for the problem from a file (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 just written. 1. Beside the box marked Initial Values File, click Browse . 2. Locate and select CircVentIni_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 have seen for steady-state problems. This is because each time step consists of several 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 each coefficient loop (not just the values at the last coefficient loop for each time step) (see "Transient Residual Plotting" on page 59 in the document "CFXSolver Manager"). Although the field values at the end of each time step will be converged, the level of convergence from one time step to the next may be 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 of each 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 114

CFX-5 Tutorials

Flow from a Circular VentViewing the Results

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 are those at the final time step, in this case at t = 30 s (this is nominally designated 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, the Time Value (simulated time in seconds) and the Type of results file that was saved at that time step. You can see that Partial results files were saved (as requested 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 that time step. Time Step 0 represents the start of the simulation. The results at this 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, it could be a surface consisting of all points where the velocity is 1 m s^-1. In this case, you are going to create an isosurface of smoke density (smoke is the 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].

CFX-5 Tutorials

Page 115

Flow from a Circular VentViewing the Results

4. Ensure that Visibility is turned on and then click Apply. A bumpy surface will be displayed, showing the smoke starting to emerge from the vent. The surface is rough because the mesh is coarse. For a smoother surface, you would re-run the problem with a smaller mesh length scale. The surface will be a constant colour as the default settings on the Colour panel were used. When Colour Mode is set to either Constant or Use Plot Variable for an Isosurface, it appears as one colour. You should not use the Local Range setting for an isosurface since the 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 title to 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 116

CFX-5 Tutorials

Flow from a Circular VentViewing the Results

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 the next section we will print in JPEG format. Many other formats are also supported (see "Print" on page 67 in the document "CFX-Post" for more details).
To produce coloured JPEG output

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 that supports the JPEG format.
To View the Results at Further Time Steps

You have now looked at the results at time 1 s and produced a JPEG file showing some of these results. Now you are going to have a look at the results 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.

CFX-5 Tutorials

Page 117

Flow from a Circular VentViewing the Results To Generate an MPEG File

You can generate an MPEG file to show the transient flow of the plume of smoke. To generate a MPEG file, you use the Animation Editor in the same way as in Tutorial 1. However, to animate the plume of smoke you need to animate 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 be loaded 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 118

CFX-5 Tutorials

Flow from a Circular VentViewing the Results

In Animation, Timestep can be set to Timestep Interpolation, TimeValue Interpolation or Sequential Interpolation. This option determines the method used to decide which time step is loaded for each frame. This will become 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 option called Keep Intermediate Graphics Files. By turning on this option, the JPEG or PPM files used to encode each frame of the MPEG will persist after MPEG creation; otherwise they will be deleted. 7. Click OK.
CFX-5 Tutorials Page 119

Flow from a Circular VentViewing the Results

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 must be created for each frame. To view the MPEG file, you need to use a viewer that supports the MPEG format.

14. When you have finished, exit from CFX-Post.

Page 120

CFX-5 Tutorials

Flow from a Circular VentContinuing the Transient Run

4.G:

Continuing the Transient Run


The CFX-Solver determines the initial field for a restart simulation according to the settings you made for initialisation. In this tutorial, in order to set up the transient run correctly you set all variables to Automatic, except Initial Time which you set to Automatic with Value. This ensured that the transient run began from an Initial Time of 0 s. Should you wish to continue your transient run, the Initial Time will be set automatically to the last value from your previous run. For more information on Initialisation, see "Global Initialisation" on page 305 in the document "CFX-Pre".

CFX-5 Tutorials

Page 121

Flow from a Circular VentContinuing the Transient Run

Page 122

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 5

Flow Around a Blunt Body


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: BluntBody.pre BluntBodyDist.cse BluntBodyMesh.gtm

CFX-5 Tutorials

Page 123

Flow Around a Blunt BodyIntroduction

5.A:
5.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Boundary Conditions Details General Mode Steady State Ideal Gas Single Domain Shear Stress Transport Isothermal Inlet (Subsonic) Outlet (Subsonic) Symmetry Plane Wall: No-Slip Wall: Free-Slip Physical Timescale

CFX-Solver Manager CFX-Post

Timestep Restart Parallel processing Plots

Default Locators Outline Plot (Wireframe) Sampling Plane Streamline Vector Volume Changing the colour range Instancing Transformation Lighting Adjustment Symmetry Viewing the Mesh

Other

You learn about: solving and post-processing a case where the geometry has been omitted on one side of a symmetry plane using free slip wall boundaries on the sides of and above the domain as a compromise between accurate flow modelling and computational grid size
CFX-5 Tutorials

Page 124

Flow Around a Blunt BodyIntroduction

accurately modelling the near-wall flow using Shear Stress Transport (SST) turbulence model running the CFX-Solver in parallel (optional) creating vector plots in CFX-Post with uniform spacing between the vectors creating a macro using power syntax in CFX-Post

5.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

5.A.3:

Overview of the problem to solve


This example demonstrates external air flow over a generic vehicle body. Since both the geometry and the flow are symmetric about a vertical plane, only half of the geometry will be used to find the CFD solution.

air speed 15.0 m/s

1.44 m

5.2 m

Figure 1: External Air Flow Over a Generic Vehicle Body

CFX-5 Tutorials

Page 125

Flow Around a Blunt BodyDefining the Simulation in CFX-Pre

5.B:

Defining the Simulation in CFX-Pre


This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file BluntBody.pre to complete this section for you and continue from Obtaining a Solution Using the CFX-5 Solver (p. 133). See any of the earlier tutorials for instructions on how to do this.

5.B.1:

Creating a New Simulation


1. Start CFX-Pre. 2. Select File > New Simulation. 3. Select General mode. 4. Set File name to BluntBody and then click Save.

5.B.2:

Importing the Mesh


Tip: While we provide a mesh to use with this tutorial, you may want to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file BluntBodyMesh.gtm, located in the examples directory (<CFXROOT>/examples), to your working directory. 2. Click the Mesh tab to access the Mesh workspace. 3. Right-click in the Mesh Selector, then select Import. 4. Leave Mesh Format set to CFX-5 GTM file. 5. Set File to BluntBodyMesh.gtm. 6. Click OK to import the mesh.

5.B.3:

Creating the Domain


The flow in the domain is expected to be turbulent and approximately isothermal. The Shear Stress Transport (SST) turbulence model with automatic wall function treatment will be used because of its highly accurate predictions of flow separation. To take advantage of the SST model, the boundary layer should be resolved with at least 10 mesh nodes. In order to reduce computational time, the mesh in this tutorial is much coarser than that.

Page 126

CFX-5 Tutorials

Flow Around a Blunt BodyDefining the Simulation in CFX-Pre

See "The Shear Stress Transport (SST) k-w Based Model" on page 71 in the document "CFX-5 Solver Theory" and "Automatic Near-Wall Treatment for k-w Based Models" on page 90 in the document "CFX-5 Solver Theory" for more details.
To create a new domain

1. Click Domain

2. Set Name to BluntBody. 3. Click OK. Edit Domain: BluntBody is displayed with General Options selected. 4. Set Location to Assembly. 5. Leave Domain Type set to Fluid Domain. 6. Retain Fluids List as Air Ideal Gas. 7. Leave Coord Frame set to Coord 0. 8. Leave Reference Pressure set to 1 [atm]. Note: This tutorial uses an ideal gas as the fluid whereas previous tutorials have used a General Fluid. When modelling a compressible flow using the ideal gas approximation to calculate density variations, it is important to set a realistic Reference Pressure. This is because some fluid properties depend on the absolute fluid pressure (calculated as the static pressure plus the reference pressure). One atmosphere is equal to 1.0E+5 Pa. You can enter pressure values in a variety of units in CFX-Pre. Valid formats for scientific notation numbers include 1e5, 1E5, 1e+5, 1E+05 and 1.0e+05. You should not use spaces between any of the characters. 9. Under Buoyancy, leave Option set to Non Buoyant. 10. Under Domain Motion leave Option set to Stationary. 11. Click the Fluid Models tab, then: a. Under Heat Transfer Model, leave Option set to Isothermal and set Fluid Temperature to 288 [K]. b. Under Turbulence Model, set Option to Shear Stress Transport. c. Under Turbulent Wall Functions, set Option to Automatic. The Initialisation panel sets domain specific initial conditions, which are not used in this tutorial. Global initialisation will be set later in the tutorial. 12. Click OK to create the domain.

CFX-5 Tutorials

Page 127

Flow Around a Blunt BodyDefining the Simulation in CFX-Pre

5.B.4:

Creating Composite Regions


An imported mesh may contain many 2D regions. For the purpose of creating boundary conditions, it can sometimes be useful to group several 2D regions together and apply a single boundary condition to the composite 2D region. In this case, you are going to create a Union between two regions that both require a free slip wall boundary condition. 1. Click the Regions tab. 2. Right-click in the Region Selector, then select New. 3. In the Create Region box, enter FreeWalls and click OK. 4. In the Region Editor, set Combination to Union. Note: The Alias option can be used to re-name a region. This can be very useful if you wish to apply the physics from one simulation to another with different region names. 5. Set Dimension to 2D. 6. In the Region List, hold down the <Ctrl> key and select Free1 and Free2. 7. Click OK to create the new region. The 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) and symmetry plane boundary conditions. The regions for these boundary conditions were defined when the mesh was created.

To Create the Inlet Boundary Condition

1. Click Boundary Condition

2. In Create Boundary, set Name to Inlet and leave Domain set to BluntBody. 3. Click OK. Edit Boundary is displayed. 4. On the Basic Settings panel, set: a. Boundary Type to Inlet b. Location to Inlet

Page 128

CFX-5 Tutorials

Flow Around a Blunt BodyDefining the Simulation in CFX-Pre

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 Normal Speed and set Normal Speed to 15 [m s^-1]. c. Under Turbulence set Option to Intensity and Length Scale, Fractional Intensity to 0.05, and Eddy Length Scale to 0.1 [m]. 6. Click OK to create the boundary condition.
To Create the Outlet Boundary Condition

1. Click Boundary Condition

2. Set Name to Outlet, leave Domain set to BluntBody, and then click OK. 3. On the Basic Settings panel, set: a. Boundary Type to Outlet b. Location to Outlet 4. Click the Boundary Details tab, then: a. Under Flow Regime, confirm that Option is set to Subsonic. b. Under Mass and Momentum set Option to Static Pressure and Relative Pressure to 0 [Pa]. 5. Click OK to create the boundary condition.

To Create Free Slip Wall Boundary Condition

The top and side surfaces of the rectangular region will use free slip wall boundary conditions. On Free Slip Walls the shear stress is set to zero so that the fluid is not retarded. The velocity normal to the Wall is also set to zero. The velocity parallel to the Wall is calculated during the solution.

This is not an ideal boundary condition for this situation since the flow around the body will be affected by the close proximity to the walls. If this case was modelling a wind tunnel experiment, the domain should model the size and shape of the wind tunnel and use no-slip walls. If this case was modelling a blunt body open to the atmosphere, a much larger domain should be used to minimise the effect of the walls. There are other possible ways of dealing with, or eliminating, wall effects, but these are beyond the scope of this tutorial.

CFX-5 Tutorials

Page 129

Flow Around a Blunt BodyDefining the Simulation in CFX-Pre

You will apply a single boundary condition to both walls by using the composite region defined earlier. 1. Click Boundary Condition . 2. Set Name to FreeWalls, then click OK. 3. On the Basic Settings panel, set: a. Boundary Type to Wall b. Location to FreeWalls 4. Click the Boundary Details tab, under Wall Influence on Flow, set Option to Free Slip. 5. Click OK to create the boundary condition.
To Create the Symmetry Plane Boundary Condition

1. Click Boundary Condition

2. Set Name to SymP, then click OK. 3. On the Basic Settings panel, set: a. Boundary Type to Symmetry b. Location to SymP 4. Click OK to create the boundary condition.

To Create a Wall Boundary Condition on the Blunt Body Surface

1. Click Boundary Condition

2. Set Name to Body, then click OK. 3. On the Basic Settings panel, set: a. Boundary Type to Wall b. Location to Body 4. Click the Boundary Details tab, then, under Wall Influence on Flow, set Option to No Slip. 5. Click OK to create the boundary condition. The remaining 2D regions (in this case, just the low Z face) will be assigned the default boundary condition which is an adiabatic, no-slip wall condition. In this case, the name of the default boundary condition is BluntBody Default. Although the boundary conditions Body and BluntBody Default are identical (except for their locations), the Body boundary condition was created so that, during post-processing, its location can by conveniently distinguished from the other adiabatic, no-slip Wall surfaces.

Page 130

CFX-5 Tutorials

Flow Around a Blunt BodyDefining the Simulation in CFX-Pre

5.B.6:

Setting Initial Values


1. Click Global Initialisation to display Global Initialisation. 2. Under Cartesian Velocity Components, set: a. Option to Automatic with Value b. U to 15 [m s^-1] c. V to 0 [m s^-1] d. W to 0 [m s^-1] 3. Under Static Pressure and Turbulence Kinetic Energy leave Option set to Automatic. 4. Turn on Turbulence Eddy Dissipation and leave Option set to Automatic. 5. Click OK to set the initialisation details.

5.B.7:

Setting Solver Control


1. Click Solver Control . Solver Control is displayed. 2. Under Advection Scheme, set Option to High Resolution. 3. Under Convergence Control, set: a. Timescale Control to Physical Timescale b. Physical Timescale to 2 [s] This is the approximate dynamic time for the flow and is an aggressive timestep for use with a turbulence model. c. Max. No. Iterations to 60 4. Under Convergence Criteria, leave Residual Type set to RMS and set Residual Target to 1e-05. 5. Click OK to set the solver control parameters.

5.B.8:

Writing the Solver (.def) File


1. Click Write Solver (.def) File Write Solver File is displayed. .

2. Leave Operation set to Start Solver Manager. 3. Leave Report Summary of Interface Connections turned off and Quit CFX-Pre turned on.
CFX-5 Tutorials Page 131

Flow Around a Blunt BodyDefining the Simulation in CFX-Pre

4. Click OK. 5. Click Yes when asked if you want to save the CFX file.

Page 132

CFX-5 Tutorials

Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver

5.C:

Obtaining a Solution Using the CFX-5 Solver


This tutorial introduces the parallel solver capabilities of CFX-5. If you do not want to solve this tutorial in parallel (on more than one processor) or, do not have a licence to run the CFX-Solver in parallel, you can continue with this tutorial 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, you should either ask your system administrator, or query the license server as described below. The results produced will be identical, whether produced by a parallel or serial run. If you would like to solve this tutorial in parallel, continue with the tutorial from Obtaining a Solution in Parallel (p. 134). To solve it in serial, continue from Obtaining a Solution in Serial (p. 134).

Querying the License Server for CFX-5 Parallel

This section explains how to find out whether you have any licenses to run CFX-5 in parallel, by using the CFX License Manager. 1. 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 window displays information about the system and license setup. The bottom half is a message window. 2. If running using a Windows platform select Query > Licenses Available. 3. If running using a Unix platform select Licenses > Features > Available. The message window will display information about available licenses on your system, in the following form:
CFX-5-SOLVER CFX-5-NOLIMIT CFX-5-PAR-PROC CFX-5-PARALLEL CFX-5-COMBUSTION CFX-5-MULTIFLUID CFX-5-MFR 5.200 5.200 5.200 5.200 5.200 5.200 5.200 100 100 200 100 100 100 100 30-Sep-2003 30-Sep-2003 30-Sep-2003 30-Sep-2003 30-Sep-2003 30-Sep-2003 30-Sep-2003 CFDS CFDS CFDS CFDS CFDS CFDS CFDS

CFX-5 Tutorials

Page 133

Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver

Look for the presence of CFX-5-PARALLEL type licenses. If you have this type of license, you can run the CFX-5 Solver in parallel.

5.C.1:

Obtaining a Solution in Serial


When the CFX-Solver Manager starts: 1. Click Start Run. The CFX-Solver calculates the solution to your CFD problem. 2. When the CFX-Solver has finished, click OK in the message box.

To View the Results

3. Click Post-Process Results

4. When Start CFX-Post appears, turn on Shut down Solver Manager then click OK. Continue with this tutorial 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 large CFD problem so that it can run on more than one machine at once, saving time and avoiding problems which arise when a CFD calculation requires more memory than a single machine has available. The partition (division) of the CFD problem is automatic but you need to set up the machines you want to run on.

Page 134

CFX-5 Tutorials

Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver Background to Parallel Running in CFX-5

A number of events occur when you set up a parallel run and then ask the CFX-Solver to calculate the solution: Your mesh will be divided into the number of partitions that you have chosen. The CFX-Solver runs separately on each of the partitions on the selected machine(s). The results that one CFX-Solver process calculates affects the other CFX-Solver processes at the interface between the different sections of the mesh. All of the CFX-Solver processes are required to communicate with each other and this is handled by the master process. The master process always runs on the machine that you are logged into when the parallel run starts. The other CFX-Solver processes are slave processes. After the problem has been resolved, a single Results File is written. It will be identical to a Results File from the same problem run as a serial process, with one exception: an extra variable Real partition number will be available for the parallel run. This will be described later in the tutorial.

Setting Up to Run in Parallel

Windows If you are working on Windows, no set up is required if your system administrator has followed the instructions in "Windows Parallel Setup" on page 60 in the document "CFX-5 Installation" as part of the installation procedure. You can move straight to "To Define a Parallel Run" on page 136 in the document "CFX-5 Tutorials". UNIX Follow the procedure below prior to running in parallel for the first time on UNIX systems. Additional information can be found in "UNIX Parallel Setup" on page 47 in the document "CFX-5 Installation". Note: The following procedure may not be needed for all systems. Your system administrator will inform you if you need to create a .rhosts file to run in parallel.

CFX-5 Tutorials

Page 135

Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver

You need to know the hostname of the machine that you are currently logged into. It will be used for the master process. 1. Type cfx5info -host in a UNIX terminal window. The output should be used as the hostname. 2. Create a file named .rhosts in your home directory. Do this using any text editor. 3. Put the following line into the .rhosts file: <master> <user> Where <master> is the hostname found in step 1 above and <user> is your current user name. For example, your user name is smith, and you are logged onto a machine with the hostname of machine1. Then your .rhosts file would contain the following line of text: machine1 smith

4. You now need to make this file readable by you only. This can be done by typing the following in a UNIX terminal window: chmod 600 ~/.rhosts If you have a different home directory on a machine you want to use for a slave process, you will have to create a .rhosts file on it in the same way, using exactly the same text (for example, use the same hostname, not the machines own hostname, for <master>). Note: If you do not have the same user name, you will be unable to run in parallel on this machine.
To Define a Parallel Run

In CFX-Solver Manager, Define Run should already be open. 1. Set Definition File to BluntBody.def. If you had wanted to run the problem as a serial run (as you have done in previous tutorials) you could have clicked Start Run. However, you are going to run the problem in parallel instead. 2. Leave Type of Run set to Full. If 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 page 12 in the document "CFX- Solver Manager" for details.

Page 136

CFX-5 Tutorials

Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver

The name of the machine that you are currently logged into should be in the Host Name list. You are going to run with two partitions on two different machines, so another machine must be added.

CFX-5 Tutorials

Page 137

Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver

4. Click Insert Host

to specify a new host machine.

The Select Parallel Hosts panel is displayed. This is where you choose additional machines to run your processes. Your system administrator should have set up a hosts file containing a list of the machines that are available to run the parallel CFX-5 Solver. The Host Name column displays names of available hosts. The second column shows the number of processors on that machine. The third shows the relative processor speed: a processor on a machine with a relative speed of 1 would typically be twice as fast as a machine with a relative speed of 0.5. The last column displays operating system information. This information is read from the hosts file; if any information is missing or incorrect your system administrator should correct the hosts file.

Note: The # Processors, Rel. Speed and System information does not have to be specified to be able to run on a host. 5. Select the name of another machine in the Host Name list Select a machine that you can log into. 6. Click Add. The name of the machine is added to the Host Name column. Note: Ensure that the machine which you are currently logged into is in the Hosts Name list in the Define Run window. 7. Close the Select Parallel Hosts window. 8. Enable Show Advanced Controls. 9. Click the Partitioner tab at the top of the panel. 10. Use the default MeTiS partitioner. Your model will be divided into two sections, with each section running in its own CFX-Solver process. The default is the MeTiS partitioner because it produces more efficient partitions than either Recursive Coordinate Bisection or User Specified Direction. See "Setting Up and Running a Parallel Run" on page 45 in the document "CFX- Solver Manager" for details of the other settings on this panel.
Page 138 CFX-5 Tutorials

Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver

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: Host computer: Job started: partitioning run fastmachine1 Wed Nov 28 15:18:40 2000

This tells you that the information following is concerned with the partitioning. After the partitioning job has finished, you will find:
CPU-Time requirements: - Preparations - Low-level mesh partitioning - Global partitioning information - Vertex, element and face partitioning information - Element and face set partitioning information - Summed CPU-time for mesh partitioning 1.460E+00 1.000E-01 3.100E-01 1.600E-01 5.000E-02 2.080E+00 seconds seconds seconds seconds seconds seconds

+--------------------------------------------------------------------+ | Job Information | +--------------------------------------------------------------------+ Host computer: Job finished: Total CPU time: or: fastmachine1 Wed Nov 28 15:19:16 1998 1.143E+01 seconds ( 0: 0: ( Days: Hours:

0: Minutes:

11.428 ) Seconds )

This marks the end of the partitioning job. The CFX-5 Solver now begins to solve your parallel run:
+--------------------------------------------------------------------+ | Job Information | +--------------------------------------------------------------------+ Run mode: Host computer: Par. Process: Job started: Host computer: Par. Process: Job started: parallel run (PVM) fastmachine1 Master running on mesh partition: Thu Nov 28 15:19:20 2000 slowermachine Slave running on mesh partition: Thu Nov 28 15:24:55 2000

The machine which you are logged into runs the master process, and
CFX-5 Tutorials Page 139

Flow Around a Blunt BodyObtaining a Solution Using the CFX-5 Solver

controls the overall simulation. The second machine selected will run the slave process. If you had more than two processes, each additional process is run as a slave process. The master process in this example is running on the mesh partition number 1 and the slave is running on partition number 2. You can find out which nodes and elements are in each partition by using CFX-Post later on in the tutorial. When the CFX-Solver finishes, the Output File displays the following:
+--------------------------------------------------------------------+ | Job Information | +--------------------------------------------------------------------+ Host computer: Par. Process: Job finished: Total CPU time: or: fastmachine1 Master running on mesh partition: Thu Nov 28 16:44:01 2000 9.025E+02 seconds ( 0: 0: 15: ( Days: Hours: Minutes:

2.517 ) Seconds )

slowermachine Slave running on mesh partition: 2 Wed Nov 28 16:54:30 2000 1.291E+03 seconds ( 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.

Host computer: Par. Process: Job finished: Total CPU time: or:

You may need to scroll up through the output file to view the region shown above. More details on the contents of the Output File can be found in "The CFX-5 Output File" on page 87 in the document "CFX-Solver Manager". The CFX-Solver displays the following at the end of the run:
BluntBody_001 has completed normally. All RMS residuals and global imbalance are below their target criteria.

12. Click OK. 13. Click Post-Process Results .

14. When Start CFX-Post appears, turn on Shut down Solver Manager then click OK.

Page 140

CFX-5 Tutorials

Flow Around a Blunt BodyViewing the Results

5.D:

Viewing the Results


In this tutorial, a vector plot is created in CFX-Post. This will let you see how the flow behaves around the body. You will also use Symmetry Planes and learn more about manipulating the geometry view in the 3D Viewer.

5.D.1:

Using Symmetry Planes


Earlier in this tutorial you used a symmetry plane boundary condition because the original blunt body had a symmetry plane. Due to this symmetry, it was necessary to use only half of the full geometry to calculate the CFD results. However, for visualisation purposes, it is helpful to use the full blunt body. CFX-Post is able to recreate the full data set from the half that was originally calculated. This is done by creating an Instance Transform object.

Manipulating the Geometry

You need to manipulate the geometry so that you will be able to see what happens when you use the symmetry plane. The CFX-Post features that you have used in earlier tutorials will not be described in detail. New features will be described in detail. 1. Click View Toward +X by using the viewer icon drop-down menu.

Creating an Instance Transform

Instance Transforms are used to visualise a full geometry representation in cases where the simulation took advantage of symmetry to solve for only part of the geometry. There are three types of transforms that you can use: Rotation, Translation, Reflection. In this tutorial you will create a Reflection transform located on a plane. 1. Click Create plane . 2. Set Name to Reflection Plane, then click OK. 3. Under Geometry, set Method to ZX Plane and Y to 0. 4. Disable Visibility. 5. Click Apply. This creates a Plane in the same location as the symmetry Plane defined in CFX-Pre. Now the instance transform can be created using this Plane: 6. Click Create instancing transformation name. and accept the default

CFX-5 Tutorials

Page 141

Flow Around a Blunt BodyViewing the Results

7. On the Definition panel, fill in the settings as shown below.

8. Click Apply to create the Instance Transform.


Using the Reflection Transform

You can use the transform when creating or editing graphics objects. For example, you can modify the Wireframe view to use it as follows: 1. Edit the Wireframe object. 2. Set Transform to Instance Transform 1, retain the other settings as their defaults and click Apply. Zoom in so that the geometry fills the Viewer.

Page 142

CFX-5 Tutorials

Flow Around a Blunt BodyViewing the Results

You will see the full blunt body. It is possible to select more than one symmetry plane. More details can be found in "Instance Transform" on page 120 in the document "CFX-Post".

5.D.2:

Creating Vectors
You are now going to create a vector plot to show velocity vectors behind the blunt body. You need to first create an object to act as a locator, which, in this case, will be a Sampling Plane. Then create the vector plot itself.

Creating the Sampling Plane

A Sampling Plane is a plane with evenly spaced sampling points on it. 1. Click Create Plane . 2. In New Plane, set Name to Sample, then click OK. 3. Under Geometry: a. Set Method to Point and Normal. b. The following (x, y, z) values must be entered into the Point boxes to define the centre of the Sampling Plane: 6, -0.001, 1. c. For the Normal vector enter the values: 0, 1, 0. d. Expand the Plane Bounds section of the form. e. Set Type to Rectangular, X Size to 2.5 [m], and Y Size to 2.5 [m]. f. Expand the Plane Type section of the form. g. Turn on Sample and set X Samples and Y Samples to 20. 4. Click Apply to create the Sampling Plane. 5. Click View Toward +Y . You will not see the location of the sampling points because Draw Lines is turned off by default on the Render tab. 6. Click the Render tab: a. Turn on Draw Lines. b. Turn off Draw Faces. 7. Click Apply. You can zoom in on the Sampling Plane to see the location of the sampling points (where lines intersect). One way to do this is to hold <Shift> while middle clicking the area of interest. There are a total of 400 (20 * 20) sampling points on the plane. A vector can be created at each sampling point.

CFX-5 Tutorials

Page 143

Flow Around a Blunt BodyViewing the Results

8. Make the Sampling Plane invisible by turning off Visibility and then clicking Apply.
Creating a Vector Plot Using the Sampling Plane

1. Click Create Vector Plot

2. In New Vector, click OK to accept the default name. 3. Under Geometry, set: a. Domains to All Domains b. Locations to Sample c. Variable to Velocity 4. Click the Colour tab, then set Mode to Use Plot Variable. This colours the Vectors by the variable shown on the Geometry panel (Velocity). 5. Click the Symbol tab, then set Symbol Size to 0.15. This scales the length of the vectors. 6. Click Apply to create the Vector plot. 7. Zoom until the Vector plot is roughly the same size as the 3D Viewer. The plot should look similar to the one below. (If you get lost, click View Toward +Y and zoom in again.).

You should be able to see a region of recirculation behind the blunt body. Note: In this example, you may want to increase the density of the vectors (by increasing the number of sampling points) to resolve the flow in this region. However, you could end up with poor results. This is because the mesh has only 2-3 elements across the feature. This is insufficient to resolve

Page 144

CFX-5 Tutorials

Flow Around a Blunt BodyViewing the Results

the vortex properly. You would need to decrease the size of the mesh elements (decrease the mesh length scale in this region) in order to improve the solution accuracy. You can try the following before continuing to the next section. 1. Change the location of the Vector plot to SymP and click Apply. 2. Double-click the Body object. Set Mode to Variable and colour the Body boundary object by Pressure and change the Transform (on the Render panel) to the transformation previously created (Instance Transform 1). Turn on Visibility 3. Try using different mouse methods of manipulating the geometry. Examine the effect of Move Light (<Ctrl> plus <Shift> and use the Arrow keys to move) and Zoom box . 4. Make the Body boundary object invisible and create a view of the surface mesh on the SymP object by making it visible, turning on lines, and turning off faces. You will be able to see the mesh around the blunt body, with the mesh length scale decreasing near the body, but still coarse in the region of recirculation. By zooming in, you will be able to see the layers of inflated elements near the body and ground. If you want to know more about any feature, select Help > Master Contents from the main menu.

5.D.3:

Creating Surface Streamlines


In order to show the path of air along the surface of the blunt body, surface streamlines can be made as follows: 1. Click Create plane . 2. In New Plane, set Name to Starter, then click OK. 3. Under Geometry: a. Set Method to YZ Plane. b. Set X to -0.1 [m]. 4. Click Apply. The plane appears just upstream of the blunt body. 5. Turn off Visibility, then click Apply. This hides the plane from view, although the plane still exists. 6. Click Create streamline .
Page 145

CFX-5 Tutorials

Flow Around a Blunt BodyViewing the Results

7. In New Streamline, accept the default Name by clicking OK. 8. On the Geometry panel: a. Set Type to Surface Streamline. b. Under Definition, set Surfaces to Body, Start From to Locations, Locations to Starter. 9. Click Apply. The surface streamlines appear on the surface of the blunt body. They start near the upstream end because the starting points were formed by projecting nodes from the plane to the blunt body.

5.D.4:

Creating a Surface Plot of y+


The velocity next to a no-slip Wall boundary changes rapidly from a value of zero 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. Many meshes are not fine enough near a wall to accurately resolve the velocity profile in the boundary layer. Wall functions can be used in these cases to apply an assumed functional shape of the velocity profile. Other grids are fine enough that they do not require wall functions, and application of the latter has little effect. The majority of cases fall somewhere in between these two extremes, where the boundary layer is partially resolved by nodes near the wall and wall functions are used to supplement accuracy where the nodes are not sufficiently clustered near the wall. One indicator of the closeness of the first node to the wall is the dimensionless wall distance y+. It is good practice to examine the values of y+ at the end of your simulation. At the lower limit, a value of y+ less than or equal to 11 indicates that the first node is within the laminar sublayer of the boundary flow. Values larger than this indicate that an assumed logarithmic shape of the velocity profile is being used to model the boundary layer portion between the wall and the first node. Ideally you should confirm that there are several nodes (3 or more) resolving the boundary layer profile. If this is not observed, it is highly recommended that more nodes be added near the wall surfaces in order to improve simulation accuracy. In this tutorial, a coarse mesh is used to speed the run time. Thus the grid is far too coarse to resolve any of the boundary layer profile, and the solution is not highly accurate. More related information can be found in "Modelling Flow Near the Wall" on page 88 in the document "CFX-5 Solver Theory", including the difference between the solution Yplus and Solver Yplus.

Page 146

CFX-5 Tutorials

Flow Around a Blunt BodyViewing the Results Creating a Surface Plot of y+

A surface plot is one which colours a surface according to the values of a variable: in this case, y+. A surface plot of y+ can be obtained as follows: 1. Turn off Visibility for all previous plots. 2. Click Perspective to enable a perspective view.

3. In the Objects Workspace, double-click the BluntBody Default object, then: a. On the Colour panel, set Mode to Variable. b. Set Variable to Yplus. Click to the right of the Variable dropdown menu to view a full list of variables, including Yplus. c. Set Range to Local. d. Click the Render tab, then use the reflection transform you created earlier (Instance Transform 1). e. Turn on Visibility. 4. Click Apply. 5. Produce a plot of Yplus on the Body object in the same way.

5.D.5:

Demonstrating Power Syntax


This section demonstrates a Power Syntax Macro used to evaluate the variation of any variable in the direction of the X axis. This is an example of Power Syntax programming in CFX-Post. For more information on Power Syntax, please see "Power Syntax Overview" on page 238 in the document "CFX-Post". For information on CCL please see "Overview of the CFX Command Language (CCL)" on page 200 in the document "CFX-Post". 1. Play the session file named BluntBodyDist.cse. A macro containing CCL and power syntax is loaded. The macro tells CFX-Post to create slice planes, normal to the X axis, at 20 evenly-spaced locations from the beginning to the end of the BluntBody domain. On each plane, it measures and prints the minimum, maximum, and average values for a specified variable (using Conservative values). The planes are coloured using the specified variable. This macro will be executed by entering a line of power syntax in the Command Editor.

CFX-5 Tutorials

Page 147

Flow Around a Blunt BodyViewing the Results

Note: The CFX-Post engine can respond to CCL commands issued directly, or to commands issued using the graphical user interface. The Command Editor can be used to enter any valid CCL command directly. Please see "Command Editor" on page 169 in the document "CFX-Post" for more information. 2. Position the geometry to look toward the -X axis. 3. From the Main menu click Tools > Command Editor. 4. Type the following line into the 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 explanatory comments), open the session file in a text editor. It contains all of the CCL and power syntax commands and will provide a better understanding of how the macro works.

5.D.6:

Viewing the Mesh Partitions (Parallel Only)


If you solved this tutorial in parallel then an additional variable named Real partition number will be available in CFX-Post 1. Create an Isosurface of Real partition number equal to 1. 2. Create a second Isosurface of Real partition number equal to 1.999. The two Isosurfaces show the edges of the two partitions. The gap between the two plots shows the overlap nodes. These were contained in both partitions 1 and 2. When you have finished looking at the results, shut down CFX-Post.

Page 148

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 6

Buoyant Flow in a Partitioned Cavity


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: Buoyancy2D.geo Buoyancy2D.pre

CFX-5 Tutorials

Page 149

Buoyant Flow in a Partitioned CavityIntroduction

6.A:
6.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Buoyant Flow Boundary Conditions Details General Mode Transient General Fluid Single Domain Laminar Thermal Energy Symmetry Plane Outlet (Subsonic) Wall: No-Slip Wall: Adiabatic Wall: Fixed Temperature Output Control Timestep Transient Results File n/a Plots Other Transient Example n/a Default Locators Timestep Selection Transient Animation

CFX-Solver Manager CFX-Post

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 that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you

Page 150

CFX-5 Tutorials

Buoyant Flow in a Partitioned CavityIntroduction

perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

6.A.3:

Overview of the problem to solve


Introduction: This tutorial demonstrates the capability of CFX-5 in modelling buoyancy-driven flows which require the inclusion of gravitational effects. The model is a 2D partitioned cavity containing air. The bottom of the cavity is kept at a constant temperature of 75C, while the top is held constant at 5C. The cavity is also tilted at an angle of 30 degrees to the horizontal. A transient simulation is set up to see how the flow develops starting from stationary conditions. Since you are starting from stationary conditions, there is no need to solve a steady-state simulation for use as the initial guess.
5 C

air

75 C

The mesh for the cavity was created in CFX-4 and has been provided.

CFX-5 Tutorials

Page 151

Buoyant Flow in a Partitioned CavityDefining the Simulation in CFX-Pre

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 the relevant boundary conditions for this problem. This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file Buoyancy2D.pre to complete 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 called Buoyancy2D 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 to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file 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 details on importing CFX-4 meshes and how to use the options available on the Advanced panel. 5. Click OK to import the mesh.

Page 152

CFX-5 Tutorials

Buoyant Flow in a Partitioned CavityDefining the Simulation in CFX-Pre

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 set to Transient. These errors will be fixed in the later part of the tutorial.

CFX-5 Tutorials

Page 153

Buoyant Flow in a Partitioned CavityDefining the Simulation in CFX-Pre

6.B.4:

Creating the Domain


You are going to create a fluid domain where the flow is driven by buoyancy. Two buoyancy models are available in CFX-5. They are invoked automatically, depending on fluid density definition. The Boussinesq approximation, used for near constant density fluids is used in this tutorial, as the density does not vary appreciably over the range of conditions in the flow. The Full Buoyancy model may be needed if the density were to change significantly. See "Buoyancy" on page 11 in the document "CFX-5 Solver Modelling" for more information.

gsin30 30 gcos30 g

y x 30

In addition to modelling buoyant flow, you will model the cavity as if it was tilted at an angle of 30. You can do this by specifying horizontal and vertical components of the gravity vector, which are aligned with the default coordinate axes, as shown in the diagram above.
To Create a New Domain

1. Click Domain

2. Set Name to Buoyancy2D then click OK.

Page 154

CFX-5 Tutorials

Buoyant Flow in a Partitioned CavityDefining the Simulation in CFX-Pre

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:
To this value Buoyant -4.905 [m s^-2] -8.49571 [m s^-2] 0.0 [m s^-2]* 40 [C] Automatic

Set the following Option Gravity X Dirn. Gravity Y Dirn. Gravity Z Dirn. Buoyancy Ref. Temp. Ref Location *. . .

This produces a gravity vector which simulates the tilt of the cavity Do not forget to change the units. This is just an approximate representative domain temperature. 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"), is sufficient

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 is no need to visit the Initialisation tab. 5. Click OK to create the domain.

CFX-5 Tutorials

Page 155

Buoyant Flow in a Partitioned CavityDefining the Simulation in CFX-Pre

6.B.5:
To Create Hot and Cold Wall Boundary Conditions

Creating the Boundary Conditions


You will create a wall boundary condition with a fixed temperature of 75 C on 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 Fixed Temperature 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 the Symmetry Plane Boundary Conditions

A single symmetry plane boundary condition can be used for the front and back 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 applied to the remaining boundaries.

Page 156

CFX-5 Tutorials

Buoyant Flow in a Partitioned CavityDefining the Simulation in CFX-Pre

6.B.6:

Setting Initial Values


1. Click Global Initialisation then: . On the Global Initialisation panel,

a. Leave Velocity Type set to Cartesian. b. Under Cartesian Velocity Components, set Option to Automatic with Value. c. Set U, V and W to 0 [m s^-1]. d. Under Static Pressure, set Option to Automatic with Value and Relative Pressure to 0 [Pa]. e. Under Temperature, set Option to Automatic with Value and Temperature 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 a transient model. The CFX-Solver checks the definition file for an existing solution field at the beginning of the run. If the file is being used to restart the CFX-Solver, then a solution field will be present and is used. If a solution field does not exist in the definition file, as is the case in this tutorial, the CFX-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 for the object. and then click OK to accept the default name

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.

CFX-5 Tutorials

Page 157

Buoyant Flow in a Partitioned CavityDefining the Simulation in CFX-Pre

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 Factor and 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 and Residual Target to 1e-04. 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. 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 158

CFX-5 Tutorials

Buoyant Flow in a Partitioned CavityObtaining a Solution

6.C:

Obtaining a Solution
When CFX-Pre has shut down and the CFX-Solver Manager has loaded, you will be able to obtain a solution to the CFD problem by following the instructions below. 1. Click Start Run. Note: Recall from Tutorial that the output displayed in the Text Area of the CFX-Solver Manager is more complicated for transient problems than for steady-state problems. Each timestep consists of several iterations, and after 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.

CFX-5 Tutorials

Page 159

Buoyant Flow in a Partitioned CavityViewing the Results

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 State timestep will be available by default. Use Tools > Timestep Selector to load the results at a different timestep.

Use the animation feature to generate plots showing the transient rise in temperature and the motion of the fluid due to heating from the bottom surface. When you have finished, close CFX-Post.

Page 160

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 7

Free Surface Flow Over a Bump


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: Bump2D.pre Bump2DExpressions.ccl Bump2Dpatran.out

CFX-5 Tutorials

Page 161

Free Surface Flow Over a BumpIntroduction

7.A:
7.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Buoyant Flow Multiphase Boundary Conditions Details General Mode Steady State General Fluid Single Domain k-Epsilon None

Inlet (Subsonic) Outlet (Subsonic) Symmetry Plane

Wall: No-Slip Wall: Free-Slip CEL (CFX Expression Language) Mesh Adaption Timestep Physical Timescale CFX-Solver Manager CFX-Post n/a Plots n/a Default Locators Isosurface Polyline Sampling Plane Vector Volume Chart Creation Title/Text Viewing the Mesh

Other

You learn about: mesh import in PATRAN Neutral format setting up a 2D problem setting up appropriate boundary conditions for a free surface simulation
CFX-5 Tutorials

Page 162

Free Surface Flow Over a BumpIntroduction

(Free Surface simulations are more sensitive to incorrect boundary and initial guess settings than other more basic models.) mesh adaption to refine the mesh where the volume fraction gradient is greatest (This aids in the development of a sharp interface between the liquid and gas.)

7.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

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 channel is interrupted by a semi-circular bump of radius 30 mm. The flow upstream of the bump is subcritical. The downstream conditions are not known but can be estimated using an analytical 1D calculation or data tables for flow over a bump.

CFX-5 Tutorials

Page 163

Free Surface Flow Over a BumpDefining the Simulation in CFX-Pre

7.B:

Defining the Simulation in CFX-Pre


This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file Bump2D.pre to complete this section for you and continue from Obtaining a Solution (p. 175). See one 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 the General Mode. You can refer to the introductory tutorials if you require instructions 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 to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the 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. on the Viewer toolbar.

Viewing the Region Labels

1. Click Label and Marker Visibility 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 meshes containing different element types. The imported mesh in this example consists entirely of hexahedral elements.
Page 164 CFX-5 Tutorials

Free Surface Flow Over a BumpDefining the Simulation in CFX-Pre

7.B.3:

Creating Expressions for Initial and Boundary Conditions


Simulation of free surface flows usually requires defining boundary and initial conditions to set up appropriate pressure and volume fraction fields. You will need to create expressions using CEL (CFX Expression Language) to define 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 1 for air and 0 for water and below the free surface is 0 for air and 1 for water. A pressure-specified outlet boundary, where the pressure above the free surface is constant and the pressure below the free surface is a hydrostatic distribution. This requires you to know the approximate height of the fluid at the outlet. In this case, an analytical solution for 1D flow over a bump was used. The simulation is not sensitive to the exact outlet fluid height, so an approximation is sufficient. You will examine the effect of the outlet boundary condition in the post-processing section and confirm that it does not affect the validity of the results. It is necessary to specify such a boundary condition to force the flow downstream of the bump into the supercritical regime. See "Modelling Advice for Free Surface Flow" on page 198 in the document "CFX-5 Solver Modelling" for more details on setting boundary conditions for free surface calculations. An initial pressure field for the domain with a similar pressure distribution to that of the outlet boundary.

You can create the expressions by reading them in from a file or by typing them into the Expression Editor. Follow only one of the two methods described below.
Creating Expressions Using the Expression Editor

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.

CFX-5 Tutorials

Page 165

Free Surface Flow Over a BumpDefining the Simulation in CFX-Pre

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.
Set the following DownH DenH UpVFAir UpVFWater UpPres DownVFAir DownVFWater DownPres To this value 0.022 [m] 998 [kg m^-3] step((y-UpH)/1[m]) 1-UpVFAir DenH*g*UpVFWater*(UpH-y) step((y-DownH)/1[m]) 1-DownVFAir DenH*g*DownVFWater*(DownH-y)

6. Proceed to Creating the Domain (p. 166).


Reading Expressions From 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.

Page 166

CFX-5 Tutorials

Free Surface Flow Over a BumpDefining the Simulation in CFX-Pre

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:
Set the following Option Gravity X Dirn. Gravity Y Dirn. Gravity Z Dirn. Buoyancy Reference Density Ref Location *. .

To this value Buoyant 0 [m s^-2] -g* 0 [m s^-2] 1.185 [kg m^-3] Automatic

You need to click the Enter Expression icon beside the field first. Always set Buoyancy Reference Density to the density of the least dense fluid in free surface calculations, see "Buoyancy" on page 11 in the document "CFX-5 Solver Modelling" for an explanation.

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 is only appropriate in some simulations, see "Free Surface Flow" on page 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 Density Difference.

CFX-5 Tutorials

Page 167

Free Surface Flow Over a BumpDefining the Simulation in CFX-Pre

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 Density Difference. 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 global initialisation will be set later in the tutorial. 8. Click OK to create the domain.

7.B.5:
Creating the Inlet Boundary Condition

Creating the Boundary Conditions


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 and Normal 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 the expression UpH. To enter an expression, place the cursor in the data box and then click to the right of the data box. .

Page 168

CFX-5 Tutorials

Free Surface Flow Over a BumpDefining the Simulation in CFX-Pre

5. Click the Fluid Values tab, then: a. Select Air at 25 C, then under Volume Fraction, set Option to Value and Volume Fraction to UpVFAir. b. Select Water, then set Option to Value and Volume Fraction to UpVFWater. 6. Click OK to create the boundary condition.
Creating the Outlet Boundary Condition

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 and Relative Pressure to DownPres. 5. Click OK to create the boundary condition.

Creating the Symmetry Boundary Conditions

1. Create a boundary condition named front with 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. 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 to constrain the flow and improve convergence. As the water level drops downstream of the bump, air tries to flow in through the outlet to maintain conservation of mass. An outlet type boundary condition does not allow fluid to flow into the domain, so the CFX-Solver erects a temporary Wall on

Creating the Wall Boundary Conditions

CFX-5 Tutorials

Page 169

Free Surface Flow Over a BumpDefining the Simulation in CFX-Pre

the affected faces to prevent inflow through the outlet during the solver run. This does not influence the flow of water, but changes the air flow above the water. If you want to model the air flow above the water, then you could use different boundary conditions for the TOP or OUTFLOW boundaries. An opening boundary condition for region TOP lets air flow into the domain when the water level drops. An opening for region OUTFLOW prevents temporary walls and lets air flow in through this boundary. When both the TOP and OUTFLOW regions are openings, the true air flow field 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 170

CFX-5 Tutorials

Free Surface Flow Over a BumpDefining the Simulation in CFX-Pre

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.

CFX-5 Tutorials

Page 171

Free Surface Flow Over a BumpDefining the Simulation in CFX-Pre

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:
Set the following Variables List Max. No. Steps* Option Node Factor *. . To this value Air at 25 C.Volume Fraction 2 Multiple of Initial Mesh 4

See "Maximum Number of Adaption Steps" on page 318 in the document "CFX-Pre" for details on setting this parameter. See "Option" on page 318 in the document "CFX-Pre" for details on setting this value.

e. Under Adaption Method, set Option to Solution Variation and leave Minimum Edge Length set to 0. f. Under Adaption Convergence Criteria, set Max. Iterations per Step to 100, leave Residual Type set to RMS and Target Residual set to 0.001.

Page 172

CFX-5 Tutorials

Free Surface Flow Over a BumpDefining the Simulation in CFX-Pre

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 the document "CFX-Pre" for details on setting the values on the Advanced Options 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.

CFX-5 Tutorials

Page 173

Free Surface Flow Over a BumpDefining the Simulation in CFX-Pre

3. Under Convergence Control, set Timescale Control to Physical Timescale, Physical Timescale to 0.05 [s], and Max. No. Iterations to 200. Important: Setting Max No. Iterations to 200 and Number of Adaption Levels to 2 with a maximum of 100 timesteps each, results in a total maximum 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 174

CFX-5 Tutorials

Free Surface Flow Over a BumpObtaining a Solution

7.C:

Obtaining a Solution
When CFX-Pre has shut down and the CFX-Solver Manager has started, you will be able to get a solution to the CFD problem by following the instructions 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 (at 69 % of the faces, 69 % of the area) to prevent fluid from flowing 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 the OUTFLOW and TOP regions. You can eliminate these messages by using an Opening boundary. After 100 iterations, the first adaption step will be performed. Information will be written to the OUT file, containing the number of elements refined and the size of the new mesh. After mesh refinement, there will be a jump in the residual levels. This is because 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 no longer 2D (it is more than 1 element thick in the z-direction).

Y Before Refinement After Refinement

When the CFX-Solver has finished: 2. Click OK.

CFX-5 Tutorials

Page 175

Free Surface Flow Over a BumpObtaining a Solution

Convergence to the target residual level has been achieved. It is common for convergence in a residual sense to be difficult to obtain in a free surface simulation. This is due to the presence of small waves at the surface preventing the residuals from dropping to the target level. This is more frequently a problem in the subcritical flow regime, as the waves can travel upstream. In the supercritical regime, the waves tend to get carried downstream and out the domain. To satisfy convergence in these cases, monitor the value of a global quantity, (for example, drag for flow around a ships hull) to see when a steady state value is reached. Where there is no obvious global quantity to monitor, you should view the results to see where the solution is changing. You can do this by running transient for a few timesteps, starting from a results file that you think is converged, or by writing some backup results files at different timesteps. In both cases look to see where the results are changing (this could be due to the presence of small transient waves). Also confirm that the value of quantities that you are interested in (for example, downstream fluid height for 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 176

CFX-5 Tutorials

Free Surface Flow Over a BumpViewing the Results

7.D:

Viewing the Results


1. Click View Toward -Z Viewer. , then zoom in so the geometry fills the

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.

Creating Velocity Vector Plots

The next step involves creating a sampling plane to display velocity vectors for 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

CFX-5 Tutorials

Page 177

Free Surface Flow Over a BumpViewing the Results

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 allowed velocities are superficial velocities (see Further Post-processing (p. 186) for more information). 12. On the Symbol panel, set Symbol Size to 0.5.

Page 178

CFX-5 Tutorials

Free Surface Flow Over a BumpViewing the Results

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 wall placed at portions of the outlet. As the water level drops, the volume of air above the water must increase, so air tries to flow in through the outlet to maintain conservation of mass. To prevent inflow through an outlet, a wall is placed at portions of the outlet. This results in a clear recirculation zone of air 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.

CFX-5 Tutorials

Page 179

Free Surface Flow Over a BumpViewing the Results

16. Click Apply. The resulting vector field is shown below.

Viewing Mesh Refinement

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 180

CFX-5 Tutorials

Free Surface Flow Over a BumpViewing the Results

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: Downstream End of Mesh" on page 181. In the transition region between different levels of refinement, tetrahedral and pyramidal elements are used since it is not possible to recreate hexahedral elements in CFX-5. Near the inlet, the aspect ratio of these elements increases. See "Figure 1: Upstream End of Mesh" on page 181. Avoid performing mesh refinement on high-aspect-ratio hex meshes, 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.

CFX-5 Tutorials

Page 181

Free Surface Flow Over a BumpViewing the Results

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 Specified and picking green from the colour pallet. 9. Click Apply. You will see a band of green which indicates the elements that include nodes 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 colour sample. 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 colour sample. 15. Click Apply.

Page 182

CFX-5 Tutorials

Free Surface Flow Over a BumpViewing the Results

You will see a band of white (with black lines) which indicates the elements that 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 is either 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.Superficial Velocity.). The variables magnitude and direction do not matter since we will change 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.

CFX-5 Tutorials

Page 183

Free Surface Flow Over a BumpViewing the Results

Blue nodes (Refinement Level 0 according to the colour legend) are part of the original mesh. Green nodes (Refinement Level 1) were added during the first adaption step. Red nodes (Refinement Level 2) were added during the second adaption step. Note that some elements contain combinations of blue, green, and red nodes. Note: See "Volume" on page 82 in the document "CFX-Post" to better understand how the volume objects were created, taking into account that some elements involved more than one refinement level via their constituent nodes.
Creating a Chart

Next, you will create a Chart to show how the height of the free surface varies along the length of the channel. To do this, you will need a Polyline which follows the free surface. You can create the Polyline from the intersecting line between one of the Symmetry planes and an Isosurface which 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. Click Isometric View (Y Up) from the Viewer toolbar.
Creating a Polyline to Follow the Free 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 a Chart to Show the Height of the Surface Page 184

1. Click the Charts tab in the CFX-Post Workspace. 2. Right-click in the Chart Selector and select New.
CFX-5 Tutorials

Free Surface Flow Over a BumpViewing the Results

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 a Bump. 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 boundary condition, even though the flow is supercritical. The chart illustrates the effect of this, in that the water level rises just before the exit plane. It is evident from this plot that imposing the elevation does not affect the upstream flow. The chart shows a wiggle in the elevation of the free surface interface at the inlet. This is related to an overspecification of conditions at the inlet, since both 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
CFX-5 Tutorials Page 185

Free Surface Flow Over a BumpViewing the Results

to a small inconsistency between the specified elevation and the elevation computed by the solver to obtain critical conditions at the bump. The wiggle is analogous to one found if pressure and velocity were both specified at a subsonic inlet, in a converging-diverging nozzle with choked flow at the throat. Further Post-processing You may wish to create some plots using the <Fluid>.Superficial Velocity variables. This is the fluid volume fraction multiplied by the fluid velocity and is sometimes called the volume flux. It is useful to use this variable for vector plots in separated multiphase flow, as you will only see a vector where a significant amount of that phase exists.

Page 186

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 8

Supersonic Flow Over a Wing


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: WingSPS.pre WingSPSMesh.out

CFX-5 Tutorials

Page 187

Supersonic Flow Over a WingIntroduction

8.A:
8.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Boundary Conditions Details Quick Setup Wizard Steady State Ideal Gas Single Domain Shear Stress Transport Total Energy Inlet (Supersonic) Outlet (Supersonic) Symmetry Plane Wall: No-Slip Wall: Adiabatic Wall: Free-Slip Fluid-Fluid (No Frame Change) Auto Timescale n/a Contour Default Locator Vector Variable Editor

Domain Interfaces Timestep n/a Plots

CFX-Solver Manager CFX-Post

Other

You learn about: setting up a supersonic flow simulation using the Shear Stress Transport turbulence model to accurately resolve flow around the wing surface defining custom vector variables for use in visualising pressure distribution

Page 188

CFX-5 Tutorials

Supersonic Flow Over a WingIntroduction

8.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

8.A.3:

Overview of the problem to solve


This example demonstrates the use of CFX-5 in simulating supersonic flow over a symmetric NACA0012 airfoil at 0o angle of attack. A 2D section of the wing is modelled. A 2D hexahedral mesh is provided that is imported into CFX-Pre.
air speed u= 600 m/s 1.25 [m]

outlet 30 [m]

wing surface

70 [m]

CFX-5 Tutorials

Page 189

Supersonic Flow Over a WingDefining the Simulation in CFX-Pre

8.B:

Defining the Simulation in CFX-Pre


This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file Wing.pre to complete this section for you and continue from Obtaining a Solution (p. 196). This session file sets up the model to produce an initial guess. See one of the first four 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 to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file 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 a new domain

Creating the Domain


1. Click Domain . 2. Enter Wing in the Name box and click OK.

Page 190

CFX-5 Tutorials

Supersonic Flow Over a WingDefining the Simulation in CFX-Pre

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 appropriate reference pressure since some properties depend on the absolute pressure level. See "Setting a Reference Pressure" on page 10 in the document "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 it includes 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 Radiation Model set to None. The Initialisation panel sets domain specific initial conditions, which are not used in this tutorial. Global initialisation will be set later in the tutorial. 5. Click OK to create the domain.

8.B.4:
Creating the Inlet Boundary Condition

Creating the Boundary Conditions


1. Create a boundary condition named Inlet. 2. On the Basic Settings panel, set: a. Boundary Type to Inlet b. Location to INLET

CFX-5 Tutorials

Page 191

Supersonic Flow Over a WingDefining the Simulation in CFX-Pre

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 Static Temperature to 300 [K]. 4. Click OK to create the boundary condition.
Creating the Outlet Boundary Condition

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 the Required Symmetry Plane Boundary Conditions

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 Free Slip Boundary Condition for the Top of the Domain Page 192

Create a free slip wall at the location TOP.

CFX-5 Tutorials

Supersonic Flow Over a WingDefining the Simulation in CFX-Pre Creating a Wall Boundary Condition for the 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 with domain interfaces. To ensure a one-to-one connection between the three regions, a translational periodic interface (with a zero translation in this case) will be created. See "One-to-one Connections" on page 127 in the document "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 --.

CFX-5 Tutorials

Page 193

Supersonic Flow Over a WingDefining the Simulation in CFX-Pre

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 sensible initial 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 gradually increases towards the fluid residence time as the residuals decrease. A user specified maximum timescale can be combined with an Auto Timescale in CFX-Pre.

Page 194

CFX-5 Tutorials

Supersonic Flow Over a WingDefining the Simulation in CFX-Pre

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 to 0.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 of Interface Connections toggle was enabled, an information window is displayed that 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.

CFX-5 Tutorials

Page 195

Supersonic Flow Over a WingObtaining a Solution

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 196

CFX-5 Tutorials

Supersonic Flow Over a WingViewing the Results

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 close to the maximum. The velocity goes to zero on the wing surface.

Figure 1: Mach Number on SymP2

CFX-5 Tutorials

Page 197

Supersonic Flow Over a WingViewing the Results

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 198

CFX-5 Tutorials

Supersonic Flow Over a WingViewing the Results

You can also try creating a user vector variable to show the pressure magnitude 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 and accept the default name.

4. Click Apply. 5. Click Create Vector Plot

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 surface of the wing.

Figure 4: Pressure acting on the Wing

When you have finished, quit CFX-Post.

CFX-5 Tutorials

Page 199

Supersonic Flow Over a WingViewing the Results

Page 200

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 9

Flow Through a Butterfly Valve


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: PipeValve.pre PipeValve_inlet.F PipeValveMesh.gtm PipValveUserF.pre

CFX-5 Tutorials

Page 201

Flow Through a Butterfly ValveIntroduction

9.A:
9.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Particle Tracking Boundary Conditions Details General Mode Steady State General Fluid Single Domain k-Epsilon None 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 CFX-Post Power-Syntax Plots Animation Default Locators Particle Track Point Slice Plane Changing the Colour Range MPEG Generation Particle Track Animation Quantitative Calculation Symmetry

Other

You learn about: using a rough wall boundary condition in CFX-Pre to simulate the pipe wall
CFX-5 Tutorials

Page 202

Flow Through a Butterfly ValveIntroduction

creating a fully developed inlet velocity profile using either the CFX Expression Language or a User CEL Function setting up a Particle Tracking simulation in CFX-Pre to trace sand particles animating particle tracks in CFX-Post to trace sand particles through the domain quantitative calculation of average static pressure in CFX-Post on the outlet boundary

9.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

9.A.3:

Overview of the problem to solve


In industry, pumps and compressors are commonplace. An estimate of the pumping requirement can be calculated based on the height difference between source and destination and head loss estimates for the pipe and any obstructions/joints along the way. Investigating the detailed flow pattern around a valve or joint however, can lead to a better understanding

CFX-5 Tutorials

Page 203

Flow Through a Butterfly ValveIntroduction

of why these losses occur. Improvements in valve/joint design can be simulated using CFD, and implemented to reduce pumping requirement and cost.

Max. Vel. 5.0 m/s 288.0 K

r = 20.0 mm

Valve Plate

Flows can also contain particulates that affect the flow and cause erosion to pipe and valve components. The particle tracking capability of CFX-5 can be used to simulate these effects. In this example, water flows through a 20 mm radius pipe with a rough internal surface. The equivalent sand grain roughness is 0.2 mm. The flow is controlled by a butterfly valve, which is set at an angle of 55 to the vertical axis. 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.

Page 204

CFX-5 Tutorials

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

9.B:

Defining the Simulation in CFX-Pre


This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use a session file to complete this section. See any 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-5 Expression Language) expression. PipeValveUserF.pre sets the inlet velocity profile using a User CEL Function which is defined by a FORTRAN subroutine. If you choose this method, you will need to compile the FORTRAN subroutine before you run the CFX-Solver, see Compiling the Subroutine (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 a Solution (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 the General Mode.

9.B.2:

Importing the Mesh


Tip: While we provide a mesh to use with this tutorial, you may want to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file 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.

CFX-5 Tutorials

Page 205

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

9.B.3:

Defining the Properties of Sand


The material properties of the sand particles used in the simulation need to be defined. Heat transfer and radiation modelling are not used in this simulation, so the only property that needs to be defined is the density of the sand. To calculate the effect of the particles on the continuous fluid, between 100 and 1000 particles are usually required. However, if accurate information about the particle volume fraction or local forces on wall boundaries is required, then a much larger number of particles needs to be modelled. When you create the domain, choose either full coupling or one-way coupling between the particle and continuous phase. Full coupling is needed to predict the effect of the particles on the continuous phase flow field but has a higher CPU cost than one-way coupling. One-way coupling simply predicts the particle paths during post-processing based on the flow field, but without affecting the flow field. To optimise CPU usage, you can create two sets of identical particles. The first set will be fully coupled and between 100 and 1000 particles will be used. This allows the particles to influence the flow field. The second set will use one-way coupling but a much higher number of particles will be used. This provides a more accurate calculation of the particle volume fraction and 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 206

CFX-5 Tutorials

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

9. Under Equation of State: a. Set Option to Value b. Leave the Molar Mass setting at its default value (this value is not required 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 will not be used in the CFX-Solver since heat transfer will not be modelled 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 a New Domain

Creating the Domain


1. Click Domain . 2. Set Name to PipeValve then click OK.

CFX-5 Tutorials

Page 207

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

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 Fully Coupled 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" on page 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 not the particle phases. c. Under Turbulent Wall Functions, ensure that Option is set to Scalable. d. Under Reaction or Combustion Model and Thermal Radiation Model 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 Transport Solid. b. Turn on Particle Diameter Distribution:
Set the following Option Min. Diameter Max. Diameter Mean Diameter Std Deviation *. . 50 microns 500 microns To this value Normal in Diameter by Mass 50e-6 [m]* 500e-6 [m] 250e-6 [m] 70e-6 [m]

Page 208

CFX-5 Tutorials

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

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, set Particle Coupling to Fully Coupled. b. Select Water | Sand One Way Coupled from the Fluid Pairs list and set Particle Coupling to One-way Coupling. c. Verify that the Drag Force is set to Schiller Naumann for both fluid pairs. 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 an inlet boundary. This means that the inlet velocity near to the walls is the same as that at the centre of the inlet. If you look at the results from these simulations, you will see that downstream of the inlet, a boundary layer will develop, so that the downstream near wall velocity is much lower than the inlet near wall velocity. You can simulate an inlet more accurately by defining an inlet velocity profile, so that the boundary layer is already fully developed at the inlet. The one seventh power law will be used in this tutorial to describe the profile at the pipe inlet. The equation for this is:

r U = Wmax 1 ------------ Rmax

1 7

where Wmax is the pipe centreline velocity, Rmax is the pipe radius, and r is the distance from the pipe centreline.
CFX-5 Tutorials Page 209

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

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 to describe the inlet profile. The subroutine is linked to the CFX-Solver during 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 in the 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 Solver Modelling". In this tutorial, you will use one of the first two methods listed above to define the velocity profile for the inlet boundary condition. The results from each method will be identical. Using a CEL expression is the easiest way to create the profile. The User CEL Function method is more complex but is provided as an example of how to use this feature. For more complex profiles, it may be necessary to use a User CEL 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 User CEL Function Method for the Inlet Velocity Profile (p. 211). Note that you will need access to a FORTRAN compiler to be able to complete the tutorial by the User CEL Function method.

9.B.6:
Creating the Velocity Profile Expression

Expression Method for the Inlet Velocity Profile


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 210

CFX-5 Tutorials

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

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:

r =

x +y

where x and y are defined as Directions 1 and 2 (X and Y for Cartesian Coordinate Frames) respectively, in the selected Reference Coordinate Frame. See "Coordinate Frames" on page 23 in the document "CFX-5 Solver Modelling" for more information on specifying coordinate frames. You should now continue with the tutorial from Creating the Boundary Conditions (p. 214).

9.B.7:
Compiling the Subroutine

User CEL Function Method for the Inlet Velocity Profile


The FORTRAN subroutine has already been written for this tutorial. 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 is available in the <CFXROOT>/examples/ directory. You can compile the subroutine and create the required library files used by the CFX-Solver at any time before running the CFX-Solver. The operation is performed at this point in the tutorial so that you have a better understanding of the values you need to specify in CFX-Pre when creating a User CEL Function. The cfx5mkext command is used to create the required objects and libraries as described below. Important: To use the cfx5mkext command make sure that the FORTRAN compiler is in your path. See "Default FORTRAN Compilers" on page 433 in the document "CFX-5 Solver Modelling" for a list of commands that should execute the compiler on each platform. 3. From the Main menu select Tools > Command Editor.

CFX-5 Tutorials

Page 211

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

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.F at an OS command prompt. The ! indicates that the following line is to be interpreted as power syntax and not CCL. Everything after the ! symbol is processed 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, for some 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 to your terminal window. Note: You can use the -double option (i.e. cfx5mkext -double PipeValve_inlet.F) to compile the subroutine for use with double precision. A subdirectory will have been created in your working directory whose name is system dependent (e.g. on IRIX it is named irix). This sub directory contains the shared object library. Note: If you are running problems in parallel over multiple platforms then you will need to create these subdirectories using the cfx5mkext command for each different platform. You can view more details about the cfx5mkext command by running 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 your FORTRAN file and the default Library Path is your current working directory.

6. Close the Command Editor.

Page 212

CFX-5 Tutorials

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre Creating the Input Arguments

Next, you will create some values that will be used as input arguments when the 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 the User CEL Function

Two steps are required to define a User CEL Function that uses the compiled FORTRAN subroutine. First, a User Routine that points to the FORTRAN subroutine will be created. Then a User CEL Function that points to the User Routine 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 the subroutine name in the FORTRAN file is in upper case. 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. .

5. Set Library Name to PipeValve_inlet.

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 to Library Path), browsing to the appropriate folder in Select Directory (not necessary if selecting the working directory), and clicking OK (in Select Directory).
CFX-5 Tutorials Page 213

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

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 by entering the expression Wprof(Wmax, r, Rmax) (although it only makes sense for the W component of the inlet velocity in this tutorial). The variable r (radius) is a CFX-5 System variable defined as:

r =

x +y

where x and y are defined as Directions 1 and 2 (X and Y for Cartesian Coordinate Frames) respectively, in the selected Reference Coordinate Frame.

9.B.8:
Creating the Inlet Boundary Condition

Creating the Boundary Conditions


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, then you would have to define a new coordinate system to apply the inlet velocity profile correctly. In this case, the pipe is already aligned with the default coordinate system, Coord 0. Turning on Coord Frame and setting Coord Frame to Coord 0 is equivalent to leaving Coord Frame turned off.

Page 214

CFX-5 Tutorials

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

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) or the expression Wprof(Wmax, r, Rmax) (User CEL Function method). To enter an expression you must click Enter Expression in the field to show the latter). (click

U, V and W are always with respect to the Reference Coordinate Frame for the boundary condition (called Coord Fame on the Basic Settings panel).

e. For Turbulence leave Option set to Medium (Intensity = 5%).

CFX-5 Tutorials

Page 215

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

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:
Set the following Option U V W *. To this value Cart. Vel. Components 0 [m s^-1] 0 [m s^-1] either Wprof or Wprof(Wmax, r, Rmax)* as you did on Boundary Details

d. Under Particle Position, set Option to Uniform Injection and Number of Positions to 200. e. Under Particle Mass Flow Rate, set Mass Flow Rate to 0.01 [kg s^-1]. Do NOT turn on Particle Diameter Distribution. The diameter distribution was defined when creating the domain; this option would 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:
Set the following Option U V W *. To this value Cart. Vel. Components 0 [m s^-1] 0 [m s^-1] either Wprof or Wprof(Wmax, r, Rmax)* as you did on Boundary Details

i. j.

Under Particle Position, set Option to Uniform Injection and Number of Positions to 5000. Under Particle Mass Flow Rate, set Mass Flow Rate to 0.01 [kg s^-1]. One-way coupled particles are tracked as a function of the fluid flow field. 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] flow of two-way coupled particles, but not by the 0.01 [kg s^-1] flow of one-way coupled particles.
CFX-5 Tutorials

Page 216

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

5. Click OK to create the boundary condition.


Creating Outlet Boundary Condition

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 Static Pressure and Relative Pressure to 0 [Pa]. 4. Click OK to create the boundary condition.

Creating Symmetry Plane Boundary Condition

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 the Pipe Wall Boundary Condition

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 of the first element should be of the same order as the roughness height. See "Wall Roughness" on page 72 in the document "CFX-5 Solver Modelling" for details.

CFX-5 Tutorials

Page 217

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

4. Click the Fluid Values tab, then: a. Ensure that Sand Fully Coupled is selected. b. Under Velocity, set:
Set the following Option Perpendicular Coeff. Parallel Coeff. To this value Restitution Coefficient 0.8 1.0

c. Select Sand One Way Coupled and use the same settings as for Sand Fully Coupled. 5. Click OK to create the boundary condition.
Editing the Default Boundary Condition

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.

Page 218

CFX-5 Tutorials

Flow Through a Butterfly ValveDefining the Simulation in CFX-Pre

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 Blend Factor 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 calculated using these options. c. Leave the Convergence Criteria settings at their default values. 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. 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-5 Solver 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.

CFX-5 Tutorials

Page 219

Flow Through a Butterfly ValveObtaining a Solution

9.C:

Obtaining a Solution
When CFX-Pre has shut itself down, and the CFX-Solver Manager has opened up, you will be able to obtain a solution to the CFD problem by following the instructions below. Note: If you followed the User CEL Function method, and you wish to run this 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 220

CFX-5 Tutorials

Flow Through a Butterfly ValveViewing the Results

9.D:

Viewing the Results


In this section, you will first plot wall stress on the valve surface and side walls due to the sand particles. You will then create an animation of particle tracks through the domain. For more details on particle tracking, please refer to "Particle Track" on page 108 in the document "CFX-Post".

Viewing the Wall Stress due to Sand particles

An important consideration in this simulation is erosion to the pipe wall and valve due to the sand particles. A good indication of erosion is given by the Wall Stress parameter, which corresponds to pressure and shear stress due to 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 show a list of all variables) This is statistically better than the Sand Fully Coupled.Wall Stress variable since many more particles were calculated for Sand One Way 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 stress values around the edge of the valve surfaces. 3. Turn on Visibility. 4. Click Apply. See "Figure 1: " on page 221.

Figure 1: CFX-5 Tutorials Page 221

Flow Through a Butterfly ValveViewing the Results

As can be seen, the highest values occur on the edges of the valve where most particles strike. Erosion of the low Z side of the valve would occur more quickly than for the high Z side.
Viewing Particle Tracks

Default particle track objects are created at the start of the session. One particle track is created for each set of particles in the simulation. You are going 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 surface of the valve.
Viewing Stress on the Pipe Wall

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 222

CFX-5 Tutorials

Flow Through a Butterfly ValveViewing the Results

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 values on the pipe wall downstream of the valve. It can clearly be seen that the stress on the pipe wall downstream of the valve is more significant than before the pipe wall.
Creating a Particle Track Animation

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

CFX-5 Tutorials

Page 223

Flow Through a Butterfly ValveViewing the Results

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. This will form the first Keyframe of the animation. You will change this value to create the final Keyframe. c. Interval to 0.065 This 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 the Keyframe for the Animation Start 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 image as the first Keyframe. to set the current Viewer

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 completely though the domain. The Max Time value should be approximately equal to the residence time of a particle in the domain for this type of simulation. Leave Interval set to 0.065 [s]. Although this value is equal to the Max Time value you have set, there will still be some particles that have not passed entirely through the domain, 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 224 CFX-5 Tutorials

Flow Through a Butterfly ValveViewing the Results

10. Click Browse

and entering the tracks.mpg as the file name. to play the animation and create the MPEG.

11. Click Play Forward

When the animation has finished, an MPEG file will have been created in the directory specified from the Save MPEG form. You can view the MPEG in any Media Player that supports the MPEG format.

12. Close Animation Editor.


Performing Quantitative Calculations

On the outlet boundary condition you created in CFX-Pre, you set the Average 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 performing calculations and Hybrid values for visualisation purposes. By clicking Conservative, all objects in CFX-Post are updated to use Conservative values. Conservative values are set by default in CFX-Post. See "Hybrid and Conservative Variable Values" on page 29 in the document "CFX-Post" for more 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 of Pressure. The average pressure is approximately zero, as specified by the boundary condition.

CFX-5 Tutorials

Page 225

Flow Through a Butterfly ValveViewing the Results

Other Features The geometry was created using a symmetry plane. You can display the other half of the geometry by creating a YZ Plane at X = 0 and then editing the Default Transform object to use this plane as a Reflection plane. 1. When you have finished viewing the results, quit CFX-Post.

Page 226

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 10

Flow in a Catalytic Converter


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: CatConv.pre CatConvHousing.hex CatConvMesh.gtm

CFX-5 Tutorials

Page 227

Flow in a Catalytic ConverterIntroduction

10.A:
10.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Subdomains Boundary Conditions Details General Mode Steady State Ideal Gas Multiple Domain k-Epsilon Isothermal Resistance Source Inlet (Subsonic) Outlet (Subsonic) Wall: No-Slip Fluid-Fluid (No Frame Change) Physical Timescale n/a Contour Default Locators Outline Plot (Wireframe) Polyline Slice Plane Vector Chart Creation Data Export Title/Text Viewing the Mesh

Domain Interfaces Timestep n/a Plots

CFX-Solver Manager CFX-Post

Other

You learn about:


Page 228

using multiple meshes and domains in CFX-Pre joining domains together using static fluid-fluid domain interfaces between 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
CFX-5 Tutorials

Flow in a Catalytic ConverterIntroduction

10.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

10.A.3:

Overview of the problem to solve


Catalytic converters are used on most vehicles on the road today. They reduce harmful emissions from internal combustion engines (such as oxides of nitrogen, hydrocarbons, and carbon monoxide) that are the result of incomplete combustion. Most new catalytic converters are the honeycomb ceramic type and are usually coated with platinum, rhodium, or palladium. The exhaust gases flow through the honeycomb structure and a pressure gradient is established between the inlet and outlet.
exhaust gas 25.0 m/s 288.0 K catalyst material

flange

20 cm

CFX-5 Tutorials

Page 229

Flow in a Catalytic ConverterIntroduction

In this tutorial, a catalytic converter is modelled without chemical reactions in order to determine the pressure drop. The inlet flange (joining the pipe to the catalyst) is designed to distribute exhaust gas evenly across the catalyst material. A hexahedral mesh for the housing, which was created in CFX-Hexa, is provided. The different meshes are connected together in CFX-Pre. You will import each mesh then create a domain, which spans all of them. Within the converter, a subdomain is added to model a honeycomb structure using a directional loss model. Physics is then specified in the same way as for other tutorials.

Page 230

CFX-5 Tutorials

Flow in a Catalytic ConverterDefining the Simulation in CFX-Pre

10.B:

Defining the Simulation in CFX-Pre


This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file CatConv.pre to complete 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 housing from provided files. Tip: While we provide a mesh to use with this tutorial, you may want to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details.
Housing Section

The first mesh that you will import is the hexahedral mesh for the catalyst housing, created in CFX-Hexa, named CatConvHousing.hex. This mesh was created using units of centimetres; however, the units are not stored with the mesh file for this type of mesh. You must set the mesh import units to cm when importing the mesh into CFX-Pre so that the mesh remains the intended 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

CFX-5 Tutorials

Page 231

Flow in a Catalytic ConverterDefining the Simulation in CFX-Pre

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 in the z-direction of 20 cm.
Pipe and Flange 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.gtm This mesh was created in units of centimetres. When importing GTM files, 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 232

CFX-5 Tutorials

Flow in a Catalytic ConverterDefining the Simulation in CFX-Pre

The pipe and flange are located at the outlet end of the housing. You will be copying and rotating the flange through 180 degrees in the next step to create the inlet side pipe and flange. The rotation is about an axis that points in 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 motion between each assembly you only need to create a single domain. This can be 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 three assemblies. 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.

CFX-5 Tutorials

Page 233

Flow in a Catalytic ConverterDefining the Simulation in CFX-Pre

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 and assume 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 Fluid Temperature 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 Radiation Model, leave Option set to None. Initialisation will be carried out using the global initialisation form. There is no need to visit the Initialisation tab. 6. Click OK to create the domain.

Page 234

CFX-5 Tutorials

Flow in a Catalytic ConverterDefining the Simulation in CFX-Pre

10.B.5:

Creating the Subdomain


The catalyst-coated honeycomb structure will be modelled using a subdomain with a directional source of resistance. For quadratic resistances, the pressure drop is modelled using:

p ------ = K Q U U i x i
where KQ is the quadratic resistance coefficient, Ui is the local velocity in the i direction, and

p -----x i

is the pressure drop gradient in the i direction.

For more information, see "Directional Loss Model" on page 27 in the document "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 Location to LIVE. This is the entire housing section. , and set

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, and Directional Loss Model. b. Under Streamwise Direction, set: Option to Cartesian Components X Component to 0 Y Component to 0 Z Component to 1 c. Under Streamwise Loss, set Option to Linear and Quadratic Coefs. d. Turn on Quadratic Resistance Coefficient and then set Quadratic Coefficient to 650 [kg m^-4]. 5. Click OK to create the subdomain.
CFX-5 Tutorials Page 235

Flow in a Catalytic ConverterDefining the Simulation in CFX-Pre

10.B.6:
Inlet Boundary Condition

Creating Boundary Conditions


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 and Normal Speed to 25 [m s^-1]. b. Leave Turbulence set to Medium (Intensity = 5%). 5. Click OK to create the boundary condition.

Outlet Boundary Condition

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 slip wall boundary condition.

10.B.7:

Creating the Domain Interfaces


Domain interfaces are used to define the connecting boundaries between meshes 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 the document "CFX-5 Solver Modelling" for details. Different types of GGI connections can be made. In this case, you require a simple Fluid-Fluid Static connection (no Frame Change). Other options allow you to change reference frame across the interface or create a periodic boundary with dissimilar meshes on each periodic face. Two Interfaces are required, one to connect the inlet flange to the catalyst housing and one to connect the outlet flange to the catalyst housing.

Page 236

CFX-5 Tutorials

Flow in a Catalytic ConverterDefining the Simulation in CFX-Pre Inlet Pipe / Housing Interface

1. Click Domain Interface 2. On the Basic Settings tab:

and set Name to InletSide.

a. Set Interface Type to Fluid Fluid b. Under Side 1, set Domain (Filter) to -- All Domains --, and Region List 1 to FlangeEnd 2. c. Under Side 2, set Domain (Filter) to -- All Domains --, and Region List 2 to INLET. d. Under Interface Models, set Frame Change to None, and Pitch Change to Automatic. 3. Click OK to create the interface.
Outlet Pipe / Housing Interface

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 Region List 1 to FlangeEnd. c. Under Side 2, set Domain (Filter) to -- All Domains --, and Region List 2 to OUTLET. d. Under Interface Models, set Frame Change to None, and Pitch Change 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 velocity through the catalyst housing. As the inlet velocity is 25 [m s^-1] and the cross sectional area of the inlet and housing are known, you can apply conservation 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]

CFX-5 Tutorials

Page 237

Flow in a Catalytic ConverterDefining the Simulation in CFX-Pre

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, and 2 [m s^-1] in the catalyst housing, an approximate fluid residence time of 0.1 [s] can be calculated. A sensible timestep of 0.04 [s] (1/4 to 1/2 of the fluid 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 of Interface Connections toggle was enabled, an information window is displayed that 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 238

CFX-5 Tutorials

Flow in a Catalytic ConverterObtaining a Solution

10.C:

Obtaining a Solution
When CFX-Pre has shut down and the CFX-Solver Manager has started, you can obtain a solution to the CFD problem by following the instructions below: 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.

CFX-5 Tutorials

Page 239

Flow in a Catalytic ConverterViewing the Results

10.D:

Viewing the Results


When CFX-Post opens, you will need to experiment with the Edge Angle setting for the Wireframe object and the various rotation and zoom features to put the geometry into a sensible position. In the Objects Workspace, several interface boundaries are available. The two connections for the catalyst housing mesh, between and the mesh for the inlet and the outlet pipes, have two interface boundaries each (one for each 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 Line Colour 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 240

CFX-5 Tutorials

Flow in a Catalytic ConverterViewing the Results

You should now have a clear view of the tetrahedral / prism and hexahedral mesh on each side of the interface. The General Grid Interface (GGI) capability of CFX-5 was used to produce a connection between these two dissimilar meshes before the solution was calculated. Notice that there are more tetrahedral / prism elements than hexahedral elements and that the extent of the two meshes is not quite the same (this is most noticeable on the curved edges). The extent of each side of the interface does not have to match to allow a GGI connection to be made.
Creating User Locations and Plots Creating a slice plane

1. Turn off the Visibility of the interface boundaries. 2. Turn on the Visibility of the Wireframe. 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 catalytic converter. You can confirm this with a contour plot.

Creating a Contour 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 a Vector Plot using the slice plane

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 into the flange, setting up a recirculation zone. The flow is uniform through the catalyst housing. Suppose for now that you want to see if the pressure drop is linear by plotting a line graph of pressure against the z-coordinate. In this case you will 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 data export 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 the chart you must define the points at which you require the data. To define a set of points in a line, you can use the polyline object.

CFX-5 Tutorials

Page 241

Flow in a Catalytic ConverterViewing the Results Creating a Polyline

1. First, make the vector and contour plots invisible. 2. Click Create Polyline name. from the main toolbar and accept the default

On the Geometry tab, the Method used to create the polyline can be From File, Boundary Intersection or From Contour. If you select From File you must specify a file containing point definitions in the required format, see "POLYLINE Data Format" on page 64 in the document "CFX-Post" for more details. In this tutorial, you will use the Boundary Intersection method. This creates a polyline from the intersecting line between a boundary object and a location (e.g between a wall and a plane). The points on the polyline are where 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 editor next to Boundary List and then holding down the <Ctrl> key while clicking 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 242

CFX-5 Tutorials

Flow in a Catalytic ConverterViewing the Results

7. Click Isometric View (Y up)

Figure 3:

8. You will be able to see the polyline following the intersecting line between the wall, inlet and outlet boundaries and the slice plane. Now that a polyline has been defined, a chart can be created.
Creating a Chart

1. Click Create chart name.

from the main toolbar and accept the default

2. In the Charts Workspace, on the Chart 1 panel, click the Chart tab, set: a. Title to Pressure Drop Through a Catalytic Converter. 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 tree diagram in the Chart Workspace, attached to the name of the chart of which they are a part. Since you have not yet created any chart lines or charts, the Chart Workspace appears blank.

CFX-5 Tutorials

Page 243

Flow in a Catalytic ConverterViewing the Results

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 of the graph). e. Set Y Axis to Pressure (to plot Pressure values along the y axis of the graph). 4. Expand the Appearance frame: a. The style and colour of the chart line is set with Line Style and Automatically generate Line Colour. Leave these default setting unchanged. 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 the pressure drop is linear. This is in the region from approximately Z=0.05 to Z=0.25. The two lines show the pressure on each side of the wall. You can see a noticeable difference in pressure between the two walls on the inlet side 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 at a slight angle, producing a higher pressure on the high X wall of the housing. 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 point along the polyline. 10. Click Apply.
Page 244 CFX-5 Tutorials

Flow in a Catalytic ConverterViewing the Results 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 file can be opened in any text editor. You can use the exported data file to plot charts in other software. 8. When finished, close CFX-Post.

CFX-5 Tutorials

Page 245

Flow in a Catalytic ConverterViewing the Results

Page 246

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 11

Non-Newtonian Fluid Flow in an Annulus


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: NonNewton.pre NonNewtonMesh.gtm

CFX-5 Tutorials

Page 247

Non-Newtonian Fluid Flow in an AnnulusIntroduction

11.A:
11.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Boundary Conditions Details General Mode Steady State General Fluid Single Domain Laminar None

Symmetry Plane Wall: No-Slip Wall: Moving CEL (CFX Expression Language) Timestep Auto Timescale CFX-Solver Manager CFX-Post n/a Plots n/a Sampling Plane Slice Plane Vector

You learn about: using CFX Expression Language (CEL) to define the properties of a shear-thickening fluid (For more information, see "Non-Newtonian Flow" on page 22 in the document "CFX-5 Solver Modelling".) using the Moving Wall feature to apply a rotation to the fluid at a wall boundary examining the pressure distribution on either side of the region of smallest radius

Page 248

CFX-5 Tutorials

Non-Newtonian Fluid Flow in an AnnulusIntroduction

11.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

11.A.3:

Overview of the problem to solve


In this example a non-Newtonian, shear-thickening liquid rotates in a 2D eccentric annular pipe gap. The motion is brought about solely by viscous fluid interactions caused by the rotation of the inner pipe.

CFX-5 Tutorials

Page 249

Non-Newtonian Fluid Flow in an AnnulusDefining the Simulation in CFX-Pre

11.B:

Defining the Simulation in CFX-Pre


This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file NonNewton.pre to complete 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 to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file 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 an Expression for Shear Rate Dependent Viscosity

Creating the Domain


You can use an expression to define the dependency of fluid properties on other variables. In this case, the fluid does not obey the simple linear Newtonian relationship between shear stress and shear strain rate. The general relationship for the fluid you will model is given by:

= K

n1

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. the viscosity increases with increasing shear strain rate. The shear strain rate is available as a CFX-Pre System Variable (sstrnr).
Page 250 CFX-5 Tutorials

Non-Newtonian Fluid Flow in an AnnulusDefining the Simulation in CFX-Pre

In order to describe this relationship using CEL, the dimensions must be consistent on both sides of the equation. Clearly this means that K must have dimensions and requires units to satisfy the equation. If the units of viscosity are kg m^-1 s^-1, and those of g are s^-1, then the expression is consistent 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 of 10.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 remains physically meaningful. To do so we will create two additional parameters that 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 of 1.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 a New 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 property will not be used by the CFX-Solver for this case. In other cases it will

CFX-5 Tutorials

Page 251

Non-Newtonian Fluid Flow in an AnnulusDefining the Simulation in CFX-Pre

be used, see "Molar Mass" on page 46 in the document "CFX-5 Solver Modelling" for a discussion on when the Molar Mass needs to be set. c. Define the Density to be constant (do not set a Density Dependency) 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 will not 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 a New 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 252

CFX-5 Tutorials

Non-Newtonian Fluid Flow in an AnnulusDefining the Simulation in CFX-Pre

Global initialisation will be set later, after creating the boundary conditions.

11.B.4:
Wall Boundary Condition

Creating the Boundary Conditions


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 and Angular Velocity to 31.33 [rev min^-1] (make sure you change the units). c. Under Axis Definition, leave Option set to Coordinate Axis and set Rotation Axis to Global Z. 4. Click OK to create the boundary condition.

To create the symmetry plane boundary conditions

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 wall boundary condition.

11.B.5:

Setting Initial Values


A reasonable initial guess for the velocity field is a value of zero throughout the domain. 1. Click Global Initialisation . 2. Leave Velocity Type set to Cartesian.

CFX-5 Tutorials

Page 253

Non-Newtonian Fluid Flow in an AnnulusDefining the Simulation in CFX-Pre

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 254

CFX-5 Tutorials

Non-Newtonian Fluid Flow in an AnnulusObtaining a Solution

11.C:

Obtaining a Solution
When CFX-Pre has shut itself down, and the CFX-Solver Manager has opened up, you will be able to obtain a solution to the CFD problem by following 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.

CFX-5 Tutorials

Page 255

Non-Newtonian Fluid Flow in an AnnulusViewing the Results

11.D:

Viewing the Results


In this tutorial you have used CEL to create an expression for the dynamic viscosity. If you now perform calculations or colour graphics objects using the Dynamic Viscosity variable, its values will have been calculated from the expression 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 to 0.3 [m]. c. Set Plane Type to Sample, Radial to 16, and Circumferential to 12. 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 256

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 12

Flow in an Axial Rotor/Stator


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: Axial.pre AxialIni.pre AxialIni_001.res stator.def rotor.grd

CFX-5 Tutorials

Page 257

Flow in an Axial Rotor/StatorIntroduction

12.A:
12.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Details Turbo Wizard Steady State Transient Ideal Gas Multiple Domain Rotating Frame of Reference k-Epsilon Total Energy Inlet (Subsonic) Outlet (Subsonic) Wall: No-Slip Wall: Adiabatic Frozen Rotor Periodic Transient Rotor Stator Physical Timescale Transient Example

Turbulence Model Heat Transfer Boundary Conditions

Domain Interfaces

Timestep Transient Results File Restart Parallel Processing

CFX-Solver Manager

Page 258

CFX-5 Tutorials

Flow in an Axial Rotor/StatorIntroduction Component CFX-Post Feature Plots Details Animation Isosurface Surface Group Turbo Post Other Changing the Colour Range Chart Creation Instancing Transformation MPEG Generation Quantitative Calculation Timestep Selection Transient Animation

You learn about: using the Turbo Wizard in CFX-Pre to quickly specify a turbomachinery application 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 Frozen Rotor 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 that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

CFX-5 Tutorials

Page 259

Flow in an Axial Rotor/StatorIntroduction

12.A.3:

Overview of the problem to solve


The following tutorial demonstrates the versatility of GGI and MFR in CFX-Pre by combining two dissimilar meshes. The first mesh to be imported (the rotor) was created in CFX-TurboGrid. This is combined with a second Definition File mesh (the stator). The geometry to be modelled consists of a single stator blade passage and two rotor blade passages. The rotor rotates about the Z axis while the stator is stationary. Periodic boundaries are used to allow only a small section of the full geometry to be modelled.
Outflow Shroud

Stator Blade

Rotor Blade

Hub

Inflow

Figure 1:

At the change in reference frame between the rotor and stator, two different interface models are considered. First a solution is obtained using a frozen rotor model. After viewing the results from this simulation, the CFX-Pre simulation is modified to use a transient rotor-stator interface model. The frozen rotor solution is used as an initial guess for the transient rotor-stator simulation.

Page 260

CFX-5 Tutorials

Flow in an Axial Rotor/StatorIntroduction

The full geometry contains 60 stator blades and 113 rotor blades. To help you visualise how the modelled geometry fits into the full geometry, "Figure 1: " 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.

Outflow

Inflow Axis of Rotation

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 blades to stator blades is close to, but not exactly, 2:1. In the stator blade passage a 6 section is being modelled (360/60 blades), while in the rotor blade passage a 6.372 section is being modelled (2*360/113 blades). This produces 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 the flow crosses the interface it is scaled to allow this type of geometry to be modelled. This results in an approximation of the inflow to the rotor passage. Furthermore, the flow across the interface will not appear continuous due to the scaling applied. The periodic boundary conditions will introduce an additional approximation since they cannot be periodic when a pitch change occurs.

CFX-5 Tutorials

Page 261

Flow in an Axial Rotor/StatorIntroduction

You should always try to obtain a pitch ratio as close to 1 as possible in your model to minimise approximations, but this must be weighed against computational resources. A full machine analysis can be performed (modelling all rotor and stator blades) which will always eliminate any pitch change, but will require significant computational time. For this rotor/stator geometry, a 1/4 machine section (28 rotor blades, 15 stator blades) would produce a pitch change of 1.009, but this would require a model about 15 times larger than in this tutorial example. If you have already completed the frozen rotor part of this tutorial you can continue from Setting up the Transient Rotor-Stator Calculation (p. 276). Note that a converged results file from the frozen rotor section is required as an initial guess. You can use your own solution or use the results file provided in the examples directory. Further details are given in Obtaining a Solution to the Transient Rotor-Stator Model (p. 280). You must make sure that the boundary names used in the initial results file exactly match those used in the transient rotor-stator case.

Page 262

CFX-5 Tutorials

Flow in an Axial Rotor/StatorDefining the Frozen-Rotor Simulation in CFX-Pre

12.B:

Defining the Frozen-Rotor Simulation in CFX-Pre


This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file AxialIni.pre to complete this section for you and continue from Obtaining a Solution to the Frozen Rotor Simulation (p. 269). See one of the first four tutorials for instructions 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 mode is 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 simulation state. 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 to appropriate boundary conditions. To do this it needs to know the region names to expect in the mesh files. The upper case Turbo Regions that are selected (e.g. HUB) correspond to the region names in the CFX-TASCflow grd file. CFX-TASCflow turbomachinery meshes use these names consistently. The lower case Turbo Regions correspond to the region names in the CFX-5 Definition file. CFX-5 turbomachinery meshes may have

CFX-5 Tutorials

Page 263

Flow in an Axial Rotor/StatorDefining the Frozen-Rotor Simulation in CFX-Pre

different region names than these. In this case just leave the Turbo Regions frame with its default settings; you will be able to assign regions to boundary 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 to develop your own in the future. Instructions on how to create this mesh in 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 file contains the rotor mesh in a CFX-TASCflow grd file, while the other mesh file contains the stator in a CFX-5 Definition file. 1. Copy the files rotor.grd and stator.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 264

CFX-5 Tutorials

Flow in an Axial Rotor/StatorDefining the Frozen-Rotor Simulation in CFX-Pre

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. The message will tell you the information that has been ignored during import. 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 true geometry. An interface is also required to connect the two meshes together across the frame change. See "Domain Interfaces" on page 299 in the document "CFX-Pre" for more details. CFX-Pre will try to create appropriate interfaces using the Turbo Region names shown earlier. In this case, CFX-Pre has displayed the definition of three interfaces. The following steps will verify that the interface definitions are correct.

Rotor Periodic Interface

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 Periodic Interface

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.

CFX-5 Tutorials

Page 265

Flow in an Axial Rotor/StatorDefining the Frozen-Rotor Simulation in CFX-Pre Frozen Rotor Domain Interface

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, you can 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 Physical Timescale to 0.002 [s]. This timescale is approximately equal to 1 / , which is often appropriate 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 the Turbo Region names shown earlier. The Boundary Definition form will appear showing a list of boundary conditions. These were automatically created, and can be viewed, edited and deleted in the same way as the interface connections that were set up earlier.

Setting the Stator Inlet Boundary Condition Page 266

1. Click Inlet. Location and Boundary Type are both correct, so there is no need to change these settings.
CFX-5 Tutorials

Flow in an Axial Rotor/StatorDefining the Frozen-Rotor Simulation in CFX-Pre

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 the rotor outlet boundary condition

1. Click Outlet. Location and Boundary Type are both correct, so there is no need to change these settings. 2. Under Flow Specification, set Option to Mass Flow Rate and Mass Flow Rate to 0.06 [kg s^-1].

Checking the Rotor Blade Boundary Condition

Click Blade, a wall boundary specified on the BLADE region. Note that all of the details are correct for this boundary condition. Wall boundary conditions are created relative to the local domain reference frame by default, so this boundary is stationary relative to the rotating domain (i.e. rotating relative to the stationary domain). Click Hub, a wall boundary on the HUB region. Note that all of the details are correct for this boundary condition.

Checking the Rotor Hub Boundary Condition Checking the Rotor Shroud Boundary Condition Checking the Remaining Boundaries

Click Shroud, a wall boundary on the SHROUD region. Note that all of the details are correct for this boundary condition.

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 are missing, you can delete and add them as appropriate. 2. Click Next > to continue.

CFX-5 Tutorials

Page 267

Flow in an Axial Rotor/StatorDefining the Frozen-Rotor Simulation in CFX-Pre

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 start the CFX-Solver. Start Solver and Quit: Write the Solver (.def) File, start the CFX-Solver and 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 268

CFX-5 Tutorials

Flow in an Axial Rotor/StatorObtaining a Solution to the Frozen Rotor Simulation

12.C:

Obtaining a Solution to the Frozen Rotor Simulation


Compared to previous tutorials, the mesh for this tutorial contains many more nodes (although it is still too coarse to perform a high quality CFD simulation). This results in a corresponding increase in solution time for the problem. We recommend solving this problem in parallel. It is recommended that your machine has a minimum of 256MB of memory to run this tutorial. Note: If you do not have a license to run CFX-5 in parallel you can run in serial by clicking the Start Run button when CFX-Solver Manager has opened up. Solution time in serial is approximately 45 minutes on a 1GHz processor. Instructions are provided below to run this tutorial in parallel. More detailed information about setting up CFX-5 to run in parallel is provided in " Flow Around a Blunt Body" on page 123 and in "Setting Up and Running a Parallel Run" on page 45 in the document "CFX- Solver Manager". You can solve this example using either Local Parallel or Distributed Parallel as guidance is provided for both.

Solving Using Local Parallel

To run in Local Parallel, the machine you are on must have more than one processor. 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 more partitions. to add

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.

CFX-5 Tutorials

Page 269

Flow in an Axial Rotor/StatorObtaining a Solution to the Frozen Rotor Simulation Solving Using Distributed Parallel

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 Non-overlap area fraction on side 2 Area based pitch ratio (6.372 leg., 6.000 leg.) = = = 0.0% 0.1% 1.062

During convergence, data is written to an out file for each equation in each 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 270

CFX-5 Tutorials

Flow in an Axial Rotor/StatorViewing the Results

12.D:

Viewing the Results


The Turbo-Post feature will be demonstrated in the following sections. This feature is designed to greatly reduce the effort taken to post-process turbomachinery simulations. A number of turbo-specific features are also available; see "CFX-Post Turbo Menu" on page 171 in the document "CFX-Post" for more details.

Initialising Turbo-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 in domains R1 and S2. In the next step, both of these components will be initialised. 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 1 This is the rotor side of the frozen rotor interface, so it is the inlet to the 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.

CFX-5 Tutorials

Page 271

Flow in an Axial Rotor/StatorViewing the Results

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 2 This is the stator side of the Frozen Rotor interface, so it is the outlet from 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 a Surface of Constant 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 Initial Setup option is chosen; Turbo 3D view, 2D Blade-to-Blade view and 2D Meridional view. In this case, the meridional turbo surface will obscure part of the plots you will be creating in the next steps.

3. In the Object Selector, turn off the visibility for the Turbo Plotter Merid Surface.

Page 272

CFX-5 Tutorials

Flow in an Axial Rotor/StatorViewing the Results

One of the default objects created when you ran the initial setup is a blade-to-blade turbo surface, drawn at a spanwise location of 0.5 (halfway between the hub and shroud). For an explanation of turbo locations, please see "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 3 domain passages

Next, you will create an instancing transformation to plot three blade passages for the stator and six blade passages for the rotor. The instancing properties of each domain have already been entered during 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 the blade and hub surfaces with the same variable. The number of instances of for 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 open the Locations Selector). icon to

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.

CFX-5 Tutorials

Page 273

Flow in an Axial Rotor/StatorViewing the Results

10. Carry out the same step for the S2 domain.

Creating a Blade Loading Chart

In this section, you will create a plot of pressure around the stator blade at a given 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 274

CFX-5 Tutorials

Flow in an Axial Rotor/StatorViewing the Results

2. Click Apply. A turbo line is automatically created in the viewer to show where pressure 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 section describes how to use the solution to set up a transient rotor-stator calculation.

CFX-5 Tutorials

Page 275

Flow in an Axial Rotor/StatorSetting up the Transient Rotor-Stator Calculation

12.E:

Setting up the Transient Rotor-Stator Calculation


This section describes the step-by-step definition of the flow physics in CFX-Pre. The existing frozen-rotor simulation is modified to define the transient rotor-stator simulation. If you wish, you can use the session file Axial.pre to complete this section for you and continue from Obtaining a Solution to the Transient Rotor-Stator Model (p. 280). See one of the first four tutorials for instructions on how to do this. Note: The session file creates a new simulation named Axial.cfx and will not modify the existing database. It also copies the required initial values files 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 a different 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 can be 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 be used to quickly create turbomachinery cases, but General Mode is always used when re-opening a simulation.

Page 276

CFX-5 Tutorials

Flow in an Axial Rotor/StatorSetting up the Transient Rotor-Stator Calculation

12.E.2:

Modifying the Simulation Type


You need to modify the domain to define a transient simulation. You are going to run for a time interval such that the rotor blades pass through 1 pitch (6.372o) using 10 timesteps. This is generally too few timesteps to obtain high quality results, but is sufficient for tutorial purposes. The timestep size is calculated as follows:

Rotational Speed = 523.6 rad/s Rotor Pitch Modelled = 2*(2/113) = 0.1112 rad Time 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 each timestep 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 one pitch. In these cases, it may be useful to look at variable data averaged over the time interval required to complete 1 pitch. You can then compare data for each pitch rotation to see if a steady state has been achieved, or if the flow is still developing. See "Using Statistics with Transient Rotor-Stator Cases" on page 335 in the document "CFX-Pre" for details on how to get time 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.

CFX-5 Tutorials

Page 277

Flow in an Axial Rotor/StatorSetting up the Transient Rotor-Stator Calculation

12.E.4:

Setting Initial Values


When defining a simulation using the Turbo Wizard, initial values are not set since the default is Automatic for all variables. When the Simulation Type was changed to Transient, CFX-Pre signalled a Physics Validation error, since initial values are required for all transient runs. The initial values must either be specified, or provided by selecting an Initial Values File in the CFX-Solver Manager when defining the run. In this tutorial, the solution from the Frozen Rotor simulation will be used as the Initial Values File. Ignoring the Physics Validation warning and later specifying an initial values file in the CFX-Solver would still allow the problem to run (because the CFX-Solver would still attempt to run the simulation with Automatic values), but in this tutorial the values will be explicitly set to Automatic to remove the 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 for the object. and then click OK to accept the default name

4. Leave Option set to Minimal.

Page 278

CFX-5 Tutorials

Flow in an Axial Rotor/StatorSetting up the Transient Rotor-Stator Calculation

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 give the 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. .

CFX-5 Tutorials

Page 279

Flow in an Axial Rotor/StatorObtaining a Solution to the Transient Rotor-Stator Model

12.F:

Obtaining a Solution to the Transient Rotor-Stator Model


When the CFX-Solver Manager has started you will need to specify an Initial Values File before starting the CFX-Solver. Set Initial Values File to AxialIni_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 can run in serial by clicking the Start Run button. Solution time in serial is similar to 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 Solution to 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 for transient 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 is given. You should see that after 10 timesteps the rotor has been moved through 1 pitch. You will notice a jump in the residuals (to the order of 1.0E-2) for every timestep. This is to be expected for a transient simulation under these conditions, which in the interest of time has a large timestep. You will also notice that the problem does not converge to the convergence criteria in a single timestep, and for accurate results reaching the convergence criteria is very important. Convergence is achieved by adjusting the length of the timestep to an appropriate value. "Transient Timestep Control" on page 352 in 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 280

CFX-5 Tutorials

Flow in an Axial Rotor/StatorViewing the Results

12.G:

Viewing the Results


To examine the transient interaction between the rotor and stator, you are going to create a blade-to-blade animation of pressure. A turbo surface will be used as the basis for this plot.

Initialising Turbo-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 the Instancing tab menu. 1. Select Turbo > Turbo Mode from the main menu bar. The Turbo tab is automatically selected, and shows the two components in domains R1 and S2. In the next step, both of these components will be initialised. 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 1 This is the rotor side of the frozen rotor interface, so it is the inlet to the 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.

CFX-5 Tutorials

Page 281

Flow in an Axial Rotor/StatorViewing the Results

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 2 This is the stator side of the Frozen Rotor interface, so it is the outlet from 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 a Turbo Surface Midway Between the Hub and Shroud

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 Span Constant span specifies a fractional distance from the hub (0), to the shroud (1). In this case a plot is created at 0.5 (halfway between hub and shroud). See "Turbo Measurements" on page 187 in the document "CFX-Post" for more details. c. Value to 0.5

Page 282

CFX-5 Tutorials

Flow in an Axial Rotor/StatorViewing the Results

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 up Instancing Transformatio ns

Next, you will use instancing transformations to view a larger section of the model. The properties for each domain have already been entered during the 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 a Transient Animation

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

CFX-5 Tutorials

Page 283

Flow in an Axial Rotor/StatorViewing the Results

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 the Animation

The animation now contains a total of 11 frames (9 intermediate frames plus the 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 that supports the MPEG format.
CFX-5 Tutorials

Page 284

Flow in an Axial Rotor/StatorViewing the Results

You will be able to see from the animation, and from the plots created previously, that the flow is not continuous across the interface. This is because a pitch change occurs. The relatively coarse mesh and the small number of timesteps used in the transient simulation also contribute to this. The movie was created with a narrow pressure range compared to the global range which exaggerates the differences across the interface.
Further Postprocessin g

You can use the Turbo Calculator to produce a report on the performance of 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 the document "CFX-Post".

CFX-5 Tutorials

Page 285

Flow in an Axial Rotor/StatorViewing the Results

Page 286

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 13

Reacting Flow in a Mixing Tube


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: Reactor.pre ReactorExpressions.ccl ReactorMesh.gtm

CFX-5 Tutorials

Page 287

Reacting Flow in a Mixing TubeIntroduction

13.A:
13.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Particle Tracking Boundary Conditions Details General Mode Steady State Variable Composition Mixture Single Domain k-Epsilon Thermal Energy Component Source Inlet (Subsonic) Outlet (Subsonic) Symmetry Plane

CFX-Solver Manager CFX-Post

Wall: Adiabatic Additional Variables CEL (CFX Expression Language) Timestep Physical Timescale n/a n/a Plots Other Isosurface Slice Plane Changing the Colour Range

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

Page 288

CFX-5 Tutorials

Reacting Flow in a Mixing TubeIntroduction

13.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

13.A.3:

Overview of the problem to solve


Reaction engineering is one of the main core components in the chemical industry. 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 basic reacting 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 through side holes. The reaction to be modelled is:

2 SO 4 + 2NaOH Na 2 SO 4 + 2H 2
The tube is modelled as an axisymmetric section. The reaction between acid and alkali is represented as a single step irreversible liquid-phase reaction

A+BC
Reagent A (dilute sulphuric acid) is injected through a ring of holes near the start of the tube. As it flows along the tube it reacts with Reagent B (dilute sodium hydroxide) which is injected through a further two rings of holes downstream. The product, C, remains in solution. The composition and pH of the mixture within the tube are principal quantities of interest to be predicted by the model. The flow is assumed to be fully turbulent and turbulence is assumed to have a significant effect on the process. The process is also exothermic.

CFX-5 Tutorials

Page 289

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

13.B:

Defining the Simulation in CFX-Pre


This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file Reactor.pre to complete 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 to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file 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 custom fluids for use in all your CFX-5 models. These fluids may be defined as a Pure Substance, but may also be defined as a Mixture, consisting of a number of transported fluid components. This type of fluid model is useful for applications involving mixtures, reactions and combustion. In order to define custom fluids, CFX-Pre provides the Material Editor. This tool allows you to define your own fluids as Pure Substances, Fixed Composition Mixtures or Variable Composition Mixtures using a range of template property sets defined for common materials.

Page 290

CFX-5 Tutorials

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

For further information on the Material Editor, see "Materials and Reactions" on page 125 in the document "CFX-Pre". The mixing tube application requires a fluid made up from four separate materials (or components). The components are the reactants and products of a simple chemical reaction together with a neutral carrier liquid. You are first going to define the materials that take part in the reaction (acid, alkali and product) as pure substances. The neutral carrier liquid is water; this material is already defined since it is commonly used. Finally, you will create a Variable Composition Mixture consisting of these four materials. This is the fluid that you will use in your simulation. A Variable Composition Mixture (as opposed to a Fixed Composition Mixture) is required because the proportion of each component will change throughout the simulation due to the reaction.
To define the properties for the 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 to Liquid.

CFX-5 Tutorials

Page 291

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

5. Click the Material Properties tab, then: a. Set Option to General Material. b. Under Equation of State, set Option to Value, Molar Mass to 19.52 [kg kmol-1], and Density to 1080.0 [kg m^-3]. See "Molar Mass" on page 46 in the document "CFX-5 Solver Modelling" for a discussion on the use of Molar Mass. c. Under Specific Heat Capacity
Set the following Option Specific Heat Capacity Reference Pressure Reference Temperature To this value Value 4190.0 [J kg^-1 K^-1] 1 [atm] 25 [C]

d. Expand the Transport Properties frame. e. Turn on Dynamic Viscosity, then set Option to Value and Dynamic Viscosity to 0.001 [kg m^-1 s^-1]. f. Turn on Thermal Conductivity, then set Option to Value and Thermal Conductivity to 0.6 [W m^-1 K^-1].

g. Leave the Buoyancy Properties and Radiation Properties turned off. 6. Click Apply to create the material. The new material will appear in the list of materials in the Materials Workspace.
To define the properties for the 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 to Liquid.

Page 292

CFX-5 Tutorials

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

4. Click the Material Properties tab, then: a. Set Option to General Material. b. Under Equation of State, set Option to Value, Molar Mass to 20.42 [kg kmol-1], and Density to 1130.0 [kg m^-3]. See "Molar Mass" on page 46 in the document "CFX-5 Solver Modelling" for a discussion on the use of Molar Mass. c. Under Specific Heat Capacity
Set the following Option Specific Heat Capacity Reference Pressure Reference Temperature To this value Value 4190.0 [J kg^-1 K^-1] 1 [atm] 25 [C]

d. Expand the Transport Properties frame. e. Turn on Dynamic Viscosity, then set Option to Value and Dynamic Viscosity to 0.001 [kg m^-1 s^-1]. f. Turn on Thermal Conductivity, then set Option to Value and Thermal Conductivity to 0.6 [W m^-1 K^-1].

g. Leave the Buoyancy Properties and Radiation Properties turned off. 5. Click Apply to create the material. The new material will appear in the list of materials in the Materials Workspace.
To define the properties for the product of the 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 to Liquid.

CFX-5 Tutorials

Page 293

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

4. Click the Material Properties tab, then: a. Set Option to General Material. b. Under Equation of State, set Option to Value, Molar Mass to 21.51 [kg kmol-1], and Density to 1190.0 [kg m^-3]. See "Molar Mass" on page 46 in the document "CFX-5 Solver Modelling" for a discussion on the use of Molar Mass. c. Under Specific Heat Capacity
Set the following Option Specific Heat Capacity Reference Pressure Reference Temperature To this value Value 4190.0 [J kg^-1 K^-1] 1 [atm] 25 [C]

d. Expand the Transport Properties frame. e. Turn on Dynamic Viscosity, then set Option to Value and Dynamic Viscosity to 0.001 [kg m^-1 s^-1]. f. Turn on Thermal Conductivity, then set Option to Value and Thermal Conductivity to 0.6 [W m^-1 K^-1].

g. Leave the Buoyancy Properties and Radiation Properties turned off. 5. Click Apply to create the material. The new material will appear in the list of materials in the Materials Workspace.
To create the fluid 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 to Liquid. 4. Click OK to create the material and close the form.

Page 294

CFX-5 Tutorials

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

13.B.4:
To create a new domain

Creating the 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 Radiation Model, 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 transport equation.

g. Turn on Kinematic Diffusivity, then set Kinematic Diffusivity to 0.001 [m^2 s^-1]. h. Use the same Option and Kinematic Diffusivity settings for alkali and product as you have just set for acid. i. j. Select Water. For Water, set Option to Constraint. One component must always use Constraint. This is the component used to balance the mass fraction equation; the sum of the mass fractions of all components of a fluid must equal unity.

4. Click OK to create the domain.

CFX-5 Tutorials

Page 295

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

13.B.5:

Defining the Reaction


Reactions and reaction kinetics can be modelled using CFX Expression Language (CEL), together with appropriate settings for Component sources. This section shows you how to develop an Eddy Break Up (EBU) type term using CEL to simulate the reaction between acid and alkali.

Reaction Source Terms

The reaction and reaction rate are modelled using a basic eddy break up formulation for the component and energy sources, so that, for example, the transport equation for mass fraction of acid is

mf alkal -min mf acid, ------------------ ( mf acid ) + ( Umf acid ) ( D A mf acid ) = 4 d-- k t i


where mf is mass fraction, DA is the Kinematic Diffusivity (set above) and i is the stoichiometric ratio. The right hand side represents the source term applied to the transport equation for the mass fraction of acid. The left hand side consists of the transient, advection and diffusion terms. For acid-alkali reactions, the stoichiometric ratio is usually based on volume fractions. To correctly model the reaction using an eddy break up formulation based on mass fractions, we must calculate the stoichiometric ratio based on mass fractions. In this tutorial the reaction is modelled by introducing source terms for the acid, alkali and product components. You can now also model this type of flow more easily using a reacting mixture as your fluid. See "Combustion and Radiation in a Can Combustor" on page 409 in the document "CFX-5 Tutorials" 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 provide convergence enhancement or stability for strongly-varying sources. The value of C may affect the rate of convergence but should not affect the converged results. If no suitable value is available for C, the solution timescale or timestep can still be reduced to help improve convergence of difficult source terms. Important: C must never be positive.

Page 296

CFX-5 Tutorials

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

An optimal value for C when solving an individual equation for a positive variable with a source S whose strength decreases with increasing is

C =

Where this derivative cannot be computed easily:

S C = -
may be sufficient to ensure convergence. Another useful recipe for C is

C = -
where is a local estimate for the source timescale. Provided that the source timescale is not excessively short compared to flow or mixing timescales, this may be a useful approach for controlling sources with positive feedback ( S > 0 ) or sources that do not depend directly on the solved variable .
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 be dilute and fully dissociated into its respective ions (H+ and X-); alkali is assumed to be dilute and fully dissociated into its respective ions (Y+ and OH-); product is assumed to be a salt solution including further H+ and OHions in a stoichiometric ratio. The concentrations of hydrogen and hydroxyl ions can be calculated from the mass fractions of the components using the following expressions:

i+i

mf prod i - = [ X ] acid = mf acid + --------------- 1+i imf prod i+ - = [ Y ] alkali = mf alkali + ----------------- 1+i

ii

where and are the X- ion and Y+ ion concentrations in the acid and alkali respectively. For this problem, is set to 1.0E-05 kmole X- per kg of acid, and =/i.

CFX-5 Tutorials

Page 297

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

Applying charge conservation and equilibrium conditions,

i+i

] + [Y

i+i

] = [X

ii

] + [ OH

H H H

i+i

] [ OH

ii

] = KW
i+i

gives the following quadratic equation for free hydrogen ion concentration:

i+i

]([H

i+i

] + [Y

] [ X

ii

]) = K ] KW =

i+i 2

] + ([Y

i+i

] [X
i+i

ii

])[H

i+i

pH = log 10 [ H

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
Creating expressions to model the reaction

You can create the expressions required to model the reaction sources and pH by either reading them in from a file or by defining them in the Expression Editor. Note that the expressions used here do not refer to a particular fluid since there is only a single fluid. In a multiphase simulation you must prefix variables with a fluid name, for example Mixture.acid.mf instead of acid.mf. 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).

Reading expressions from a file

Page 298

CFX-5 Tutorials

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre To create the expressions manually

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
Name Rate HeatReaction i AcidSource AcidSourceCoeff AlkaliSource AlkaliSourceCoeff ProductSource HeatSource Definition 4.*density*ed/ke 460. [kJ kg^-1] 2.7905 [kg kg^-1] -Rate*min(acid.mf,alkali.mf/i) AcidSource/max(acid.mf,1.0e-16) -Rate*min(alkali.mf,acid.mf*i) AlkaliSource/max(alkali.mf,1.0e-16) (1.0+i)*Rate*min(acid.mf,alkali.mf/i) HeatReaction*Rate*min(acid.mf,alkali.mf/i)

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 that kmol 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 alpha Xions Yions Definition 1.0E-05 [kmole kg^-1] alpha*density*(acid.mf+product.mf/(1+i)) alpha*density*(alkali.mf/i + product.mf/(1+i))

CFX-5 Tutorials

Page 299

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre Name a b c Hions pH Definition 1. [kg kg^-1] Yions - Xions -1.0E-14 [kmole^2 m^-6] (-b+sqrt(max(b*b-4*a*c,0.0 [kmole^2 m^-6])))/(2*a) -log10(max((Hions/ 1. [kmol m^-3]), 1.0E-15))

13.B.6:

Creating an Additional Variable to Model pH


You are going to use an Additional Variable to model the distribution of pH in the mixing tube. You can create Additional Variables in the Additional Variable 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 modify a domain.

13.B.7:

Modifying the Domain


You now need to modify the domain to include the Additional Variable for modelling pH. To do this, you can opt to model the Additional Variable using 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 expression mode. e. Set Value to pH. 3. Click OK to modify the domain. to toggle from value mode to

Page 300

CFX-5 Tutorials

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

13.B.8:

Creating the Subdomain


To provide the correct modelling for the chemical reaction you need to define sources for the fluid components acid, alkali and product. To do this, you need to create a subdomain where the relevant sources can be specified. In this case, sources need to be provided within the entire domain of 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 the parent 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 to AcidSource (remember to click Enter Expression first), turn on Source Coefficient, and set Source Coefficient to AcidSourceCoeff. d. Turn on alkali.mf. e. Under alkali.mf, leave Option set to Source, set Source to AlkaliSource, turn on Source Coefficient, and set Source Coefficient to AlkaliSourceCoeff. f. Turn on Energy. g. For Energy, leave Option set to Source and set Source to HeatSource. h. Turn on product.mf. i. Under product.mf, leave Option set to Source, set Source to ProductSource, turn on Source Coefficient, and set Source Coefficient to 0 [kg m^-3 s^-1].

4. Click OK to create the subdomain.

CFX-5 Tutorials

Page 301

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

13.B.9:
To create the water inlet boundary condition

Creating the Boundary Conditions


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 and Normal 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 Static Temperature to 300 [K]. 4. Under Component Details: a. Under acid, set Option to Mass Fraction and Mass Fraction to 0 [kg kg^-1]. b. Select alkali. c. Under alkali, set Option to Mass Fraction and Mass Fraction to 0 [kg kg^-1]. d. Select product. e. Under product, set Option to Mass Fraction and Mass Fraction to 0 [kg kg^-1]. 5. Click OK to create the boundary condition.

To create the acid inlet boundary condition

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 and Normal 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 Static Temperature to 300 [K].

Page 302

CFX-5 Tutorials

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

4. Under Component Details: a. Under acid, set Option to Mass Fraction and Mass Fraction to 1.0 [kg kg^-1]. b. Select alkali. c. Under alkali, set Option to Mass Fraction and Mass Fraction to 0 [kg kg^-1]. d. Select product. e. Under product, set Option to Mass Fraction and Mass Fraction to 0 [kg kg^-1]. 5. Click OK to create the boundary condition.
To create the alkali inlet boundary condition

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 and Normal 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 Static Temperature to 300 [K]. 4. Under Component Details: a. Under acid, set Option to Mass Fraction and Mass Fraction to 0 [kg kg^-1]. b. Select alkali. c. Under alkali, set Option to Mass Fraction and Mass Fraction to 1.0 [kg kg^-1]. d. Select product. e. Under product, set Option to Mass Fraction and Mass Fraction to 0 [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 enters at a higher velocity. The result is an acid-to-alkali volume inflow ratio of 1:2.667. Recall that a stoichiometric ratio of 2.7905 was specified based on

CFX-5 Tutorials

Page 303

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

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 calculated as 1:2.7905. We are therefore providing enough acid and alkali to produce a neutral solution if they react together completely.
To create the outlet boundary condition

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 and Relative Pressure to 0 [Pa]. 4. Click OK to create the boundary condition.

To create the symmetry boundary condition

1. Create a symmetry boundary condition named sym1 with Location set to sym1. 2. Create a symmetry boundary condition named sym2 with Location set to sym2. The default adiabatic wall boundary condition will automatically be applied to the remaining unspecified boundary.

Figure 1: Boundary Condition Schematic

See "Figure 1: Boundary Condition Schematic" on page 304 for an understanding of the geometry and boundary conditions.

Page 304

CFX-5 Tutorials

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

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 Timescale The 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 appropriate timestep would be 1/4 to 1/2 of this value. See "Timestep Selection" on page 347 in the document "CFX-5 Solver Modelling" for more details on selecting a timestep. b. Physical Timescale to 0.01 [s] c. Max No. Iterations to 50

CFX-5 Tutorials

Page 305

Reacting Flow in a Mixing TubeDefining the Simulation in CFX-Pre

4. Use defaults for all other Solver Parameter settings. 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.

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 306

CFX-5 Tutorials

Reacting Flow in a Mixing TubeObtaining a Solution

13.C:

Obtaining a Solution
When the CFX-Solver Manager has started, obtain a solution to the CFD problem by following the instructions below. We recommend using the double precision CFX-Solver executable for this case. 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.

CFX-5 Tutorials

Page 307

Reacting Flow in a Mixing TubeVisualising the Results

13.D:

Visualising the Results


Try the following: Create an XY plane through Z = 0 coloured by MixturePh. The lower and upper bounds should approximately range from 2 to 11 or 15, depending on whether the solver executable used was double or single precision. View the acid, alkali and product mass fractions on the same plane. For these plots, set Range to Local (on the Colour panel). Create isosurfaces of Turbulence Kinetic Energy and Turbulence Eddy Dissipation.

Page 308

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 14

Conjugate Heat Transfer in a Heating Coil


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: HeatingCoil.pre HeatingCoil_001.res HeatingCoil_solid92.cdb HeatingCoilAnimation.avi HeatingCoilANSYSResults.rst HeatingCoilMesh.gtm

CFX-5 Tutorials

Page 309

Conjugate Heat Transfer in a Heating CoilIntroduction

14.A:
14.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Conjugate Heat Transfer Subdomains Boundary Conditions Details General Mode Steady State General Fluid Multiple Domain k-Epsilon Thermal Energy Energy Source Inlet (Subsonic) Opening Wall: No-Slip

CFX-Solver Manager CFX-Post

Wall: Adiabatic CEL (CFX Expression Language) Timestep Physical Timescale n/a n/a Plots Cylinder Default Locators Isosurface Changing the Colour Range Data Export Expression Editor Lighting Adjustment Variable Editor

Other

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 heat transfer from the coil to the fluid
CFX-5 Tutorials

Page 310

Conjugate Heat Transfer in a Heating CoilIntroduction

14.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

14.A.3:

Overview of the problem to solve


This example demonstrates the capability of CFX-5 in modelling conjugate heat transfer. In this example, part of the model of a simple heat exchanger is used to model the transfer of heat from a solid to a fluid. The model consists of a fluid domain and a solid domain. The fluid domain is an annular region through which water flows at a constant rate. The heater is a solid copper coil modelled as a constant heat source.
Outflow

Solid Heater

Inflow

This tutorial also includes an optional step that demonstrates the use of the CFX to ANSYS Data Transfer Tool to export thermal and mechanical stress data for analysis in ANSYS. A results file is provided in case you wish to skip the 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 directory and continue from Exporting the Results to ANSYS (p. 322).

CFX-5 Tutorials

Page 311

Conjugate Heat Transfer in a Heating CoilDefining the Simulation in CFX-Pre

14.B:

Defining the Simulation in CFX-Pre


This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file HeatingCoil.pre to complete 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 named HeatingCoil using the General Mode.

14.B.2:

Importing the Mesh


Tip: While we provide a mesh to use with this tutorial, you may want to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file HeatingCoilMesh.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 create a fluid domain for the annular region of the heat exchanger. The fluid domain will include the region of fluid flow but exclude the solid copper heater.

Page 312

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilDefining the Simulation in CFX-Pre To create the fluid 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 to B1.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 Radiation Model, 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 of the automatic initial guess. c. Turn on Turbulence Eddy Dissipation and set Option to Automatic. 5. Click OK to create the domain.

14.B.4:
To create the solid domain

Solid 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 to B2.P3. b. Set Domain Type to Solid Domain. c. Set Solids List to Copper.

CFX-5 Tutorials

Page 313

Conjugate Heat Transfer in a Heating CoilDefining the Simulation in CFX-Pre

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 than the fluid, you can initialise the temperature to a reasonable value. The initialisation option that is set when creating a domain applies only to that domain. 4. Click the Initialisation tab, then: a. Under Temperature, set Option to Automatic with Value and Temperature 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 heating element, 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:
To create the inlet boundary condition

Creating the Boundary Conditions


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 314

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilDefining the Simulation in CFX-Pre

3. Click the Boundary Details tab, then: a. Under Mass and Momentum, set Option to Normal Speed and Normal 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 Static Temperature to 300 [K]. 4. Click OK to create the boundary condition.
To create the opening boundary condition

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 we expect, at some stage during the solution, that the coiled heating element will cause some recirculation at the exit. At an opening boundary you need to set the temperature of fluid that enters through the boundary. In this case it 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)@outflow You 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 have created the boundary condition, so you will have to type this part of the expression. 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.

CFX-5 Tutorials

Page 315

Conjugate Heat Transfer in a Heating CoilDefining the Simulation in CFX-Pre

8. Click the Boundary Details tab, then: a. Under Mass and Momentum, set Option to Pressure and Direction (stable) and Relative Pressure to 0 [Pa]. b. Under Flow Direction, set Option to Normal to Boundary Condition. c. Under Turbulence, set Option to Medium (Intensity = 5%). d. Under Heat Transfer, set Option to Static Temperature and Static Temperature to OutletTemperature (for this expression, click the 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 applied to the remaining unspecified external boundaries of the fluid domain. The default Fluid-Solid Interface boundary condition (flux conserved) will be 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 inlet velocity. 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 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. 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 316

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilDefining the Simulation in CFX-Pre

Since this tutorial uses a solid domain, domain interfaces are created automatically between the fluid and solid regions. Report Summary of Interface Connections was turned on and therefore an information window is displayed that 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 from the CFX-Pre main menu. 7. Click Yes when asked if you want to save the CFX file.

CFX-5 Tutorials

Page 317

Conjugate Heat Transfer in a Heating CoilObtaining a Solution

14.C:

Obtaining a Solution
When the CFX-Solver Manager has started, obtain a solution to the CFD problem by clicking Start Run. While the calculations proceed, you can see residual 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 for the fluid and solid domains separately by editing the Workspace Properties (start from the Workspace menu). See "Monitors: Plot Lines" on page 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 318

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilViewing the Results

14.D:

Viewing the Results


This tutorial introduces conjugate heat transfer to the modelling capability of CFX-5. When CFX-Post has loaded, look at the default graphics objects that have been created in the Object Selector. You should see the following named Boundaries in the object tree: Default 1 Side FluidZone Part 1 Default 1 Side SolidZone Part 2 FluidZone Default SolidZone Default inflow outflow The boundaries with the Default suffixes are automatically generated by CFX-Pre on unspecified boundaries. SolidZone Default and FluidZone Default refer to the wall boundary conditions between the solid domains, fluid domains, and the outside world. Default 1 Side FluidZone Part 1 and Default 1 Side SolidZone Part 2 refer to the fluid-side and solid-side boundaries 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 or Wall Heat Transfer Coefficient. Leave the visibility of Default 1 Side FluidZone Part 1 turned on and turn on the visibility for Default 1 Side SolidZone Part 2. Change the Face Culling on the Render panel to Front Faces for both of these regions. Since domain boundaries always have normal vectors that point out of the domain, this removes the faces visible from the outside of each domain and leaves the faces visible from the inside of each domain. The fluid side of the interface is now coloured according to the colouring for Default 1 Side FluidZone Part 1 and the solid side of the interface is coloured according to the colouring for Default 1 Side SolidZone Part 2. You can see how face culling works by turning off the visibility of one of the surfaces, then rotating the view, paying particular attention to the ends of the coil. For more information, see "Face Culling" on page 20 in the document "CFX-Post". Create a YZ Plane passing through X = 0 and then colour that Plane by Temperature 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 319

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilViewing the Results

values for Temperature. As you do this examine the change in the YZ Plane at the interface between the solid heating coil and the surrounding fluid. This behaviour is explained in "Hybrid and Conservative Variable Values" on page 29 in the document "CFX-Post". On the Colour panel for the previously-defined YZ Plane, set Range to Local, then try colouring by different variables. On the Colour panel for the previously-defined YZ Plane, set Range to Global, then alter the Domains field on the Geometry panel. Turn off any graphics objects that hide the inside of the coil. Create an XY plane at Z = 2.24. Colour by Temperature using a Local range. You will see that the exit Temperature distribution is uneven due to the shape of the heating coil, with more heat transfer occurring on 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 the annular domain. This can be done by using an expression to specify radius and locating a particular radius with an isosurface.

To create the expression

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 320

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilViewing the Results To create the variable

1. Click Create variable

and set Name to radius.

2. Set Expression to expradius and then click Apply. 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".

To create an Isosurface of the variable

14.D.2:

Specular Lighting
Specular lighting is on by default. To see the effect of specular lighting, turn off Lighting and Specular on the Render panel for the Isosurface (Do not forget to click Apply.). Specular lighting allows glaring bright spots on the surface of an object, depending on the orientation of the surface and the position 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 pointer somewhere in the viewer area, then hold down the <Ctrl> key and click and drag using the right mouse button. If using Workbench: To move the light source, press and hold Shift and then press the arrow keys left, right, up or down. For more information on conjugate heat transfer in CFX-5, see "Conjugate Heat Transfer" on page 24 in the document "CFX-5 Solver Theory".

CFX-5 Tutorials

Page 321

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

14.E:

Exporting the Results to ANSYS


This optional step involves generating ANSYS .cdb data files from the results generated in the CFX-Solver. The stress analysis to be carried out in ANSYS will measure the combined effects of thermal and mechanical stresses on the solid heating coil using the Multifield Solver. Important: This method requires that you have a Multiphysics license for ANSYS. If you are unsure whether you have the required license, please consult your ANSYS customer support representative. There are two possible routes when exporting data to ANSYS. The method used in this section uses the CFX-Solver Manager export utility and the ANSYS Multiphysics application to carry out a stress analysis on the solid heating coil. Instructions for this method can be followed from Exporting Data from the CFX-Solver Manager (p. 322). The second method uses CFX-Post to export data (see Export (p. 60)) and involves the following steps: Importing a surface mesh from ANSYS into CFX-Post, and associating the surface with the corresponding 2D region in the CFX-5 results file. Exporting the data to a file containing SFE commands that represent surface element thermal or mechanical stress values. Loading the commands created in the last step into ANSYS and visualising 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 3D thermal data will be exported to an ANSYS element type 70 results file. The mechanical stresses are calculated on the liquid side of the liquid-solid interface. These values will be exported as 2D data to an ANSYS element 154 type results file. 1. Start the CFX-Solver Manager. 2. Select Tools > Export to ANSYS Multifield.

Page 322

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

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.res The Export File field is automatically filled in. b. Edit the file name by appending _70 to the end of the name that appears in the Export File box. (The file should be called HeatingCoil_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. To follow those instructions instead, continue reading from Processing the Results in ANSYS: Command Line method (p. 335). The ANSYS main menu is similar to the workspaces in CFX-5, and contains a tree structure with expandible categories based on processes, to readily access aspects of the simulation. The Utility Menu is similar to the Main Menu Bar in CFX-5, containing utility functions that are available throughout the ANSYS session, such as file controls, selecting, graphics controls, and setting parameters. Starting ANSYS 1. Start ANSYS Multiphysics from the ANSYS launcher. The mesh itself has already been generated and is provided for use in the following steps. The data files created in the previous steps will be used.

CFX-5 Tutorials

Page 323

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

PreProcessing 1. 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 file HeatingCoil_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 the name) 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 324

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

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 to 1.1e11 and PRXY to 0.35. c. Under Favorites > Linear Static > Thermal Expansion, set Reference 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_1 and 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.

CFX-5 Tutorials

Page 325

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

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 326

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

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 to HeatingCoil_001_ansysfsi_154.cdb 17. Click OK. Note: Keep the .cdb file in your working directory (without spaces in the name) 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.

CFX-5 Tutorials

Page 327

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

20. In the Utility Menu, select Select > Entities. a. Set the fields up as shown in "Figure 1:" on page 326, except type surf154 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 the name) 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 via the command line.

Page 328

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

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.

CFX-5 Tutorials

Page 329

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

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 330

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

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
CFX-5 Tutorials Page 331

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

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 332

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

Solution 43. 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 Edge only/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).

CFX-5 Tutorials

Page 333

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

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 added to the examples directory. Copy the file to your working directory if you wish to view it. c. Click Close in the Animation Control window to stop the animation and 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 334

CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

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 of the 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 Line method


As an alternative to running the GUI method, the following command line arguments 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

CFX-5 Tutorials

Page 335

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

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 336 CFX-5 Tutorials

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

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

CFX-5 Tutorials

Page 337

Conjugate Heat Transfer in a Heating CoilExporting the Results to ANSYS

Page 338

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 15

Multiphase Flow in Mixing Vessel


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: MixerImpeller.def MixerTank.geo MultiphaseMixer.pre

CFX-5 Tutorials

Page 339

Multiphase Flow in Mixing VesselIntroduction

15.A:
15.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Details General Mode Steady State General Fluid Multiple Domain Rotating Frame of Reference Dispersed Phase Zero Equation Fluid-Dependant Turbulence Model k-Epsilon None

Turbulence Model

Heat Transfer Buoyant Flow Multiphase Boundary Conditions

Domain Interfaces Output Control Timestep n/a Plots

Inlet (Subsonic) Outlet (Degassing) Wall: Thin Surface Wall: (Slip Depends on Volume Fraction) Frozen Rotor Periodic Physical Timescale n/a Default Locators Isosurface Slice Plane Quantitative Calculation

CFX-Solver Manager CFX-Post

Other

You learn about:


Page 340

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
CFX-5 Tutorials

Multiphase Flow in Mixing VesselIntroduction

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 that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

CFX-5 Tutorials

Page 341

Multiphase Flow in Mixing VesselIntroduction

15.A.3:

Overview of the problem to solve


This example simulates the mixing of two fluids in a mixing vessel. The geometry consists of a mixing tank vessel containing four baffles. A rotating impeller blade is connected to a shaft which runs vertically through the vessel. Air is injected into the vessel through an inlet pipe located below the impeller blade at a speed of 5 m/s.
Shaft Baffles

Mixing Tank Walls

Air Inlet

Impeller

Figure 1: Cut-away diagram of Mixing Vessel

The figure above shows the full geometry, with part of the tank walls and one baffle cut away. The symmetry of the vessel allows a 1/4 section of the full geometry to be modelled.

Page 342

CFX-5 Tutorials

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre

15.B:

Defining the Simulation in CFX-Pre


This section describes step-by-step how to define the flow physics in CFX-Pre. If you wish, you can use the session file MultiphaseMixer.pre to 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 named MultiphaseMixer using the General Mode.

15.B.2:

Importing the Meshes


Tip: While we provide a mesh to use with this tutorial, you may want to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh 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.

CFX-5 Tutorials

Page 343

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre

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 the Impeller 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.

Transforming the Impeller Mesh

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 to 0.275, Dy to 0, and Dz to 0. 4. Click OK to transform the impeller mesh.

Viewing the Mesh at the Tank Periodic Boundary

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. To reduce the solution time for this tutorial, the mesh used is very coarse. This is not a suitable mesh to obtain accurate results, but it is sufficient for demonstration purposes. Note: If you do not see the surface mesh, highlighting may be turned off. If highlighting is enabled, the button will be depressed. The default highlight type will show the surface mesh for any selected regions. If you see a different highlighting type, you can alter it by selecting Edit > Options and browsing to Pre > Viewer.

Page 344

CFX-5 Tutorials

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre

15.B.3:
Rotating Domain for the Impeller

Creating the Domains


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:
Set the following Option Gravity X Dirn. Gravity Y Dirn. Gravity Z Dirn. Buoy. Ref. Density Ref Location *.
*

To this value Buoyant -9.81 [m s^-2] 0 [m s^-2] 0 [m s^-2] 997 [kg m^-3] Automatic

For dilute dispersed multiphase flow, always set the buoyancy reference density to that for continuous fluid. See "Buoyancy" on page 11 in the document "CFX-5 Solver Modelling" for further details.

f.

Under Domain Motion, set Option to Rotating.

g. Set Angular Velocity to 84 [rev min-1] (note: you will need to change the default units). h. Under Axis Definition, leave Option set to Coordinate Axis and set 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, leave Option set to None. c. Under Turbulence Model, leave Option set to Fluid Dependent. d. Under Reaction or Combustion Model and Thermal Radiation Model, leave Option set to None.

CFX-5 Tutorials

Page 345

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre

4. Click the Air at 25 C tab, then: a. Under Morphology, set Option to Dispersed Fluid and Mean Diameter to 3 mm (note the change in units). b. Under Turbulence Model, leave Option set to Dispersed Phase Zero 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 Tension Coeff 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 Particle Model. c. In the Momentum Transfer frame, in the Drag Force frame, set Option to Grace. d. Turn on Correction Exponent and set Correction Exponent to 4. A discussion on suitable values for this exponent is given in "Grace Drag Model" on page 161 in the document "CFX-5 Solver Modelling". e. Expand the Non-drag forces frame. f. Under Turbulent Dispersion Force, set Option to Lopez de Bertodano and Turbulent Dispersion Coefficient to 0.1.

g. Under Turbulence Transfer, set Option to Sato Enhanced Eddy Viscosity. h. Under Mass Transfer, leave Option set to None. Initialisation data will be set on the Global Initialisation panel, so it does not need to be set on the Initialisation panel (to see its tab, you may need to use the right arrow button beside the tabs). 7. Click OK to create the domain.

Page 346

CFX-5 Tutorials

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre Stationary Domain for the Main Tank

Next, you will create a stationary domain for the main tank by copying the properties 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 impeller Default boundary object was copied from the impeller domain when the tank 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 be stationary relative to the rotating domain. A wall for the shaft in the stationary domain. This will be rotating relative to the stationary domain. Periodic domain interfaces for the periodic faces of the tank and impeller.

Periodic domain interfaces can either be one-to-one or GGI interfaces. One-to-one transformations occur for topologically similar meshes whose nodes match within a given tolerance. One-to-one periodic interfaces are more accurate and reduce CPU and memory requirements. Whether the interfaces are one-to-one or GGI is determined by CFX-Pre when the Solver (.def) File is written (you can view a report of interface connections that were implemented at this point by referring to "Summary
CFX-5 Tutorials Page 347

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre

of Interface Connections" on page 356 in the document "CFX-Pre"). For more advice on this topic, please refer to "Periodic Interfaces" on page 304 in the document "CFX-Pre" and "Periodic Interfaces" on page 144 in the document "CFX-5 Solver Modelling". When the default wall boundary condition is generated, the internal 2D Regions of an imported mesh are ignored, while the regions that form domain boundaries are included.
Air Inlet Boundary Condition

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 Speed to 5 [m s^-1]. c. Under Volume Fraction, set Option to Value and Volume Fraction to 1. d. Select Water from the list. e. Under Velocity, set Option to Normal Speed and Normal Speed to 5 [m s^-1]. f. Under Turbulence, set Option to Medium (Intensity = 5%). g. Under Volume Fraction, set Option to Value and Volume Fraction to 0. 5. Click OK to create the boundary condition.

Degassing Outlet Boundary Condition

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 348

CFX-5 Tutorials

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre

4. Click OK to create the boundary condition.


Thin Surface for the Baffle

In CFX-Pre, thin surfaces can be created by specifying wall boundary conditions on both sides of internal 2D regions. Both sides of the baffle regions 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 the contact area with the walls is near zero for low gas phase volume fractions. 5. Click OK to create the boundary condition.

Wall Boundary Condition for the Shaft

The next stage involves setting up a boundary condition for the shaft, which exists in the tank (stationary domain). These regions are connected to the shaft in the impeller domain. Since the tank domain is not rotating, you need 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 fraction of air in this location will be high and the assumption of zero contact area for the gas phase is not physically correct. In this case, a no slip boundary

CFX-5 Tutorials

Page 349

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre

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 Slip condition is more appropriate for the air phase. In cases where it is important to correctly model the dispersed phase slip properties at walls for all volume fractions, you can declare both fluids as no slip, but set up an expression for the dispersed phase wall area fraction. The expression should result in an area fraction of zero for dispersed phase volume fractions from 0 to 0.3, for example, and then linearly increase to an area 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.
Required Boundary Conditions in the Impeller Domain

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 Blade The Blade region only includes the surface from one side of the blade (you can confirm this by examining Blade in the Region Selector). Therefore, you can turn on Create Thin Surface Partner to 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 350

CFX-5 Tutorials

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre

5. Click OK to create the boundary condition. You will see in the Physics Selector that a boundary named Blade Other Side 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 the Default Wall Boundary Condition

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 since the remaining surfaces will be assigned interface conditions in the next section.

CFX-5 Tutorials

Page 351

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre

15.B.5:
Periodic Interface for the Impeller Domain

Creating the Domain Interfaces


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.

Periodic Interface for the Tank Domain

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 regions connecting the two domains.

Page 352

CFX-5 Tutorials

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre First Frozen Rotor 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 Frozen Rotor 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 Frozen Rotor 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.

CFX-5 Tutorials

Page 353

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre

In this case three separate interfaces were created. You should not try to create a single domain interface for multiple surfaces that lie in different planes.

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 to Automatic. d. Under Volume Fraction, set Option to Automatic with Value and Volume Fraction to 0. e. Select Water from the list. f. Turn on Water. g. Under Cartesian Velocity Components, leave Option set to Automatic. h. Turn on Velocity Scale and set Velocity Scale to 0 [m s^-1]. i. j. Under Turbulence Kinetic Energy, leave Option set to Automatic. Turn on Turbulence Eddy Dissipation and leave Option set to Automatic.

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 the sum 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 based on the velocity values set at inlets, openings, and outlets. In this tutorial, the only boundary that has a set velocity value is the inlet, which specifies a velocity of 5 [m s^-1] for both phases. Without setting the Velocity Scale parameter, the resulting initial guess would be a uniform velocity of 5 [m s^-1] in the X-direction throughout the domains for both phases. This is clearly not suitable since the water phase is enclosed by the tank. When
Page 354 CFX-5 Tutorials

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre

the boundary velocity conditions are not representative of the expected domain velocities, the Velocity Scale parameter should be used to set a representative domain velocity. In this case the velocity scale for water is set to zero, causing the initial velocity for the water to be zero. The velocity scale is not set for air, resulting in an initial velocity of 5 [m s^-1] in the X-direction for the air. This should not be a problem since the initial volume fraction of the air is zero everywhere. See "Automatic" on page 87 in the document "CFX-5 Solver Modelling" for a more detailed description of Automatic initialisation.

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. The first is a small time scale based on the rotational speed of the impeller, typically taken as 1 / , resulting in a time scale of 0.11 s for this case. The second time scale is usually larger and based on the recirculation time of the continuous phase in the mixer. Using a time step based on the rotational speed of the impeller will be more robust, but convergence will be slow since it takes time for the flow field in the mixer to develop. Using a larger time step reduces the number of iterations required for the mixer flow field to develop, but reduces robustness. You will need to experiment to find 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 during the solver run so that you can view the volume fraction of air in the tank (the gas hold up). The gas hold up is often used to judge convergence in these
CFX-5 Tutorials Page 355

Multiphase Flow in Mixing VesselDefining the Simulation in CFX-Pre

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)@tank ImpellerAirHoldUp = volumeAve(Air at 25 C.vf)@impeller TotalAirHoldUp = (volume()@tank * TankAirHoldUp + volume()@impeller * ImpellerAirHoldUp) / (volume()@tank + volume()@impeller) and then monitor the value of TotalAirHoldUp. See "Monitor Objects" on page 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 file which allows force and torque calculations to be performed in post-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 of Interface Connections was turned on, an information window is displayed that 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 356

CFX-5 Tutorials

Multiphase Flow in Mixing VesselObtaining a Solution

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 the instructions 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 end of the OUT file. A common quantity of interest is the mass balance; this compares the amount 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-Mass equation. For a multiphase calculation, examine the information given for the P-Vol equation. This is not the volumetric flow balance information, but is the summation of the phasic continuity mass balance information. .0

3. Click Post-Process Results

4. When Start CFX-Post appears, turn on Shut down Solver Manager then click OK.

CFX-5 Tutorials

Page 357

Multiphase Flow in Mixing VesselViewing the Results

15.D:

Viewing the Results


When CFX-Post has started you will be able to see the mixer geometry in the Viewer. You will create some plots showing how effective mixing has occurred. You will also calculate the power and torque required by the impeller.

Visualising the 1. Mixing Process

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 shaft and the degassing outlet. b. Pick Point 2 to be at the intersection of the tank shaft and the base of the mixer. c. Pick Point 3 to be somewhere on the outer semi-circular edge of the 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 358

CFX-5 Tutorials

Multiphase Flow in Mixing VesselViewing the Results

"Figure 3: " on page 359 shows a 3D view of the mixer geometry with a contour of Air at 25 C.Volume Fraction on a plane and an isosurface of Air at 25 C.Volume Fraction = 0.04. Note the influence of the baffles. You do 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 of 0 [s^-1] to 15 [s^-1]. Areas of high shear strain rate or shear stress are typically also areas where the highest mixing occurs. Pressure using a Local Range. Note that the hydrostatic contribution to pressure is excluded. This is because the Buoyancy Reference Density was set to the density of water, so pressure variations you are viewing are due only to the dynamic pressure. See "Buoyancy" on page 11 in the document "CFX-5 Solver Modelling" for further details. If you plot the variable called Absolute Pressure, you will see the true pressure including the 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

CFX-5 Tutorials

Page 359

Multiphase Flow in Mixing VesselViewing the Results

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 on the default walls. The global maximum values occur on the TankShaft boundary directly above the inlet. Although these values are very high, the shear force exerted on this boundary will be small since the contact area fraction of water here is very small.
Calculating the Power and Torque Required by the 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 impeller blade, approximately 70 [N m]. This must be multiplied by the number of blades in the full geometry to obtain the total torque required by the impeller; the result is a value of approximately 282 [N m]. You could also include the results from the locations HubShaft and TankShaft; however in this case their contributions are negligible. The power requirement is simply the required torque multiplied by the rotational speed (8.8 rad/s): Power = 282*8.8 = 2482 [W]. Remember that this value is the power requirement for the work done on the fluid only, it does not account for any mechanical losses, efficiencies etc. Also note that the accuracy of these results is significantly affected by the coarseness of the mesh. You should not use a mesh of this length scale to obtain accurate quantitative results.

Page 360

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 16

Gas-Liquid Flow in an Airlift Reactor


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: BubbleColumn.pre BubbleColumnMesh.gtm

CFX-5 Tutorials

Page 361

Gas-Liquid Flow in an Airlift ReactorIntroduction

16.A:
16.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Details Quick Setup Wizard Steady State General Fluid Single Domain Dispersed Phase Zero Equation Fluid-Dependent Turbulence Model k-Epsilon None

Heat Transfer Buoyant Flow Multiphase Boundary Conditions

CFX-Solver Manager CFX-Post

Timestep n/a Plots Other

Inlet (Subsonic) Outlet (Degassing Symmetry Plane Wall: Thin Surface Wall: (Slip depends on Volume Fraction) Physical Timescale n/a Default Locators Vector Changing the Colour Range Symmetry

You learn about: setting up a multiphase flow involving air and water using a fluid dependent turbulence model to set different turbulence options for each fluid specifying buoyant flow specifying a degassing outlet boundary condition to allow air, but not water, to escape from the boundary
CFX-5 Tutorials

Page 362

Gas-Liquid Flow in an Airlift ReactorIntroduction

16.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

16.A.3:

Overview of the problem to solve


This tutorial demonstrates the EulerianEulerian multiphase model in CFX-5. For an introduction to multiphase flow, see "Introduction" on page 148 in the document "CFX-5 Solver Modelling". The tutorial simulates a bubble column with an internal tube (draft tube) used to direct recirculation of the flow. This configuration is known as an airlift reactor. Bubble columns are tall gas-liquid contacting vessels and are often used in processes where gas absorption is important (e.g. bioreactors to dissolve oxygen in broths) and to limit the exposure of micro-organisms to excessive shear, imparted by mechanically driven mixers. This example models the dispersion of air bubbles in water. The gas is supplied through a sparger at the bottom of the vessel and the rising action of the bubbles provides gentle agitation of the liquid. Simple bubble columns that are without the draft tube tend to develop irregular flow patterns and poor overall mixing [68]. The draft tube in the airlift reactor helps establish a regular flow pattern in the column and achieve better uniformity of temperature, concentration and pH in the liquid phase, but sometimes at the expense of decreased mass transfer from the gas to the liquid [69]. This tutorial also demonstrates the use of thin surfaces. Thin surfaces are internal two dimensional wall boundaries used to model thin three dimensional features (e.g. baffles, guide vanes within ducts, etc.). The airlift reactor that is modelled here is very similar to the laboratory bench scale prototype used by Garca-Calvo and Letn [70]. The dimensions of 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.

CFX-5 Tutorials

Page 363

Gas-Liquid Flow in an Airlift ReactorIntroduction

Table 1
Height of column Elevation of liquid level Radius of column Height of draft tube Radius of draft tube Elevation of draft tube Radius of sparger ring Radius of sparger tube Elevation of sparger ring
degassing boundary y = 77.0 cm

1.100 m 0.770 m 0.080 m 0.700 m 0.055 m 0.035 m 0.030 m 0.004 m 0.035 m

downcomer
y = 73.5 cm

draft tube

outer wall

draft tube

gas inlet 73.74o y = 3.5 cm sparger r = 0.4 cm

downcomer

riser

outer wall

axis

sparger
base x = 0.0 cm x = 3.0 cm x = 5.5 cm x = 8.0 cm y = 0.0 cm

base

Figure 1:

Page 364

CFX-5 Tutorials

Gas-Liquid Flow in an Airlift ReactorDefining the Simulation in CFX-Pre

16.B:

Defining the Simulation in CFX-Pre


This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file BubbleColumn.pre to complete 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 for Multiphase 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 using the General Mode.

16.B.2:

Importing the Mesh


Tip: While we provide a mesh to use with this tutorial, you may want to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file 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.

CFX-5 Tutorials

Page 365

Gas-Liquid Flow in an Airlift ReactorDefining the Simulation in CFX-Pre

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:
Set the following Option Gravity X Dirn. Gravity Y Dirn. Gravity Z Dirn. Buoy. Ref. Density* Ref Location *. To this value Buoyant 0 [m s^-2] -9.81 [m s^-2] 0 [m s^-2] 997 [kg m^-3] Automatic

For multiphase flows with a dilute dispersed phase, always set the buoyancy reference density to that of the continuous phase. See "Buoyancy" on page 11 in the document "CFX-5 Solver Modelling" for an explanation.

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.

Page 366

CFX-5 Tutorials

Gas-Liquid Flow in an Airlift ReactorDefining the Simulation in CFX-Pre

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 be used). d. Leave Maximum Packing turned off (the default will be used). e. Under Turbulence Model, set Option to Dispersed Phase Zero Equation. f. Under Fluid Buoyancy Model, leave Option set to Density Difference.

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 Density Difference.

Note: For help on any of these panels, press the F1 key.

CFX-5 Tutorials

Page 367

Gas-Liquid Flow in an Airlift ReactorDefining the Simulation in CFX-Pre

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 used in 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-5 Solver Modelling" for details of this model. d. In the Momentum Transfer frame, under Drag Force, set Option to Grace. See "Grace Drag Model" on page 160 in the document "CFX-5 Solver Modelling" for details of this model. e. Turn on Volume Fraction Correction Exponent and set Volume Fraction 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 de Bertodano and Turbulent Dispersion Coefficient to 0.3. h. Under Turbulence Transfer, set Option to Sato Enhanced Eddy Viscosity. 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 required are: 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 368

CFX-5 Tutorials

Gas-Liquid Flow in an Airlift ReactorDefining the Simulation in CFX-Pre To create the inlet boundary condition

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 Speed to 0.3 [m s^-1]. c. Under Volume Fraction, set Option to Value and Volume Fraction to 0.25. d. Select Water from the list. e. Under Velocity, set Option to Normal Speed and Normal Speed to 0.0 [m s^-1]. f. Under Turbulence, set Option to Medium (Intensity = 5%). g. Under Volume Fraction, set Option to Value and Volume Fraction to 0.75. There are an infinite number of inlet velocity/volume fraction combinations that will produce the same mass inflow of air. The combination chosen gives an air inlet velocity close to the terminal rise velocity. Since the water inlet velocity is zero, you can adjust its volume fraction until the required mass flow rate of air is obtained for a given air inlet velocity. 5. Click OK to create the boundary condition.

Creating the Outlet Boundary Condition

The top of the reactor will be a degassing boundary, which is classified as an outlet boundary. 1. Create a boundary condition named Top. 2. On the Basic Settings panel, set: a. Boundary Type to Outlet b. Location to Top

CFX-5 Tutorials

Page 369

Gas-Liquid Flow in an Airlift ReactorDefining the Simulation in CFX-Pre

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 can be found in "Degassing Condition" on page 65 in the document "CFX-5 Solver Modelling". 4. Click OK to create the boundary condition.
Creating the Thin Surface Draft Tube Boundary Condition

Thin surfaces are created by specifying a wall boundary condition on both sides of an internal region. If only one side has a boundary condition then the CFX-Solver will fail. To assist with this, you can select only one side of a thin surface and then enable the Create Thin Surface Partner toggle. CFX-Pre will then try to automatically create another boundary condition for 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 created automatically.

Creating the Symmetry Plane Boundary Conditions

In this step you will create symmetry plane boundary conditions on the Symmetry1 and Symmetry2 locators, one for each of the two vertical cross sections 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 370

CFX-5 Tutorials

Gas-Liquid Flow in an Airlift ReactorDefining the Simulation in CFX-Pre

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 the Default Boundary

The remaining external regions are assigned to the default wall boundary condition. 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.

CFX-5 Tutorials

Page 371

Gas-Liquid Flow in an Airlift ReactorDefining the Simulation in CFX-Pre

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 Automatic With 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 Automatic With 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 different to that of the continuous phase. This results in a non-zero drag between the phases which can help stability at the start of a simulation. Since there is no water entering or leaving the domain, a stationary initial guess is recommended. h. Set Turbulence Kinetic Energy to Automatic. i. j. Turn on Turbulence Eddy Dissipation and set Option to Automatic. Set the Volume Fraction to Automatic with Value as use a value 1. The Volume Fractions must sum to unity over all fluids. Since a value has been set for Water, the Volume Fraction of Air will be calculated 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 be obtained by using CEL (CFX Expression Language) to specify a non zero volume fraction, for air in the riser and a zero value in the downcomer. This should be done if two solutions are possible (for example, if the flow could go up the downcomer and down the riser).

Page 372

CFX-5 Tutorials

Gas-Liquid Flow in an Airlift ReactorDefining the Simulation in CFX-Pre

See "Initial Conditions" on page 195 in the document "CFX-5 Solver Modelling" for advice on setting initial conditions in a multiphase simulation.

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 to produce a finer mesh, we recommend using a Target Residual of 1.0E-05 to 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.

CFX-5 Tutorials

Page 373

Gas-Liquid Flow in an Airlift ReactorObtaining a Solution

16.C:

Obtaining a Solution
When the CFX-Solver Manager has started, follow the instructions below to obtain a solution to the CFD problem: Note: If a fine mesh is used for a formal quantitative analysis of the flow in the reactor, the solution time will be significantly longer than for the coarse mesh. 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 on how 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 374

CFX-5 Tutorials

Gas-Liquid Flow in an Airlift ReactorViewing the Results

16.D:
16.D.1:

Viewing the Results


Coarse Mesh Results
Because the simulation in this tutorial is conducted on a coarse grid, the results are only suitable for a qualitative demonstration of the multiphase capability of CFX-5.7.1. You will first examine the distribution of velocities and fluid volume fraction by creating the following plots. The results will then 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 to model the draft tube. You will next plot the volume fraction of air on the thin surface. 4. Click Isometric View (Y up) Viewer. . Zoom in, so that the geometry fills the

5. Colour the boundary DraftTube using the variable Air at 25 C.Volume Fraction.

CFX-5 Tutorials

Page 375

Gas-Liquid Flow in an Airlift ReactorViewing the Results

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. When viewing plots on thin surfaces, you must ensure that you are viewing the correct side of the thin surface. The plot just created is displaying the volume fraction for air in the downcomer region of the airlift reactor. If you rotate the geometry you will see that the same plot is visible from both sides of the thin surface. This is because a thin surface is modelled as having a thickness of zero, so plots appear at the same spatial locations for each side. You will make use of the face culling feature to turn off visibility for the 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 Control object 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 376

CFX-5 Tutorials

Gas-Liquid Flow in an Airlift ReactorViewing the Results

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 a finer grid, whose maximum edge length is 0.005 m or shorter. The corresponding grid will have 21000 or more nodes. The same plots produced using the results for the coarse mesh can be reproduced using the results for the fine mesh. The image below used a maximum element edge length of 0.003m and contained approximately 90000 nodes. It shows the SymP1 Boundary coloured by Air at 25 C.Volume Fraction.

Figure 3:

CFX-5 Tutorials

Page 377

Gas-Liquid Flow in an Airlift ReactorViewing the Results

The use of a finer mesh has captured a region where the air bubbles recirculate at the top of the downcomer. This is confirmed by zooming in on a Vector plot of Air at 25 C.Velocity on SymP1 near the top of the downcomer. A similar plot of Water.Velocity reveals that only the gas phase is recirculating in the region at the top of the downcomer. This diagram shows a vector plot on SymP1, in the region of recirculation. The value plotted is Air at 25 C Velocity. See "Figure 4: " on page 378.

Figure 4:

The results of simulations show that: Due to the large 0.006 m diameter of the air bubbles, they quickly attain a significant terminal slip velocity (the terminal velocity relative to water). The resulting terminal slip velocity, obtained using the Grace drag model, is consistent with the prediction by Maneri and Mendelson [71] and the prediction by Baker and Chao [72]. These correlations predict a terminal slip velocity of about 0.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 the riser inside the draft tube), the superficial gas velocity (the rising velocity relative to the reactor vessel of gas bubbles in the draft tube multiplied by the gas holdup), and the liquid velocity in the downcomer agree with the results reported by Garca-Calvo and Letn [70], for gas holdup values of 0.03 or less. At higher values of gas holdup, the multifluid model does not account for
CFX-5 Tutorials

Page 378

Gas-Liquid Flow in an Airlift ReactorViewing the Results

pressure-volume work transferred from gas to liquid due to isothermal expansion of the bubbles. The simulation therefore tends to under-predict both the superficial gas velocity in the riser, and the liquid velocity in the downcomer for gas holdup values greater than 0.03. Note: Multiphase results files contain the vector variable Fluid.Superficial Velocity defined as Fluid.Volume Fraction multiplied by Fluid.Velocity. This is sometimes also referred to as the fluid volume flux. The components of this vector variable are available as scalar variables (e.g. Fluid.Superficial Velocity X). Many reference texts on bubble columns cite the Hughmark [73] correlation as a standard for gas hold up and superficial gas velocity in bubble columns. However, the Hughmark correlation should not be used when liquid flow is concurrent with gas at velocities exceeding 0.1 m s-1. In the airlift reactor described in this tutorial, the liquid velocity in the riser clearly exceeds 0.2 m s-1 and the Hughmark correlation is therefore not applicable.

CFX-5 Tutorials

Page 379

Gas-Liquid Flow in an Airlift ReactorViewing the Results

Page 380

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 17

Air Conditioning Simulation


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: HVAC.pre HVAC_expressions.ccl HVACMesh.gtm TStat_Control.F

CFX-5 Tutorials

Page 381

Air Conditioning SimulationIntroduction

17.A:
17.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Radiation Buoyant Flow Boundary Conditions Details General Mode Transient General Fluid Single Domain k-Epsilon Thermal Energy

Boundary Profile Visualisation 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 n/a n/a

CFX-Solver Manager

Page 382

CFX-5 Tutorials

Air Conditioning SimulationIntroduction Component CFX-Post Feature Plots Details Animation Isosurface Point Slice Plane Other Auto Annotation Changing the Colour Range Legend MPEG Generation Timestep Selection Title/Text Transient Animation

You learn about: using the Monte Carlo Radiation Model with a directional source of radiation setting a monitor point to observe the temperature at a prescribed location

17.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

17.A.3:

Overview of the problem to solve


This tutorial demonstrates a simple air conditioning case in a room. The room contains windows and an inlet vent for cooled air. The windows are set up to include heat and radiation sources which act to raise the

CFX-5 Tutorials

Page 383

Air Conditioning SimulationIntroduction

temperature of the room. The inlet vent introduces cool air into the room to lower the temperature to a set level. The room also contains an outlet vent, which removes ambient air from the room.
Roof Inlet Windows

Outlet

Page 384

CFX-5 Tutorials

Air Conditioning SimulationDefining the Simulation in CFX-Pre

17.B:

Defining the Simulation in CFX-Pre


This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file HVAC.pre to complete most of this section for you. See one of the first four tutorials for instructions on how to do this. To finish setting up the simulation, follow the instructions in Compiling the Subroutine (p. 390). You can then continue from Obtaining a 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 to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file 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 an alternative to entering each one, you can elect to load all of the expressions using the following method. Otherwise, follow the instructions under Creating Expressions Manually (p. 386).

Importing Expressions from 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.

CFX-5 Tutorials

Page 385

Air Conditioning SimulationDefining the Simulation in CFX-Pre

3. Continue the Tutorial from Setting up the Thermostat (p. 389).


Creating Expressions Manually

This tutorial requires some expressions to be created. In this tutorial, a transient simulation will be performed over 3 minutes 45 seconds with 3 second timesteps for a total of 75 timesteps. Expressions will be used to enter these values. The expressions are also used to calculate the inlet temperature of air under different conditions. As the air conditioner will remove a specified amount of heat, the inlet vent temperature is a function of the outlet vent temperature. A CEL function is used to find the outlet temperature (see "CEL Variables, Functions and Constants" on page 38 in the document "CFX-5 Reference Guide" for more information. A User CEL Function is used to simulate the behaviour of a thermostat that turns on cold air when the temperature (measured at a particular location) is above 22 C (295.15 K) and turns off the cold air when the temperature falls below 20 C (293.15 K). For each of the expressions defined in Table 1 (p. 387), create an expression using 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 386

CFX-5 Tutorials

Air Conditioning SimulationDefining the Simulation in CFX-Pre

Table 1 Expressions used to govern simulation


Name tStep tTotal Flowrate Definition 3 [s] 225 [s] 0.06 [m^3 s^-1] Explanation The timestep size for this problem The total simulation time. The flowrate of air through the domain. In this case, the air is recycled approximately 10 times per hour. The quantity of heat removed per second. This value corresponds to approximately 3400 Btu/hr. This is a large quantity for the room in question, and a smaller heat removal rate would result in a more comfortable inlet vent temperature. The value has been chosen because demonstrating the thermostat function with a lower heat removal rate would result in a longer simulation time (and a significantly longer solution time for this tutorial). A CEL function is used here to obtain the exit temperature of the ambient room air as it leaves the domain through the outlet boundary VentOut (which will be created later). The temperature setting for the thermostat. This equates to the temperature at which the air conditioner will switch on. Allowed temperature deviation from thermostat setting. TSet - TTol equates to the temperature at which the air conditioner will switch off (20 C in this tutorial). Temperature measured at the monitor point named Thermometer.

MassFlow HeatRemoved

1.185 [kg m^-3] * Flowrate The mass of air leaving the domain. 1000 [J s^-1]

TVentOut

areaAve(T)@VentOut

TSet

22 [C]

TTol

2 [K]

TSensor

probe(T)@Thermometer

CFX-5 Tutorials

Page 387

Air Conditioning SimulationDefining the Simulation in CFX-Pre Name ACOn Definition Thermostat Function (TSensor,TSet,TTol,aitern) Explanation ACOn is defined to be equal to the returned value from the User CEL function called TStatControl. The latter returns 1 if the air conditioner should be turned on and 0 if it should be turned off. The variable aitern is equal to the inner coefficient loop number, used to detect the first inner loop for each time step which it the only time. The decision to turn the air conditioner on or off is made only during the first inner loop of each time step.

CoolTempCalc

TVentOut - (HeatRemoved Calculate the temperature of the air entering the / (MassFlow * 1.004 [kJ room when the air conditioner is on. 1.004 kg^-1 K^-1])) corresponds to the specific heat capacity of air. ACOn*CoolTempCalc+(1ACOn)*TVentOut This is the temperature that the room inlet should be: When the air conditioner is off, ambient air enters the room; when the air conditioner is on, cooled air enters the room. The value of the X Component of velocity at the inlet vent. See Inlet velocity profile (p. 389). The value of the Z Component of velocity at the inlet vent. See Inlet velocity profile (p. 389).

TIn

XCompInlet ZCompInlet

5*(x-0.05 [m]) / 1 [m] -1+XCompInlet

Note: The expression for TSensor requires a monitor point named Thermometer 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 the thermostat output: whether the air conditioner should be on or off. This will be set up next.

Page 388

CFX-5 Tutorials

Air Conditioning SimulationDefining the Simulation in CFX-Pre

17.B.4:

Inlet velocity profile


An expression will be created to simulate guiding vanes at the inlet, as the following diagram shows:
Roof Inlet Vent x=0.15

x=0.05

Wall x

Figure 1: Intended airflow direction from the roof inlet vent

The two x locations indicated on the diagram correspond to the x values across the width of the inlet vent. When x is 0.05, the z component of velocity will be -1 and the x component will be zero. When x is 0.15, let the x component of velocity be 0.5 and the z component be -0.5. The x component of velocity varies linearly with x. The following expression can be used to calculate the x component of velocity:

x 0.05 - = 5 ( x 0.05 ) XCompInlet = 0.5 ---------------0.1 ZCompInlet = 1 + XCompInlet


When the expression for YCompInlet is created, it is divided by units of 1 m because the component must be dimensionless.

17.B.5:

Setting up the Thermostat


A FORTRAN subroutine that simulates the thermostat has already been written for this tutorial.

CFX-5 Tutorials

Page 389

Air Conditioning SimulationDefining the Simulation in CFX-Pre Compiling the Subroutine

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 by the CFX-Solver at any time before running the CFX-Solver. The operation is performed at this point in the tutorial so that you have a better understanding of the values you need to specify in CFX-Pre when creating a User CEL Function. The cfx5mkext command is used to create the required objects and libraries as described below. Important: To use the cfx5mkext command make sure that the FORTRAN compiler is in your path. See "Default FORTRAN Compilers" on page 433 in the document "CFX-5 Solver Modelling" for a list of commands that should execute 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.F at an OS command prompt. The ! indicates that the following line is to be interpreted as power syntax and not CCL. Everything after the ! symbol is processed 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, for some 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 -double PipeValve_inlet.F) to compile the subroutine for use with double precision CFX-Solver executables. A subdirectory will have been created in your working directory whose name is system dependent (e.g. on IRIX it is named irix). This sub directory contains the shared object library.
Page 390 CFX-5 Tutorials

Air Conditioning SimulationDefining the Simulation in CFX-Pre

Note: If you are running problems in parallel over multiple platforms then you will need to create these subdirectories using the cfx5mkext command for each different platform. You can view more details about the cfx5mkext command by running 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 your FORTRAN file and the default Library Path is your current working directory.

Close the Command Editor.


Creating the User CEL Function

A User CEL Function is required to link the subroutine into CFX-5. The complete definition for the function is defined in two steps. First, a User Routine that contains the Calling Name, Library Name and Library Path is created. Then, a User Function that points to the User Routine, and also contains 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 the subroutine name in the FORTRAN file is in upper case. 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.

5. Set Library Name to TStat_Control.

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 (forward slashes are also permitted on windows in CFX-Pre)

The next step defines the routine name and arguments.


CFX-5 Tutorials Page 391

Air Conditioning SimulationDefining the Simulation in CFX-Pre

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

[], since the result will be a dimensionless integer

14. Click OK to complete the User Function specification. You can now use the User Function to return a value that indicates whether the 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 expression.) 5. Under Initial Time, set: a. Option to Automatic with Value b. Time to 0 [s] 6. Click OK. to enter an .

Page 392

CFX-5 Tutorials

Air Conditioning SimulationDefining the Simulation in CFX-Pre

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:
Set the following Option Gravity X Dirn. Gravity Y Dirn. Gravity Z Dirn. Buoyancy Ref. Temp Ref Location To this value Buoyant 0 [m s^-2] 0 [m s^-2] the expression -g 298 [K] Automatic

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 boundary conditions.

Inlet Boundary Condition

1. Create a boundary condition named Inlet. 2. On the Basic Settings panel, set: a. Boundary Type to Inlet b. Location to Inlet

CFX-5 Tutorials

Page 393

Air Conditioning SimulationDefining the Simulation in CFX-Pre

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 and Mass Flow Rate to MassFlow. c. Under Flow Direction, set Option to Cartesian Velocity Components. Set the following components:
Set the following X Component Y Component Z Component To this value XCompInlet 0 ZCompInlet

d. Under Turbulence, leave Option set to Medium (Intensity = 5%). e. Under Heat Transfer, set Option to Static Temperature and Static Temperature to TIn. f. Under Thermal Radiation, set Option to Local Temperature. Now you can verify that the expressions to define the inlet cartesian components 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).
Outlet Boundary Condition

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 Static Pressure and Relative Pressure to 0 [Pa]. c. Under Thermal Radiation, set Option to Local Temperature. 4. Click OK.

Page 394

CFX-5 Tutorials

Air Conditioning SimulationDefining the Simulation in CFX-Pre Window Boundary Conditions

To model incoming radiation at the window boundaries, a directional radiation source will be created. The windows will also contribute heat to the 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 Fixed Temperature to 26 [C]. d. Leave the Thermal Radiation settings at their default values.

CFX-5 Tutorials

Page 395

Air Conditioning SimulationDefining the Simulation in CFX-Pre

4. Click the Sources tab, then: a. Turn on Sources. b. Click Add new item in the Radiation Source frame and accept the default name by clicking OK. c. Under Radiation Source 1, set Option to Directional Radiation Flux, Radiation Flux to 600 [W m^-2]. d. Under Direction, set:
Set the following Option X Component Y Component Z Component To this value Cartesian Components 0.33 0.33 -0.33

If Window 2 is assumed to be south-facing, then the radiation source comes from the south-east at an inclination of 45, as shown in "Figure 2: Direction of incoming radiation" on page 396.

Arrows showing direction of the radiation source

Window2

Figure 2: Direction of incoming radiation

Page 396

CFX-5 Tutorials

Air Conditioning SimulationDefining the Simulation in CFX-Pre

5. Click the Plot Options form, then: a. Enable Boundary Vector b. Set Profile Vector Components to Cartesian Components in Radiation 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 Wall Boundary Conditions

The default boundary condition for any undefined surface in CFX-Pre is a no-slip, smooth, adiabatic wall. For radiation purposes, the default wall is assumed 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 the wall during the simulation. A more detailed analysis would model heat transfer through the walls, but as this tutorial is designed only for demonstration 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 default boundary, it will not appear in the wireframe when the results file is opened in 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]

CFX-5 Tutorials

Page 397

Air Conditioning SimulationDefining the Simulation in CFX-Pre

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 398

CFX-5 Tutorials

Air Conditioning SimulationDefining the Simulation in CFX-Pre

17.B.11:

Setting Output Control


Transient results files will be set up to record transient values of a chosen set of variables. Monitor points will be created to show the on/off status of the air 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 expression tStep. f. Turn on Output Variable Operators and set Output Variable Operators to All. This causes the gradients of the selected variables to be written to the transient files, along with other information. See "Output Variable Operators" on page 340 in the document "CFX-Pre" for more information.

CFX-5 Tutorials

Page 399

Air Conditioning SimulationDefining the Simulation in CFX-Pre

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. j. l. Set Output Variables List to Temperature. Set the Cartesian Coordinates: (2.95,1.5,1.25). . Set Name to Temp at VentOut and click OK. .

k. Click Add New item

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 400

CFX-5 Tutorials

Air Conditioning SimulationObtaining a Solution

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.

CFX-5 Tutorials

Page 401

Air Conditioning SimulationViewing the Results

17.D:
17.D.1:

Viewing the Results


Creating Graphics Objects
Plane locators will be placed vertically through the vents and horizontally above 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 named Plane 2 with Z=0.35 [m]. Colour it using the same settings as for the first plane, and turn off Lighting.
Isosurface Locator

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 402

CFX-5 Tutorials

Air Conditioning SimulationViewing the Results

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 be able to see it when playing the animation (a step carried out later).
Adjusting the Legend

The Legend title should not name the locator of any particular object since all 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 the thermometer which controls the thermostat. This will be especially useful for the animation which is created later in this tutorial. Before creating the label, you will need to support the expression for TSensor by creating a point called Thermometer at the location of the sensor thermometer. This point will replace the monitor point called Thermometer which was used during the solver run, but no longer exists. Note: The actual thermometer data generated during the run was stored in the results file, but is not easily accessible, and cannot currently be used in an auto-annotation label.

Creating a Point for the Thermometer

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 the prescribed location.

Creating the Text Label

1. Click Create text

2. Accept the default name and click OK.


Page 403

CFX-5 Tutorials

Air Conditioning SimulationViewing the Results

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 404

CFX-5 Tutorials

Air Conditioning SimulationViewing the Results

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 Editing list, then change # of Frames to 200 in the box labelled # of Frames. This will place 200 intermediate frames between the first and (yet to be created) second key frames, for a total of 202 frames. This will produce an animation lasting about 8.8 s since the frame rate will be 24 frames per second. Since there are 76 unique frames, each frame will be shown at least once. 6. Load the last Time Value (225 s) using the Timestep Selector. .

CFX-5 Tutorials

Page 405

Air Conditioning SimulationViewing the Results

7. In the Animation Editor: a. Click New to create KeyframeNo2. The # of Frames parameter has no effect for the last Keyframe, so leave 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 the Low 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 and file 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 from which CFX-Post was launched. h. Click Save in Save MPEG. The MPEG file name (including path) will be set, but the MPEG will not be created yet. i. Frame 1 is not loaded (shown in the top right corner of the Animation Editor, beside F:). Click To Beginning to load it. Wait a few seconds for the frame to load. Click Save... and save the animation to a file. This will enable you to quickly restore the animation in case you want to make changes. Animations are not restored by loading ordinary state files (those with the .cst extension).

j.

k. Click Play Forward . The MPEG will be created as the animation proceeds. This may take a few minutes, since a time step must be loaded and objects must be created for each frame. To view the MPEG file, you need to use a viewer that supports the MPEG format. 8. When you have finished, exit from CFX-Post.

Page 406

CFX-5 Tutorials

Air Conditioning SimulationViewing the Results

Further Steps 1. 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.

CFX-5 Tutorials

Page 407

Air Conditioning SimulationViewing the Results

Page 408

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 18

Combustion and Radiation in a Can Combustor


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: CombustorEDM.pre CombustorFlamelet.pre CombustorMesh.gtm

CFX-5 Tutorials

Page 409

Combustion and Radiation in a Can CombustorIntroduction

18.A:
18.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Combustion Radiation Boundary Conditions Details General Mode Steady State Reacting Mixture Single Domain k-Epsilon Thermal Energy

Inlet (Subsonic) Outlet (Subsonic) Wall: No-Slip Wall: Adiabatic Wall: Thin Surface Physical Timescale n/a Outline Plot (Wireframe) Sampling Plane Slice Plane Vector Changing the Colour Range Colourmap Legend Quantitative Calculation

CFX-Solver Manager CFX-Post

Timestep n/a Plots

Other

You learn about:


Page 410

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
CFX-5 Tutorials

Combustion and Radiation in a Can CombustorIntroduction

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 that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

18.A.3:

Overview of the problem to solve


The can combustor is a feature of the gas turbine engine. Arranged around a central annulus, can combustors are designed to minimise emissions, burn very efficiently and keep wall temperatures as low as possible. This

CFX-5 Tutorials

Page 411

Combustion and Radiation in a Can CombustorIntroduction

tutorial is designed to give a qualitative impression of the flow and temperature distributions. The basic geometry is shown below with a section of the outer wall cut away.
The Outlet has a surface area of 150 cm2

There are six side air inlets, each with a surface area of 2 cm2

There are six small fuel inlets, each with a surface area of 0.14 cm2.

Main air inlet. The inlet is guided by vanes to give the air a swirling velocity component. Total surface area is 57 cm2

Figure 1: Overview of Can Combustor Geometry

Page 412

CFX-5 Tutorials

Combustion and Radiation in a Can CombustorUsing the Eddy Dissipation and P1 Models

18.B:

Using the Eddy Dissipation and P1 Models


This tutorial demonstrates two different Combustion and Radiation model combinations. The first uses the Eddy Dissipation Combustion Model with the P1 Radiation Model; the NOx model is also included. The second uses the Laminar Flamelet Model with the Discrete Transfer Radiation Model. If you wish to use the Flamelet Combustion Model and Discrete Transfer Radiation Model, see Using the Laminar Flamelet and Discrete Transfer Models (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 flow physics in CFX-Pre. If you wish, you can play the session file CombustorEDM.pre to complete this section for you and continue from Obtaining a Solution (p. 422). See one of the first four tutorials for instructions 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 the Reaction Editor, but you can also define your own reactions, see "Reactions Editor" 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 to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file 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.

CFX-5 Tutorials

Page 413

Combustion and Radiation in a Can CombustorUsing the Eddy Dissipation and P1 Models

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 a mesh. The only exception occurs when importing a gtm mesh file, as in this tutorial, 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 composition mixture.

To create the variable composition mixture

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 of the fuel into its products in a single-step reaction. The formation of NO is also 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 the solution time since the CFX-Solver will not have to calculate radiation mixture 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 414

CFX-5 Tutorials

Combustion and Radiation in a Can CombustorUsing the Eddy Dissipation and P1 Models To modify the Methane Oxygen WD1 reaction

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" on page 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 set later). The products limiter is not recommended for multi-step eddy dissipation 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 tutorial because 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.

CFX-5 Tutorials

Page 415

Combustion and Radiation in a Can CombustorUsing the Eddy Dissipation and P1 Models

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 Eddy Dissipation. e. Under Thermal Radiation Model, set Option to P1. f. Under Component Details, set:
To this value Transport Equation Transport Equation Transport Equation Constraint Transport Equation Transport Equation

Set the following CH4 CO2 H2O N2 NO O2

4. Click OK to create the domain.

18.B.6:
Fuel Inlet Boundary Condition

Creating the Boundary Conditions


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 and Normal 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 Static Temperature to 300 [K]. d. Under Thermal Radiation, set Option to Local Temperature. e. Under Component Details, set:
Set the following Mass Fraction of CH4 Mass Fraction (of all other components) To this value 1 0 CFX-5 Tutorials

Page 416

Combustion and Radiation in a Can CombustorUsing the Eddy Dissipation and P1 Models

4. Click OK to create the boundary condition.


Bottom Air Inlet Boundary Condition

Two separate boundary conditions will be applied for the incoming air. The first is at the base of the can combustor. The can combustor employs vanes downstream 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 and Normal 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 Static Temperature to 300 [K]. d. Under Thermal Radiation, set Option to Local Temperature. e. Under Component Details, set:
Set the following Mass Fraction of O2 Mass Fraction (of all other components) To this value 0.232 0

The remaining mass fraction at the inlet will be made up from the Constraint component, N2. 4. Click OK to create the boundary condition.
Side Air Inlet Boundary Condition

The secondary air inlets are located on the side of the vessel and introduce extra 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

CFX-5 Tutorials

Page 417

Combustion and Radiation in a Can CombustorUsing the Eddy Dissipation and P1 Models

3. Click the Boundary Details tab, then: a. Under Mass and Momentum, set Option to Normal Speed and Normal 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 Static Temperature to 300 [K]. d. Under Thermal Radiation, set Option to Local Temperature. e. Under Component Details, set:
Set the following Mass Fraction of O2 Mass Fraction (of all other components) To this value 0.232 0

4. Click OK to create the boundary condition.


Outlet Boundary Condition

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 and Relative Pressure to 0 [Pa]. b. Under Thermal Radiation, set Option to Local Temperature. 4. Click OK to create the boundary condition.

Vanes Boundary Condition

The vanes above the main air inlet are to be modelled as thin surfaces. To create a vane as a thin surface in CFX-Pre, you must specify a wall boundary condition on each side of the vanes. The Create Thin Surface Partner feature in CFX-Pre will automatically match the other side of a thin surface if you pick just a single side. You will first create a new region which contains one side of each of the eight vanes, then use the Create Thin Surface Partner feature to match the other side. 1. Select Create > Regions > Region. 2. Set Name to Vane Surfaces. 3. Leave Combination set to Union.

Page 418

CFX-5 Tutorials

Combustion and Radiation in a Can CombustorUsing the Eddy Dissipation and P1 Models

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 the location list to create a thin surface boundary condition. See "Create Thin 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 Wall Boundary Condition

The default boundary condition for any undefined surface in CFX-Pre is a no-slip, smooth, adiabatic wall. For radiation purposes, the wall is assumed to be a perfectly absorbing and 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 is neglected. 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.

CFX-5 Tutorials

Page 419

Combustion and Radiation in a Can CombustorUsing the Eddy Dissipation and P1 Models

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 the fraction 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 and Mass Fraction to 0.01. c. Under O2, set Option to Automatic with Value and Mass Fraction to 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 Physical Timescale, set Physical Timescale to 0.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 420

CFX-5 Tutorials

Combustion and Radiation in a Can CombustorUsing the Eddy Dissipation and P1 Models

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.

CFX-5 Tutorials

Page 421

Combustion and Radiation in a Can CombustorObtaining a Solution

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 422

CFX-5 Tutorials

Combustion and Radiation in a Can CombustorViewing the Results

18.D:

Viewing the Results


When CFX-Post opens, you might need to experiment with the Edge Angle setting for the Wireframe object and the various rotation and zoom features in order to place the geometry in a sensible position.

Viewing Temperature Within the Domain

1. Create a ZX Slice Plane (accepting the default name Plane 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 is due to forced convection, as shown in "Figure 2: Temperature" on

page 423.
Figure 2: Temperature Viewing the NO concentration in the Combustor

In the next step you will colour Plane 1 by the mass fraction of NO to view the distribution of NO within the domain. 1. Edit Plane 1 and click the Colour tab. 2. Set the Variable to NO.Mass Fraction.

CFX-5 Tutorials

Page 423

Combustion and Radiation in a Can CombustorViewing the Results

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 the outlet of the domain.
Printing a Greyscale Graphic

Here we will change the colour map (for Plane 1) to a greyscale map. The result will be a plot with different levels of grey representing different mass fractions of NO. This technique is especially useful for printing, to a black and white printer, any image that contains a colour map. Conversion to greyscale by conventional means (i.e. using graphics software, or letting the printer do the conversion) will generally cause colour legends to change to a non-linear distribution of levels of grey, as shown in "Figure 4: Rainbow Map converted to Greyscale (left) versus Inverse Greyscale Map (right)" on page 425 (left). 1. Edit Plane 1 and click the Colour tab. 2. Change the Colour Map to Inverse Greyscale.

Page 424

CFX-5 Tutorials

Combustion and Radiation in a Can CombustorViewing the Results

3. Click Apply. "Figure 4: Rainbow Map converted to Greyscale (left) versus Inverse Greyscale Map (right)" on page 425 (right) shows the resulting plot.

Figure 4: Rainbow Map converted to Greyscale (left) versus Inverse Greyscale Map (right) Calculating NO Mass Fraction at the Outlet

The emission of pollutants into the atmosphere is always a design consideration for combustion applications. In the next step, you will calculate 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.

CFX-5 Tutorials

Page 425

Combustion and Radiation in a Can CombustorViewing the Results Viewing Flow Field

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 the problem with a finer mesh would show this region to be a larger recirculation zone. The coarseness of the mesh in this tutorial means that this region of flow is not accurately resolved. See "Figure 6: Velocity

Page 426

CFX-5 Tutorials

Combustion and Radiation in a Can CombustorViewing the Results

Vector Field (finer mesh solution)" on page 427 for an illustration showing the larger recirculation zone (mesh used had over 50000 nodes).

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.

CFX-5 Tutorials

Page 427

Combustion and Radiation in a Can CombustorViewing the Results

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 Location for the Vector plot to Plane 2 only. In the region near the fuel and air inlets, the swirl component of momentum (theta direction) results in increased mixing with the surrounding fluid and a higher residence time in this region. As a result, more fuel is burned. 9. Examine the distribution of Incident Radiation and Radiation Intensity throughout the domain.

Page 428

CFX-5 Tutorials

Combustion and Radiation in a Can CombustorUsing the Laminar Flamelet and Discrete

18.E:

Using the Laminar Flamelet and Discrete Transfer Models


In this second part of the tutorial, you will start with the simulation from the first part of the tutorial and modify it to use the Laminar Flamelet combustion 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 flow physics in CFX-Pre. If you wish, you can play the session file CombustorFlamelet.pre to complete this section for you and continue from Obtaining a Solution (p. 432). See any of the introductory tutorials for instructions on how to play a 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.

CFX-5 Tutorials

Page 429

Combustion and Radiation in a Can CombustorUsing the Laminar Flamelet and Discrete

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 "Laminar Flamelet with PDF Model" on page 270 in the document "CFX-5 Solver Modelling".

Create the variable composition mixture

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 the chemistry library for the NO component) c. all other components to Automatic (check every one) 5. Click OK to create the domain.

18.E.6:
Modifying the Fuel Inlet Boundary Condition

Creating the Boundary Conditions


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 430

CFX-5 Tutorials

Combustion and Radiation in a Can CombustorUsing the Laminar Flamelet and Discrete Modifying the Bottom Air Inlet Boundary Condition

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 the Side Air Inlet Boundary Condition

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 the Outlet Boundary Condition Modifying the Vanes Boundary Conditions

No changes to the outlet boundary condition are required.

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 Radiation equations, 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 Radiation Control and Iteration Interval. b. Set Iteration Interval to 10.

CFX-5 Tutorials

Page 431

Combustion and Radiation in a Can CombustorUsing the Laminar Flamelet and Discrete

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 Temperature within the Domain

Viewing the Results


1. Create a ZX Slice Plane (accepting the default name Plane 1) through a point with y = 0. 2. Colour the Plane by Temperature.

Page 432

CFX-5 Tutorials

Combustion and Radiation in a Can CombustorUsing the Laminar Flamelet and Discrete

"Figure 7: Temperature" on page 433 shows a different temperature prediction than the Eddy Dissipation Model predicts (cf. Figure 2: (p. 423)).

Figure 7: Temperature Viewing the NO concentration in the Combustor

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

CFX-5 Tutorials

Page 433

Combustion and Radiation in a Can CombustorUsing the Laminar Flamelet and Discrete Calculating NO Concentration

Performing the same calculation as Calculating NO Mass Fraction at the Outlet (p. 425) shows nearly double the amount of NO at the outlet compared with the Eddy Dissipation Model. The next plot will show the concentration of CO (carbon monoxide), which is a by-product of incomplete combustion and is poisonous in significant concentrations. 1. Edit Plane 1 and click the Colour tab. 2. Set Variable to CO.Mass Fraction. 3. Set Range to Local. 4. Click Apply.

Viewing CO Concentration

Figure 9: CO Mass Fraction

As can be seen, the highest values are very close to the fuel inlet and in the regions of highest temperature.
Calculating CO Mass Fraction at the Outlet

In the next step, you will calculate the mass fraction of CO 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 CO.Mass Fraction

Page 434

CFX-5 Tutorials

Combustion and Radiation in a Can CombustorUsing the Laminar Flamelet and Discrete

3. Click Calculate. There is approximately 0.4% CO by mass in the outlet stream. Further Postprocessing 1. 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.

CFX-5 Tutorials

Page 435

Combustion and Radiation in a Can CombustorUsing the Laminar Flamelet and Discrete

Page 436

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 19

Cavitation Around a Hydrofoil


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: Hydrofoil.pre HydrofoilExperimentalCp.csv HydrofoilGrid.grd HydrofoilIni.pre HydrofoilIni_001.res HydrofoilPostContour.cst HydrofoilPostFlowfield.cst

CFX-5 Tutorials

Page 437

Cavitation Around a HydrofoilIntroduction

19.A:
19.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Multiphase Boundary Conditions Details General Mode Steady State General Fluid Single Domain k-Epsilon Isothermal Inlet (Subsonic) Outlet (Subsonic) Symmetry Plane Wall: No-Slip Wall: Free-Slip Physical Timescale Contours Line Locator Polyline Slice Plane Streamline Vector Chart Creation Data Export Printing Title/Text Variable Editor

CFX-Solver Manager CFX-Post

Timestep Restart Plots

Other

You learn about:


Page 438

modelling flow with cavitation using vector reduction in CFX-Post to clarify a vector plot with many arrows importing and exporting data along a polyline plotting computed and experimental results
CFX-5 Tutorials

Cavitation Around a HydrofoilIntroduction

19.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

19.A.3:

Overview of the problem to solve


This example demonstrates cavitation in the flow of water around a hydrofoil. A two-dimensional solution is obtained by modelling a thin slice of the hydrofoil and using two symmetry boundary conditions.

cavitation zone

16.91 m s^-1

Figure 1: Hydrofoil and Flow Overview

In this tutorial, an initial solution with no cavitation is generated to provide an accurate initial guess for a full cavitation solution, which is generated afterwards.

CFX-5 Tutorials

Page 439

Cavitation Around a HydrofoilCreating the Initial Simulation

19.B:

Creating the Initial Simulation


This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file HydrofoilIni.pre to complete this section for you and continue from Obtaining the Starting-Point Solution Using the CFX-5 Solver (p. 445). See one of the first four 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 to develop your own in the future. Instructions on how to create this mesh in CFX-Mesh are available from the CFX Community Site. Please see "Mesh Generation" on page 3 for details. 1. Copy the mesh file 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 440

CFX-5 Tutorials

Cavitation Around a HydrofoilCreating the Initial Simulation Viewing the Mesh

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 water vapour. The volume fractions are initially set so that the domain is filled entirely 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 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 Fluid Temperature to 300 [K]. Since Cavitation will not be turned on during the first solution, there is no need to visit the remaining panels. 5. Click OK to create the domain. icon. c. Select Water Vapour at 25 C and Water then click OK.

19.B.4:

Creating the Boundary Conditions


The simulation requires inlet, outlet, wall and symmetry plane boundary conditions. The regions for these boundary conditions were imported with the grid file.

Inlet Boundary Condition

1. Create a boundary condition named inlet. 2. On the Basic Settings panel, set: a. Boundary Type to Inlet b. Location to IN

CFX-5 Tutorials

Page 441

Cavitation Around a HydrofoilCreating the Initial Simulation

3. Click the Boundary Details tab, then: a. Under Mass And Momentum, set Option to Normal Speed and Normal 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 to 0.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.
Outlet Boundary Condition

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 Wall Boundary Condition

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.

Symmetry Plane Boundary Condition

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 442

CFX-5 Tutorials

Cavitation Around a HydrofoilCreating the Initial Simulation

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 Value U 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, leave Option set to Automatic. c. Turn on Turbulence Eddy Dissipation and set Option to Automatic. 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 and Volume Fraction to 0. d. Select Water. e. Turn on Water. f. Under Volume Fraction set Option to Automatic with Value and Volume 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.

CFX-5 Tutorials

Page 443

Cavitation Around a HydrofoilCreating the Initial Simulation

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 444

CFX-5 Tutorials

Cavitation Around a HydrofoilObtaining the Starting-Point Solution Using the CFX-5 Solver

19.C:

Obtaining the Starting-Point 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.

CFX-5 Tutorials

Page 445

Cavitation Around a HydrofoilViewing the Results of the Starting-Point Solution

19.D:
If the solver manager is still open

Viewing the Results of the Starting-Point Solution


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. 1. Start CFX-Post. 2. Load HydrofoilIni_001.res (the results file produced by the solver).

If you have closed the solver manager before launching CFX-Post Visualising Pressure and Velocity

"Figure 2: Pressure Field - No Cavitation" on page 446 (produced by restoring the state file: HydrofoilPostFlowfield.cst, located in the examples directory) shows a plane that passes between the symmetry planes (Z=0.007 m), coloured by pressure. It also shows a vector plot of velocity (with a vector reduction of 5 applied to reduce the number of vectors shown) on the same plane. In order to prevent the vector symbols from being hidden by the coloured plane, Arrow3D vectors were used.

Figure 2: Pressure Field - No Cavitation

Page 446

CFX-5 Tutorials

Cavitation Around a HydrofoilViewing the Results of the Starting-Point Solution Visualising Liquid and Vapour 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 fraction of water vapour. Notice that there is no water vapour present anywhere in the domain.

Figure 3: Water Vapour Volume Fraction- No Cavitation

The figure was produced by creating a line using the Two-Points method and 12 Samples. A streamline object was then produced using the line as a locator for the starting points. Streamline symbols of type Arrow3D arrow were used with a Symbol Size of 0.3 and an Interval of 0.003 s. The background is a contour plot using the XY Plane Z=0.007 m as a locator.

CFX-5 Tutorials

Page 447

Cavitation Around a HydrofoilViewing the Results of the Starting-Point Solution Plotting Pressure Distribution Data

In this section, you will create a plot of the pressure coefficient distribution around the hydrofoil. The data will then be exported to a file for later comparison with data from the cavitating flow case, which will be run later in 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 be seen around the hydrofoil. Do this by clicking repeatedly on the Colour box. f. Click Apply. g. Manipulate the view to confirm that the polyline wraps around the hydrofoil. So far, you have used a plane to create a polyline. In order to obtain pressure coefficient data on the polyline, we first need to create a variable for pressure 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[kg m^-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 for points 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 448 CFX-5 Tutorials

Cavitation Around a HydrofoilViewing the Results of the Starting-Point Solution

(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 the hydrofoil. h. Click Apply. Note: Although the variables that were just created are only needed at points along the Polyline, they exist throughout the domain. Now that the variables Chord and Pressure Coefficient exist, they can be associated with the previously defined Polyline (the locator) to form a chart line. 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 to Pressure Coefficient Distribution, then click OK. c. In the Chart Editor, on the Chart Line 1 panel, set Line Name to Solver Cp, Locator to Foil, X Axis to Chord and Y Axis to Pressure Coefficient. d. Click Apply. The chart line is created, added to the chart object, and displayed in the 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 corresponding axis variables. h. Set X Axis Label to Normalised Chord Position and Y Axis Label to Pressure Coefficient. i. Click the Ranges tab, then, under Ranges, set: Selection to Manual Minimum X to 0 Maximum X to 1 Minimum Y to 0.4 Maximum Y to -0.5 Click Apply.

j.

You will now export the chord and pressure coefficient data along the polyline. This data will be imported and used in a chart later in this tutorial for comparison with the results for when cavitation is present.
CFX-5 Tutorials Page 449

Cavitation Around a HydrofoilViewing the Results of the Starting-Point Solution Exporting Pressure Distribution Data

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 the Post-Processin g 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 turned on. Similar post-processing follows, and the effect of cavitation on the pressure distribution around the hydrofoil will be illustrated in a chart.

Page 450

CFX-5 Tutorials

Cavitation Around a HydrofoilRunning the Simulation with Cavitation

19.E:

Running the Simulation with Cavitation


Earlier in this tutorial, you ran a simulation without cavitation. The solution from 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 in CFX-Pre. If you wish, you can use the session file Hydrofoil.pre to complete this section for you and continue from Obtaining the Cavitation Solution Using the CFX-5 Solver (p. 453). See one of the first four tutorials for instructions 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 can be 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 a homogeneous binary mixture (see "Materials Editor: Homogeneous Binary Mixture" on page 143 in the document "CFX-Pre"), but one has not been used in this tutorial. 9. Click Solver Control . 10. Under Advection Scheme leave Option set to High Resolution.

CFX-5 Tutorials

Page 451

Cavitation Around a HydrofoilRunning the Simulation with Cavitation

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 185 This allows at least 150 further iterations since the first simulation has 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 452

CFX-5 Tutorials

Cavitation Around a HydrofoilObtaining the Cavitation Solution Using the CFX-5 Solver

19.F:

Obtaining the Cavitation Solution Using the 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.

CFX-5 Tutorials

Page 453

Cavitation Around a HydrofoilViewing the Results of the Cavitation Solution

19.G:
If the solver manager is still open

Viewing the Results of the Cavitation Solution


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. 1. Start CFX-Post 2. Load Hydrofoil_001.res (the second results file produced by the solver).

If you have closed the solver manager before launching CFX-Post Visualising Pressure and Velocity

"Figure 4: Pressure Field - Cavitation Present" on page 454 shows the pressure 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 file was manually edited to remove the part that loads a RES file. This plot shows little evidence that there is cavitation present in the flow.

Figure 4: Pressure Field - Cavitation Present Visualising Liquid and Vapour Phases

"Figure 5: Water Vapour Volume Fraction- Cavitation Present" on page 455 shows 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:
CFX-5 Tutorials

Page 454

Cavitation Around a HydrofoilViewing the Results of the Cavitation Solution

HydrofoilPostContour.cst, located in the examples directory, with Load RES file not selected. Note that there is a region with water vapour (cavitation occurs here) over part of the suction side of the hydrofoil.

Figure 5: Water Vapour Volume Fraction- Cavitation Present Importing and Plotting Pressure Distribution Data

You will restore the state file saved earlier in this tutorial while preventing the first solution (which has no cavitation) from loading. This will cause the plot of pressure distribution to use data from the currently loaded solution (which has cavitation). Data from the first solution will be added to the chart object by importing NoCavCpData.csv (the file that was exported earlier). A file containing experimental data will also be imported and added to the plot. The resulting chart will show all three sets of data (solver data with 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.

CFX-5 Tutorials

Page 455

Cavitation Around a HydrofoilViewing the Results of the Cavitation Solution

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 of Pressure 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 456

CFX-5 Tutorials

Cavitation Around a HydrofoilViewing the Results of the Cavitation Solution

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 while the Chart Viewer is visible (not when the 3D Viewer is visible). This will allow you to print the chart to an image file.

CFX-5 Tutorials

Page 457

Cavitation Around a HydrofoilViewing the Results of the Cavitation Solution

Page 458

CFX-5 Tutorials

CFX-5 Tutorials

Tutorial 20

Fluid Structure Interaction and Mesh Deformation


Sample files used in this tutorial can be copied to your working directory from <CFXROOT>/examples. See Working Directory (p. 2) and Sample Files (p. 3) for more information. Sample files referenced by this tutorial include: Valvefsi (folder) ValveFSI.pre ValveFSI_expressions.ccl ValveFSIUserF.pre

CFX-5 Tutorials

Page 459

Fluid Structure Interaction and Mesh DeformationIntroduction

20.A:
20.A.1:

Introduction
Features explored in this tutorial
Introduction: This tutorial addresses the following features of CFX-5.
Component CFX-Pre Feature User Mode Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Details General Mode Transient General Fluid Single Domain k-Epsilon None

Output Control CEL (CFX Expression Language) User Fortran Boundary Conditions Inlet (Subsonic) Outlet (Subsonic) Wall: No-Slip Wall: Adiabatic Transient Example n/a Animation Point Slice Plane Vector Opening Symmetry Plane Wall: No Slip Wall: Moving

CFX-Solver Manager CFX-Post

Timestep Transient Results File n/a Plots

Other

You learn about: Moving Mesh Fluid-Solid Interaction (without modelling solid deformation) MPEG creation Monitor Points

Page 460

CFX-5 Tutorials

Fluid Structure Interaction and Mesh DeformationIntroduction

20.A.2:

Before beginning this tutorial


Introduction: It is necessary that you have a working directory and that sample files have been copied to that directory. This procedure is detailed in "Introduction to the CFX-5 Tutorials" on page 1. Unless you review the introductory materials and perform required steps including setting up a working directory and copying related sample files, the rest of this tutorial may not work correctly. It is recommended that you perform the tasks in Tutorial 1, Tutorial 2 and Tutorial 3 before working with other tutorials as these three tutorials detail specific procedures that are simplified in subsequent tutorials.

CFX-5 Tutorials

Page 461

Fluid Structure Interaction and Mesh DeformationIntroduction

20.A.3:

Overview of the problem to solve


This tutorial involves a moving mesh and a two-way fluid-structure interaction (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 of the CheckValve Geometry" on page 462.
4.5 mm Valve Housing Region Fluid flows up and around the valve, acting against gravity and the force of the

The ball is modelled as a cavity region with a simulated spring force acting downwards.

Gravity The ball is shown in the zero-displacemen t position. In this position, the spring applies no force to the ball.

4 mm y x

15 mm

Tank Region 10 mm

Figure 1: Overview of the CheckValve Geometry

Check valves are commonly used to allow uni-directional flow. The check-valve in this tutorial is located on the top of a tank, and acts as a pressure-relieving valve by moving to allow fluid to leave. The ball is connected to a spring that acts to push the ball downward when the ball is raised above the y=0 position. The forces on the ball are gravity, force due to the spring, and force due to fluid flow. The ball is represented as a cavity region in the mesh. The deformation of the ball is not modelled.
Page 462 CFX-5 Tutorials

Fluid Structure Interaction and Mesh DeformationIntroduction

The tutorial is divided into two parts. In the first part, the motion of the ball is controlled by CEL expressions which account for the forces acting on the ball, including the force imparted by the flow. In the second part of the tutorial, the motion of the ball is controlled by a Junction Box Routine that updates the ball position at the start of each time step by loading mesh coordinate files from a set of such files. The mesh coordinate files and required FORTRAN routines are provided with this tutorial.

CFX-5 Tutorials

Page 463

Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh

20.B:
20.B.1:

Using CEL Expressions to Govern Mesh Deformation


Setting up the Simulation in CFX-Pre
This section describes the step-by-step definition of the flow physics in CFX-Pre. If you wish, you can use the session file ValveFSI.pre to complete this section for you and continue from Obtaining a Solution using the CFX-5 Solver (p. 472). See one of the first four tutorials for instructions on how to do this.

20.B.2:

Modelling the Ball Dynamics


When defining your own simulations, the mesh motion may already be known. In such cases, it can be specified explicitly using the CEL. In this tutorial, the mesh motion is not known a-priori, and will be calculated using the forces that act on the ball. The dynamics equation that describes the motion of the ball is considered before setting up the simulation. According to Newtons Second Law, the time rate of change in the balls linear momentum is proportional to the net force acting on the ball. In differential form, the equation to be solved for the motion of the ball is:

d mBall* ( velBall ) = FFlow FSpring FGrav dt


where mBall is the mass of the ball (which is constant), velBall is the velocity of the ball in the y coordinate direction, and FFlow, FSpring and FGrav are, respectively, the flow (viscous and drag), spring, and gravitational forces acting on the ball. The left hand side of the equation is discretised to include an expression for the new displacement of the ball (relative to the springs neutral position). The time derivative of the ball velocity is discretised as:

d ( velBall ) velBallNew velBallOld --------------------- = ----------------------------------------------------dt tStep


where velBallNew is further discretised as:

dBallNew dBallOld velBallNew = ---------------------------------------------tStep

Page 464

CFX-5 Tutorials

Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh

The new displacement of the ball also appears in the expression for spring force:

FSpring = kSpring dBallNew


The discrete form of the equation of motion for the ball is re-assembled, and the ball displacement is isolated as:

velBallOld mBall dBallOld FFlow FGrav + mBall ----------------------------------------- + ------------------------------------- 2 tStep tStep dBallNew = -----------------------------------------------------------------------------------------------------------------------------------mBall kSpring + ------------ 2 tStep
No further substitutions are required because all of these quantities are available 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 enter each of the expressions by hand.

To import the CCL expressions

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

CFX-5 Tutorials

Page 465

Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh To enter the expressions individually

1. Click Expressions Editor CFX-Pre Workspace). 2. Click New .

(or click the Expressions tab in the

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:
Name tStep tTotal denBall volBall mBall FFlow FGrav velBallOld dBallOld dBallNumer dBallDenom dBallNew Definition 5.0e-5 [s] 7.5e-3 [s] 7800 [kg m^-3] pi * (2.0 [mm])^2 * 1e-4 [m] denBall * volBall force_y()@Ball mBall * 9.81 [m s^-2] areaAve(Mesh Velocity v)@Ball areaAve(Total Mesh Displacement y)@Ball FFlow - FGrav + mBall*velBallOld/tStep + mBall*dBallOld/tStep^2 kSpring+mBall/tStep^2 dBallNumer/dBallDenom

Note: The areaAve function calls are evaluated using solution data from the end of the previous time step; These calls are not updated during the solution of the mesh displacement equations. Thus, dBallOld and velBallOld represent 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 to develop your own in the future. Instructions on how to create this mesh in 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.

Page 466

CFX-5 Tutorials

Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh

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 Motion Specified. e. Leave the other settings at their default values. 5. Click OK to create the domain.

CFX-5 Tutorials

Page 467

Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh

Mesh motion specifications are applied to two and three dimensional regions of the domain (i.e. boundaries and subdomains, respectively) as follows: The mesh motion specification for the ball will be displacement the y-direction according to the CEL expression dBallNew (which happens to be a single CEL variable). The mesh motion specification for the walls of the valve housing will be Unspecified. This settings allows the mesh nodes to move freely. The motion of the mesh points on this boundary will be strongly influenced by the motion of the ball. Since the ball moves vertically, the surrounding mesh nodes will also move vertically and will therefore remain on the valve housing. This mesh motion specification helps to preserve the quality of the mesh on the upper surface of the ball. The mesh motion specifications for the tank opening and tank volume will be Stationary. The stationary tank volume ensures that the mesh does not fold at the sharp corner that exists where the valve joins the tank. The stationary mesh for the tank opening prevents the mesh nodes from moving (If the tank opening had unspecified mesh motion, the mesh nodes on this boundary would move vertically and separate from the non-vertical parts of the boundary.). .

To create the boundary condition for the 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 468

CFX-5 Tutorials

Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh To create the symmetry boundary condition

Since a 2D representation of the flow field is being modelled (using a 3D mesh with one element thickness in the Z direction) symmetry boundaries will 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 the vertical valve wall boundary condition

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 the tank opening boundary condition

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.

CFX-5 Tutorials

Page 469

Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh To create the valve opening boundary condition

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 and re-enter the domain across the inflow and outflow boundaries. This behaviour is expected due to the oscillatory motion of the ball and due to the potentially large region of flow re-circulation that will occur on the downstream side of the ball.

Verifying that the default boundary is set to a stationary specification

The default boundary applies to all 2D boundary regions which have not otherwise been given a boundary condition. In this case, the default boundary 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 470

CFX-5 Tutorials

Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh

20.B.8:

Setting Initial Values


1. Click Global Initialisation . Since a transient simulation is being modelled, initial values are required for all variables. The Global Initialisation form will appear with 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.

CFX-5 Tutorials

Page 471

Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh

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 (20 timesteps) 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 .
CFX-5 Tutorials

Page 472

Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh

5. When Start CFX-Post appears, turn on Shut down Solver Manager then click OK.

20.B.13:
Creating User Locations and Plots

Viewing the Results in CFX-Post


In the following steps, you will create an XY plane that lies midway between the 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 an animation. 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 a slice plane

Creating a Point

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 shown in 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 a Vector Plot using the slice plane

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.

CFX-5 Tutorials

Page 473

Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh

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 Editing list, then change # of Frames to 148. This will produce an animation keyframe at each timestep, resulting in 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, so leave it at the default value. b. Click the Options tab, then, in Animation, change Width to 704 and 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 and file name for the MPEG file. 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 from which CFX-Post was launched. h. Click Save in Save MPEG. The MPEG file name (including path) will be set, but the MPEG will not be created yet. i. Frame 1 is not loaded (The loaded frame is shown in the top right corner of the Animation Editor, beside F:). Click To Beginning to load it then wait a few seconds for the frame to load. . 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 must be created for each frame. To view the MPEG file, you need to use a viewer that supports the MPEG format.
CFX-5 Tutorials

j.

Page 474

Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh

8. When you have finished, exit from CFX-Post.

CFX-5 Tutorials

Page 475

Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern

20.C:

Using a Junction Box Routine to Govern Mesh Deformation


In this part of the tutorial, a Junction Box Routine will be used to read in a sequence of meshes, causing a sinusoidal motion of the ball. The meshes are provided for convenience; they were generated based on the following expression for displacement of the ball in the y direction as a function of time: 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 in CFX-Pre. If you wish, you can use the session file ValveFSIUserF.pre to complete this section for you and continue from Obtaining a Solution using the CFX-5 Solver (p. 484). See one of the first four tutorials for instructions on how to do this. Important: If using a Linux platform, the Portland Group Fortran compiler is required for this tutorial. See Defining the Junction Box Routine (p. 479).

Preparing the Working Directory

To prepare the working directory, copy the files and sub-directories contained in <CFXROOT> /examples/valvefsi into your working directory. The working directory should now contain the initial mesh file (ValveFSI.out), plus two sub-directories. The meshes sub-directory contains 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 476

CFX-5 Tutorials

Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern

juncbox sub-directory contains the Fortran source files that are used in the Junction Box Routine that will read the sequence of mesh files. The subroutines contained in these files are summarized as: update_mesh_user: Highest level Junction Box Routine that is responsible for replacing the mesh coordinates inside CFX-5 with the updated coordinates read in or defined by the low level routine, set_mesh_user. set_mesh_user: Low level routine that defines the updated mesh coordinates. In this tutorial, this is done by reading mesh files. In other applications, however, this could be done by using a set of Fortran commands that directly modify the existing mesh coordinates. update_crdvx_user and upd_crdvx_user: Routines to call for the generation of a node map between the initial mesh and the first user-defined mesh, and to repeatedly use this map to replace the mesh inside CFX-5 with the remaining sequence of user-defined meshes.

Two important attributes of the sequence of meshes read by the SET_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 and for monitoring values during the solution process.

CFX-5 Tutorials

Page 477

Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern To create an expression for force on the ball due to fluid 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 more information, please refer to "CFX Expression Language" on page 33 in the document "CFX-5 Reference Guide". 1. Click Expressions Editor CFX-Pre Workspace). 2. Click New . (or click the Expressions tab in the

3. Set Name to FFlow then click OK. 4. For the Definition, enter the following expression: force_y()@Ball 5. Click Apply.
To create an expression for the total simulation time

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 an expression for the 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 478

CFX-5 Tutorials

Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern

20.C.5:

Defining the Junction Box Routine


You must compile and link the provided FORTRAN routines before the CFX-Solver is started. The cfx5mkext command is used to create the required objects and libraries as described below. Important: The user FORTRAN routine performs file input/output operations. On Linux platforms, the Portland Group compiler must be used (not g77). Information on obtaining this compiler is found in "User Subroutines" on page 32 in the document "CFX-5 Installation". If you are not sure which FORTRAN compiler is used, check the output from the cfx5mkext command (which is run in the next step) and ensure that a path to the Portland Group compiler is used. Important: To use the cfx5mkext command make sure that the FORTRAN compiler is in your path. See "Default FORTRAN Compilers" on page 433 in the document "CFX-5 Solver Modelling" for a list of commands that should execute 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/*.F at an OS command prompt. The ! indicates that the following line is to be interpreted as power syntax and not CCL. Everything after the ! symbol is processed 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, for some 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 your working directory (For example, on IRIX a subdirectory named irix will be created in your working directory.). This subdirectory contains the shared object library named meshread. Note: You can introduce the -double option to compile the subroutines for use with double precision CFX-Solver executables.

CFX-5 Tutorials

Page 479

Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern

Note: If you are running problems in parallel over multiple platforms then you will need to create these subdirectories using the cfx5mkext command for each different platform. The following steps create a CCL object that specifies the path to the meshes directory and the number of meshes. The FORTRAN subroutine later looks up the values contained in this object so that it can determine where 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 = 20 END

If you are working on windows, substitute the forward slash with a backslash. 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 Mesh Deformation feature.

Page 480

CFX-5 Tutorials

Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern

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:
To create the domain

Creating the Domain


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:
To create the boundary condition for the ball

Creating the Boundary Conditions


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

CFX-5 Tutorials

Page 481

Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern

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 the symmetry boundary condition

Since a 2D representation of the flow field is being modelled (using a 3D mesh with one element thickness in the Z direction) symmetry boundaries will 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 the tank opening boundary condition

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 the valve opening boundary condition

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 482

CFX-5 Tutorials

Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern

5. Click OK to create the boundary condition. Note: Opening boundary types are used to allow the flow to leave and re-enter the domain across the inflow and outflow boundaries. This behaviour is expected due to the oscillatory motion of the ball and due to the potentially large region of flow re-circulation that will occur on the downstream side of the ball.
To create the remaining wall boundary conditions

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 are required for all variables. The Global Initialisation form will appear with 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.

CFX-5 Tutorials

Page 483

Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern

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 time step. 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 the monitored value of FFlow (force imparted on the ball by the flow) as the solution develops. Using the mouse, click on various points on the curve.

Page 484

CFX-5 Tutorials

Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern

Note: By default, the CFX-Solver Manager will not plot a point for each inner loop iteration. To include these points in the plot, select Workspace > Workspace Properties. On the Global Plot Settings tab, turn on Plot Coefficient Loop Data and click OK.

CFX-5 Tutorials

Page 485

Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern

Page 486

CFX-5 Tutorials

CFX-5 Tutorials Index


A additional variables 101 to model pH creating 300 airlift reactor, example 361 animation plot animation 405 auto annotation 116, 404 automotive catalytic converter tutorial 227 axi-symmetric modelling example 287 chemical reaction example 287 CHT example 309 CHT example 309 circular vent example 97 conjugate heat transfer example 309 continuing the transient run 121 contours adding to surface plot 41 contours, adding 41 create boundary conditions 128, 314 fluid domain 234 isosurface 115 pressure and volume fraction expressions 165 subdomain 235 surface plot of y+ 146 vectors 143 creating and modifying streamlines 92

B baffles 342 blade, impeller 342 boundary conditions for free surface flows 165 modify 109 buoyancy example 149 butterfly valve example 201

D default legend 34 domain creating 295 modifying 300

C catalytic converter automotive 227 example 227 cavity example 149 changing timestep 115
CFX-5 Tutorials

Page i

E energy model thermal 155 total 191 examples 1 airlift reactor 361 axi-symmetric 287 buoyancy 149 butterfly valve 201 catalytic converter 227 cavity 149 chemical reaction 287 CHT 309 circular vent 97 conjugate heat transfer 309 free surface 161 gas-liquid flow in an airlift reactor 361 heat exchanger 309 mixing tube 287 multicomponent flow 287 multiphase flow 361 solid region 309 static mixer 7 steady state simulation 287, 309 supersonic flow 187 transient simulation 149 two-dimensional 149 valve 201 vent 97 wing 187 expression language shear rate dependent viscosity 250 velocity profile 210 expression method for inlet velocity profile 210 expressions to model the reaction creating 298
Page ii

F face culling 319 file generating output 116 flow example gas-liquid 361 multicomponent 287 multiphase 361 supersonic 187 fluid subdomain creating 301 free surface example 161 setting boundary conditions 165

G gas-liquid flow example 361 generating output files 116 greyscale 424

H heat exchanger example 309

I impeller blade 342 inlet (supersonic) 191

M method for the inlet velocity profile, expression 210 mixer static mixer example 7
CFX-5 Tutorials

with refined mesh 49 mixing tank walls 342 mixing tube example 287 model creating 52 thermal energy 155 total energy 191 modelling example axi-symmetric 287 two-dimensional 149 modify streamlines 92 monitoring the run 280 multicomponent flow example 287 multiphase flow example 361 mixer example 339

Greyscale Graphic 424 problem definition 263

R reaction defining 296 run in parallel 135 monitoring 280

S Saving 42 serial solution 280 set boundary conditions 393, 416, 430 buoyancy reference density 167 initial values 194 to run in parallel 135 transient rotor-stator calculation 276 simulation example steady state 287, 309 transient 149 solid region example 309 static mixer example 7 refined mesh 49 steady state simulation example 287, 309 streamlines creating and modifying 92 superficial velocity 379 supersonic flow example 187 surface plot 147 symmetry planes 253
Page iii

O obtaining a solution in parallel 134 in serial 134 opening 103 existing simulation 108 outlet (supersonic) 192 outline plot 29 output files generating 116

P parallel running 135 solution 280 pH, calculating 297 power syntax 147 Print
CFX-5 Tutorials

syntax, power 147

W wall boundary conditions 397, 419 free slip 129 wing example 187 writing definition file 268

T text auto annotation 116, 404 thermal energy model 155 total energy model 191 transient simulations example 97, 149 tutorial examples 1 <italic>see also examples two-dimensional modelling example 149

U using cfx5mkext command 212, 390, 479 symmetry planes 141

V valve example 201 variables user vector 199 velocity superficial 379 vent example 97 viewing inflated elements 67 mesh partitions (parallel only) 148 results 177

Page iv

CFX-5 Tutorials

Вам также может понравиться