Академический Документы
Профессиональный Документы
Культура Документы
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
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
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
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
Table of Contents
Page viii
CFX-5 Tutorials
Table of Contents
CFX-5 Tutorials
Page ix
Table of Contents
Page x
CFX-5 Tutorials
Table of Contents
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
Page xii
CFX-5 Tutorials
Table of Contents
CFX-5 Tutorials
Page xiii
Table of Contents
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
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
CFX-5 Tutorials
Page 1
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
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
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
Page 4
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
CFX-5 Tutorials
Page 5
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
CFX-5 Tutorials
Page 7
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
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
1.A.2:
1.A.3:
CFX-5 Tutorials
Page 9
1.B:
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
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:
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
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
Procedure
Page 12
CFX-5 Tutorials
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.
3. From your working directory, select StaticMixerMesh.gtm. 4. Click Open. 5. Click OK. The mesh is loaded.
CFX-5 Tutorials
Page 13
1.B.4:
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:
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
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:
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
1.B.7:
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
4. Click OK. The boundary is created and, when selected, properties related to the boundary are displayed.
1.B.9:
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
1.B.10:
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.B.11:
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.B.12:
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
1.B.13:
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:
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:
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:
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:
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
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 .
Page 24
CFX-5 Tutorials
1.C:
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
1.C.1:
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
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:
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
1.D:
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
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:
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
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
1.D.2:
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
1.D.3:
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
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:
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
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
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
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
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
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:
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
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
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
Procedure
1.D.10:
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
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
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
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
1.E:
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
1.F:
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:
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
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
1.F.3:
Synopsis
Procedure
Page 44
CFX-5 Tutorials
1.F.4:
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
CFX-5 Tutorials
Page 45
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
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
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
CFX-5 Tutorials
Page 49
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
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
2.A.2:
2.A.3:
CFX-5 Tutorials
Page 51
Flow in a Static Mixer (Refined Mesh)Defining the Simulation using General Mode in CFX-Pre
2.B:
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:
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
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
. .
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.
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:
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
Procedure
2.B.6:
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:
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:
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 .
Page 60
CFX-5 Tutorials
2.C:
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:
CFX-5 Tutorials
Page 61
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
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:
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
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
2.C.4:
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
2.D:
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
2.D.1:
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
2.D.2:
Procedure
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:
Procedure
Page 66
CFX-5 Tutorials
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 .
2.D.4:
Synopsis
In this module, the first element is a normal tetrahedral element. The second is an inflated prismatic element.
CFX-5 Tutorials
Page 67
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
Page 68
CFX-5 Tutorials
2.D.5:
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:
Procedure
CFX-5 Tutorials
Page 69
2.D.7:
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
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:
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
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
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
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
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
CFX-5 Tutorials
Page 73
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
3.A.2:
3.A.3:
CFX-5 Tutorials
Page 75
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.3 m
Page 76
CFX-5 Tutorials
Flow in a Process Injection Mixing PipeDefining a Simulation using General Mode in CFX-Pre
3.B:
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:
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
. .
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:
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.
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.
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:
Procedure
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:
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
7. Click OK.
3.B.8:
Procedure
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:
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
3.B.10:
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]
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
3.B.12:
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:
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
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:
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
3.C:
3.C.1:
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:
CFX-5 Tutorials
Page 91
3.D:
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:
Procedure
1. In the Object Selector double click Wireframe. 2. Set the Edge Angle to 15 [degree]. 3. Press Apply.
3.D.2:
Procedure
1. Select Create > Object > Streamline. 2. Under Name type MainStream. 3. Click OK.
Page 92
CFX-5 Tutorials
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
3.D.3:
Procedure
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:
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
3.D.5:
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:
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
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
CFX-5 Tutorials
Page 97
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
4.A.2:
4.A.3:
CFX-5 Tutorials
Page 99
4.B:
4.B.1:
4.B.2:
4.B.3:
Page 100
CFX-5 Tutorials
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:
4.B.5:
To Create a New 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
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
Page 102
CFX-5 Tutorials
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
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
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
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
4.B.7:
4.B.8:
4.B.9:
CFX-5 Tutorials
Page 105
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
4.C:
CFX-5 Tutorials
Page 107
4.D:
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:
4.D.2:
Page 108
CFX-5 Tutorials
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:
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
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
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
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:
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.
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
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:
CFX-5 Tutorials
Page 113
4.E:
7. When Start CFX-Post appears, turn on Shut down Solver Manager then click OK.
Page 114
CFX-5 Tutorials
4.F:
4.F.1:
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
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:
Page 116
CFX-5 Tutorials
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
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
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
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.
Page 120
CFX-5 Tutorials
4.G:
CFX-5 Tutorials
Page 121
Page 122
CFX-5 Tutorials
CFX-5 Tutorials
Tutorial 5
CFX-5 Tutorials
Page 123
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
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
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:
5.A.3:
1.44 m
5.2 m
CFX-5 Tutorials
Page 125
5.B:
5.B.1:
5.B.2:
5.B.3:
Page 126
CFX-5 Tutorials
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
5.B.4:
5.B.5:
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
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
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.
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
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
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.
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
5.B.6:
5.B.7:
5.B.8:
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
4. Click OK. 5. Click Yes when asked if you want to save the CFX file.
Page 132
CFX-5 Tutorials
5.C:
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
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:
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:
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.
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
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
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
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
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
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.
14. When Start CFX-Post appears, turn on Shut down Solver Manager then click OK.
Page 140
CFX-5 Tutorials
5.D:
5.D.1:
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.
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
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
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.
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
8. Make the Sampling Plane invisible by turning off Visibility and then clicking Apply.
Creating a Vector Plot Using the Sampling Plane
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
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:
CFX-5 Tutorials
7. In New Streamline, accept the default Name by clicking OK. 8. On the Geometry panel: a. Set Type to Surface Streamline. b. Under Definition, set Surfaces to Body, Start From to Locations, Locations to Starter. 9. Click Apply. The surface streamlines appear on the surface of the blunt body. They start near the upstream end because the starting points were formed by projecting nodes from the plane to the blunt body.
5.D.4:
Page 146
CFX-5 Tutorials
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:
CFX-5 Tutorials
Page 147
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:
Page 148
CFX-5 Tutorials
CFX-5 Tutorials
Tutorial 6
CFX-5 Tutorials
Page 149
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
You learn about: using CFX-4 Mesh Import setting up a time dependent (transient) simulation modelling buoyant flow
6.A.2:
Page 150
CFX-5 Tutorials
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:
air
75 C
The mesh for the cavity was created in CFX-4 and has been provided.
CFX-5 Tutorials
Page 151
6.B:
6.B.1:
6.B.2:
Page 152
CFX-5 Tutorials
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
6.B.4:
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
Page 154
CFX-5 Tutorials
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
6.B.5:
To Create Hot and Cold Wall 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
6.B.6:
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:
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
6.B.8:
6.B.9:
Page 158
CFX-5 Tutorials
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
6.D:
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
CFX-5 Tutorials
Page 161
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
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 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:
7.A.3:
CFX-5 Tutorials
Page 163
7.B:
7.B.1:
7.B.2:
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
7.B.3:
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
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)
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:
Page 166
CFX-5 Tutorials
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
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
Page 168
CFX-5 Tutorials
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
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.
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
CFX-5 Tutorials
Page 169
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:
Page 170
CFX-5 Tutorials
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
7.B.7:
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
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:
CFX-5 Tutorials
Page 173
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:
Page 174
CFX-5 Tutorials
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).
CFX-5 Tutorials
Page 175
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
7.D:
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.
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
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
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
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
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.
CFX-5 Tutorials
Page 181
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
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
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.
1. Click the Charts tab in the CFX-Post Workspace. 2. Right-click in the Chart Selector and select New.
CFX-5 Tutorials
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
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
CFX-5 Tutorials
Page 187
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
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
8.A.2:
8.A.3:
outlet 30 [m]
wing surface
70 [m]
CFX-5 Tutorials
Page 189
8.B:
8.B.1:
8.B.2:
8.B.3:
Creating a new domain
Page 190
CFX-5 Tutorials
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
CFX-5 Tutorials
Page 191
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.
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
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:
CFX-5 Tutorials
Page 193
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:
8.B.7:
Page 194
CFX-5 Tutorials
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:
CFX-5 Tutorials
Page 195
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
8.D:
CFX-5 Tutorials
Page 197
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.
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.
Page 198
CFX-5 Tutorials
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.
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.
CFX-5 Tutorials
Page 199
Page 200
CFX-5 Tutorials
CFX-5 Tutorials
Tutorial 9
CFX-5 Tutorials
Page 201
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
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:
9.A.3:
CFX-5 Tutorials
Page 203
of why these losses occur. Improvements in valve/joint design can be simulated using CFD, and implemented to reduce pumping requirement and cost.
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
9.B:
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:
9.B.2:
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
9.B.3:
Page 206
CFX-5 Tutorials
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
CFX-5 Tutorials
Page 207
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
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:
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
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
Page 210
CFX-5 Tutorials
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
CFX-5 Tutorials
Page 211
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.
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].
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. .
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
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
Page 214
CFX-5 Tutorials
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).
CFX-5 Tutorials
Page 215
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
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.
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.
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
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:
Page 218
CFX-5 Tutorials
9.B.10:
9.B.11:
CFX-5 Tutorials
Page 219
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
9.D:
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.
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
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
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.
and entering the tracks.mpg as the file name. to play the animation and create the MPEG.
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.
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
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
CFX-5 Tutorials
Page 227
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
Other
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
10.A.2:
10.A.3:
flange
20 cm
CFX-5 Tutorials
Page 229
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
10.B:
10.B.1:
10.B.2:
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
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.
Page 232
CFX-5 Tutorials
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:
CFX-5 Tutorials
Page 233
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:
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
10.B.5:
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
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
10.B.6:
Inlet 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:
Page 236
CFX-5 Tutorials
Flow in a Catalytic ConverterDefining the Simulation in CFX-Pre Inlet Pipe / Housing Interface
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:
CFX-5 Tutorials
Page 237
3. Turn on Turbulence Eddy Dissipation and leave Option set to Automatic 4. Click OK to set the initialisation details.
10.B.9:
10.B.10:
Page 238
CFX-5 Tutorials
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
10.D:
Figure 2:
Page 240
CFX-5 Tutorials
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.
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.
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
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
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
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
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
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
Page 246
CFX-5 Tutorials
CFX-5 Tutorials
Tutorial 11
CFX-5 Tutorials
Page 247
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
11.A.2:
11.A.3:
CFX-5 Tutorials
Page 249
11.B:
11.B.1:
11.B.2:
11.B.3:
Creating an Expression for Shear Rate Dependent Viscosity
= 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
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
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
Global initialisation will be set later, after creating the boundary conditions.
11.B.4:
Wall Boundary Condition
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:
CFX-5 Tutorials
Page 253
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:
11.B.7:
Page 254
CFX-5 Tutorials
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
11.D:
Page 256
CFX-5 Tutorials
CFX-5 Tutorials
Tutorial 12
CFX-5 Tutorials
Page 257
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
Domain Interfaces
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:
CFX-5 Tutorials
Page 259
12.A.3:
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
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
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
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
12.B:
12.B.1:
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
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:
Page 264
CFX-5 Tutorials
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:
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.
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.
1. Click Inlet. Location and Boundary Type are both correct, so there is no need to change these settings.
CFX-5 Tutorials
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].
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
12.B.7:
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
12.C:
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
12.D:
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
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
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
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
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
12.E:
12.E.1:
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
12.E.2:
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:
CFX-5 Tutorials
Page 277
12.E.4:
12.E.5:
12.E.6:
Page 278
CFX-5 Tutorials
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:
CFX-5 Tutorials
Page 279
12.F:
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:
Page 280
CFX-5 Tutorials
12.G:
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
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
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.).
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
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.
. .
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
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
Page 286
CFX-5 Tutorials
CFX-5 Tutorials
Tutorial 13
CFX-5 Tutorials
Page 287
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
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
13.A.2:
13.A.3:
13.A.4:
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
13.B:
13.B.1:
13.B.2:
13.B.3:
Page 290
CFX-5 Tutorials
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
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
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
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
13.B.4:
To create a new domain
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.
CFX-5 Tutorials
Page 295
13.B.5:
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
Page 296
CFX-5 Tutorials
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 =
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
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).
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:
13.B.7:
Page 300
CFX-5 Tutorials
13.B.8:
CFX-5 Tutorials
Page 301
13.B.9:
To create the water 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
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
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.
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.
See "Figure 1: Boundary Condition Schematic" on page 304 for an understanding of the geometry and boundary conditions.
Page 304
CFX-5 Tutorials
13.B.10:
13.B.11:
CFX-5 Tutorials
Page 305
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.
13.B.12:
Page 306
CFX-5 Tutorials
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
13.D:
Page 308
CFX-5 Tutorials
CFX-5 Tutorials
Tutorial 14
CFX-5 Tutorials
Page 309
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
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
14.A.2:
14.A.3:
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
14.B:
14.B.1:
14.B.2:
14.B.3:
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
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:
14.B.6:
To create the inlet boundary condition
Page 314
CFX-5 Tutorials
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
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:
14.B.8:
Page 316
CFX-5 Tutorials
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
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
14.D:
CFX-5 Tutorials
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:
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
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".
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
14.E:
14.E.1:
Page 322
CFX-5 Tutorials
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:
CFX-5 Tutorials
Page 323
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
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
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:
Page 326
CFX-5 Tutorials
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
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
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
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
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
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
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
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
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:
CFX-5 Tutorials
Page 335
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
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
Page 338
CFX-5 Tutorials
CFX-5 Tutorials
Tutorial 15
CFX-5 Tutorials
Page 339
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
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
Other
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
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:
CFX-5 Tutorials
Page 341
15.A.3:
Air Inlet
Impeller
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
15.B:
15.B.1:
15.B.2:
CFX-5 Tutorials
Page 343
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.
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.
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
15.B.3:
Rotating Domain for the Impeller
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.
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
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:
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
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.
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
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.
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
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
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
15.B.5:
Periodic Interface for the Impeller 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.
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.
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
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:
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
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:
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
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:
15.B.9:
Page 356
CFX-5 Tutorials
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
4. When Start CFX-Post appears, turn on Shut down Solver Manager then click OK.
CFX-5 Tutorials
Page 357
15.D:
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
"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
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
CFX-5 Tutorials
Page 361
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
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
16.A.2:
16.A.3:
CFX-5 Tutorials
Page 363
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
downcomer
y = 73.5 cm
draft tube
outer wall
draft tube
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
16.B:
16.B.1:
16.B.2:
CFX-5 Tutorials
Page 365
16.B.3:
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.
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
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.
CFX-5 Tutorials
Page 367
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:
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.
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
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.
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
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:
CFX-5 Tutorials
Page 371
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
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:
16.B.7:
CFX-5 Tutorials
Page 373
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
16.D:
16.D.1:
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
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:
Page 376
CFX-5 Tutorials
16.D.3:
Figure 3:
CFX-5 Tutorials
Page 377
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
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
Page 380
CFX-5 Tutorials
CFX-5 Tutorials
Tutorial 17
CFX-5 Tutorials
Page 381
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:
17.A.3:
CFX-5 Tutorials
Page 383
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
17.B:
17.B.1:
17.B.2:
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).
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
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
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
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
17.B.4:
x=0.05
Wall x
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:
17.B.5:
CFX-5 Tutorials
Page 389
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
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.
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.
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)
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.
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:
Page 392
CFX-5 Tutorials
17.B.7:
f.
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:
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
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
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
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.
Window2
Page 396
CFX-5 Tutorials
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:
CFX-5 Tutorials
Page 397
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:
Page 398
CFX-5 Tutorials
17.B.11:
CFX-5 Tutorials
Page 399
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. .
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:
Page 400
CFX-5 Tutorials
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
17.D:
17.D.1:
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
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.
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.
CFX-5 Tutorials
3. Set Text String to Time Elapsed: (without the quotes). 4. Turn on Embed Auto Annotation. The full Text String should now be Time elapsed: <aa>. The <aa>represents the location where the auto annotation will be substituted. 5. Set Type to Time Value. This will show the amount of simulated time that has passed in the simulation. 6. Click More. This adds a second line of text to the text object. 7. Set Text String to Sensor Temperature: (without the quotes). 8. Turn on Embed Auto Annotation. 9. Set Type to Expression. 10. Set Expression to TSensor. 11. Click the Appearance tab, change Height to 0.03, then click Apply. A label appears at the top of the figure. The large font is used so that the text will be clearly visible in the animation which will be produced in the next section.
Page 404
CFX-5 Tutorials
17.D.2:
Creating an Animation
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
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
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
Page 408
CFX-5 Tutorials
CFX-5 Tutorials
Tutorial 18
CFX-5 Tutorials
Page 409
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
Other
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
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:
18.A.3:
CFX-5 Tutorials
Page 411
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
Page 412
CFX-5 Tutorials
Combustion and Radiation in a Can CombustorUsing the Eddy Dissipation and P1 Models
18.B:
18.B.1:
18.B.2:
18.B.3:
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:
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:
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
18.B.6:
Fuel Inlet Boundary Condition
Page 416
Combustion and Radiation in a Can CombustorUsing the Eddy Dissipation and P1 Models
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
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.
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:
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:
18.B.9:
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
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
18.D:
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
3. Click Apply. The resulting plot of NO.Mass Fraction is shown in "Figure 3: NO Mass Fraction" on page 424.
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
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.
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
Vector Field (finer mesh solution)" on page 427 for an illustration showing the larger recirculation zone (mesh used had over 50000 nodes).
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
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:
18.E.1:
18.E.2:
18.E.3:
CFX-5 Tutorials
Page 429
Combustion and Radiation in a Can CombustorUsing the Laminar Flamelet and Discrete
18.E.4:
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:
18.E.6:
Modifying the Fuel Inlet Boundary Condition
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.
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
18.E.7:
18.E.8:
CFX-5 Tutorials
Page 431
Combustion and Radiation in a Can CombustorUsing the Laminar Flamelet and Discrete
18.E.9:
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
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)).
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)).
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
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
CFX-5 Tutorials
Page 437
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
Other
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
19.A.2:
19.A.3:
cavitation zone
16.91 m s^-1
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
19.B:
19.B.1:
19.B.2:
Page 440
CFX-5 Tutorials
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:
19.B.4:
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
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.
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.
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
19.B.5:
19.B.6:
CFX-5 Tutorials
Page 443
19.B.7:
Page 444
CFX-5 Tutorials
Cavitation Around a HydrofoilObtaining the Starting-Point Solution Using the CFX-5 Solver
19.C:
CFX-5 Tutorials
Page 445
19.D:
If the solver manager is still open
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.
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.
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
(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
19.E:
19.E.1:
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
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:
CFX-5 Tutorials
Page 453
19.G:
If the solver manager is still open
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
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
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
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
Page 458
CFX-5 Tutorials
CFX-5 Tutorials
Tutorial 20
CFX-5 Tutorials
Page 459
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
Other
You learn about: Moving Mesh Fluid-Solid Interaction (without modelling solid deformation) MPEG creation Monitor Points
Page 460
CFX-5 Tutorials
20.A.2:
CFX-5 Tutorials
Page 461
20.A.3:
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
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
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:
20.B.2:
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:
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:
20.B.4:
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
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:
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:
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.). .
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.
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.
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
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.
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:
Page 470
CFX-5 Tutorials
Fluid Structure Interaction and Mesh DeformationUsing CEL Expressions to Govern Mesh
20.B.8:
20.B.9:
20.B.10:
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:
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:
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
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:
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
CFX-5 Tutorials
Page 475
Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern
20.C:
20.C.1:
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:
20.C.3:
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.
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:
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:
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:
Page 480
CFX-5 Tutorials
Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern
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
20.C.8:
To create the boundary condition for the 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.
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.
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:
20.C.10:
CFX-5 Tutorials
Page 483
Fluid Structure Interaction and Mesh DeformationUsing a Junction Box Routine to Govern
20.C.11:
20.C.12:
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:
20.C.14:
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
B baffles 342 blade, impeller 342 boundary conditions for free surface flows 165 modify 109 buoyancy example 149 butterfly valve example 201
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
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
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
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
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