Você está na página 1de 576

USER GUIDE

STAR-CD VERSION 3.26

CONFIDENTIAL FOR AUTHORISED USERS ONLY

2005 CD-adapco

TABLE OF CONTENTS
OVERVIEW 1 CFD MODELLING PRINCIPLES Introduction ............................................................................................................... 1-1 The Basic Modelling Process .................................................................................... 1-1 Spatial description and volume discretisation ........................................................... 1-2 Solution domain definition .............................................................................. 1-3 Mesh definition ................................................................................................ 1-4 Mesh distortion ................................................................................................ 1-6 Mesh distribution and density ......................................................................... 1-7 Mesh distribution near walls ........................................................................... 1-9 Moving mesh features ................................................................................... 1-10 Flow characterisation and material property definition .......................................... 1-10 Nature of the flow .......................................................................................... 1-10 Thermophysical properties ............................................................................ 1-11 Force fields and energy sources .................................................................... 1-11 Initial conditions ............................................................................................ 1-11 Boundary description .............................................................................................. 1-12 Boundary location ......................................................................................... 1-13 Boundary conditions ...................................................................................... 1-13 Numerical solution control ..................................................................................... 1-15 Selection of solution procedure ..................................................................... 1-15 Transient calculations with PISO .................................................................. 1-15 Steady-state calculations with PISO (iterative mode) ................................... 1-17 Steady-state calculations with SIMPLE ........................................................ 1-17 Steady-state calculations with SIMPISO ....................................................... 1-18 Effect of round-off errors .............................................................................. 1-19 Choice of the linear equation solver .............................................................. 1-19 Monitoring the calculations .................................................................................... 1-19 Model evaluation .................................................................................................... 1-20 BASIC STAR-CD FEATURES Introduction ............................................................................................................... 2-1 Running a CFD Analysis .......................................................................................... 2-2 Using the script-based procedure .................................................................... 2-3 Using STAR-Launch ....................................................................................... 2-8 pro-STAR Initialisation .......................................................................................... 2-12 Input/output window ..................................................................................... 2-13 Main window ................................................................................................. 2-15
i

Version 3.26

The menu bar .................................................................................................2-17 General Housekeeping and Session Control ...........................................................2-18 Basic set-up ....................................................................................................2-18 Screen display control ....................................................................................2-19 Error messages ...............................................................................................2-20 Error recovery ................................................................................................2-21 Session termination ........................................................................................2-21 Set Manipulation .....................................................................................................2-21 Table Manipulation .................................................................................................2-25 Basic functionality .........................................................................................2-25 The table editor ..............................................................................................2-27 Useful points ..................................................................................................2-32 Plotting Functions ....................................................................................................2-32 Basic set-up ....................................................................................................2-32 Advanced screen control ................................................................................2-33 Screen capture ................................................................................................2-34 The Users Tool ........................................................................................................2-36 Getting On-line Help ...............................................................................................2-36 The STAR GUIde Environment ..............................................................................2-39 Panel navigation system .................................................................................2-41 STAR GUIde usage .......................................................................................2-42 General Guidelines ..................................................................................................2-42 MESH CREATION Introduction ...............................................................................................................3-1 Basic concepts ..................................................................................................3-1 Meshing techniques .........................................................................................3-3 Other mesh facilities ........................................................................................3-5 Extrusion ...................................................................................................................3-5 Cell-layer Approach ..................................................................................................3-7 Coordinate Systems ...................................................................................................3-8 Local coordinate systems ...............................................................................3-10 Other coordinate system functions .................................................................3-14 Vertices ....................................................................................................................3-14 Command-driven facilities .............................................................................3-14 Vertex set selection facilities .........................................................................3-19 GUI-driven facilities ......................................................................................3-20 Additional considerations ..............................................................................3-26 Splines .....................................................................................................................3-27 Spline tables ...................................................................................................3-27

ii

Version 3.26

Command-driven facilities ............................................................................ 3-28 Spline set selection facilities ......................................................................... 3-30 GUI-driven facilities ...................................................................................... 3-30 Vertex manipulation using splines ................................................................ 3-35 Cells ........................................................................................................................ 3-37 Cell types ....................................................................................................... 3-37 Cell properties ............................................................................................... 3-38 Cell shapes ..................................................................................................... 3-40 Command-driven facilities ............................................................................ 3-44 Cell set selection facilities ............................................................................. 3-46 GUI-driven facilities ...................................................................................... 3-47 Cell numbering .............................................................................................. 3-53 Multi-block Approach ............................................................................................. 3-53 Mesh block generation .................................................................................. 3-54 Multi-block generation .................................................................................. 3-56 Command-driven facilities ............................................................................ 3-57 Block set selection facilities .......................................................................... 3-57 GUI-driven facilities ...................................................................................... 3-57 Multi-block Meshing Using STAR-GUIde Panels ................................................. 3-60 Using the panel .............................................................................................. 3-61 Other panel functions .................................................................................... 3-63 OTHER MESH OPERATIONS Importing Data from other Systems .......................................................................... 4-1 Data exporting ........................................................................................................... 4-2 Mesh Structure .......................................................................................................... 4-2 Regular connectivity ........................................................................................ 4-4 Integral and arbitrary connectivity .................................................................. 4-5 Embedded mesh refinement ............................................................................ 4-7 Cell Couples .............................................................................................................. 4-8 The Couple Tool .............................................................................................. 4-8 Couple properties ............................................................................................. 4-9 Couple creation .............................................................................................. 4-11 Couple set selection facilities ........................................................................ 4-14 Couple manipulation ..................................................................................... 4-15 Other couple functions .................................................................................. 4-22 Useful Points ................................................................................................. 4-22 Mesh Refinement .................................................................................................... 4-23 Mesh and Geometry Checking ................................................................................ 4-26 Macroscopic checking ................................................................................... 4-26 Microscopic checking .................................................................................... 4-27
iii

Version 3.26

Mesh Quality Improvement .....................................................................................4-29 MESH VISUALISATION Data Range ................................................................................................................5-2 Plot Characteristics ....................................................................................................5-3 Basic plot type definitions ...............................................................................5-3 Plot orientation .................................................................................................5-5 Additional display options ...............................................................................5-6 Colour settings .................................................................................................5-9 Special lighting effects ...................................................................................5-10 Other special effects .......................................................................................5-12 Mouse operations ...........................................................................................5-15 Keyboard operations ......................................................................................5-16 Plotted Entity ...........................................................................................................5-16 MATERIAL PROPERTY AND FLOW CHARACTERISATION Introduction ...............................................................................................................6-1 Cell Table ..................................................................................................................6-1 Cell indexing ....................................................................................................6-3 Multi-Stream and Conjugate Property Setting ..........................................................6-5 Setting up models .............................................................................................6-6 Compressible Flow ....................................................................................................6-9 Setting up compressible flow models ..............................................................6-9 Useful points on compressible flow ...............................................................6-10 Non-Newtonian Flow ..............................................................................................6-11 Setting up non-Newtonian models .................................................................6-11 Useful points on non-Newtonian flow ...........................................................6-11 Turbulence Modelling .............................................................................................6-12 Wall functions ................................................................................................6-13 Two-layer models ..........................................................................................6-13 Low Re models ..............................................................................................6-14 Hybrid wall boundary condition ....................................................................6-15 Reynolds Stress models .................................................................................6-15 LES models ....................................................................................................6-15 Changing the turbulence model in use ...........................................................6-15 Conjugate Heat Transfer .........................................................................................6-16 Setting up conjugate heat transfer models .....................................................6-17 Conjugate heat transfer in baffles ..................................................................6-18 Useful points on conjugate heat transfer ........................................................6-19 Buoyancy-driven Flows and Natural Convection ...................................................6-20 Setting up buoyancy-driven models ...............................................................6-20
Version 3.26

iv

Useful points on buoyancy-driven flow ........................................................ 6-20 Fluid Injection ......................................................................................................... 6-21 Setting up fluid injection models ................................................................... 6-22 BOUNDARY AND INITIAL CONDITIONS Introduction ............................................................................................................... 7-1 Boundary Location .................................................................................................... 7-1 Command-driven facilities .............................................................................. 7-2 Boundary set selection facilities ...................................................................... 7-4 Boundary listing .............................................................................................. 7-5 Boundary Region Definition ..................................................................................... 7-6 Inlet Boundaries ...................................................................................................... 7-10 Introduction ................................................................................................... 7-10 Useful points .................................................................................................. 7-11 Outlet Boundaries ................................................................................................... 7-12 Introduction ................................................................................................... 7-12 Useful points .................................................................................................. 7-13 Pressure Boundaries ................................................................................................ 7-13 Introduction ................................................................................................... 7-13 Useful points .................................................................................................. 7-14 Stagnation Boundaries ............................................................................................ 7-15 Introduction ................................................................................................... 7-15 Useful points .................................................................................................. 7-16 Non-reflective Pressure and Stagnation Boundaries ............................................... 7-17 Introduction ................................................................................................... 7-17 Useful points .................................................................................................. 7-18 Wall Boundaries ...................................................................................................... 7-20 Introduction ................................................................................................... 7-20 Thermal radiation properties ......................................................................... 7-21 Solar radiation properties .............................................................................. 7-21 Useful points .................................................................................................. 7-22 Baffle Boundaries ................................................................................................... 7-23 Introduction ................................................................................................... 7-23 Setting up models .......................................................................................... 7-24 Thermal radiation properties ......................................................................... 7-25 Solar radiation properties .............................................................................. 7-26 Symmetry Plane Boundaries ................................................................................... 7-27 Cyclic Boundaries ................................................................................................... 7-27 Introduction ................................................................................................... 7-27 Setting up models .......................................................................................... 7-28
v

Version 3.26

Cyclic set manipulation ..................................................................................7-31 Free-stream Transmissive Boundaries ....................................................................7-32 Introduction ....................................................................................................7-32 Useful points ..................................................................................................7-33 Transient-wave Transmissive Boundaries ...............................................................7-34 Introduction ....................................................................................................7-34 Useful points ..................................................................................................7-35 Riemann Boundaries ...............................................................................................7-36 Introduction ....................................................................................................7-36 Useful points ..................................................................................................7-37 Attachment Boundaries ...........................................................................................7-38 Useful point ....................................................................................................7-39 Radiation Boundaries ..............................................................................................7-39 Phase-Escape (Degassing) Boundaries ...................................................................7-39 Internal Regions ......................................................................................................7-40 Boundary Visualisation ...........................................................................................7-41 Flow Field Initialisation ..........................................................................................7-41 Steady-state problems ....................................................................................7-41 Transient problems .........................................................................................7-42 CONTROL FUNCTIONS Introduction ...............................................................................................................8-1 Analysis Controls for Steady-State Problems ...........................................................8-1 Analysis Controls for Transient Problems ................................................................8-4 Default (single-transient) solution mode .........................................................8-4 Load-step based solution mode ........................................................................8-6 Load step characteristics ..................................................................................8-6 Load step definition .........................................................................................8-8 Solution procedure outline ...............................................................................8-9 Other transient functions ................................................................................8-14 Using Error Estimates .............................................................................................8-15 Steady-state flow ............................................................................................8-15 Transient flow ................................................................................................8-16 Viewing the results ........................................................................................8-16 Solution Control with Mesh Changes .....................................................................8-17 Mesh-changing procedure ..............................................................................8-17 Solution-Adapted Mesh Changes ............................................................................8-19 POST-PROCESSING Introduction ...............................................................................................................9-1 Data Loading and Display Set-up .............................................................................9-1
Version 3.26

vi

Basic Post-processing Displays ................................................................................ 9-9 Plot specification ............................................................................................. 9-9 Plot display .................................................................................................... 9-12 Plot Manipulation .................................................................................................... 9-16 Data Manipulation .................................................................................................. 9-21 The OPERATE utility ................................................................................... 9-21 Other data manipulation utilities ................................................................... 9-24 Data Reporting ........................................................................................................ 9-24 Mapping and Copying Post Data ............................................................................ 9-27 Particle Tracking ..................................................................................................... 9-28 Useful Points ................................................................................................. 9-29 Graph Displays ........................................................................................................ 9-30 Data loading ................................................................................................... 9-30 Graph customization ...................................................................................... 9-31 Data display ................................................................................................... 9-31 Animation ............................................................................................................... 9-32 pro-STAR animation effects .......................................................................... 9-32 Animation sequence definition and display .................................................. 9-34 Storing animations ......................................................................................... 9-46 Movie making ................................................................................................ 9-47 10 POROUS MEDIA FLOW Setting Up Porous Media Models ........................................................................... 10-1 Useful Points ........................................................................................................... 10-4 11 THERMAL AND SOLAR RADIATION Radiation Modelling for Surface Exchanges .......................................................... 11-1 Radiation Modelling for Participating Media ......................................................... 11-3 Capabilities and Limitations of the DTRM Method ............................................... 11-5 Capabilities and Limitations of the DORM Method ............................................... 11-7 Radiation Sub-domains ........................................................................................... 11-8 12 CHEMICAL REACTION AND COMBUSTION Introduction ............................................................................................................. 12-1 Local Source Models .............................................................................................. 12-2 Presumed Probability Density Function (PPDF) Models ....................................... 12-3 Single-fuel PPDF ........................................................................................... 12-3 Multiple-fuel PPDF ....................................................................................... 12-4 Regress Variable Models ........................................................................................ 12-5 Complex Chemistry Models ................................................................................... 12-6 Setting Up Chemical Reaction Schemes ................................................................. 12-9 Useful points for local source and regress variable schemes ...................... 12-10
Version 3.26 vii

13

14

15

16

Chemical reaction conventions ....................................................................12-12 Useful points for PPDF schemes .................................................................12-13 Useful points for complex chemistry models ..............................................12-15 Useful points for ignition models ................................................................12-15 NOx Modelling ......................................................................................................12-16 Soot Modelling ......................................................................................................12-17 Coal Combustion Modelling .................................................................................12-17 Stage 1 ..........................................................................................................12-17 Stage 2 ..........................................................................................................12-17 Useful notes .................................................................................................12-20 Switches and constants for coal modelling ..................................................12-21 Special settings for the Mixed-is-Burnt and Eddy Break-Up models ..........12-22 LAGRANGIAN MULTI-PHASE FLOW Setting Up Lagrangian Multi-Phase Models ...........................................................13-1 Data Post-Processing ...............................................................................................13-4 Static displays ................................................................................................13-5 Trajectory displays .........................................................................................13-8 Engine Combustion Data Files ................................................................................13-9 Useful Points .........................................................................................................13-10 EULERIAN MULTI-PHASE FLOW Introduction .............................................................................................................14-1 Setting up multi-phase models ................................................................................14-1 Useful points on Eulerian multi-phase flow ..................................................14-4 FREE SURFACE AND CAVITATION Free Surface Flows ..................................................................................................15-1 Setting up free surface models .......................................................................15-1 Useful points on free surface flow .................................................................15-4 Cavitation ................................................................................................................15-5 Setting up cavitation models ..........................................................................15-5 Useful points on cavitation ............................................................................15-7 ROTATING AND MOVING MESHES Rotating Reference Frames .....................................................................................16-1 Models for a single rotating reference frame .................................................16-1 Useful points on single rotating frame problems ...........................................16-1 Models for multiple rotating reference frames (implicit treatment) ..............16-2 Useful points on multiple implicit rotating frame problems ..........................16-4 Models for multiple rotating reference frames (explicit treatment) ...............16-5 Useful points on multiple explicit rotating frame problems ..........................16-8 Moving Meshes .......................................................................................................16-9
Version 3.26

viii

Basic concepts ............................................................................................... 16-9 Setting up models ........................................................................................ 16-10 Useful points ................................................................................................ 16-13 Cell-layer Removal/Addition ................................................................................ 16-14 Basic concepts ............................................................................................. 16-14 Setting up models ........................................................................................ 16-15 Useful points ................................................................................................ 16-18 Sliding Meshes ...................................................................................................... 16-19 Regular sliding interfaces ............................................................................ 16-19 Arbitrary Sliding Interfaces ......................................................................... 16-22 Automatic Events Generation for Mixing Vessel Problems ....................... 16-24 Cell Attachment and Change of Fluid Type ......................................................... 16-26 Basic concepts ............................................................................................. 16-26 Setting up models ........................................................................................ 16-27 Useful points ................................................................................................ 16-32 Mesh Region Inclusion/Exclusion ........................................................................ 16-32 Basic concepts ............................................................................................. 16-32 Useful points ................................................................................................ 16-33 Moving Mesh Pre- and Post-processing ............................................................... 16-33 Introduction ................................................................................................. 16-33 Action commands ........................................................................................ 16-34 Status setting commands ............................................................................. 16-34 17 OTHER TYPES OF FLOW Multi-component Mixing ........................................................................................ 17-1 Setting up multi-component models .............................................................. 17-1 Useful points on multi-component mixing .................................................... 17-2 Aeroacoustic Analysis ............................................................................................ 17-3 Setting up aeroacoustic models ..................................................................... 17-3 Useful points on aeroacoustic analyses ......................................................... 17-4 Liquid Films ............................................................................................................ 17-4 Setting up liquid film models ........................................................................ 17-4 Film stripping ................................................................................................ 17-7 Useful points on liquid film analyses ............................................................ 17-7 Unsupported features ..................................................................................... 17-7 18 USER PROGRAMMING Introduction ............................................................................................................. 18-1 Subroutine Usage .................................................................................................... 18-1 Useful points .................................................................................................. 18-4 Description of UFILE Routines .............................................................................. 18-5
Version 3.26 ix

Boundary condition subroutines ....................................................................18-5 Material property subroutines ........................................................................18-6 Turbulence modelling subroutines .................................................................18-9 Source subroutines .......................................................................................18-10 Radiation modelling subroutines .................................................................18-11 Free surface / cavitation subroutines ............................................................18-11 Lagrangian multi-phase subroutines ............................................................18-12 Eulerian multi-phase subroutines .................................................................18-13 Chemical reaction subroutines .....................................................................18-14 Rotating reference frame subroutines ..........................................................18-15 Moving mesh subroutines ............................................................................18-15 Miscellaneous flow characterisation subroutines ........................................18-16 Solution control subroutines ........................................................................18-17 Sample Listing .......................................................................................................18-18 New Coding Practices for Dynamic Memory .......................................................18-19 User defined arrays ......................................................................................18-19 User coding examples ..................................................................................18-21 New Coding Practices for Eulerian Multi-phase Problems ...................................18-22 General principle ..........................................................................................18-22 Example of implementation .........................................................................18-22 E2P-supported subroutines ..........................................................................18-23 User Coding in parallel runs ..................................................................................18-23 19 PROGRAM OUTPUT Introduction .............................................................................................................19-1 Permanent Output ....................................................................................................19-1 Input-data summary .......................................................................................19-1 Run-time output .............................................................................................19-3 Printout of Field Values ..........................................................................................19-4 Optional Output .......................................................................................................19-4 Example Output .......................................................................................................19-7 20 pro-STAR CUSTOMISATION Set-up Files ..............................................................................................................20-1 Panels .......................................................................................................................20-2 Panel creation .................................................................................................20-2 Panel definition files ......................................................................................20-5 Panel manipulation .........................................................................................20-6 Macros .....................................................................................................................20-6 Function Keys ..........................................................................................................20-9

Version 3.26

21 OTHER STAR-CD FEATURES AND CONTROLS Introduction ............................................................................................................. 21-1 File Handling .......................................................................................................... 21-1 Naming conventions ...................................................................................... 21-1 Commonly used files ..................................................................................... 21-1 File relationships ........................................................................................... 21-8 File manipulation ........................................................................................... 21-9 Special pro-STAR Features .................................................................................. 21-12 pro-STAR environment variables ................................................................ 21-12 Resizing pro-STAR ..................................................................................... 21-13 Special pro-STAR executables .................................................................... 21-14 Use of temporary files by pro-STAR .......................................................... 21-15 The StarWatch Utility ........................................................................................... 21-15 Running StarWatch ..................................................................................... 21-16 Choosing the monitored values ................................................................... 21-18 Controlling STAR ....................................................................................... 21-18 Manipulating the StarWatch display ........................................................... 21-21 Monitoring another job ................................................................................ 21-22 Hard Copy Production .......................................................................................... 21-22 Neutral plot file production and use ............................................................ 21-22 Scene file production and use ...................................................................... 21-24

APPENDICES
A pro-STAR CONVENTIONS Command Input Conventions .................................................................................. A-1 Help Text / Prompt Conventions ............................................................................. A-3 Control and Function Key Conventions .................................................................. A-4 File Name Conventions ............................................................................................ A-4 B pro-STAR NEUTRAL PLOT FILE C FILE USAGE D PROGRAM UNITS E VALID PLOT COMBINATIONS F pro-STAR X-RESOURCES G USER INTERFACE TO MESSAGE PASSING ROUTINES H STAR RUN OPTIONS Usage ........................................................................................................................ H-1 Options ..................................................................................................................... H-1 Parallel Options ........................................................................................................ H-3 Resource Allocation ................................................................................................. H-8 Default Options ........................................................................................................ H-8
Version 3.26 xi

Cluster Computing ...................................................................................................H-9 Batch Runs Using STAR-NET .................................................................................H-9 Running under IBM Loadleveler using STAR-NET ....................................H-10 Running under LSF using STAR-NET .........................................................H-10 Running under OpenPBS using STAR-NET ................................................H-11 Running under PBSPro using STAR-NET ...................................................H-12 Running under SGE using STAR-NET ........................................................H-12 Running under Torque using STAR-NET ....................................................H-13 BIBLIOGRAPHY

INDEX

xii

Version 3.26

OVERVIEW
Purpose
The Methodology volume presents the mathematical modelling practices embodied in the STAR-CD code and the numerical solution procedures employed. In this volume, the focus is on the structure of the system itself and how to use it. This presentation assumes that the reader is familiar with the background information provided in the Methodology volume.

Contents
Chapter 1 introduces some of the fundamental principles of computational fluid dynamics, including an outline of the basic steps involved in setting up and using a successful computer model. The important factors to consider at each step are mostly explained independently of the computer system used to perform the analysis. However, reference is also made to the particular capabilities of the STAR-CD system, where appropriate. Chapter 2 outlines the basic features of STAR-CD, including GUI facilities, session control and plotting utilities. Chapters 3 to 9 provide the reader with detailed instructions on how to use the basic facilities of the code, e.g. mesh generation, boundary condition specification, material property definition, etc., and an overview of the GUI panels appropriate to each of them. The description covers all facilities that might be employed for modelling most common CFD problems. Chapters 2 to 9 should be read at least once to gain an understanding of the general housekeeping principles of pro-STAR and to help with any problems arising from routine operations. It is recommended that users refer to the appropriate chapter repeatedly when setting up a model for general guidance and an overview of the relevant GUI panels. Chapters 10 to 17 describe additional STAR-CD capabilities relevant to models of a more specialised nature, i.e. rotating systems, combustion processes, buoyancy-driven flows, etc. Users interested in a particular topic should consult the appropriate section for a summary of commands or options specially designed for that purpose, plus hints and tips on performing a successful simulation. Chapter 18 outlines the user programmability features available and provides an example FORTRAN subroutine listing implementing these features. All such subroutines are readily available for use and can be easily adapted to suit the model's requirements. Chapter 19 presents the printable output produced by the code which provides, among other things, a summary of the problem specification and monitoring information generated during the calculation. Chapter 20 explains how pro-STAR can be customised, in terms of user-defined panels, macros and keyboard function keys, to meet a users individual requirements. Finally, Chapter 21 covers some of the less commonly used features of STAR-CD, including the interaction between STAR and pro-STAR and how various system files are used.

Version 3.26

Chapter 1

CFD MODELLING PRINCIPLES Introduction

Chapter 1

CFD MODELLING PRINCIPLES


The aim of this section is to introduce the most important issues involved in setting up and solving a thermofluids problem using a computational fluid dynamics code. Although the discussion applies in principle to any such code, reference is made where appropriate to the particular capabilities of the STAR-CD system. It is also assumed that the reader is familiar with the material presented in the Methodology volume. The process of computational flow simulation does not usually start with the direct use of a CFD code. It is indeed important to recognise that STAR-CD, or any other CFD, CAD or CAE system, should be treated as a tool to assist the engineer in understanding physical phenomena. The success or failure of a fluid simulation depends not only on the code capabilities, but also upon the input data, such as: Geometry of the ow domain Fluid properties Boundary conditions Solution control parameters

Introduction

For a simulation to have any chance of success, such information should be physically realistic and correctly presented to the analysis code. The essential steps to be taken prior to CFD modelling are as follows: Pose the ow problem in physical terms. Establish the amount of information available and its sufciency and validity. Assess the capabilities and features of the CFD code, to ensure that the problem is well posed and amenable to numerical solution by the code. Plan the simulation strategy carefully, adopting a step-by-step approach to the nal solution.

Users should turn to STAR-CD and proceed with the actual modelling only after the above tasks have been completed.

The Basic Modelling Process


The modelling process itself can be divided into four major phases, as follows: Phase 1 Working out a modelling strategy This requires a precise definition of the physical systems geometry, material properties and flow conditions based on the best available understanding of the relevant physics. The necessary tasks include: Planning the computational mesh (e.g. number of cells, size and distribution of cell dimensions, etc.). Looking up numerical values for appropriate physical parameters (e.g. density, viscosity, specic heat, etc.). Choosing the most suitable modelling option from what is available (e.g. turbulence model, combustion option, etc.).

Version 3.26

1-1

CFD MODELLING PRINCIPLES Spatial description and volume discretisation

Chapter 1

The user also has to balance the requirement of physical fidelity and numerical accuracy against the simulation cost and computational capabilities of his system. His modelling strategy will therefore incorporate some trade-off between these two factors. This initial phase of modelling is particularly important for the smooth and efficient progress of the computational simulation. Phase 2 Setting up the ow model using pro-STAR The main tasks involved at this phase are: Creating a computational mesh to represent the ow domain (i.e. the model geometry). Specifying the thermophysical properties of the uids and/or solids present in the simulation and, where relevant, the turbulence model(s), body forces, etc. Setting the solution parameters (e.g. solution variable selection, relaxation coefcients, etc.) and output data formats. Specifying the location and denition of boundaries and, for unsteady ow simulation problems, further denition of transient boundary conditions and time steps. Writing appropriate data les as input to the analytical run of the following phase.

Phase 3 Performing the ow analysis using STAR This phase consists of: Reading input data created by pro-STAR and, if dealing with a restart run, the results of a previous run. Judging the progress of the run by analysing various monitoring data and solution statistics provided by STAR.

Phase 4 Post-processing the results using pro-STAR This involves the display and manipulation of output data created by STAR using the appropriate pro-STAR facilities. The remainder of this chapter discusses the elements of each modelling phase in greater detail.

Spatial description and volume discretisation


One of the basic steps in preparing a CFD model is to describe the geometry of the problem. The two key components of this description are: The denition of the overall size and shape of the ow domain. This is often called the solution domain since all the differential equations representing momentum, heat and mass transfer are solved in this region. The subdivision of the domain into a mesh of discrete, nite, contiguous volume elements or cells, as shown in Figure 1-1.

1-2

Version 3.26

Chapter 1

CFD MODELLING PRINCIPLES Spatial description and volume discretisation

Figure 1-1

Example of domain subdivision into cells

This process is called volume discretisation and is an essential part of solving the above equations numerically. In STAR-CD both components of the spatial description are performed as part of the same operation, setting up the finite-volume mesh, but separate considerations apply to each of them. Solution domain denition Through its internal design and construction, STAR-CD permits a very general and flexible definition of what constitutes a solution domain. The latter can be: A uid and/or heat ow eld fully occupying an open region of space. Fluid and/or heat owing through a porous medium. Heat owing through a solid.

Arbitrary combinations of these three basic types can also be specified within the same model, as in conjugate heat transfer analysis. The users first task is therefore to decide which parts of the physical system being modelled need to be included in the solution domain and whether each part is occupied by a fluid, solid or porous medium. Whatever its composition, the fundamental requirement is that the solution domain is bounded. This means that the user has to examine his systems geometry carefully and decide exactly where the enclosing boundaries lie. The boundaries can be one of four kinds: 1. Physical boundaries walls or solid obstacles of some description that serve to conne the ow physically. 2. Symmetry boundaries axes or planes beyond which the ow pattern becomes a mirror image of itself. 3. Cyclic boundaries surfaces beyond which the ow pattern repeats itself, in a cyclic or anticyclic fashion. The purpose of symmetry and cyclic boundaries is to limit the size of the domain, and hence the computer requirements, by excluding regions where the solution is essentially known. This in turn allows one to model the ow in greater detail than would have been the case otherwise. 4. Notional boundaries these are non-physical surfaces that serve to
Version 3.26 1-3

CFD MODELLING PRINCIPLES Spatial description and volume discretisation

Chapter 1

close-off the solution domain in regions not covered by the other two types of boundary. Their location is entirely up to the users discretion but, in general, they should be placed only where one of the following apply: (a) Flow conditions are known. (b) Flow conditions can be guessed reasonably well. (c) The boundary is far enough away from the main ow region for boundary condition inaccuracies to have little effect. Thus, locating this type of boundary may require some trial and error. The location and characterisation of boundaries is discussed further in Boundary description on page 1-12. Mesh denition Creation of a lattice of finite-volume cells to represent the solution domain is normally the most time-consuming task in setting up a CFD model. This process is greatly facilitated by STAR-CD because of its ability to generate a wide selection of basic cell shapes, and employ them as part of an unstructured mesh.

This means that the mesh can always be made to fit closely to the shape of the solution domain without needing to generate any inactive or void cells. The difference between structured and unstructured meshes is illustrated in Figure 1-2.

(a) Structured mesh void cells

(b) Unstructured mesh

Figure 1-2
1-4

Structured and unstructured meshes for a bluff body model


Version 3.26

Chapter 1

CFD MODELLING PRINCIPLES Spatial description and volume discretisation

In creating a finite-volume mesh, the user should aim to represent accurately the following two entities: 1. The overall external geometry of the solution domain, by specifying an appropriate size and shape for near-boundary cells. The latters external faces, taken together, should make up a surface that adequately represents the shape of the solution domain boundaries. Small inaccuracies may occur because all boundary cell faces (including rectangular faces) are composed of triangular facets, as shown in Figure 1-3. These errors diminish as the mesh is rened.

triangular facet

Figure 1-3

Boundary representation by triangular facets

2. The internal characteristics of the ow regime. This is achieved by careful control of mesh spacing within the solution domain interior so that the mesh is nest where the ow characteristics change most rapidly. An example of this is shown in Figure 1-2. Near-wall regions are important and a high mesh density is needed to resolve the ow in their vicinity. This point is discussed further in Mesh distribution near walls on page 1-9. Mesh spacing considerations The chief considerations governing the mesh spatial arrangement are: Accuracy primarily determined by mesh density and, to a lesser extent, mesh distortion (discussed in Mesh distortion on page 1-6). Numerical stability this is a strong function of the degree of distortion. Cost a function of both the aforementioned factors, through their inuence on the speed of convergence and c.p.u. time required per iteration or time step.

Thus, the user should aim at an optimum mesh arrangement which


Version 3.26

employs the minimum number of cells, exhibits the least amount of distortion, is consistent with the accuracy requirements.
1-5

CFD MODELLING PRINCIPLES Spatial description and volume discretisation

Chapter 1

Chapter 3 describes several methods available in STAR-CD, some of them semi-automatic, to help the user achieve this goal. However, even when suitable automatic mesh generation procedures are available, the user must still draw on knowledge and experience of fluid mechanics and CFD to produce the right kind of mesh arrangement. Mesh distortion Mesh distortion is measured in terms of three factors aspect ratio, internal angle and warp angle illustrated in Figure 1-4.

a b/a = aspect ratio = internal angle = warp angle

Figure 1-4

Cell shape characteristics

When setting up the mesh, the user should try to observe the following guidelines: Aspect Ratio values close to unity are preferable, but departures from this are allowed. Internal Angle departures from 90 intersections between cell faces should be kept to a minimum. Warp Angle the optimum value of this angle is zero, which can occur only when the cell face vertices are co-planar.

Any adverse effects arising from departures from the preferred values of these factors manifest themselves through the relative magnitudes of the coefcients in the nite-volume equations, especially those arising from non-orthogonality, and the signs of the coefcients (negative values are generally detrimental).

It is difficult to place rigid limits on the acceptable departures because they depend on local flow conditions. However, the following values serve as a useful guideline: Aspect Ratio Internal angle Warp angle 10 45 45

pro-STAR can calculate these quantities and identify cells having out-of-bounds
1-6 Version 3.26

Chapter 1

CFD MODELLING PRINCIPLES Spatial description and volume discretisation

values, as discussed in Mesh and Geometry Checking on page 4-26. What is really important in this respect is the combined effect of the various kinds of mesh distortion. If all three are simultaneously present in a single cell, the limits given above might not be stringent enough. On the other hand, the effects of distortion also depend on the nature of the local flow. Thus, the above limits may be exceeded in the region of simple ows such as, for example, uniform-velocity free streams, wall boundary layers, where cells of high aspect ratio (in the ow direction) are commonly employed without difculty.

Generally speaking, non-orthogonality at boundaries may cause problems and should be minimised whenever practicable. Mesh distribution and density Numerical discretisation errors are functions of the cell size; the smaller the cells (and therefore the higher the mesh density), the smaller the errors. However, a high mesh density implies a large number of mesh storage locations, with associated high computing cost. It is therefore advisable, wherever possible, to ensure that the mesh density is high only where needed, i.e. in regions of steep gradients of the ow variables, and low elsewhere; avoid rapid changes in cell dimensions in the direction of steep gradients in the ow variables.

The flexibility afforded by STARs unstructured mesh and the range of alternative cell shapes employed (illustrated in Figure 1-5) facilitates such selective refinement. Of course, it is not always possible to ascertain a priori what the flow structure will be. However, the need for higher mesh density can usually be anticipated in regions such as: Wall boundary layers. Jets issuing from apertures. Shear layers formed by ow separation or neighbouring streams of different velocities. Stagnation points produced by ow impingement. Wakes behind bluff bodies. Temperature or concentration fronts arising from mixing or chemical reaction.

Version 3.26

1-7

CFD MODELLING PRINCIPLES Spatial description and volume discretisation

Chapter 1

Hexahedron

Tetrahedron

Triangular prism Polyhedral Cells

Pyramid

Figure 1-5
1-8

Basic and polyhedral STAR cell shapes


Version 3.26

Chapter 1

CFD MODELLING PRINCIPLES Spatial description and volume discretisation

Mesh distribution near walls As discussed in the section on Wall Boundary Conditions in Chapter 6 of the Methodology volume, wall functions are an economic way of representing turbulent boundary layers (hydrodynamic and thermal) in turbulent flow calculations. These functions effectively allow the boundary layer to be bridged by a single cell, as shown in Figure 1-6(a).

Outer region

y (a) Wall function model

Inner region

(b) Two-layer or Low Re models

Figure 1-6

Near-wall mesh distribution

The location y of the cell centroids in the near-wall layer, and hence the thickness of that layer, is usually determined by reference to the dimensionless normal distance y + from the wall. For the wall function to be effective, this distance must be not too small, otherwise, the bridge might span only the laminar sublayer; not too large, as the ow at that location might not behave in the way assumed in deriving the wall functions.

Ideally, y + should lie in the approximate range 30 to 150. Alternative treatments that do not require the use of wall functions are also available. These are: 1. Two-layer turbulence models, whereby wall functions are replaced by a one-equation k-l model or a zero-equation mixing-length model 2. Low Reynolds number models, where viscous effects are incorporated in the k and transport equations For the above two types of model, the solution domain should be divided into two regions with the following characteristics: An inner region containing a ne mesh An outer region containing normal mesh sizes

The two regions are illustrated in Figure 1-6(b). As explained in the Methodology volume (Chapter 6, Two-layer models), the inner region should contain at least 15 mesh layers and encompass that part of the boundary layer influenced by viscous effects.
Version 3.26 1-9

CFD MODELLING PRINCIPLES Flow characterisation and material property denition

Chapter 1

A more recent development, called the hybrid wall function is also available that extends the low-Reynolds number formulation of most turbulence models. This may be used to capture boundary layer properties more accurately in cases where the near-wall cell size is not adapted for the low-Reynolds number treatment and thus achieve y + independent solutions. Moving mesh features STAR-CD offers a range of moving mesh features, including: General mesh motion Internal sliding mesh Cell deletion and insertion

The first of these is straightforward to employ and the only caution required is the obvious one: avoid creating excessive distortion when redistributing the mesh. This caution also applies to the use of the other two features, but they have additional rules and guidelines attached to them. These are summarised in the Methodology volume, Chapter 15 (Internal Sliding Mesh on page 15-5 and Cell Layer Removal and Addition on page 15-7). Additional guidelines also appear in this volume, Cell-layer Removal/Addition on page 16-14 and Sliding Meshes on page 16-19; hence they are not repeated here.

Flow characterisation and material property denition


Correct definition of the physical flow conditions and the properties of the materials involved is a prerequisite to obtaining the right solution to a problem, or indeed to obtaining any solution at all. It is also essential for determining whether the problem can be modelled with STAR-CD. The user must therefore ensure that the problem is well defined in respect of: The nature of the ow (e.g. steady/unsteady, laminar/turbulent, incompressible/compressible). Thermophysical properties (e.g. density, viscosity, specic heat). External force elds (e.g. gravity, centrifugal forces) and energy sources, when present. Initial conditions for transient ows.

Nature of the ow It is very important to understand the nature of the flow being analysed in order to select the appropriate mathematical models and numerical solution algorithms. Problems will arise if an incorrect choice is made, as in the following examples: Employing an iterative, steady-state algorithm for an inherently unsteady problem, such as vortex shedding from a bluff body. Computing a turbulent ow without invoking a suitable turbulence model. Modelling transitional ow with one of the turbulence models currently implemented in STAR-CD. None of them can represent transitional behaviour accurately.

1-10

Version 3.26

Chapter 1

CFD MODELLING PRINCIPLES Flow characterisation and material property denition

Thermophysical properties The specification of thermophysical properties, such as density, molecular viscosity, thermal conductivity, etc. depends on the nature of the fluids or solids involved and the circumstances of use. For example, STAR-CD contains several built-in equations of state from which density can be calculated as a function of one or more of the following field variables: Pressure Temperature Fluid composition

In all cases where complex calculations are used to evaluate a material property, the following measures are recommended: The relevant eld variables must be assigned plausible initial and boundary values. Where necessary, properties should be solved for together with the eld variables as part of the overall solution. In the case of strong dependencies between properties and eld variables, the user should consider under-relaxation of the property value calculations, in the manner described in the Methodology volume (Chapter 7, Scalar transport equations). When required, STAR-CDs facility for alternative, user-programmable functions may be used.

Force elds and energy sources As already noted, STAR-CD has built-in provision for body forces arising from buoyancy, rotation.

It is important to remember that as the strength of the body forces increases relative to the viscous (or turbulent) stresses, the flow may become physically unstable. In these circumstances it is advisable to switch to the transient solution mode. It is also possible to insert additional, external force fields and energy sources via the user programming facilities of STAR-CD. In such cases, it is important to understand the physical implications and avoid specifying conditions that lead to physical or numerical instability. Examples of such conditions are: Thermal energy sources that increase linearly with temperature. These can give rise to physical instability called thermal runaway. Setting the coefcient i in the permeability function K i = i v + i to a very small or zero value. If the local uid velocity also becomes very small, the result may be numerical instability whereby small pressure perturbations produce a large change in velocities.

Initial conditions The term initial conditions refers to values assigned to the dependent variables at all mesh points before the start of the calculations. Their implication depends on the
Version 3.26 1-11

CFD MODELLING PRINCIPLES Boundary description

Chapter 1

type of problem being considered: In unsteady ow applications, this information has a clear physical signicance and will affect the course of the solution. Due care must therefore be taken in providing it. It sometimes happens that the effects of initial conditions are conned to a start-up phase that is not of interest (as in, for example, ows that are temporally periodic). However, it is still advisable to take some precautions in specifying initial conditions for reasons explained below. In calculating steady ow by iterative means, the initial conditions will usually have no inuence on the nal solution (apart from rare occasions when the solution is multi-valued) but may well determine the success and speed of achieving it.

Poor initial field specifications or, for transient problems, abrupt changes in boundary conditions put severe demands on the numerical algorithm when substituted into the finite-volume equations. As a consequence, the following special start-up measures may be necessary to ensure numerical stability: Use of unusually small time steps in transient calculations. Use of strong under-relaxation in iterative solutions.

Specific recommendations concerning these practices are given in Numerical solution control on page 1-15. In either case, increased computing times can be an undesirable side effect. For steady-state and pseudo-transient calculations, the code has a built-in initialisation procedure that is applied over and above any user-specified initialisation of flow variables. This is discussed in Flow Initialisation on page 7-10 of the Methodology volume. Most problems can be started up by relying entirely on this procedure. However, attention should still be paid to the specified values for characteristic length and maximum expected velocity in the flow field as these are important for initialisation. The user is advised to run his problem for zero iterations and then examine the initial velocity and pressure fields predicted by STAR. Some fine tuning of the characteristic length value may then be necessary. In especially difficult cases, the pressure initialisation or even the entire initialisation process may have to be omitted by using appropriate solution-control switches. The user should then rely on strong under-relaxation or very small time steps to start up the solution.

Boundary description
As stated in Spatial description and volume discretisation on page 1-2, boundary identification and description are intimately connected with the generation of the finite-volume mesh, since the boundary topography is defined by the outermost cell faces. Furthermore, correct specification of the boundary conditions is often the main area of difficulty in setting up a model. Problems often arise in the following areas:
1-12

Identifying the correct type of condition. Specifying an acceptable mix of boundary types. Ascribing appropriate boundary values.
Version 3.26

Chapter 1

CFD MODELLING PRINCIPLES Boundary description

The above are in turn linked to the decisions on where to place the boundaries in the first instance. Boundary location Difficulties in specifying boundary location normally arise where the flow conditions are incompletely known, for example at outlets. The recommended solutions, in decreasing degree of accuracy, are to place boundaries in regions where the conditions are known, if this is possible; in a location where the Outlet or Prescribed Pressure option is applicable (see Chapters 5 and 16 in the Methodology volume); where the approximations in the boundary condition specication are unlikely to propagate upstream into the regions of interest.

Whenever possible, it is particularly important to avoid the following situations: 1. A boundary that passes through a major recirculation zone. 2. In transient transonic or supersonic compressible ows, an outlet boundary located where the ow is not supersonic. 3. A mix of boundary conditions that is inappropriate. Examples of this are: (a) Multiple Outlet boundaries unless further information is supplied on how the ow is partitioned between the outlets. (b) Prescribed ow split outlets coexisting with prescribed mass outow boundaries in the same stream. (c) A combination of prescribed pressure and ow-split outlet conditions. Boundary conditions Another source of potential difficulty is in boundary value specification wherever known conditions need to be set, e.g. at a Prescribed Inflow or Inlet boundary. The basic points to bear in mind in this situation are: All transport equations to be solved require specication of their boundary values, including the turbulence transport equations when they are invoked. Inappropriate setting of boundary values can lead to erroneous results or, in extreme cases, to numerical instability.

The following recommendations can be given regarding each different type of boundary: 1. Prescribed ow Here, care should be taken to: (a) Assign realistic values to all dependent variables, including the turbulence parameters, and also to auxiliary quantities, such as density. (b) Ensure that, if this is the only type of ow boundary imposed, overall continuity is satised (STAR-CD will accept inadvertent mass imbalances of up to 5%, correcting them by adjusting the outows. An error message is issued if the imbalance exceeds this gure). 2. Outlet The main points to note for this boundary type are:
Version 3.26 1-13

CFD MODELLING PRINCIPLES Boundary description

Chapter 1

(a) The need to specify the boundary, where possible, at locations where the ow is everywhere outwardly directed; also to recognise that, if inow occurs, it may introduce numerical instability and/or inaccuracies. (b) The necessity, if more than one boundary of this type is declared, of prescribing either the ow split between them or the mass outow rate at each location. (c) The inapplicability of prescribed split outlets to problems where the inows are not xed, e.g. i) in combination with pressure boundary conditions, or ii) in the case of transient compressible ows. 3. Prescribed pressure The main precautions are: (a) To specify relative (to a prescribed datum) rather than absolute pressures. (b) If inow is likely to occur, to assign realistic boundary values to temperature and species mass fractions. It is also advisable to specify the turbulence parameters indirectly, via the turbulence intensity and length scale or by extrapolating them from values in the interior of the solution domain. 4. Stagnation conditions It is recommended to use this condition for boundaries lying within large reservoirs where properties are not signicantly affected by ow conditions in the solution domain. 5. Non-reflecting pressure and stagnation conditions A special formulation of the standard pressure and stagnation conditions, developed to facilitate analysis of steady-state turbomachinery applications 6. Cyclic boundaries These always occur in pairs. The main points of advice are: (a) Impose this condition only in appropriate circumstances. Two-dimensional axisymmetric ows with swirl is a good example of an appropriate application. (b) For axisymmetric ows, make use of the CD/UD blending scheme to apply the maximum level of central differencing in the tangential direction (the default blending factor is 0.95; see also on-line Help topic Miscellaneous Controls in STAR GUIde). 7. Planes of symmetry It is recommended to use this condition for two-dimensional axisymmetric ows without swirl 8. Free-stream transmissive boundaries This condition should be used for modelling only supersonic free streams 9. Transient wave transmissive boundaries This condition should be used only in problems involving transient compressible ows 10. Riemann boundaries This condition is based on the theory of Riemann invariants and its application allows pressure waves to leave the solution domain without reflection
1-14 Version 3.26

Chapter 1

CFD MODELLING PRINCIPLES Numerical solution control

Numerical solution control


Proper control of the numerical solution process applied to the flow equations is highly important, both for acceptable computational efficiency and, sometimes, in order to achieve a solution at all. By necessity, the means of controlling the process depend heavily on the particular numerical techniques employed so no universal guidelines can be given. Thus, the recommended settings vary with the particular algorithm selected and the circumstances of application. Selection of solution procedure The basic selection should be based on a correct assessment of the nature of the flow and will be either a transient calculation, starting from well-dened initial and boundary conditions and proceeding to a new state in a series of discrete time steps; or a steady-state calculation, where an unchanging ow pattern under a given set of boundary conditions is arrived at through a number of numerical iterations.

PISO, SIMPLE and SIMPISO are the three alternative solution procedures available in STAR-CD. PISO is mandatory for unsteady calculations and may sometimes be preferred for steady-state ones, in cases involving strong coupling between dependent variables such as buoyancy driven flows. SIMPLE is the default algorithm for steady-state solutions and works well in most cases. However, when the mesh distortion is especially severe, SIMPISO can sometimes be used to better effect. When doubts exist as to whether the problem considered actually possesses a steady-state solution or when iterative convergence is difficult to achieve, it is better to perform the calculations using the transient option. Transient calculations with PISO As stated in The PISO algorithm on page 7-2 of the Methodology volume, PISO performs at each time (or iteration) step, a predictor, followed by a number of correctors, during which linear equation sets are solved iteratively for each main dependent variable. The decisions on the number of correctors and inner iterations (hereafter referred to as sweeps, to avoid confusion with outer iterations performed as part of the steady-state solution mode) are made internally on the basis of the splitting error and inner residual levels, respectively, according to prescribed tolerances and upper limits. The default values for the solver tolerances and maximum correctors and sweeps are given in Table 1-1. Normally, these will only require adjustment by the user in exceptional circumstances, as discussed below.

Version 3.26

1-15

CFD MODELLING PRINCIPLES Numerical solution control

Chapter 1

Table 1-1: Standard Control Parameter Settings for Transient PISO Calculations Variable Parameter Velocity Solver tolerance Sweep limit 0.01 100 Pressure 0.001 1000 Turbulence 0.01 100 Enthalpy 0.01 100 Mass fraction 0.01 100

Corrector limit = 20 Pressure correction relaxation factor = 1.0 Corrector step tolerance = 0.25

The remaining key parameter in transient calculations with PISO is the size of the time increment t . This is normally determined by accuracy considerations and may be varied during the course of the calculation. The step should ideally be of the same order of magnitude as the smallest characteristic time t c for convection and diffusion, i.e. L L t c = min -, ---------- ----U
2

(1-1)

Here, U and are a characteristic velocity and diffusivity, respectively, and L is a mean mesh dimension. Typically, it is possible to operate with t 50 t c and still obtain reasonable temporal accuracy. Values significantly above this may lead to errors and numerical instability, whereas smaller values will lead to increased computing times. During the course of a calculation, the limits given in Table 1-1 may be reached, in which case messages to this effect will be produced. This is most likely to occur during the start-up phase but is nevertheless acceptable if, later on, the warnings either cease entirely or only appear occasionally, and the predictions look reasonable. If, however, the warnings persist, corrective actions should be taken. The possible actions are: Reduction in time step by, say, an initial factor of 2 if this improves matters, then the cause may simply be an excessively large t . Increase in the sweep limits if measure 1 fails, then this should be tried, only on the variable(s) whose limit(s) have been reached. Again, twofold changes are appropriate. Pressure correction under-relaxation a value of 0.8 for pressure correction under-relaxation, using PISO, may be helpful for some difcult cases (e.g. for severe mesh distortion or ows with Mach numbers approaching 1). Corrector step tolerance this may be set to a lower value but consult CD adapco rst.
Version 3.26

1-16

Chapter 1

CFD MODELLING PRINCIPLES Numerical solution control

Steady-state calculations with PISO (iterative mode) When PISO operates in this mode, the inner residual tolerances are decreased and under-relaxation is introduced on all variables, apart from pressure, temperature and mass fraction. However, the last two variables may need to be under-relaxed for buoyancy driven problems. The standard, default values for these parameters and the sweep limits, which are unchanged from the transient mode, are given in Table 1-2.
.

Table 1-2: Standard Control Parameter Settings for Iterative PISO Calculations Variable Parameter Velocity Solver tolerance Sweep limit Relaxation factor 0.1 100 0.7 Pressure 0.05 1000 1.0 Turbulence 0.1 100 0.7 Enthalpy 0.1 100 0.95 Mass fraction 0.1 100 1.0

Corrector limit = 20 These settings should, all being well, result in near-monotonic decrease in the global residuals during the course of the calculations, depending on mesh density and other factors. If, thereafter, one or more of the global residuals R do not fall, then remedial measures will be necessary. In some instances, the offending variable(s) can be identified from the behaviour of the global residuals. The main remedies now available are: Reduction in relaxation factor(s) this should be done in decrements of between 0.05 and 0.10 and should be applied to the velocities if the momentum and/or mass residuals are at fault. Decrease in solver tolerances as in the transient case, this may prove benecial, especially in respect of the pressure tolerance and its importance to the ow solution. A twofold reduction should indicate whether this measure will work. Increase in sweep limits if warning messages about the limits being reached appear and are not suppressed by measures 1 and 2, then it may be worthwhile increasing the limit(s) on the offending variables. Under-relaxation of density and effective viscosity use of this method for density can be advantageous where signicant variations occur, e.g. compressible ows, combustion, and mixing of dissimilar gases. Effective viscosity oscillations can arise in turbulent ow and non-Newtonian uid ow and can be similarly damped by this device.

Steady-state calculations with SIMPLE As noted previously, the control parameters available for SIMPLE are similar to
Version 3.26 1-17

CFD MODELLING PRINCIPLES Numerical solution control

Chapter 1

those for PISO, except that, in the case of the former, a single corrector stage is always used and pressure is under-relaxed. The standard (default) settings are given in Table 1-3.
.

Table 1-3: Standard Control Parameter Settings for Iterative SIMPLE Calculations Variable Parameter Velocity Solver tolerance Sweep limit Relaxation factor 0.1 100 0.7 Pressure 0.05 1000 0.3 Turbulence 0.1 100 0.7 Enthalpy 0.1 100 0.95 Mass fraction 0.1 100 1.0

In the event of failure to obtain solutions with the standard values, then the measures to be taken are essentially the same as those for iterative PISO, given in the previous section. However, here, reduction in the pressure relaxation factor is an additional device for overcoming instabilities in the flow field solution. The standard value of this factor, it should be noted, is already low (0.3) and fractional reductions of no more than 50% are recommended. If values less than 0.01 are required due to severe mesh distortion, then a better course of action is to either alleviate the distortion or employ the SIMPISO algorithm. Steady-state calculations with SIMPISO The SIMPISO procedure, as outlined in The SIMPISO algorithm on page 7-6 of the Methodology volume, contains additional corrective measures for the effect of mesh non-orthogonality on the pressure calculation. These are accompanied by an additional under-relaxation factor, as indicated in Table 1-4. This should be reduced, when necessary, in decrements of 0.05. For orthogonal or nearly orthogonal meshes, SIMPISO reverts to SIMPLE.

1-18

Version 3.26

Chapter 1

CFD MODELLING PRINCIPLES Monitoring the calculations

Table 1-4: Standard Control Parameter Settings for Iterative SIMPISO Calculations Variable Parameter Velocity Solver tolerance Sweep limit Relaxation factor Pressure correction relaxation factor 0.1 100 0.7 Pressure 0.05 1000 0.3 Turbulence 0.1 100 0.7 Enthalpy 0.1 100 0.95 Mass fraction 0.1 100 1.0

0.8

Effect of round-off errors Efforts have been made to minimise the susceptibility of STAR-CD to the effects of machine round-off errors, but problems can sometimes arise when operating in single precision on 32-bit machines. They usually manifest themselves as failure of the iterative solvers to converge or, in extreme cases, in divergence leading to machine overflow. If difficulties are encountered with problems of this kind, then it is clearly advisable to switch to double precision calculations. Instructions on how to do this are provided in the Installation Manual. As a general rule, however, you should try to avoid generating very small values for cell volumes and cell face areas by working with sensible length units. Alternatively, you could re-specify your problem geometry units while preserving relevant non-dimensional quantities such as Re and Gr. Choice of the linear equation solver STAR-CD offers two types of preconditioning of its conjugate gradient linear equations solvers: one which vectorises fully, and the other, which is numerically superior to the first one but vectorises only partially. Therefore, the first one (called vector solver) is recommended when the code is run on vector machines (like CRAY-YMP), and the second one (called scalar solver) is recommended if STAR-CD is run on scalar machines (like workstations).

Monitoring the calculations


Chapter 8 and the section on Permanent Output on page 19-1 give details of the information extracted from the calculations at each iteration or time step and used for monitoring and control purposes. This consists of: Values of all dependent variables at a user-specied monitoring location. Care should be taken in the choice of location, especially for steady-state
1-19

Version 3.26

CFD MODELLING PRINCIPLES Model evaluation

Chapter 1

calculations. Ideally, it should be in a sensitive region of the ow where the approach to the steady state is likely to be slowest, e.g. a zone of recirculation. In transient ow calculations, the information has a different signicance and other criteria for choice of location may apply. For example, a location may be chosen so as to conrm an expected periodic behaviour in the ow variables. The normalised global residuals R for all equations solved. Apart from turbulence dissipation rate residuals (see Chapter 7, Completion tests in the Methodology volume), these are used to judge the progress and completion of iterative calculations for steady and pseudo-transient solutions. In the early stages of a calculation, the non-linearities and interdependencies of the equations may result in non-monotonic decrease of the residuals. If these oscillations persist after, say, 50 iterations, this may be indicative of problems. The global rates of change C for all equations solved. These are used in transient ow calculations and are not measures of incompleteness of the solution; rather, they simply provide an indication of the overall rates of change of the conserved quantities (mass, momentum, energy, etc.). Their interpretation and usefulness will, in general, depend on the particular circumstances of the application.

Remember that reduction of the normalised residuals to the prescribed tolerance () is a necessary but not sufficient condition for convergence, for two reasons: 1. The normalisation practices used (given in Appendix A of the Methodology volume) may not be appropriate for the application. 2. It is also necessary that the features of interest in the solution should have stabilised to an acceptable degree. If doubts exist in either respect, it is advisable to reduce the tolerance and continue the calculations. It follows from the above discussion that strong reliance is placed on the global residuals to judge the progress and completion of iterative calculations of steady flows. These quantities provide a direct measure of the degree of convergence of the individual equation sets and are therefore useful both for termination tests and for identifying problem areas when convergence is not being achieved. Moreover, they have a clear physical significance. For example, the energy residuals provide a (normalised) measure of the degree to which the prevailing fields satisfy energy conservation. Analogous interpretations apply to the other residuals.

Model evaluation
Checking the model STAR-CD offers a variety of tools to help assess the accuracy and effectiveness of all aspects of the model building process. In performing the modelling stages discussed previously, the user should therefore take advantage of these facilities and check that: 1. The mesh geometry agrees with what it is supposed to represent. This is greatly facilitated by the built-in graphics capabilities that allow the mesh display to be
1-20 Version 3.26

Chapter 1

CFD MODELLING PRINCIPLES Model evaluation

(a) (b) (c) (d)

rotated, displaced, reduced, enlarged.

This enables the user to look at the mesh from any viewpoint, with the view showing the correct three-dimensional perspective. Frequent mesh displays during the mesh generation stage are very useful for verifying the accuracy of what is being created and are therefore strongly recommended, particularly for complex-geometry problems. It is best if such geometries are subdivided into convenient parts that can be individually meshed and then checked visually. 2. Materials of different physical properties occupy the correct location in the mesh. This can be checked visually by using the built-in colour differentiation scheme. Alternatively, each materials mesh domain can be plotted individually. Precise values of specied properties can be checked via the screen printout. 3. Boundary conditions are correct, by producing special mesh views that show (a) boundary location, (b) boundary type, (c) a schematic of the conditions applied (e.g. inlet velocities). More complete information on specied boundary values can be obtained from the screen printout. 4. The initial conditions should also be checked, particularly for transient problems and initial elds specied through user subroutines, by running STAR for zero iterations/time steps and plotting the relevant eld variables. Checking the calculations Having completed the model preparation, the next task is to run STAR and to check the results of the numerical calculations. These results are presented in various ways, details of which are given in Chapter 9. Briefly, printouts and/or plots can be produced of the following: Field values of all primary variables at interior and boundary nodes. Interpolated values of the above quantities at arbitrary, user-specied points or surfaces within the solution domain. Surface heat and mass transfer coefcients and forces; also values of the dimensionless coordinate y+ for near-wall mesh nodes. Global quantities such as total force components (e.g. drag, lift) on submerged bodies and their dimensionless counterparts, overall energy balances, etc.

It is important to examine this information carefully to verify that the calculations have been properly set up and are producing sensible results. In particular, the user should ensure that:
Version 3.26

The interior elds are examined for plausibility and similar checks made on global quantities. For turbulent ow calculations, the near-wall node y+ values are within the
1-21

CFD MODELLING PRINCIPLES Model evaluation

Chapter 1

recommended range (30-100) in regions where adherence to this constraint is important. In the case of calculations with a two-layer model, checks should be made that the mesh is sufciently dense within the near-wall layer. The magnitude of numerical discretisation errors (spatial and, where relevant, temporal) is assessed and arrangements made for their reduction to acceptable levels, if necessary.

Of the above tasks, the last is currently the most difficult, for it is not possible to achieve it by a simple calculation. What is required are the following: A reliable means of evaluating the discretisation errors. At present, this is accomplished by repeating the calculations with ner meshes and smaller time steps (strictly, these should be done independently) and noting regions of appreciable change in the solution. Strategies for altering the mesh or time step to reduce errors. These adjustments are made manually.

Ideally, the error correction process should continue until the changes fall to acceptable levels. In practice, this approach may not be feasible, especially for three-dimensional problems involving complex geometries, due to the large preparation and computing overheads. An alternative way of gaining some insight into the presence of spatial truncation errors is to change the spatial discretisation scheme and note the effect on the solution. The second-order options, or blends thereof, available in STAR-CD will usually produce the lowest numerical errors.

1-22

Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Introduction

Chapter 2

BASIC STAR-CD FEATURES


The main aim of this part of the manual is to provide users, whether experienced or not in the application of general-purpose computational fluid dynamics codes, with advice on effective ways of setting up and running a basic flow analysis model using STAR-CD. The reader is, however, expected to have gone through Chapter 1 and the material in the Methodology volume. All aspects of user interaction are handled by pro-STAR, the pre- and post-processing subsystem of the STAR-CD package. As a pre-processor, pro-STAR is the means by which the user defines the geometry, calculation mesh, boundary conditions, initial conditions, uid and solid material properties, analysis controls,

Introduction

which uniquely determine the flow problem to be solved. As a post-processor, pro-STAR can read and re-format the various data les produced by the analysis, manipulate the data read in, produce extensive and easily comprehensible printouts, summarise information on the calculated results, draw sophisticated 3-D graphical images, animate those images, draw graphs of various calculated quantities.

Both pre- and post-processing operations are served by an extensive set of plotting facilities, enabling rapid visualisation of even the largest models, plus on-line context sensitive help that provides detailed information on usage. pro-STAR is a combined command-, menu-, and process panel-driven program. The choice of working interface is entirely up to the user and depends on whether the available terminal can accept and display graphical input and output, whether the host computers operating system supports a windowed, graphical user interface (GUI) environment, user preference and level of experience with STAR-CD.

GUI facilities are available for UNIX, Linux or Windows implementations of STAR-CD using the OSF Motif graphics environment. They consist of two basic types: 1. Graphical tools such as drop-down menus, dialog boxes, push-buttons, sliders, etc. to assist users in specifying the desired pro-STAR actions. These facilities are arranged around the main pro-STAR window, or have their starting point located somewhere on that window. Their purpose and best way of using them are explained throughout this volume.
Version 3.26 2-1

BASIC STAR-CD FEATURES Running a CFD Analysis

Chapter 2

2. A series of process-oriented panels contained within the STAR GUIde window. These represent an additional GUI facility, suitable for building CFD models from scratch. An outline description is given in the section entitled The STAR GUIde Environment on page 2-39. Information on how to use this environment is provided by an on-line Help system accessed from within the STAR GUIde window. Note, however, that: In the present release, a number of pro-STAR facilities are not accessible via either of the GUI systems. Where this is the case, the discussion is in terms of commands rather than GUI operations. For the convenience of users who prefer to work with commands, the description of every GUI panel and dialog box also includes a list of commands that have equivalent functionality. A summary of all pro-STAR commands is given in the Commands volume, Appendix B. A summary of pro-STARs conventions regarding command syntax can be found in this volume, Appendix A. The same information is also available on line by choosing Help > pro-STAR Help from the menu bar in the main pro-STAR window and then selecting item PROGRAM (for command syntax) or COMLIST (for command summary) in the scroll list at the bottom of the Help dialog box. Details of all available commands and specic aspects of the command-driven mode of operation are discussed in the Commands volume.

Whichever operating mode is chosen, the same principles of use apply, namely: A model is constructed or examined with the aid of numerous functions or tools, each of them represented by a menu-item choice, a special dialog box, a STAR GUIde panel or a command. Tools are selected as necessary, in a sequence that is sensible for modelling purposes. The recommended sequence is described in Chapter 1, The Basic Modelling Process and is further elaborated in the Tutorials volume. A tool always provides instant feedback so the user can tell immediately if it was used properly. Users can greatly inuence the speed with which certain operations are performed by intelligent use of the available options.

Running a CFD Analysis


A CFD analysis may be performed in one of the following two ways: By typing a series of script names in a shell or command prompt, each designed to help you build a CFD model, obtain a solution and then display the analysis results. This is the original method of working with STAR-CD and, for reasonably experienced users, may be the quickest way of getting results. By employing a new utility, STAR-Launch, as an aid to navigating through the various STAR-CD functions. This method should be particularly benecial to novice users.
Version 3.26

2-2

Chapter 2

BASIC STAR-CD FEATURES Running a CFD Analysis

Using the script-based procedure To perform a CFD analysis using scripts, the procedure described below should be followed in the order indicated: Step 1 Set up an appropriate environment for your STAR-CD system. The desired pro-STAR setup is defined by a number of environment variables such as: STARUSR path to the location of les PRODEFS (for command abbreviations) and PROINIT (for pro-STAR initialisation) see Chapter 20, Set-up Files MACRO_LOCAL and MACRO_GLOBAL paths to the local and global macro locations (see Chapter 20, Macros) PANEL_LOCAL and PANEL_GLOBAL paths to the local and global user-dened panel locations (see Chapter 20, Panel denition les) TMPDIR path to the location of pro-STARs temporary (scratch) les Further instructions on how to set the STAR-CD environment variables are given in the Installation and Systems Guide, supplied with the STAR-CD installation CD-ROM. Note that these settings can usually be made once and for all, at the time when STAR-CD is first installed on your computer. Step 2 Create a separate subdirectory for each case to be analysed and give it a descriptive name. This helps to organise the various files created during a run and makes it much easier to check or repeat previous work. Step 3 Move to the appropriate subdirectory and start a pre-processing (model building) session by typing: prostar The system will respond by prompting you to define the pro-STAR variant you wish to use Please enter the required graphics driver Available drivers are: x, xm, glm, mesa [xm] where the options refer to the various types of graphics libraries commonly used for graphical displays in workstations or X-terminals, i.e. x xm glm mesa X-windows X-windows using the Motif interface for pro-STARs GUI functions Motif interface plus the standard Open GL libraries for pro-STARs GUI functions As above but using the Mesa OpenGL library (this option is not available in Windows ports)
2-3

Version 3.26

BASIC STAR-CD FEATURES Running a CFD Analysis

Chapter 2

The precise list of options displayed by the prompt depends on how the pro-STAR environment was originally set up on your particular machine. Type in a response that is appropriate to the workstation or terminal you are using. Note that pro-STAR automatically searches for the highest depth pseudo colour, direct colour or true colour visual that exists for your screen and uses it. This may be overridden by specifying option -c when starting up pro-STAR, as shown below: prostar -c This is an 8-bit pseudo colour setting with shared colour map. The setting causes no screen ashing but requires sufcient available colours to work. Once the desired pro-STAR variant has been chosen, an introductory panel opens up leading you into STAR-CDs model-building environment, as discussed in the section on pro-STAR Initialisation. From that point on, you may provide input for setting up your model according to the descriptions given in the remaining chapters of this manual. Step 4 When you have finished setting up your CFD model, it is advisable to check the files created so far in your working directory. These should include: File .mdl, containing all user-supplied information about the model File .geom, containing a full description of the model geometry. At present, STAR operates only in SI units and all dimensions must therefore be dened in metres. However, it is possible to scale the mesh dimensions by a scaling factor if non-SI units were used during mesh generation. File .prob, containing problem data, such as material properties, boundary conditions, control parameters, etc. File .echo, containing a log (echo) of all instructions issued to pro-STAR during the session parm.inc, containing problem size information such as number of cells, vertices, boundaries, etc. This is created by pro-STAR while writing the geometry file. The size information helps to create an optimised STAR executable file for the model in hand.

Depending on the nature of your problem (e.g. whether it requires a special modelling facility such as Lagrangian multi-phase) additional files may be created. These are discussed fully in individual chapters of the User Guide dealing with these topics. A detailed description of all commonly used data files is given in Chapter 21, Commonly used files. Step 5 If user-defined subroutines are not required, go to Step 6. Otherwise, create a subdirectory called ufile and place your subroutine files in it. The most convenient way of doing this is to create both the subdirectory and the files from within the pro-STAR session (see Chapter 18, Subroutine Usage). Note that these files contain default (dummy) code to start with and you should edit them as necessary to insert your own code.

2-4

Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Running a CFD Analysis

Step 6 Based on the geometrical and thermophysical data of the model just created, you are now in a position to run STAR. This may be done in one of the following ways: 1. Via STAR-GUIdes Run Analysis Interactively panel. Examples of using this panel are provided in the Tutorials volume. This way, the STAR executable will be run automatically and the analysis results (in terms of solution residuals) will be displayed on a separate window; see The StarWatch Utility on page 21-15 for more details. 2. By exiting from pro-STAR and then running STAR from your sessions shell or command prompt. For a large number of cases, it will be sufcient to type one command. For a single-precision run, type: star whereas for a double-precision run, type: star -dp Please note that it is not necessary to provide the case name of the model you are running. However, for better bookkeeping, it is still important to keep every case in its own directory. In most cases, and based on the model characteristics specied in pro-STAR, STAR automatically recognises the default run-time requirements and proceeds with the CFD analysis without further user input. Some cases, however, require the specication of additional options related to both run-time resources and/or behaviour. Briey, the user can control the operational behaviour of STAR in one of the following areas: Job precision (single or double precision) Job control (to abort, kill or restart a job) Environment (to export environment variables) User coding (to control the compilation and/or linking of user-supplied code) Parallel setup (pertaining to domain decomposition variations, data distribution and parallel communication libraries) Resource allocation (to choose which machines to use)

A full list of such options can be obtained by typing: star -h or star -help The listing will also contain a short description of each options purpose. A more complete description can be found in Appendix H of this manual. Please note that, in general, one needs to specify the machine (node) resources for running STAR and this input is automatically used to determine the type of run required. The following examples illustrate this point:
Version 3.26 2-5

BASIC STAR-CD FEATURES Running a CFD Analysis

Chapter 2

star star origin star 4

Runs sequentially on the local node Runs sequentially on a host called origin Runs in parallel with 4 processes on the local node Runs in parallel with 16 processes on a host called origin

star origin,16

star cheese,2 pickle,2 curry,2 rice,2 Runs in parallel on a cluster of 4 machines with 2 processes each Please note that, for parallel cases, the computational domain decomposition is automatically handled by the star front-end script. The output les generated during the course of the run will be merged and placed in the cases directory. There is then no visible difference between running in sequential and running in parallel. Extra options exist to cater for special situations which cannot be detected automatically. Please refer to Appendix H for a list of such options, their syntax and their intended purpose. Step 7 Once the run starts, iteration or time-marching continues until one of the following conditions is met: All the iterations or time steps specied for the current run have been completed. The normalised residual sum drops below a specied value (steady-state runs only). The solution starts to diverge. This occurs when a residual anywhere inside the solution domain reaches a very high value or a numeric overow condition. Divergence is automatically detected by STAR, which then stops the calculations and writes a le with extension .div. This is identical in format and content to the normal solution data (.pst) le and thus enables you to inspect the residuals and locate the mesh region where numerical instability has occurred.

Check the condition under which your run has terminated. The parameters involved in controlling the CFD simulation are set in pro-STAR using the facilities provided by the Analysis Controls folder in STAR GUIde. Additional information, such as printout of input data, boundary conditions, residual histories of the inner iterative loops, etc. can also be generated, as described in Chapter 19. Step 8 At the beginning of the analysis, STAR will read the following files: case.geom geometry data case.prob problem data

and, optionally, one or more problem-dependent files such as


2-6

case.pst solution data (for restart runs)


Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Running a CFD Analysis

case.vfs view factors for radiation problems case.ndt wall distances for two-layer turbulence models case.evt transient event data case.drp droplet data

On completion of the run, additional files will be present in your working directory. These will include: case.run summary of input data plus numerical statistics and (optional) printout of solution variables case.info STAR warning messages and (optional) additional numerical statistics case.rsi various statistics of the run (solution residuals / rate-of-change values) in a form that can be displayed graphically. Statistics are not currently available for entities V22 and F22 of the V2F turbulence model, nor the six components of the Reynolds Stress turbulence model. case.pst STAR results in a form suitable for post-processing or for restarting another STAR run

The above is the minimum number of output files created by a STAR run and you should confirm that they are all present. Additional files may appear depending on the nature of the problem. Such cases are discussed and explained individually in the relevant chapters of this volume. A description of all commonly used output files appears in Chapter 21, Commonly used files. Note that, at the beginning of every restart run, all current results files (such as the ones listed above) are automatically saved in a local sub-directory called RESULTS.xxx, where xxx stands for the run number. These sub-directories thus contain results obtained at the end of each successive run and are available for future inspection, or as a backup in case the restart runs files are corrupted. If the case is subsequently run from initial conditions, the results of the last run performed are stored in sub-directory RESULTS.000 and all other RESULTS directories deleted. The process then repeats itself with the creation of a new RESULTS directory for each new restart. Step 9 You should now check the results of the analysis by looking at the run history (.run) file (see Chapter 19 for more information on its contents). The additional information (.info) file should also be examined for any signs of numerical problems. These are normally translated into warning messages. Both these files may be inspected via a suitable text editor or via panel Run History of a Previous Analysis in STAR-GUIde. Satisfactory completion of steady-state STAR runs can usually be judged by observing the following quantities: The residual history printed during the run. The sum of the normalised absolute residuals should diminish steadily. The monitoring values of the dependent variables at a critical location within the ow eld. These should stabilise to the converged solution.

In transient calculations, completion is defined in terms of the elapsed (simulation) time or establishment of a steady state. In the latter case, information on the global
Version 3.26 2-7

BASIC STAR-CD FEATURES Running a CFD Analysis

Chapter 2

change and monitoring values can be used in the same way as for a steady state analysis. It is important that checks are made regularly during the initial stages of the analysis to monitor the solution progress. If divergence occurs, the run should be terminated and appropriate adjustments made to the relevant control parameters such as under-relaxation factors. Neglecting this can result in costly and unproductive runs. Note, however, that increases in residuals and oscillations in the computed variables during the early stages of a run are not uncommon and should disappear after a few iterations. The run should therefore be given sufficient time to stabilise before any judgement is made on its progress. Step 10 Continue with an evaluation of the simulation results (post-processing) using the relevant facilities in STAR-GUIde. If you have previously exited from pro-STAR and run STAR separately (see Step 6 above), continue by typing prostar to re-enter pro-STAR. Reply as before to the initial prompt Please enter the required graphics driver Available drivers are: x, xm, glm, mesa [xm] and then supply the case name and other input, as described in Step 3. Using STAR-Launch STAR-Launch is a graphical interface that provides access to most of the CD adapco modelling tools, including pro-STAR, several es-tools and the STAR solver. Using STAR-Launch eliminates the need to enter multiple script names manually, as described in the previous section, and also ensures settings can be saved between sessions and between cases. STAR-Launch is intended to be used with only one case at a time. There is, however, no limit on the number of STAR-Launch windows that can be active simultaneously. Activating STAR-Launch On Unix/Linux Either double-click the appropriate icon on your desktop (for systems which support this), or else type starlaunch & in an appropriate X-terminal window. This will display the STAR-Launch main window shown below:

2-8

Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Running a CFD Analysis

On Windows Double-click the appropriate icon on your desktop. Window layout The key parts of the STAR-Launch main window are highlighted below. The Shortcut Buttons provide quick access to the three main functions of STAR-Launch, namely: Setting the working directory Launching a pre-/post-processing tool Running the STAR solver

These functions are also accessible through the Main Menubar running along the top of the window. The current working directory is displayed to the right of the Shortcut Buttons. This is the directory that will be used when launching a pre-/post-processing tool or running the STAR solver.

Version 3.26

2-9

BASIC STAR-CD FEATURES Running a CFD Analysis

Chapter 2

Setting the working directory Choose File > Set Working Directory or click the first shortcut button on the main window. This will display a directory browser as follows:

Navigate to the desired directory and click OK. Note that a path can be entered manually in the Look In entry box at the top of the browser window. The directory tree will be updated to reflect any valid path entered here. The path that will be set on clicking OK is shown along the base of the browser window. Starting a pre-/post-processing tool To start a pro-STAR session, or an equivalent pre-/post-processing tool, select the appropriate entry in the Pre-Post menu, or click the second shortcut button on the main window. The tool that will be started from this button is set using the Pre-Post tab of the Preferences dialog. Only tools available in the current installation will be listed in the Pre-Post menu. STAR-Launch will open a new Process Output window as shown below, which will contain any text generated by the Pre-/Post-processing tool as it starts up.

2-10

Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Running a CFD Analysis

The STAR-Launch window can be resized as necessary to display more of the text appearing in the Process Output window. Only one pre-/post-processing tool can be running at any one time. If an attempt is made to start another one, a prompt will appear asking if the existing tool should be closed. Choosing Yes will kill the existing process, which could result in loss of any unsaved data. When a process is active, the ball appearing in the Process Output window tab will be shaded red. This will change to black when the process is finished. Running STAR interactively Selecting Solver > Run Star Interactively, or clicking the third shortcut button, will display the Run Star Interactively dialog shown below. The dialog provides several options for running the STAR solver; detailed information on these options can be found in the STAR-Launch On-line Help, accessed from Help > Online Manual. When all settings have been made, the solver is started by clicking Run. STAR output will appear in a new Process Output window, similar to the one shown above for the Pre-/Post-processing tool. When the STAR solver finishes, the ball on the tab of the output window will turn black. Note that only one STAR solver can be run at any one time from a STAR-Launch session. If multiple solver processes are required, more STAR-Launch sessions must be opened.

STAR-Launch project les .starlaunch directory and launcherGlobal.xml When STAR-Launch is first used, it will attempt to create a hidden directory, .starlaunch in the users home directory (as given by $HOME). Within this directory, STAR-Launch will write file launcherGlobal.xml. The file is normally written on exit from STAR-Launch and contains details of the last working directory specified by the user. It also stores a flag indicating whether this stored path is to be used automatically in a new session. starProject.xml Another file, starProject.xml, can be written by STAR-Launch if requested by the user. This stores settings from the Preferences and Run Star Interactively
Version 3.26 2-11

BASIC STAR-CD FEATURES pro-STAR Initialisation

Chapter 2

dialogs. The various File menu options affecting this are explained below: File > Open Project This presents a le browser that should be used to nd the required starProject.xml le. STAR-Launch will be updated to reect settings from the new le. File > Save Project This will write a starProject.xml le in the current working directory. Settings within the le will reect the current state of STAR-Launch. File > Save As Default This will write a starProject.xml le in the hidden .starlaunch directory within the users home directory.

STAR-Launch start-up procedure When STAR-Launch is first started, it will look for the launcherGlobal.xml file in the hidden .starlaunch directory. This will be read to determine the initial working directory. If a starProject.xml file is also contained in the hidden .starlaunch directory, STAR-Launch will read all settings within the file, and use these to configure the initial state of the GUI. If a starProject.xml file is also found within the initial working directory, STAR-Launch will read the settings within that file, and use these to update the initial state of the GUI. Settings contained in a local starProject.xml file (i.e. one within the initial working directory) will always take precedence over settings obtained from a starProject.xml file in the hidden .starlaunch directory. Preferences dialog Selecting File > Preferences... will display the Preferences dialog shown below:

The options contained here are explained fully in the STAR-Launch Online Help (Help > Online Manual). Their state will be saved in the starProject.xml file.

pro-STAR Initialisation
Once the basic GUI mode of operation has been chosen (x, xm, glm or mesa, see Running a CFD Analysis, Step 3 above, or via the Preferences dialog in STAR-Launch), the introductory panel shown below appears. The following three optional inputs may be provided: 1. The desired case name star is the default name assigned to the current problem at the start of a pro-STAR session. Overtype this by the correct name in the Enter Case Name text box. Note that:
2-12 Version 3.26

Chapter 2

BASIC STAR-CD FEATURES pro-STAR Initialisation

(a) If a model already exists in your present working directory, its name will be picked up automatically by pro-STAR. (b) If you have more than one model, you may choose the right one by clicking on the le selection icon next to the Case Name text box. This activates a File Selection browser (see page 2-34) that enables you to choose the desired model, stored in a le of form case.mdl 2. The Restart mode This can be either a restart from an existing model denition, via its corresponding model (.mdl) le or a brand new case. Clear this option if the latter applies. 3. The Append mode The sessions user input will be appended to an existing log or echo (.echo) le or a new echo le will be created. Clear this option if the latter applies. Refer to the description given in Chapter 21, Commonly used files for a definition of pro-STARs model and echo files. Click on Continue to display the basic pro-STAR GUI windows or Exit to abort the current session.

Two windows are displayed automatically immediately following the initialisation stage. These are described in the sections entitled Input/output window below and Main window on page 2-15. Input/output window This window, shown on the next page, consists of the following three sub-windows, in top-to-bottom sequence:
Version 3.26 2-13

BASIC STAR-CD FEATURES pro-STAR Initialisation

Chapter 2

1. Command Output displays the time and date of the run, plus summary data for the model in hand, if such data were read in from a Restart le at the initialisation stage. All subsequent output in that window are the echo of every instruction issued by the user plus pro-STARs response to it. The latter serves as feedback to help determine whether a facility was used properly. 2. Command Input accepts pro-STAR instructions in the conventional Command keyword plus parameters format described in the pro-STAR Commands volume. Thus, it is possible to work in command mode at any stage of the model building process despite the fact that the GUI version of the code is active. This is useful when working with facilities that cannot be activated from a GUI panel or dialog box in the present pro-STAR version. This sub-window can be re-sized by dragging the control sash (the small square at the top right-hand corner) up and down. 3. Command History provides a numbered command history list that keeps track of all pro-STAR instructions issued in the current session, either as choices from a menu in the main GUI window (see Main window on page 2-15) or as commands typed in the sub-window above. Menu choices are translated into their equivalent commands before being added to the list. The list can be used in the following two ways: (a) Single-click the command number to copy a command into the Input window and then edit it. (b) Double-click the command number for immediate re-execution. The Command History sub-window can be re-sized by dragging its control sash up and down.

2-14

Version 3.26

Chapter 2

BASIC STAR-CD FEATURES pro-STAR Initialisation

Note that: 1. The Command Input sub-window can accept multiple commands by cutting and pasting from the window of another application (e.g. a text editor). If any of the imported command text needs editing prior to execution, click the Pause action button under the window (see the above panel) paste in the required group of commands make the necessary changes click the Pause action button again to allow pro-STAR to begin executing the commands one by one 2. The Command History sub-window will normally list all commands issued to pro-STAR, including those generated indirectly via an external command le (see Chapter 21, Commonly used files) or a user macro (see Chapter 20, Macros). It will also list details (e.g. coordinate values) of items such as vertices, splines, cell faces, etc. that are directly picked from the main window display with the mouse. Such output may become extremely voluminous and may thus obscure the record of primary operations performed by the user. Clicking the Short Input History button will prevent this and will cause pro-STAR to list only the instructions directly issued by the user. Main window The main GUI window, shown below, is used for the following purposes: (a) (b) (c) (d)

Version 3.26

2-15

BASIC STAR-CD FEATURES pro-STAR Initialisation

Chapter 2

For graphical display of various aspects of the current model. As a launch pad for those pro-STAR utilities that are available in GUI form. The user should click one of the eleven drop-down menus appearing in the menu bar and select one of the displayed choices. Commonly used functions affecting the model display in the graphics area are also implemented, in the form of action buttons. These are distributed along the top and left-hand-side borders of the window and are described in Chapter 5. Letting the mouse rest on top of any button causes a brief explanatory legend to appear in a special window provided for this purpose. To show messages for the user, such as prompts to supply data, in the space underneath the graphics area. The default display shows: (a) The current plot parameters (see Plot Characteristics on page 5-3). (b) A clock display showing the current time and date. This may be turned on or off by selecting Show Clock or Hide Clock from the Utility menu. (c) Three status indicators showing the result of processing the latest command, irrespective of whether it was typed in directly or issued via a GUI operation. The indicators are arranged as a set of trafc lights whose signicance when lit is as follows: i) Green the command was executed successfully. The displayed message is

2-16

Version 3.26

Chapter 2

BASIC STAR-CD FEATURES pro-STAR Initialisation

Command: <Command Name> is Done ii) Amber the indicator ashes to signal the presence of warning messages in the Output window. The displayed message is Command: <Command Name> has a Warning, check the output window iii) Red the command has failed. The displayed message is Command: <Command Name> has an Error. Click on the red light to view the error Clicking on the red light displays an Error/Warning Summary pop-up window with more information on what has gone wrong, as discussed under Error messages below. Note that if a GUI operation generates a series of commands, a message is issued for each one in turn as soon as it is processed. If all goes well, the message nally seen on the screen is for the last command that was executed. The menu bar The menu bar items are listed below, along with a reference to chapters containing a detailed description of their functionality: 1. File Provides all basic housekeeping utilities, including those related to input/output operations see Chapter 21, File Handling. 2. Tools Activates dialog boxes that allow denition and manipulation of basic pro-STAR entities (cells, vertices, splines, etc.). Most of these are covered in Chapter 3. Another type of tool facilitates routinely-used, complex operations such as colour selection and mesh surface lighting effects (see Chapter 5, Colour settings). 3. Lists Displays lists of all available entities of a certain type (cells, vertices, boundaries, etc.) as well as those currently grouped into a user-dened set. 4. Modules Accesses special dialog boxes that set up various STAR-CD model parameters in connection with (a) Animation control see Chapter 9, Animation. (b) Transient condition denition see Chapter 8, Load-step based solution mode. 5. Plot Contains most of the facilities and options used for plotting operations see Chapter 5. 6. Post Displays the results of a STAR run see Chapter 9, Basic Post-processing
Version 3.26 2-17

BASIC STAR-CD FEATURES General Housekeeping and Session Control

Chapter 2

7. 8.

9.

10.

11.

Displays. Graph Produces various types of graph see Chapter 9, Graph Displays. Utility Provides miscellaneous utility functions designed to aid model control and development, such as calculation of cell volumes and distance between vertices see Chapter 4, Mesh and Geometry Checking. It also supports special user-controlled operations, such as the assignment of user-dened functions to keyboard keys. Panels Allows you to set up your own screen buttons or panel tools for performing common pro-STAR operations see Chapter 20. Favorites (optional) This menu appears only if you have chosen any favourite (i.e. frequently used) panels in the STAR GUIde tree structure (see Panel navigation system). The relevant panels are listed under this menu, enabling you to jump to them directly. Help Displays pro-STAR command help information in a scrolled-text fashion. Also contains on-line versions of the STAR-CD manuals and tutorials.

A mouse click on any of the above menu names displays a drop-down list. In general, clicking an item on the list starts up the action indicated, unless the name is followed by an ellipsis () which means the item displays a new dialog box, or an arrow () which means the item opens a secondary list with more items to choose from.

Throughout this manual, the > sign denotes successive mouse clicks on menu names, menu list items, dialog box buttons, etc. For example, Tools > Cell Tool > Edit Types means click Tools in the menu bar, then click the Cell Tool item in the drop-down list, then click the Edit Types button on the displayed Cell Tool dialog.

General Housekeeping and Session Control


When pro-STAR is initially installed on a computer system, default settings are provided for the programs fundamental operating features. These settings, specified mostly via commands typed in the Command Input window, can be altered in special circumstances. The following aspects of the programs operation are covered: Basic set-up These settings are helpful in establishing an appropriate environment for pro-STAR and for accessing facilities related to the operating system of the host machine. They are as follows: 1. Operating mode command BATCH disables pro-STARs periodic prompts
2-18 Version 3.26

Chapter 2

BASIC STAR-CD FEATURES General Housekeeping and Session Control

2.

3. 4.

5.

to stop or continue displaying long lists of data. pro-STAR size command SIZE lists the maximum number of cells, vertices, boundaries, etc. that the code can handle. If any of these values is inadequate for the model in hand, it may be increased by following the procedure described in Chapter 21, Resizing pro-STAR. Reporting cpu time required to complete a pro-STAR function by typing command TPRINT. Accessing special, user-written pro-STAR subroutines by typing command USER. It is advisable to use this facility only after consultation with CD adapco. Communicating with the operating system itself. This may be done by rst choosing File > System Command from the menu bar to display the System Command dialog box shown below and then typing system commands in its text box.

Command:

SYSTEM

This is useful for issuing instructions to the host operating system without having to exit from the pro-STAR environment. Screen display control There are several facilities for controlling the screen display during a session, as follows: Dening the layout and look of the pro-STAR windows. Default settings are normally used for these but the user can override them at will, as explained in Chapter 20, Set-up Files and also in Appendix F. Switching from the terminals graphics screen to the text screen via command TEXT. This is applicable only when running a non-GUI version of pro-STAR and is used for controlling terminals that operate entirely either in text or in graphics mode. Setting the number of lines that appear on each page of the Command Output window during lengthy listings using command PAGE. Displaying a history of the most recent commands issued during the session via command HISTORY. Again, this applies only when running non-GUI versions of pro-STAR since these do not provide a command history window. Echoing the user input stream to the same device as the output stream (e.g. the screen or a disk le) via command ECHOINPUT. Reading stored cursor picks from an input le, rather than displaying a crosshair cursor and reading the user-specied picks off the screen command CURSORMODE. Providing a descriptive title for the current model that helps to identify each
2-19

Version 3.26

BASIC STAR-CD FEATURES General Housekeeping and Session Control

Chapter 2

plot produced subsequently choose File > Model Title from the menu bar to display the dialog box shown below. The desired title and up to two lines of subtitle text should be typed in the text boxes provided.

Command: Error messages

TITLE

pro-STAR issues error messages as a result of receiving incorrect commands or if it is unable to execute a valid command for whatever reason. Such messages appear in three places: On the standard Output window At the bottom of the main pro-STAR window, after the red indicator light (see page 2-17) On the Error/Warning Summary pop-up panel, as in the example shown below:

2-20

Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Set Manipulation

The panel shows a list of all current errors, including their error id and command in which the error occurred. If you know the cause of the problem, click Clear to close the panel. Otherwise, select any item in the list to see the error description at the bottom of the panel. Error recovery If mistakes are made during a session, the following operations are useful for error recovery: Re-executing a named range of previously issued commands by typing command RECALL. This can be most conveniently used in conjunction with the HISTORY command above. Retrieving the state of the model description as it was at the time of the previous SAVE or RESUME operation command RECOVER. This is useful if a mistake is made but the user does not notice it until some time later. A list of commands issued since the last SAVE or RESUME operation is displayed, along with a prompt to choose the last command in the list to re-execute. The chosen command will normally precede the one where the mistake was made. Once all commands up to that point are re-executed, the user should type in a correct command and carry on from there. Note that the above safety features can be switched off using command SAFETY. This might speed up pro-STAR execution but at the potential cost of making any sort of recovery from mistakes nearly impossible. Thus, turning off these features should be used with extreme caution.

Session termination The current pro-STAR session is terminated by choosing File > Quit from the menu bar. This displays the Quit pro-STAR dialog box shown below, reminding you to save the results of the session to a .mdl file (in case this has not already been done explicitly). Alternatively, you may deliberately exit from pro-STAR without saving the present sessions work, by clicking Quit, Nosave.

Command:

QUIT

Set Manipulation
pro-STAR has extensive facilities for collecting and modifying sets of objects. These are accessible by clicking one of the coloured buttons down the left-hand side of the main window. The pro-STAR entities serviced by the buttons are:
Version 3.26

C-> cell sets V-> vertex sets


2-21

BASIC STAR-CD FEATURES Set Manipulation

Chapter 2

S-> spline sets Bk-> mesh block sets B-> boundary sets Cp-> couple sets D-> droplet sets

Each button offers a wide range of possibilities to select, delete or re-select sets. For example, selection may be done by picking all objects falling within a given geometric range in a local coordinate system. Using other criteria, one can collect together all cells or boundaries connected to the current vertex set (and the reverse). Selection can also take place by simply using the screen cursor to point to items on the current plot. Each button gives direct access to the following set manipulation options: All select the entire set None empty out the current set Invert invert the current set, i.e. select all entities that are not currently selected and un-select the ones that are New replace the current set with a new set, formed on the basis of a criterion given in a secondary drop-down list Add add more members to the current set, selected using one of the criteria in the secondary drop-down list Unselect remove some members from the current set, selected using one of the criteria in the secondary drop-down list Subset select a smaller group of members from those in the current set, selected using one of the criteria in the secondary drop-down list

In addition, C-> offers one extra option, Surface, which selects all cells lying on the surface of the most recent mesh plot and makes them the current set. Further details on the above set selection options are given in Chapter 3, for each of the mesh entities described there. Note that it is possible to save and restore useful cell, vertex, spline, block, boundary and couple sets without the need to rebuild them frequently. This is done by clicking the INFO button at the left-hand side of the main pro-STAR window. The following operations are possible: 1. To perform a save set operation, select INFO > Store Set/Surface/View and then click the Sets tab to display the dialog shown below:

2-22

Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Set Manipulation

Commands: SETWRITE

SETDELETE

The input required is as follows: (a) Set File The name of the set (.set) le that will store the set denition. If such a le already exists, pro-STARs built-in le browser may be used to help locate it. (b) Name An identier for the set being saved, up to 80 characters long Click Write to save the set denition. 2. To delete a set denition previously stored, use the same dialog as above and specify the following information: (a) Set File The name of the set (.set) le containing the denition to be deleted. pro-STARs built-in le browser may be used to locate it. (b) Select Entry The location of the set to be deleted, as select from the list. Click Delete to delete the set denition. 3. To perform a restore set operation, select INFO > Recall Set/Surface/View and then click the Sets tab to display the dialog shown overleaf:

Version 3.26

2-23

BASIC STAR-CD FEATURES Set Manipulation

Chapter 2

Command:

SETREAD

The input required is as follows: (a) Set File The name of the set (.set) le containing the set denition. pro-STARs built-in le browser may be used to help locate it (b) Select Entry Select the particular set required by name from the scroll list. The status of the selected entry is displayed in the box underneath (c) Choose Data Specify the type of set to be read in (All, Cells, Vertices, etc.) by clicking one of the displayed option buttons (d) Read Option Specify how the sets to be read in will modify any existing sets by selecting one of the menu options (Newset, Add, Unselect or Subset) Click Recall to recall the selected set. Note that it is possible to print a summary of all data sets stored so far by typing command FSTAT. Selecting sets of various entities has two major uses: 1. To display only items in the currently active set. For example, each time Cell plot is chosen from the Plot menu, pro-STAR plots only cells in the currently active cell set. Note that command SETADD causes all newly-dened cells to be automatically added to the current set. Thus, successive plots of the current state of the mesh can be made without needing to build a new set after each new cell denition. SETADD may also be used in the same way for other kinds of sets, i.e. boundaries, cell couples and splines. 2. To perform almost any modelling or post-processing operation on the currently active set, instead of on individual objects or a range of them. For
2-24 Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Table Manipulation

example: (a) Choosing Lists > Cells from the menu bar and clicking the Show Cset Only option button will list only cells in the current set. (b) When working with commands, typing VMOD,VSET,2.5 will modify the X-coordinate of every vertex in the current vertex set. All set operations can also be performed by typing commands CSET, VSET, BSET, BLKSET, CPSET, SPLSET and DSET. These are described in detail in the pro-STAR Commands volume.

Table Manipulation
pro-STAR tables are multi-variable entities akin to spreadsheets and can be used to store values for up to 100 dependent variables as functions of a combination of several independent variables. For most commonly used tables, the independent variables can be the three spatial coordinates, plus time for transient cases or iteration for steady-state cases. The dependent variables are normally flow field solution variables but, in principle, they could be anything of relevance to STAR-CD. Basic functionality At present, tables are used principally as a substitute for user subroutines in the following situations: Boundary Conditions variable conditions along the surface of a boundary region; see Chapter 7, Boundary Region Denition, page 7-8. For most boundary types, the independent variables may be any combination of spatial coordinates and, for transient cases, time. The only exception is outlet boundaries where only time is allowed (i.e. there can be no spatial variation in outow conditions along the outlet surface). The permissible dependent variables vary according to the boundary type considered; a full list is given under the various boundary type descriptions in Chapter 7, or the corresponding on-line Help topics for STAR GUIdes Dene Boundary Regions panel. Initial Conditions non-uniform initial distributions of eld variables; see Chapter 7, Flow Field Initialisation. The independent variables may be any combination of spatial coordinates, for both steady and transient cases. The permissible dependent variables for uid materials are listed under topic Manual Initialisation. Scalar variables representing chemical species mass fractions may also be initialised as described in topic Initialisation. Note that: (a) The applicability of eld variable and scalar initialisation tables can be restricted to a selected stream or cell type (b) The only dependent variable allowed for solid materials is temperature Source Terms a description of mass, heat, momentum or scalar species sources; see Chapter 6, page 6-8. The independent variables may be any combination of spatial coordinates and time for transient cases, or iteration
2-25

Version 3.26

BASIC STAR-CD FEATURES Table Manipulation

Chapter 2

number for steady-state cases. The permissible dependent variables vary according to the source type considered; a full list is given in the on-line Help topics for the various sources denable via panel Source Terms. Note that, as with initial conditions, the applicability of source tables can be restricted to a selected stream or cell type. Rotational Speeds variable angular velocity in rotating systems, specied in panel Rotating Reference Frames. The independent variable is time for transient cases, or iteration number for steady-state cases. The dependent variable is angular velocity, expressed in r.p.m. Run Time Controls variable time step for transient cases, specied in panel Set Run Time Controls. The independent variable is time, the dependent variable the time step size. Note that STAR assumes a linear variation in step size between the size values entered at two consecutive time points. This is illustrated by the example below, showing the desired time step variation and the table structure needed to achieve it:
0.35 0.3 0.25

DT (sec)

0.2 0.15 0.1 0.05 0.0 0.00

5.00

10.00

15.00

20.00

Time (sec)
Figure 2-1 Example of time step variation

Table 2-1: Time step size table TIME 0.0 1.0 5.0 5.0 10.0 20.0 DT 0.01 0.1 0.1 0.2 0.3 0.3

In addition, a special table type is used to enter problem data for Lagrangian
2-26 Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Table Manipulation

Multi-Phase cases. The following two options are available in this category: Mass Flow Rate injection rate history, specied in panel Spray Injection with Atomization which activates STAR-CDs built-in spray modelling facilities. The table is used in transient analyses only and contains injector mass ow rates vs. time (see also topic Dene Injectors). The same table type may also be used in panel Injection Denition as part of an explicit specication of injection characteristics. Diameter Distribution Function a denition of the droplet diameter distribution function, in terms of spray percentage mass vs. droplet diameter. This table may also be specied in panel Injection Denition.

The table editor Table data are stored in text files and may be created via a suitable text editor. There are several alternative formats available, described in the Commands volume (see command TBREAD). However, unless a specific data ordering is required, the easiest way of creating or modifying tables is to use pro-STARs own GUI facilities. These are accessible by clicking the special table editor button

at the bottom left-hand side of the main window. The basic functions provided by the editor are described below. New tables To create a new table, click New Table to display the table view shown below:

Version 3.26

2-27

BASIC STAR-CD FEATURES Table Manipulation

Chapter 2

The required input, reading from left to right along the dialog, is as follows: 1. Table Title enter a title up to 80 characters long, including spaces. Note, however, that only the rst 30 characters found up to the rst space in the string are usable by STAR. 2. Coordinate System specify the coordinate system number to be used for spatial independent variables (see Coordinate Systems on page 3-8). A search button is provided for choosing any of the currently dened systems from the Coordinate Systems dialog. Depending on your selection, the three space coordinates are interpreted as follows: Cartesian x (X) y (Y) z (Z) Cylindrical r (R) () z (Z) Spherical r (R) () (PHI) Toroidal r (R) () (PHI)

The coordinate names shown above inside parentheses should be used as table headers when creating a table outside this GUI environment. 3. Out of bound value options prescribe the action to be taken if needing to calculate dependent variable values at points lying outside the table range. Obviously, this does not apply to mass ow rate tables. The available options are: (a) Error issue an error message (b) Extrapolate use the closest two data points to calculate an
2-28 Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Table Manipulation

extrapolated value (c) Cutoff use the closest data point as the variable value 4. Select Table Type choose the basic table type from the list of options described under Basic functionality. The correct type is selected automatically if you enter the editor indirectly, i.e. by clicking button New in a STAR GUIde panel that requires the use of tables. 5. Select Dependent Variables for boundary and source tables, select also the specic type of boundary or source required from a secondary menu. All valid variables for the chosen table type are displayed automatically in the adjacent scroll list. To select an item from this list: (a) For single items, click the desired variable (b) For two or more items in sequence, click the rst variable, press and hold down the Shift key, then click the last variable in the group (c) For a random selection, hold down the Cntrl key and then click each variable in turn 6. Select Independent Variables all valid variables for the chosen table type are displayed automatically as a series of option buttons. Choose those needed to dene your table by clicking the corresponding button. 7. Click Setup to conrm your selections and enter the data input mode, as shown in the example below.

Commands: TBDEFINE
Version 3.26

TBCLEAR

TBWRITE

TBGRAPH
2-29

BASIC STAR-CD FEATURES Table Manipulation

Chapter 2

The following points should be kept in mind when specifying table data: Table values should be entered for each dependent variable selected in step 5 above. Your selection will be automatically reected in the options shown on Dependent Variables scroll box. Fill in all required data for the currently selected variable before scrolling to the next one. The left-hand side of the panel will display a number of columns, one for each independent variable selected in step 6 above. Fill each column with all the values assumed by that variable in the table, in ascending order. Tables containing two or more independent variables are essentially multi-dimensional and need to be specied as a series of two-dimensional x-y tables, as in a spreadsheet. Accordingly, a pair of independent variable values are displayed as row and column headings and the user lls in appropriate values for the current dependent variable, as shown in the example above. To create such two-dimensional tables: (a) Select the required pair from the Independent Variables menu, noting that pro-STAR activates only those combinations that correspond to the choice made in step 6 above. The available pairs for the example shown (an X, Y, TIME selection) will be X - Y, X - TIME and Y - TIME and the pair chosen is X - Y. (b) Fix the other independent variable(s) to a desired value, by clicking the radio button next to that value in its column on the left-hand side. In the example, TIME is xed to 0. (c) Click the FILL button. This sets up the 2D table and displays the chosen pairs values as row and column headings (d) Fill the table with the required dependent variable values and then click Save Data. (e) Fix the other independent variable(s) to a different value and repeat steps (b) to (d) above as many times as necessary (f) Select another pair from the Independent Variables menu and ll in another series of 2D tables. This might happen, for example, if instead of choosing to enter an X - Y set for a series of xed TIMEs, you chose instead to enter X - TIME sets for xed Ys followed by Y - TIME sets for xed Xs. Tables for rotational speeds, run-time controls and Lagrangian multi-phase specications always have one independent variable and thus involve lling in a two-column table. The same also applies to the other tables if only a single independent variable is specied. A simplied display appears in the editor panel in these cases.

Once your data input is complete, you may: 1. Check the table contents graphically by plotting them as a pro-STAR graph (see Chapter 9, Graph Displays). To use this facility: (a) Select the variable to be checked from the Dependent Variables scroll box. This will be plotted along the graphs y-axis. (b) Go to the graph setup section at the bottom of the panel (which now displays the chosen variable) and select an independent variable from the
2-30 Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Table Manipulation

versus scroll box. This will be plotted along the graphs x-axis. (c) The names of the remaining independent variable(s) will also be displayed in the const boxes. For the purposes of the graph, these will be xed to the value indicated by the radio button in each variables column. These values will also appear inside the @ boxes. (d) Click Graph to see the result of your selection. 2. Save your data in a table le. The le name should have extension .tbl and should be entered in the File Name box at the bottom of the panel. pro-STARs built-in browser may also be used to locate an existing le. Click Write Table to save your data in this le. Existing table display/modication To read and display the contents of an existing table, click Read Table at the top left-hand side of the editor and then enter the file name (of form case.tbl) in the File Name box. pro-STARs built-in browser may be used to help locate the file.

Commands:

TBREAD

TBLIST

TBMODIFY

TBGRAPH

Once the table has been read, its contents can be checked visually using the graph function described in the previous section or modified as required. Note that: 1. You cannot add new dependent or independent variables to an existing table (or delete any that are currently dened) 2. You may alter both individual values and the number of such values for any independent variable. Click Save Modified Data to conrm the changes.
Version 3.26 2-31

BASIC STAR-CD FEATURES Plotting Functions

Chapter 2

3. Changes to existing dependent variable entries are made by over-typing and conrmed by clicking Save Data. 4. At the end of the editing session, you should always save your updated table in a named le by clicking Write Table Useful points 1. Only one table at a time may be loaded into the pro-STAR editor. If you need to access a second table, you must rst save the current one to a named le (if you have made changes) before reading in the new one. 2. If you change your mind about the contents of your current table and wish to make drastic change, clicking New Table enables you to erase all entries and start afresh. 3. The scale factor applied when saving model geometry data (see Chapter 21, STAR geometry le (.geom)) is also applied to table coordinate data when they are accessed by STAR. 4. Apart from the table le itself, table data needed for the next CFD analysis are also stored in the STAR control le (see Chapter 21, STAR control le (.prob)) so that they are available to STAR during the run. The user species which tables will be needed as part of the boundary, initial condition or other model specication requiring the use of tables. 5. You may use command TBSCAN to scan a named .tbl le. Information about its contents is displayed in the I/O window.

Plotting Functions
Basic set-up The basic hardware-related plotting features are set by a single command, TERMINAL. This command sets: The display mode of X-based terminals (use option ALTERNATE only for improving the plotting speed of certain older types of workstation). This setting may also be accessed from the menu bar by switching between options Plot > Standard Plot Mode and Plot > Alternate Plot Mode. The plot destination this species whether plots are to appear directly on the screen or written to the neutral plot le (see Appendix B). The operating mode of the plotting device a choice between raster, vector or extended (for high-performance workstations). It is also possible to toggle between raster and extended plot mode by clicking the X / GL button at the bottom left-hand side of the main window. Note, however, that this option is available only if you are working with the glm version of pro-STAR (see Running a CFD Analysis, Step 3).

The basic features of devices operating under one of the above modes are: 1. Vector devices, such as pen plotters, can draw lines in one or more colours, but are not generally capable of lling in closed polygons or erasing regions of the plot after drawing in them. When this mode is set: (a) All hidden-line plot calculations are done by software. (b) Large amounts of time may be required for large models.
2-32 Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Plotting Functions

(c) All contour plots displayed as line contours rather than lled colours. 2. Raster devices, such as most workstation screens, Postscript laser printers, etc. are capable of lling in polygons quickly and overwriting previously coloured-in regions with new colours. When this mode is set: (a) Hidden-line plots are done by hardware. (b) Contour plots are rendered in lled colours. (c) VECTOR mode operation is still possible if, for example, the user wants fringe-style rather than lled-colour contour plots. 3. Extended mode devices offer additional functionality such as true (24-bit) colour, hardware Z-buffers, double-frame buffering, coordinate transformation pipelines, Gouraud shading, etc. Machines with these high-specication graphics attributes can provide: (a) Real-time rotation, translation and zooming of plots. (b) Contour plots rendered in smoothly varying colour bands. (c) Added lighting effects to enhance a users perception of the model geometry. This style of plot is limited to machines that support the OPENGL standard and cannot be stored in the neutral plot le at present. Appendix E lists all currently available combinations of plot mode and plot characteristics. The same information can also be listed on line by choosing Help > pro-STAR Help from the menu bar and then selecting the COMBINAT item from the list shown at the bottom of the pro-STAR Help dialog. Advanced screen control Advanced screen control functions are implemented as follows: Background/foreground colour reversal from the menu bar, select Plot > Background > Standard (for white lines and text on a black background) or Plot > Background > Reverse (for black lines and text on a white background). Alternatively, use command CLRMODE. Maximising the graphics area from the menu bar, select Plot > Maximum Plot Screen to hide the GUI buttons surrounding the graphics area so as to make the plot as large as possible. The window is also enlarged to take up almost the entire screen. This is helpful when making animations since the largest number of pixels are used, thereby obtaining the highest possible plotting resolution. Select Plot > Standard Plot Screen to return the window to its default size and appearance. Alternatively, use command WHOLE. Restoration of the original screen settings command RESET. Temporary, on-line storage of complete screen images command SCROUT. On-line retrieval of screen images previously stored with SCROUT command SCRIN. This command also provides an elementary animation facility, by replaying a sequence of screen images in quick succession. Deletion of screen images previously stored with SCROUT command SCRDELETE. Customised scaling of text fonts used in pro-STAR command TSCALE.
2-33


Version 3.26

BASIC STAR-CD FEATURES Plotting Functions

Chapter 2

Image display control command PLTBACK. This enables images to be created and stored in memory and then popped onto the screen (as opposed to displaying them as they are being created).

For further details on using the above commands, refer to the pro-STAR Commands volume. Screen capture It is often very useful to be able to save the contents of the graphics screen as a picture file. The latter can then be pasted into a document created by another, say presentation or word-processing, application. pro-STAR provides this facility via the Utility > Capture Screen menu option (or by typing command SCDUMP). The result of this operation is the creation of a new window containing the picture currently displayed in pro-STARs main graphics area. The picture can be subsequently saved in a file by choosing Utility > Save Screen As and selecting one of the following options for the file format: XWD (X Window Dump) X-Motif version of pro-STAR only GIF (Graphics Interchange Format) PS (PostScript, either Level 1 or Level 2 format) EPSF (Encapsulated PostScript, either Level 1 or Level 2 format)

The user needs to make sure that the choice of format is appropriate to the end application. Selecting any of the above options opens the File Selection dialog shown below, enabling you to specify the name and destination directory of the picture file.

If you are working in OpenGL extended graphics mode (see page 2-33), you also have a choice of saving a high-resolution screen dump (HRSD) of the extended mode plotting window. This appears as an additional option, High Res. Screen Dump, in the Utility menu (alternatively, use command HRSDUMP). Selecting this option from the main menu opens the High Resolution Screen Dump dialog shown below:

2-34

Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Plotting Functions

The user input is as follows: 1. Select the required le format from the File Type menu as one of (a) (b) (c) (d) png gif ps (PostScript) eps (Encapsulated PostScript)

2. Enter the le name in the box provided. Clicking the adjacent browser button opens the File Selection dialog shown above which helps locate the required le. 3. Clicking the Options button opens a secondary Image Options dialog that enables you to specify the required image resolution and/or page properties (for PostScript les). An example for GIF/PNG images is shown below.

It is also possible to use the HRSD facility in batch mode to produce high-quality plots using OpenGL style graphics (i.e. including translucency, special lighting effects, etc.). You do not require a special OpenGL graphics card on your machine to do this; the pictures can be made off-screen using the mesa software emulation of OpenGL as follows: Run pro-STAR with mesa graphics in batch mode prostar mesa -b Set extended mode graphics term,,exte Set up the model as you wish, including any CPLOT/REPLOT operations needed to display the picture, and then use the HRSD command as follows:
2-35

Version 3.26

BASIC STAR-CD FEATURES The Users Tool

Chapter 2

hrsd,png,output.png (write a .png le) hrsd,ps,test.ps (write a .ps le) You can also use the various options to change image size, resolution, etc., just as for interactive mode above (see the HRSD command Help on options for setting image size, resolution, etc.)

The Users Tool


The Users Tool enables you to create your own customised user interface, by running a Tcl/Tk script from within pro-STAR by means of a built-in interpreter. To make use of this tool, you need solid knowledge of Tcl/Tk programming. The basic idea is that the user builds a dialog box as he/she would for any other Tcl/Tk-based application, with widget callbacks designed to pass pro-STAR command strings back to pro-STAR (much as it happens now when you click a button in STAR GUIde). An introductory panel, shown below, is provided via the main menu, by choosing Tools > Users Tool. Clicking the left-hand button invokes the built-in interpreter which then runs your script.

To use this facility, it is important to save your Tcl script in a le called STARTkGUI.tcl assign the path to this le to an environment variable called STAR_TCL_SCRIPT

Getting On-line Help


The Help menu in the main pro-STAR window is divided into three parts. There are three options in the top part, About pro-STAR, Select Item and pro-STAR Help. Clicking About pro-STAR displays pro-STAR version information, as shown below:

2-36

Version 3.26

Chapter 2

BASIC STAR-CD FEATURES Getting On-line Help

Clicking pro-STAR displays the pro-STAR Help dialog shown below:

This dialog contains on-line information on: Conventions regarding command line syntax All valid combinations of plot mode and plot characteristics One-line summaries of every pro-STAR command, grouped by command module and listed in alphabetical order A list of all database les available under pro-STAR pro-STAR environment variable denitions All le extensions used A description of pro-STARs macro les A description of pro-STARs user-dened Motif panels A tabulation of thermal and solar radiation parameters required for walls and bafes Units for all physical quantities used in STAR-CD A list of user subroutine names and brief descriptions A list of all GUI tools and dialog boxes

Help on any of the above items is obtained simply by selecting the appropriate title in the scroll list underneath the main information display area. In addition, the default listing of any user subroutine may be displayed by
Version 3.26 2-37

BASIC STAR-CD FEATURES Getting On-line Help

Chapter 2

selecting item UserSubs from the Module pop-up menu and then choosing the required subroutine name from the second scroll list. Details on the functionality and syntax of every command may be displayed as follows: By typing the command name in the Find Command text box and pressing Return By selecting the appropriate command module from the Module pop-up menu (see the pro-STAR Commands volume for a description of modules) and then choosing the required command name in the scroll list By searching through the available help text for a keyword, as typed in the Keyword text box In a context-sensitive manner, by choosing option Select Item from the Help menu. This changes the mouse pointer from an arrow to a hand (Help) pointer with which you can click any part of the main pro-STAR window. Such an action will automatically display the corresponding command description for that part of the window.

An example of command help is shown below:

The middle section of the Help menu gives on-line access to every volume in the STAR-CD documentation set, consisting of Release Notes for the current version, pro-STAR Commands, Methodology, Tutorials and the User Guide. To view these documents, users must make sure that Adobes Acrobat Reader is installed on their machine. Instructions on how to do this are given in the STAR-CD Installation and Systems Guide. There is also a Help section containing useful information on how to best use Acrobat for viewing on-line help text corresponding to each panel of the STAR GUIde system described below. The last section of the Help menu activates your machines web browser and directs it to useful web sites set up by CD adapco.

2-38

Version 3.26

Chapter 2

BASIC STAR-CD FEATURES The STAR GUIde Environment

The STAR GUIde Environment


STAR GUIde represents the latest development in easy-to-use GUI tools for building CFD models. It works by dividing the CFD analysis task into groups of major modelling activities; displaying pre-dened groups of panels relating to each of the activities so that the user can specify model parameters and characteristics pertinent to the current activity; guiding the user through the CFD modelling process in a logical sequence so that no steps of that process are overlooked.

At present, the STAR GUIde panels cover a subset of pro-STARs capabilities, i.e. those that relate to the most common tasks of the modelling process. Additional capabilities are being continually added and appear in each new version of STAR-CD. STAR GUIde may be accessed from pro-STARs main window using either of the following two methods: 1. Selecting Tools > STAR GUIde from the menu bar 2. Clicking the STAR GUIde button at the top left-hand side of the window.

This displays the introductory screen shown below. The screen consists of two parts: On the left is the Navigation Centre (NavCenter), a tool for guiding the user through the various stages of the model building process. These stages are represented by panels and are subdivided into logical groups. The panels and their groups are shown as a tree structure within the NavCenter sub-window. On the right is the initial Help screen explaining how STAR GUIde works and what its function buttons do. This is replaced by the contents of the current process panel as you go through each stage of model building.

Version 3.26

2-39

BASIC STAR-CD FEATURES The STAR GUIde Environment

Chapter 2

The following points should be borne in mind when using this tool: 1. The NavCenter tree contains a set of yellow folder icons representing each major modelling activity and acts as the starting point for dening your own model. A complete CFD simulation can be set up and run by performing the activities in the folder tree and in the order shown. 2. Click on one of the yellow folder icons (or on the text next to them) to open and close the folder and to display its constituent process panels and sub-folders. 3. Click on a grey panel icon (or on the text next to it) to open the panel; its contents will be displayed on the right-hand side of the STAR GUIde window. Each process panel enables you to enter or generate data needed to complete that process. 4. Where appropriate, the input for a given process is distributed amongst colour-coded, le tabs. These are brought to the forefront by clicking on the appropriate tab. The colour coding depends on the entity (block, spline, cell, etc.) being processed and is consistent with the colour coding used in the main
2-40 Version 3.26

Chapter 2

BASIC STAR-CD FEATURES The STAR GUIde Environment

pro-STAR window. 5. In some instances, clicking a button on a panel activates a separate, free-oating dialog box. This happens whenever such a dialog provides the most convenient means of entering the data required. 6. To exit from the STAR GUIde, click the Close STAR GUIde button at the bottom of the NavCenter sub-window. Panel navigation system The set of five buttons at the top right-hand side of the STAR GUIde window are designed to help you navigate through the system and get more information about what to do. The function of each button is as follows: Go Back returns to the previously selected panel.

Collapse/Expand Navcenter Closes the left-hand (NavCenter) side of the STAR GUIde window to make more space on your screen. The window may be expanded back to its original size by clicking this button again.

Favorite enables you to store the names of frequently used panels so that you may jump to them directly, i.e. without first opening the STAR GUIde window and then searching through the NavCenter tree. A favourite panel is selected by first displaying it in STAR GUIde, clicking Favorite and then choosing the Add to favorites option. The reverse operation is performed by choosing Remove from favorites. The current favourites are listed under the Favorites menu in the main pro-STAR window. Help provides concise information on the current panel, including descriptions of the data required, explanations of the choices available, suggestions on things to look out for, etc. Help screens use Adobes Acrobat Reader system; their contents therefore appear in a separate window opened by that system. Information on how to best use Acrobat for reading these screens is given under the Help menu in the main pro-STAR window (option Help).

Version 3.26

2-41

BASIC STAR-CD FEATURES General Guidelines

Chapter 2

Go Fwd if the Go Back control has already been used, goes forward to the most recently displayed panel.

STAR GUIde usage The STAR GUIde panels should be used in conjunction with the facilities (pop-up menus and action buttons) offered by the main pro-STAR window. The input/output window should also be displayed to cater for operations that need command input (see also the Introduction section). For maximum ease of use, all three windows should be displayed side-by-side on your screen, as shown below:

General Guidelines
The following general guidelines should be kept in mind when running STAR-CD models, including those described in the Tutorials volume: 1. Take advantage of the on-line Help facilities to check the codes conventions and, if necessary, the structure and meaning of individual commands. These facilities are accessed either from the GUI Help menu (see Getting On-line Help) or by typing HELP, command_name in the pro-STAR I/O window.
2-42 Version 3.26

Chapter 2

BASIC STAR-CD FEATURES General Guidelines

2. Make frequent use of the File > Save Model option (or command SAVE) to store the current state of your model description on the pro-STAR model le (.mdl). This safeguards against unexpected mishaps (power failures, system crashes, etc.) by enabling you to restart your work from the point where the last SAVE operation was performed. You should, however, make sure that the model is in a satisfactory state before saving it. 3. If necessary, split lengthy model-building sessions into several parts, by using option File > Quit (or command QUIT) at any convenient point in your current session and then saving your work on the .mdl le. To continue working on the model, re-enter pro-STAR as discussed in Step 10 on page 2-8 and then perform the next operation. However, remember that for transient problems the transient data (.trns) le has to be explicitly re-connected to the pro-STAR session by using the Connect button in the Advanced Transients dialog (or command TRFILE). 4. Mistakes in pro-STAR can be rectied in two ways: (a) Use option File > Resume Model (or command RESUME) to go back to the state of the model saved with the last SAVE operation and start again from there (b) Use command RECOVER to play back all commands issued since the last SAVE operation, re-execute the code up to the one that went wrong, and continue from there 5. Note that command execution can be terminated half way through in the following circumstances: (a) By typing Abort instead of a parameter value while supplying parameter values to a command in novice mode. (b) By typing Ctrl+C while waiting for a command to nish processing. Note that the effect of this operation is machine-dependent and therefore great caution should be exercised in its use; in some machines it will abort the entire pro-STAR session. 6. Display the relevant STAR GUIde panels frequently to check the settings of pro-STAR parameters; alternatively use command STATUS. In the latter case, the screen information relates to the active command module, so make sure you are in the right module by typing the appropriate keyword (MESH, PROPERTY, CONTROL, etc.) 7. Remember that all pro-STAR windows can be re-sized using the mouse. It is recommended that both the I/O and the main window are positioned and sized so that both are visible simultaneously. This is particularly helpful when you need to use commands for a particular operation, or if you want to check the commands that were generated automatically by a particular GUI operation.

Version 3.26

2-43

Chapter 3

MESH CREATION Introduction

Chapter 3

MESH CREATION
The body-fitted meshing capabilities of the STAR-CD system offer a wide choice of computational cell shapes such as hexahedra prisms tetrahedra pyramids polyhedra

Introduction

Combined with facilities for creating unstructured non-orthogonal grids, local mesh refinement and arbitrary coupling between mesh blocks, pro-STAR gives users great flexibility in representing highly complex geometries. Note that pro-STAR works in arbitrary units. However, to avoid numerical problems, the length units chosen should be such that the model dimensions lie in the range 0.01 104. This chapter covers only the basic mesh generation facilities available within pro-STAR. Users wishing to employ pro-am, the advanced meshing module also available under pro-STAR, should consult the separate manual describing this module. Basic concepts The first task in the process of flow simulation is the creation of a computational mesh to represent the flow domain geometry. The basic entities available for accomplishing this task are as follows: Vertex: A point in three-dimensional space, dened by a coordinate triplet and possessing an index number for identication. ( 5, 6, 8 )

101

Vertex no. 101 at X = 5 Y=6 Z=8

Cell: A three-dimensional volume whose shape is dened by vertices located at its corners.

vertex cell

Figure 3-1

Cell denition

Version 3.26

3-1

MESH CREATION Introduction

Chapter 3

Shell: A two-dimensional surface whose shape is dened by vertices located at its corners.
shell

vertex

Figure 3-2

Shell denition

Spline: A smooth curve dened by vertices located along its length.


vertex spline

Figure 3-3

Spline denition

Patch: A smooth, at or curved surface whose outer perimeter is dened by four splines and/or straight lines and which is internally lled with shells. Patch edges consisting of connected splines and straight lines are acceptable. Note that straight lines are dened solely via the two vertices at either end.
Patch

Shells

Splines

Figure 3-4

Patch denition

Block: A three-dimensional volume bounded by smooth, curved or at surfaces, whose edges consist of eight splines and/or straight lines (dened by their end points, as above). Block edges consisting of discontinuous splines (e.g. combinations of straight-line and smooth-curve segments) are acceptable.

3-2

Version 3.26

Chapter 3

MESH CREATION Introduction

Straight line

Discontinuous spline Block

Continuous spline

Figure 3-5

Block denition

Meshing techniques The most appropriate initial step when building a mesh is to decide on the number and distribution of cells to be used. The amount of time spent on the planning of mesh generation is usually dependent on the complexity of the flow domain geometry. For less complex cases, where the grid is more or less regular, grid planning becomes less important. It is nevertheless advisable to always have a well visualised mesh in mind before building a model. This can usually be achieved by roughly sketching the desired mesh and working out a mesh generation strategy before using pro-STAR. Initial planning also involves choosing between the different mesh generation techniques and tools available. pro-STAR offers five basic methods for setting up a mesh and the user is free to choose any one or a combination of them, depending on the geometrical complexity of the model and his own preferences: 1. Extrusion this technique permits the extrusion of a three-dimensional mesh from an existing surface, as shown in Figure 3-6.

Starting cell surface

Figure 3-6
Version 3.26

Mesh generation by extrusion


3-3

MESH CREATION Introduction

Chapter 3

2. Using cell layers this is a bottom-up approach that builds the solution domain up from its constituent cells, layer by layer, on the basis of a well-dened meshing strategy (see Figure 3-7). Given the wide variety of building blocks (cell shapes) available, this can be a very exible technique, well-suited to constructing complex model geometries. Its main disadvantage is that the overall geometry is entirely dependent on individual cell shapes and how these are put together. It can also be highly time-consuming and involved.

Cells acting as building blocks

Figure 3-7

Cell-layer mesh generation

3. Using multiple blocks this is a top-down approach that requires sub-division of the solution domain into a series of conveniently shaped blocks (or just a single block for simple geometries) that dene the geometry of the model (see Figure 3-8). Sub-division of each block into individual cells in an automatic fashion is then possible. A particular advantage of this method is that the overall model geometry denition is decoupled from the computational mesh denition.

Block 1

Block 2

Figure 3-8

Multi-block mesh generation

4. Using pro-am this is a special advanced meshing module residing under the pro-STAR interface. It contains powerful facilities for generating complex meshes in an easy-to-use manner and is supplied with its own separate documentation. 5. Data import this relies on an external CAD package to perform the basic geometric modelling and/or meshing operations. pro-STAR provides interfaces that can re-arrange and translate the external data into pro-STAR notation. The imported data can be in two basic forms:
3-4 Version 3.26

Chapter 3

MESH CREATION Extrusion

(a) Entire meshes that have been generated by a different CAD/CAE system such as ICEM CFD, PATRAN, ANSYS, etc. (b) Geometric denitions of models, in the form of surfaces, splines or points generated by an external CAD/CAE system in IGES or VDA format. Such data can be used by pro-STAR as a starting point for creating a mesh (see Figure 3-9).
Surface data

Imported points

Imported spline

Figure 3-9

Mesh generation by data import

pro-STAR offers a mixture of facilities for creating a mesh, some GUI-driven (but always with a corresponding command-based facility) and others command-driven only. The facilities of the latter category are grouped within the MESH command module (for local mesh generation) or the CONVERT module (for mesh data import/export capabilities), as described in the pro-STAR Commands volume. Other mesh facilities Numerous facilities are provided for checking the model being constructed. These include: Visual checking, using the options in the drop-down list of the Plot menu, accessible from the main menu bar, to plot the mesh and model geometry (see Chapter 5). Numerical checking, accessed by selecting Tools > Check Tool from the main menu bar to audit detailed mesh characteristics such as internal angles and deformations. In addition, various items in the drop-down list of the Utility menu, accessible from the main menu bar, will check the overall model geometry using area and volume calculations (see Mesh and Geometry Checking on page 4-26).

Extrusion
This approach uses a surface consisting of an arbitrary collection of shells as the starting point (see Figure 3-10). Alternatively, the starting point may be a patch (see page 3-2) or a baffle (see Computational cells on page 3-38). The surface can then be extruded to create a three-dimensional mesh block.
Version 3.26

Building of complex surfaces is possible by creating patches (see the


3-5

MESH CREATION Extrusion

Chapter 3

denition on page 3-2) using the PATCH command. Shells making up the extrusion surface can also be created individually from a pre-dened set of vertices (see Command-driven facilities on page 3-44) or by adding them to faces of existing cells selected via the graphics cursor (see page 3-48). Also, command LIVE offers a convenient way of creating shells that dene the surface of the current cell set. The command can also store such shells in .cel, .vrt les.

Figure 3-10

Starting surfaces for extrusion

The extrusion operation is executed by typing command VCEXTRUDE. VCEXTRUDE generates a three-dimensional mesh by allowing the cells to grow from the base surface (see Figure 3-11). In so doing, new vertices and cells are normally created simultaneously. However, there is also a choice of creating only new vertices or only new cells (assuming the vertices have been created already by a previous use of the command).

(a)

(b)

Figure 3-11

Cell growth from original starting surface

The extrusion can be either normal to the starting surface [Figure 3-11(a)] or along a given direction in a pre-dened local coordinate system [Figure
Version 3.26

3-6

Chapter 3

MESH CREATION Cell-layer Approach

3-11(b)]. The extruded cell layers may have either uniform or non-uniform spacing, the latter controlled by the magnitude of the ll ratio parameter. Values less than 1 will concentrate the cell layers on the far end, while values greater than 1 will have the same effect on the inner end. A value of 1 will result in uniform spacing. Although VCEXTRUDE is most commonly employed for creating 3-D mesh blocks from 2-D surfaces, as described above, the command may also be used to generate 2-D structures (shells) from 1-D line cells or 1-D structures (curves) from point cells (see Visualisation cells on page 3-38). A special, extrusion-type operation that creates solid cells only (see Cell types on page 3-37) is available via command CBEXTRUDE. This creates a single layer of solid cells centred on a given shell or bafe set that acts as the starting surface. The boundaries of any uid cells touching this surface are moved back to accommodate the new cell layer. This command is designed for use in heat transfer problems, see Chapter 6, Conjugate heat transfer in bafes. Another extrusion-type operation is available for the purpose of adjusting the thickness and ratio of previously extruded cell layers, as shown in the example of Figure 3-12. This is implemented via command REEXTRUDE. The re-extrusion operation may be performed in a direction normal to the starting shell layer, or along a direction determined by a local coordinate system, or in the direction of the original extrusion.

Before

After

Figure 3-12

Example of mesh re-extrusion

Cell-layer Approach
The functions discussed in the section on Mesh block generation generally provide for easy and flexible meshing. However, there are many cases where the complexity of the flow domain geometry dictates a manual approach to mesh creation, i.e. building the mesh up from its constituent cells. This constitutes the cell-layer approach whose principal features are: 1. Reliance on the initial creation of a set of vertices, which constitute the corner points of the cells (see Figure 3-13).
Version 3.26 3-7

MESH CREATION Coordinate Systems

Chapter 3

Figure 3-13

Creation of cells from vertices

2. The model geometry is generated as a result of the creation and manipulation of individual vertices and the attachment of cells to them. 3. The method consists of two stages as follows: (a) Creation of vertices and possible subsequent manipulation (moving them around in space) so that they take up the shape of the models geometrical features. (b) Attachment of cells to these vertices to dene the volume elements constituting the model. Points to remember when using this approach are as follows: It relies heavily on vertex manipulation. Cells cannot exist without vertices but vertices can exist on their own. The user is free to create a complete vertex latticework rst and dene cells afterwards, or dene cells as soon as sufcient vertices are created.

Within pro-STAR, cells are created and manipulated using various operations described in Cells on page 3-37. The constituent vertices are defined using another set of operations, described in Vertices on page 3-14. Vertex generation is greatly aided by built-in facilities for setting up a wide variety of coordinate systems, as described below.

Coordinate Systems
pro-STAR allows the use of a number of different coordinate systems, whose principal function is to aid the positioning and manipulation of vertices. The main characteristics of these systems are as follows: 1. They act like drawing instruments, enabling the user to specify the location of a point in space in the most convenient way. 2. Different types of coordinates are provided, like different instruments, to suit the requirements of a particular geometry. Thus, just as it is very difcult to draw a circle with a ruler, it would be very time-consuming to dene and manipulate points around a circular arc by using only Cartesian coordinates. 3. In the interests of even greater exibility, there is a choice between two kinds of coordinate system: (a) Global systems, possessing a pre-dened origin and axis orientation. Global systems cannot be altered by the user and can be one of three
3-8 Version 3.26

Chapter 3

MESH CREATION Coordinate Systems

types: i) Cartesian (see Figure 3-14) ii) Cylindrical (see Figure 3-15) iii) Spherical (see Figure 3-16) (b) Local systems, possessing a user-dened origin and axis orientation. These can be one of four types: i) ii) iii) iv) Cartesian Cylindrical Spherical Toroidal (see Figure 3-17)

The available coordinate system types are illustrated below: Cartesian


Y M(x,y,z) M 0 z x Z y X

Figure 3-14

Cartesian coordinate system

Cylindrical
Y Underlying Cartesian system

r 0 M z X

M(r,,z) Z

Figure 3-15

Cylindrical coordinate system

Version 3.26

3-9

MESH CREATION Coordinate Systems

Chapter 3

Spherical
Y Underlying Cartesian system

0 r M X

M(r,,) Z

Figure 3-16

Spherical coordinate system

Toroidal
Y Underlying Cartesian system

r R 0 M(r,,) Parameter = R Z M

Figure 3-17

Toroidal coordinate system

Local coordinate systems Local coordinate systems can be listed, defined and altered via the Coordinate Systems tool shown below. This is activated by clicking the CSYS button on the main pro-STAR window.

3-10

Version 3.26

Chapter 3

MESH CREATION Coordinate Systems

Commands:

LOCAL CSLIST

VLOCAL CSYS

CLOCAL CSDELETE

PLLOCALCOOR

On opening the dialog, the three default global coordinate systems (Cartesian, cylindrical and spherical) are displayed at the top, followed by any local ones defined by the user. The currently active system, whether global or local, is indicated by an asterisk. pro-STAR automatically sets the global Cartesian system as the default active system for new problems. To create a local system, the user has to highlight an unoccupied reference number on the list and then specify the origin location and axis orientation of an underlying Cartesian system. The desired local coordinates are then defined relative to this underlying system, as shown in Figure 3-14 to Figure 3-17. The underlying system definition can be accomplished in two ways: 1. Explicitly, via specied translations X c , Y c , Z c and right-handed rotations R xy , R yz , R zx (in degrees) about each axis (i.e. re-positioning and re-orientation in space). The required translations and rotations must be typed in the corresponding text boxes underneath the list, plus the major radius value for toroidal systems. The type of coordinate system is selected from the pop-up menu on the left. To apply these denitions: (a) Click on the New (Global) button if the desired translations and rotations are with respect to the global Cartesian system, as shown in Figure 3-18. (b) Click on the New (Local) button if they are with respect to the currently active coordinate system Thus, one local system can be dened in terms of another.

Version 3.26

3-11

MESH CREATION Coordinate Systems YG Y,YL Y

Chapter 3

XL X,X

ROTATION 1 ROTXY about Z 2 ROTYZ about X 3 ROTZX about Y Z,Z Z

O
3 ZL

X Final local Cartesian coordinates XL, YL, ZL

TRANSLATION to O O (X,Y,Z) (XG,YG,ZG)

ZG

Figure 3-18

Local coordinate translations and rotations

2. Implicitly, with respect to three pre-dened vertices, as shown in Figure 3-19. Vertex NVORIG denes the origin of the coordinate system. In combination with vertex NV1, it also denes the rst axis of the coordinate system, X L . Vertex NV2 denes the X L Y L plane. Axis Y L itself is automatically set up by the system so that it is at right angles to X L . The third axis, Z L is also set up automatically so that it is at right angles to the X L Y L plane. The required vertices can be specied by clicking on the New button, choosing an X L Y L plane from the displayed drop-down list (X-Y, Y-Z, or Z-X) and then selecting the three required vertices with the mouse, i.e. NVORIG, NV1, NV2 and in that order.

3-12

Version 3.26

Chapter 3

MESH CREATION Coordinate Systems YG Axis 2 = YL NV2 NV1 Axis 1 = XL

NVORIG

Axis 3 = ZL XG

ZG

Axis 3 = Axis 1 Axis 2

Figure 3-19

Local coordinate denition using three vertices

Figure 3-20 shows an example of a two-block mesh created by command VC3DGEN using two local coordinate systems. You may display or hide the local coordinate system triads shown in the figure by clicking on the Show Triad or Hide Triad buttons, respectively (see also page 5-7). Note that it is possible to define and store up to 99 local systems.
YL Cylindrical coordinate system XL ZL Block 2

Block 1

YL Cartesian coordinate system XL ZL

Figure 3-20

Example use of local coordinate systems

Version 3.26

3-13

MESH CREATION Vertices

Chapter 3

Other coordinate system functions The available functions are: Changing the active coordinate system to a different system (local or global) select the desired system in the Coordinate Systems list and then click on the Set Active button. Deleting a given set of coordinate systems select the system(s) on the list and then click on the Delete button. Note that global coordinate systems cannot be deleted.

Additional points to bear in mind about coordinates are: When a new system is dened, it becomes the currently active system. Local coordinate systems are not only used in mesh manipulation but also for boundary denitions and post-processing operations, as discussed in Chapter 7 and Chapter 9.

Vertices
As mentioned in the Introduction on page 3-1, vertices are points that have a unique identifier (vertex number) and a physical location in pro-STARs three-dimensional global Cartesian coordinate system. On account of their importance as a fundamental entity of the STAR mesh, the system provides numerous command-driven and GUI-driven facilities for their creation and manipulation. These are described in the next three sections. Command-driven facilities Creation, using local coordinates to dene the vertex position command V. A GUI implementation of this command is available in the Vertex List dialog (see page 3-24); also in the Vertices tab of the Create Geometric Entities STAR-GUIde panel.

( 5, 6, 8 )

101
Figure 3-21

Vertex no. 101 at X = 5 Y=6 Z=8 Command: V,101,5,6,8


Vertex creation using command V

Set generation, starting from a pre-dened vertex set command VGENERATE. Specied increments in a local coordinate system are used to position the new set. The vertex numbers of this set are calculated from a given vertex offset (see Figure 3-22). Note that if the offset is 0, the starting vertex set will simply be moved to the new location.

3-14

Version 3.26

Chapter 3

MESH CREATION Vertices Command: VGEN, 2 , 10 , 1 , 4 , 1 , 2 , 0 , 0 12 13

11

14 2m 1 2 y 4 r x 3

Figure 3-22

Vertex set generation using VGENERATE

Filling additional vertices in between two previously dened ones, according to a specied pattern (see Figure 3-23) command VFILL. The vertices can be specied numerically or using the terminal cursor.
y

Command: VFILL , 1 , 5 , 5 , 10 , 10 , 1 , 1 , 1

50 40 30 20 10 1 (a) Filling in Cartesian coordinates

5 1 10 20 30 r 40

5 x 50

(b) Filling in cylindrical coordinates

Figure 3-23

Additional vertex lling using VFILL

Switching the direction of angular change when lling vertices in non-Cartesian coordinate systems command CSDIR. The effect on command VFILL is to switch the direction of lling from 180 180 to 0 360, as shown in Figure 3-24. The ll arc for some coordinate systems may pass through both the =0 and =180 axes, in which case option BOTH should be used.

Version 3.26

3-15

MESH CREATION Vertices Command: VFILL , 2 , 1 , 5 , 10 , 10 , 1 , 1 , 1 y

Chapter 3

30 20 r 10 = 180 2

y 40 50 1 x 10 20 30 CSDIR , 0 2 r 40

1 x =0 50

CSDIR , 180

Figure 3-24

Switching the direction of angular change via CSDIR

Filling vertices along the perimeter of a cross-sectional cut through the current cell set command VSECTION (see also the description of cross-sections in Chapter 5). Filling vertices along the perimeter of the intersection of the current cell set with a given shell type command VINTERSECT. The action is very similar to VSECTION, except that the cut is made by a shell rather than a cross-sectional plane. Dening a vertex at the centroid of a user-dened collection of other vertices (command VVERTEX) or cells (command VCELL). These can be useful in dening sensor points for interpolation and display of post data (see the discussion on page 9-26) or particle track starting points (see Chapter 9, Particle Tracking). Reection, which generates a new, mirror-image vertex set that is symmetrically disposed with respect to a local coordinate axis (see Figure 3-25) command VREFLECT. Note that what needs to be specied is the direction of the reection, not the axis about which the vertices are reected.

Command: VREF , 11 , 2 , 100 , 10 , 40 , 10 Y 30 20 10 Coordinate system no. 11 40

X 110 120

130 140

Figure 3-25

Vertex reection using VREFLECT

Centring, i.e. placing a vertex at the centre of a circle dened by other vertices (see Figure 3-26) command VCENTER.

3-16

Version 3.26

Chapter 3

MESH CREATION Vertices Command: VCEN , 20 , 5 , 15 , 10 , 3.5 5 r = 3.5 10 20 15

Figure 3-26

Vertex centring using VCENTER

Moving vertices from their position in one coordinate system to a new location in a different coordinate system (see Figure 3-27) command VMOVE.

Command: VMOVE , VSET , 11 , F , V , F , 12 , 5 , V , V , 1.E-4 Y r=5 Local Cartesian system 11 Local cylindrical system 12 Vertex set 20 to 22

20 21

22

Figure 3-27

Moving vertices using VMOVE

Moving a vertex by changing some of its coordinates to those of another vertex (see Figure 3-28) command VEQUAL.

Version 3.26

3-17

MESH CREATION Vertices Command: VEQUAL , 10 , 20 , X Y Fixed vertex 10 10

Chapter 3

20

Figure 3-28

Moving vertices using VEQUAL

Changing the coordinates of a given vertex range to a different coordinate system (with optional vertex number offsetting), in preparation for further vertex operations command VTRANS. Scaling of the coordinates of a given vertex set by given factors in each coordinate direction command VSCALE. Projection of a vertex set onto a shell surface command VPROJECT (see Figure 3-29).
(CSET is the target shell surface) 1 2 3

Command: VPROJ , 1 , 3 , 1 , 10 , CSET ,,, NORM

11 12 13

Figure 3-29

Projecting vertices onto a surface using VPROJECT

Projection of a vertex set, together with the cells associated with these vertices, onto a shell surface command REPROJECT (see Figure 3-30).

3-18

Version 3.26

Chapter 3

MESH CREATION Vertices

Before

After

Vertex set

Shell surface Figure 3-30 Projecting vertices and cells onto a surface using REPROJECT

Replacement of a given set of vertices by a subset command VREPLACE. The vertices that are eliminated are related to the ones that are kept via a specied vertex-number offset. Renumbering of all vertices associated with a given cell set command VRENUMBER. The operation is performed sequentially, starting from a specied vertex number. Reordering of vertices in a given cell set on the basis of cell connectivity command RESTRUCTURE. This creates a structured vertex numbering scheme reecting the structure of the cell set to which it is applied. The renumbering scheme works in terms of local mesh directions I, J and K dened via command CDIRECTION. Counting the currently dened vertices command COUNT. Alternatively, execute this operation by choosing Utility > Count > Vertices from the menu bar. Finding gaps (unused vertex numbers) within a given vertex range command VGAP.

Vertex set selection facilities Vertices need to be grouped together, thus defining a vertex set, for the purposes of mass manipulation or plotting. This is done by selecting one of the list options provided by the V-> button in the main pro-STAR window. The available options are as follows: 1. All puts all existing vertices in the current set 2. None clears the current set 3. Invert replaces the current set with one consisting of all currently unselected vertices 4. New replaces the current set with a new set of vertices 5. Add adds new vertices to the current set 6. Unselect removes vertices from the current set
Version 3.26 3-19

MESH CREATION Vertices

Chapter 3

7. Subset selects a smaller group of vertices from those in the current set For the last four options, the required vertices are collected by choosing an item from a secondary drop-down list, as follows: Cursor Select click on the desired vertices with the cursor, complete the selection by clicking the Done button on the plot. Zone use the cursor to draw a polygon around the desired vertices. Complete the polygon by clicking the last corner with the right mouse button (or click Done outside the display area to let pro-STAR do it for you). Abort the selection by clicking the Abort button. Cell Set select vertices attached to cells in the current cell set. Cell Set Surface select vertices on the surface of the current cell set. Cell Set Edge select vertices along the edges of the current cell set. Edges are dened by adjacent faces whose normals differ by an amount that exceeds a user-specied feature angle. Boundary Set select vertices attached to boundaries in the current boundary set. Spline Set select vertices attached to splines in the current spline set. Block Set select vertices attached to blocks in the current block set. Couple Set select vertices attached to cell faces in the current couple set Couple Set Masters select vertices attached to master cell faces in the current couple set Couple Set Slaves select vertices attached to slave cell faces in the current couple set All Initial Particle Positions select all vertices corresponding to initial particle positions (see Particle Tracking on page 9-28) All Sensors select all sensor vertices (see Data Reporting on page 9-24)

More vertex set operations are available in the Vertex List dialog box (see Listing on page 3-24) or by typing command VSET (see the pro-STAR Commands volume for a description of additional selection options). GUI-driven facilities These are accessed via the Vertex Tool, shown overleaf, which is activated by choosing Tools > Vertex Tool from the main window menu bar.

3-20

Version 3.26

Chapter 3

MESH CREATION Vertices

Commands:

VMAP CENTER

VCROSS VDELETE

VUNDO VCOMPRESS

VLIST VPLOT

The available facilities are: 1. Vertex-related graphical operations These require a mesh plot on the pro-STAR graphics window for proper operation (see Plotted Entity on page 5-16) and are performed by clicking on one of the blue-coloured buttons on the tool, as follows: (a) Plot centring Center at Vertex or Auto Center, see Plot Characteristics on page 5-3 for a discussion. (b) Mapping, i.e. placing a vertex onto the plane of a cell face Move (on Face) for moving existing vertices or New (on Face) for creating new ones. The desired location is found by projecting the vertex indicated by the screen cursor along the viewing direction onto the cell face. The relevant face is the one that surrounds the indicated vertex on the current plot, as shown in Figure 3-31. For a new vertex, its number is generated automatically by incrementing the existing total and the vertex is then added to the current set.

Version 3.26

3-21

MESH CREATION Vertices

Chapter 3

Surrounding cell face

Terminal cursor

Indicated point

Figure 3-31

Projecting vertices onto a cell face

(c) Creation or repositioning of vertices using the cursor to mark the desired location on the screen Move (in Plane) for moving an existing vertex in the plane of the screen or New (in Plane) for creating a new one. The latters number is generated automatically by incrementing the existing total and the vertex is then added to the current set. (d) Cancelling out the result of the last vertex addition/deletion/modication/ etc. operation Undo. If necessary, this facility can be deactivated using command SAFETY with parameter STATUS set to OFF. (e) Identication of a vertex in terms of its number and coordinates in the currently active coordinate system Identify Vertex. The vertex in question is indicated via the cursor and the required information appears in the pro-STAR output window. 2. Deletion This is performed by clicking one of the red-coloured buttons on the tool to (a) delete vertices in the current mesh plot by pointing at them with the cursor (Delete Vertex) or (b) delete only those collected in the current vertex set (Delete Vertex Set). Further vertex deletion options are also available via the Vertex List dialog box, see Listing on page 3-24. 3. Import/Export Vertex denitions may be imported into pro-STAR by reading in their coordinates from a .vrt le click button Vertex Read to display the dialog box shown below. The information required is:

3-22

Version 3.26

Chapter 3

MESH CREATION Vertices

(a) The input le name. pro-STARs built-in le browser may be used to help locate it (b) An offset to be added to vertex numbers upon input (c) The vertex range, in terms of the rst and last vertex number to read (d) The input le format either Coded or Binary

Command:

VREAD

The reverse operation, exporting vertices by writing their coordinates to a .vrt le is performed by clicking button Vertex Write. The dialog box displayed is shown below. The information required is: (a) The output le name. An existing le may be located using pro-STARs built-in le browser. (b) An offset to be added to vertex numbers upon output. (c) The vertex range, in terms of the rst and last vertex number to write. (d) The output le format either Coded or Binary.

Command:

VWRITE

Version 3.26

3-23

MESH CREATION Vertices

Chapter 3

4. Listing This is performed by clicking the Vertex List button to activate the Vertex List dialog shown below. Alternatively, select Lists > Vertices from the main menu bar. Vertex denitions in terms of X, Y, Z coordinates are displayed in the scroll list in the upper half of the box, in numerically ascending order. There is also a choice of listing all vertices or just the current set (marked by asterisks in the Vset column). The choice is made simply by clicking the Show All Verts or the Show Vset Only option button, respectively. The user can choose the coordinate system in which the vertices are listed by dragging the Coordinate System slider at the bottom of the box (or clicking the bar to the right or left of the slider with the mouse to change the coordinate system numbers one at a time). To select vertices from the list: (a) For single items, click the required vertex on the list. (b) For a group of two or more contiguous items, click the rst vertex you want to select, press and hold down the Shift key, and then click the last vertex in the group.

Commands:

VLIST

VDELETE

VMODIFY

VSET

Once the desired vertices are selected, the following operations are possible: (a) Addition to (or removal from) the current set click the Add to Set/Remove from Set button. (b) Deletion click the Delete Vertices button. (c) Modication of coordinates for multiple vertices type the new coordinate value in the appropriate text box underneath the list, then click the Modify X, Modify Y, or Modify Z button below the box to change the coordinate value for all the vertices selected. (d) Creation or modication of a single vertex a new vertex can be added
3-24 Version 3.26

Chapter 3

MESH CREATION Vertices

to the model by typing its number in the Vertex Number box, its coordinate values in the X, Y, Z boxes underneath the list and then clicking the Add/Modify Vertex button. To modify an existing vertex, select it with the mouse (or type its number in the Vertex Number box), type the new coordinate value(s) in the appropriate text box underneath the list, then click the Add/Modify Vertex button. Note that the currently active coordinate system may need to be changed as a result of performing items c) and d) above. This change is retained after exiting from the dialog box. Also note that all the above operations have an immediate effect on the vertex denitions, reected by immediate changes to what is displayed in the list. However, any subsequent vertex changes made outside this dialog box, e.g. by issuing commands via the pro-STAR I/O window, will not be listed. To display these changes, click the Update List button. 5. Merging Coinciding vertices are merged by eliminating either the higher- or lowernumbered vertices that occupy the same position in space. The operation is performed by clicking button Vertex Merge to display the VMerge dialog shown below.

Command:

VMERGE

The information required is: (a) The vertex range, in terms of the rst and last vertex number to check for coincidence. (b) The merging tolerance, typed in the Vertex Tolerance text box. This quantity is used to force nearly-coincident vertices to coincide precisely in space. (c) Three geometric ranges, pertaining to the x-, y- and z- directions of the currently active local coordinate system, respectively. This is an
Version 3.26 3-25

MESH CREATION Vertices

Chapter 3

alternative means of delimiting the range of vertices to be checked. (d) A specication of whether the lowest- or highest-numbered coincident vertices are to be retained after merging, selected by an option in the Coincident Set to keep pop-up menu. (e) A choice of whether to keep or delete the vertices that are not retained after merging. 6. Compression This involves the elimination of all unused vertex numbers corresponding to non-existent (e.g. deleted) vertices click Vertex Compress to display the VCompress dialog shown below:

Command:

VCOMPRESS

Text boxes are provided to enable specication of a vertex range on which this operation is to be performed. Note that, on completion, the operation produces continuous, sequentially-numbered vertices throughout the mesh. Any existing cell, boundary, block, spline and post-processing data denitions are renumbered accordingly. 7. Cell shape improvement Button Unwarp This is discussed under Mesh Quality Improvement on page 4-29. 8. Plotting This is performed by clicking on the Vertex Plot or Replot button. pro-STAR plots vertices in the current set in accordance with the relevant plotting parameters (see Plot Characteristics on page 5-3). Alternatively, select Plot > Vertex Plot from the main menu bar. Additional considerations The following additional points should also be born in mind: Vertices can be created in any order. All the manipulation facilities listed above can be applied to vertices of all mesh types, irrespective of their method of creation or origin. If any of the vertices generated by a command such as VFILL, VGENERATE, etc. already exists, the effect of the command is to reposition the vertex in space according to the latest command parameters. Although the user can model in any coordinate system or scale, the STAR-CD code works in SI units. The user must therefore ensure that the vertex
Version 3.26

3-26

Chapter 3

MESH CREATION Splines

coordinates are in meters before geometric data are passed on to STAR. This can be achieved by scaling the geometry either before writing the geometry le (using command VSCALE mentioned above under Command-driven facilities) or while writing the geometry le (via the GEOMWRITE operation, see Chapter 21, File manipulation). Given that pro-STAR is a single-precision program, it is very important to avoid using very large or very small coordinate values when specifying the location of vertices. Following on from the point made above, models should be built in reasonable units (i.e. using coordinate values in the range 0.001 to 10000 if at all possible) and then scaled to meters for STAR. This requirement can be met more easily if the origin of the global coordinate system is situated within or near the model.

Splines
As mentioned in the Introduction on page 3-1, splines are general-purpose, smooth, one-dimensional shapes that are specied in terms of vertices situated along their length; can be dened as continuous or discontinuous combinations of curves and lines.

Splines can be thought of as sophisticated drawing tools that help the user describe complex geometrical features in the model. They are therefore commonly used for dening edges of blocks (i.e. they act like wire frames, see Figure 3-32); dening edges of patches, as shown in Figure 3-32; complex paths along which vertices can be projected, generated or lled.

Patch

Block

Figure 3-32

Use of splines for patch and block denition

Spline tables Splines can be indexed and differentiated in various ways by means of the so-called spline table. The latter allows splines used for a common purpose (or derived from a common source) to be grouped together and assigned a common spline identity.
Version 3.26 3-27

MESH CREATION Splines

Chapter 3

This identity is expressed in terms of a spline type index. The common attributes distinguishing a spline type are: Colour, specied by a colour index. Group, specied by a group index. This identies an object (shell surface, cell range, etc.) within the mesh that is associated with this spline type in some way. Splines imported from IGES les (see topic IGES Data File in the STAR GUIde system) are very often collected together into groups.

A spline table can be defined and/or manipulated by means of an editor incorporated within the Spline Tool. The top part only of this tool, containing the editor, is shown below. Access is via the menu bar, by selecting Tools > Spline Tool.

Commands: STLIST

STABLE

STYPE

Current table entries are displayed in the scroll list in numerically ascending index number. New entries can be generated by highlighting an unoccupied spline type number with the mouse and then typing the colour and group indices in the text boxes provided under the list. Note that: Any additions or modications to the table can only be made permanent by clicking on the Modify Table button. Newly created splines can be given a different type by changing the currently active spline type prior to their creation. This is done by clicking on the Set Active Type button. The selection is indicated in the list by a letter A against the active type. Spline table entries can be deleted by typing command STDELETE. Note that all splines indexed to this entry must be deleted or changed to a different index before the table entry itself can be deleted.

pro-STAR also provides numerous command-driven and GUI-driven facilities for spline generation and manipulation. These are discussed in the next three sections. Command-driven facilities Creation, i.e. specication of a spline that passes through a given set of vertices in a continuously- or discontinuously-curving fashion (see Figure 3-33) command SPL. As shown in Figure 3-33(b), a discontinuous spline consists of a series of sub-splines. The end of one sub-spline and the beginning of the next is marked by a minus sign attached to the appropriate vertex number. Options CHASE or MESH of this command enable specication of only a
Version 3.26

3-28

Chapter 3

MESH CREATION Splines

very limited number of vertices. The remaining vertices along the spline curve are lled in automatically by following the surface of the current cell set. A full GUI implementation of this command is available in the Splines tab of the Create Geometric Entities STAR-GUIde panel.
Command: SPL , 1 , VRAN , 10 , 60 , 10 Command: SPL , 2 , VLIST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 2 60 1 4 3 5 6 7 (a) (b) 8

40 30 10 20

50

Figure 3-33

Spline creation using SPL

Generation, starting from an existing base set of splines command SPLGENERATE. The new splines are created by offsetting the constituent vertices of the base set (see Figure 3-34). All vertices for the new set should already exist.

Command: SPLGEN , 3 , 1 , 5 , 5 , 1 , 10 24 23 Spline 7 21 22 14 13 Spline 6 11 12 4 3 Spline 5 1 2 5 6 15 16 25 26

Figure 3-34

Spline set generation using SPLGENERATE

Adding splines along the perimeter of (a) a cross-sectional cut through the current cell set command VSECTION (see also the description of cross-sections in Chapter 5, Additional display options); (b) the intersection of the current cell set with a given shell type command VINTERSECT.

Counting the currently dened splines command COUNT. Alternatively, this operation can be executed by choosing Utility > Count > Splines from the menu bar.

Version 3.26

3-29

MESH CREATION Splines

Chapter 3

Spline set selection facilities Splines need to be grouped together, thus defining a spline set, for plotting or generation purposes. This is done by selecting one of the list options provided by the S-> button in the main pro-STAR window. The available options are as follows: 1. All puts all existing splines in the current set 2. None clears the current set 3. Invert replaces the current set with one consisting of all currently unselected splines 4. New replaces the current set with a new set of splines 5. Add adds new splines to the current set 6. Unselect removes splines from the current set 7. Subset selects a smaller group of splines from those in the current set For the last four options, the required splines are collected by choosing an item from a secondary drop-down list, as follows: Cursor Select select the desired splines with the screen cursor, complete the selection by clicking the Done button on the plot window Zone use the cursor to draw a polygon around the desired splines. Complete the polygon by clicking the last corner with the right mouse button (or click Done outside the display area to let pro-STAR do it for you). Abort the selection by clicking the Abort button. Type (Active) select all splines of the currently active type (see Spline tables on page 3-27 for a denition of spline types). Type (Current) or Type (Cursor Select) select all splines whose type index is currently highlighted in the spline table. Alternatively, select the type by clicking on a representative spline with the cursor. Color (Current) or Color (Cursor Select) select all splines whose colour is currently highlighted in the spline table. Alternatively, select all splines having the same colour by pointing at a representative spline with the cursor. Group (Current) or Group (Cursor Select) select all splines that belong to the same group as the one currently highlighted in the spline table (see Spline tables on page 3-27 for a denition of spline groups). Alternatively, select the group by pointing at a representative spline with the cursor. Vertex Set (Any) select splines with at least one constituent vertex in the current vertex set. Vertex Set (All) select splines with all constituent vertices in the current vertex set.

More spline set operations are available in the Spline List dialog box (see Listing on page 3-33) or by typing command SPLSET (see the pro-STAR Commands volume for a description of additional selection options). GUI-driven facilities These are accessed via the Spline Tool shown below. The tool is activated by choosing Tools > Spline Tool from the main window menu bar.

3-30

Version 3.26

Chapter 3

MESH CREATION Splines

Commands:

SPLCROSS VSPCROSS

SPLDELETE SPLMODIFY

SPLOT SPCHECK

SPCOMPRESS

The available facilities are: 1. Spline table operations These are performed by buttons Modify Table, Set Active Type and are described on page 3-28. 2. Spline-related graphical operations These require both a spline and a vertex or mesh plot on the main pro-STAR window for proper operation (see Plotted Entity on page 5-16). They are performed by clicking one of the blue-coloured buttons on the tool, as follows: (a) Creation of a new spline, using the screen cursor to choose its constituent vertices New Spline. The spline number is generated automatically by incrementing the existing total and the spline is then added to the current set. If you click on the same vertex twice, pro-STAR changes the sign of the vertex, indicating a break in slope continuity at that location (see Figure 3-33 on page 3-29 for an illustration). (b) Addition of vertices Add to Spline. This uses the cursor to rst choose a spline and then add a number of selected vertices at the end of it. (c) Modication of an existing spline Modify. This operation requires a spline plot (and in some cases also a vertex plot) on the main pro-STAR window. The effect of the operation can be one of the following,
Version 3.26 3-31

MESH CREATION Splines

Chapter 3

depending on the item selected from the drop-down list. In all cases, the desired spline(s) must rst be indicated with the cursor: i) Reverse the vertex order in the spline denition Reverse. ii) Split a spline into two at the indicated vertex Split. iii) Join two splines together Join. The last vertex of the rst spline becomes the rst vertex in the second spline, therefore the previously specied starting vertex of the second spline is not included in the new spline. iv) Delete an indicated vertex from the spline denition Delete Vertex. v) Insert an indicated vertex into the spline denition Insert Vertex. vi) Use the spline as a means of re-positioning a vertex in space Move Vertex on Spline. Use the graphics cursor to mark the desired vertex location on the spline. vii) Change the spline type index to the one that is currently active Spline Type. Note that it is also possible to change the type of all currently dened splines (option Spline Type (All)) or just of those in the current spline set (option Spline Type (Spline Set)). Further spline modication options are also available in the Spline List dialog box, see Listing on page 3-33. 3. Deletion This is performed by clicking one of the red-coloured buttons on the tool to (a) delete splines in the current spline plot by pointing at them with the cursor (Delete Spline), or (b) delete only those collected in the current spline set (Delete Spline Set). Further spline deletion options are also available in the Spline List dialog box, see Listing on page 3-33. 4. Import/Export Spline denitions may be imported into pro-STAR by reading them from a .spl le click button Spline Read to display the dialog shown below. The information required is: (a) The input le name. pro-STARs built-in le browser may be used to help locate it (b) An offset applied to vertex numbers upon input. (c) The spline range, in terms of the rst and last spline number to read. (d) An option to either Add the input splines to the end of the current list, disregarding spline numbers read from the le, or to use these numbers for overwriting current spline numbers (Modify). (e) The input le format either Coded or Binary.

3-32

Version 3.26

Chapter 3

MESH CREATION Splines

Command:

SPLREAD

The reverse operation, exporting spline denitions by writing them to a .spl le is performed by clicking button Spline Write. This displays the dialog shown below. The information required is: (a) The output le unit number. An existing le may be located using pro-STARs built-in le browser. (b) An offset applied to vertex numbers upon output. (c) The spline range, in terms of the rst and last spline numbers to write. (d) The output le format either Coded or Binary.

Command:

SPLWRITE

5. Listing This is performed by clicking the Spline List button to activate the Spline List dialog shown below. Alternatively, select Lists > Splines from the menu bar. Spline denitions in terms of type index (see Spline tables on page 3-27) and number of constituent vertices are displayed in the scroll list in the left half of the box, in numerically ascending order. There is also a choice of listing all splines or just the current set (marked by asterisks in the Set column). The choice is made simply by clicking the Show All Splines or the
Version 3.26 3-33

MESH CREATION Splines

Chapter 3

Show Spline Set Only option button, respectively. To select splines from the list: (a) For single items, click the required spline. (b) For two or more items in sequence, click the rst spline you want to select, press and hold down the Shift key, and then click the last spline in the group.

Commands: SPLLIST

SPLDELETE SPLUNDELETE

SPLMODIFY SPLSET

Once the desired splines are selected, the following operations are possible: (a) Addition to (or removal from) the current set click the Add to Set/Remove from Set button. (b) Deletion click the Delete Spline button. Note that any splines that have been deleted up to a given point can be reinstated, provided the spline Compress operation (see Compression on page 3-35) has not been performed. To reinstate all currently deleted splines, click the Undelete Spline button. If only one spline is selected, the following spline modication operations are possible, depending on the button clicked: (a) Change the spline denition by: i) Inserting additional vertices Insert Vertices. The insertion location is immediately after the point highlighted in the vertex scroll list. The inserted vertex number is typed in the text box underneath. ii) Deleting one or more vertices highlighted in vertex scroll list
3-34 Version 3.26

Chapter 3

MESH CREATION Splines

Remove Vertices. iii) Modifying some of the constituent vertices (see Figure 3-35) Replace Vertices. The new vertex number must be typed in the text box below the list. (b) Split a spline into two, at the location of the vertex highlighted in the list Split Spline. (c) Reverse the order of the constituent vertices Reverse Order. (d) Inserting slope discontinuities at specied points on a spline, in the manner illustrated by Figure 3-33(b) Change Signs. The discontinuity is indicated in the vertex list by a negative sign.
Command: SPLMOD , 3 , MODIFY , 14 , 24 , 25 , 26 15 14 Spline 3 11 12 13 24 25 26 16

Figure 3-35

Spline modication by vertex replacement

Note that all the above operations have an immediate effect on the spline denitions, reected by immediate changes to what is displayed in the list. However, any subsequent spline changes made outside this dialog box, e.g. by issuing commands via the pro-STAR I/O window, will not be listed. To display these changes, click the Update List button at the top of the box. 6. Checking This checks for splines that cross over themselves click the Spline Check button. The command version of this operation (SPCHECK) can also search for duplicate splines. 7. Compression This involves the elimination of all deleted splines and renumbering of those remaining in a continuous and sequential fashion click the Spline Compress button. Note that if you also want to eliminate the vertices belonging to the deleted splines, you will need to issue a separate command, SPVCOMPRESS, via the I/O window. 8. Plotting This is performed by clicking on the Spline Plot or Replot button. pro-STAR plots splines in the current set in accordance with the relevant plotting parameters (see Plot Characteristics on page 5-3). Alternatively, select Plot > Spline Plot from the main menu bar. Vertex manipulation using splines As already mentioned, splines can be used for manipulation of vertices in space. The relevant vertex functions are as follows:
Version 3.26 3-35

MESH CREATION Splines

Chapter 3

Single vertex creation, using the spline as a means of positioning a vertex in space (see Figure 3-36) command VSPDEFINE.

Command: VSPDEF , 4 , 60 , PERC , 0.6 60 Spline 4 1 2 3 4 5

Figure 3-36

Vertex creation on a spline using VSPDEFINE

Creation via the cursor, as above but using the graphics cursor to mark the desired vertex location on the spline command VSPCROSS. Vertex set generation, starting from an existing arbitrary base set. Each new set is generated as if the original set had been dragged along the spline (see Figure 3-37) command VSPGENERATE.

Command: VSPGEN , 7 , 3 , 10 , 10 , 12 , 1 , ABSA , 0.2 , 0.0 , 1.0 32 12 Spline 7 11 10 22 21 20 31 30

Figure 3-37

Vertex set generation using a spline as a coordinate system

Filling additional vertices along the spline in between two previously-dened vertices, according to a specied pattern (see Figure 3-38) command VSPFILL. The end vertices plus the ones in between can also be specied graphically using the terminal cursor.

Command: VSPF , 8 , 10 , 20 , 3 , 2 , 1 4 Spline 8 10 2 3 20

Figure 3-38

Vertex lling between two points on a spline

Moving a vertex to the intersection of a spline with a constant-coordinate surface in a local coordinate system (Figure 3-39) command VSPMOVE.

3-36

Version 3.26

Chapter 3

MESH CREATION Cells Command: VSPMOVE , 7 , 47 , 23 , V , V , 3.0 YL Vertex 47

Spline 7

Z = 3.0 ZL XL

Figure 3-39

Intersection of a spline and a local coord. system

Projection of a set of vertices onto a curve dened by a spline set command VSPPROJECT. Listing of spline coordinates for a given range of vertices command VSPLIST.

For further details on vertex manipulation using splines, refer to the pro-STAR Commands volume.

Cells
Cells are basic building blocks of the mesh. Their properties and various alternative methods used for their creation are discussed in this section. The basic properties of cells are as follows: They are nite volumes or surface elements dened by a number of vertices situated at their corners. They cannot exist independently of vertices. They change shape and/or position as their vertices move, as shown in Figure 3-40.
4 8 1 5 3 7 2 8 on moving vertex no. 6 5 6 1 4 3 7 2

Figure 3-40

Cell dependence on vertices

Cell types Every cell has an associated type. At present, pro-STAR offers six cell types that
Version 3.26 3-37

MESH CREATION Cells

Chapter 3

can be grouped into two major categories, computational cells and visualisation cells. Computational cells These are needed for CFD calculations and can be one of the following types: Fluid used to ll those parts of the model occupied by liquids, gases, or porous media. Solid used in those parts occupied by solids. Such cells are ignored for calculation purposes except in conjugate heat transfer problems, i.e. when conduction through solids is taken into consideration. Bafe these are effectively zero-thickness, two-dimensional cells. Otherwise, their properties are similar to solids. Bafes may be placed between any two uid or solid cells, as shown in Figure 3-41, where they act like solid or permeable walls, depending on the properties assigned to them.

Bafes

Figure 3-41

Example model with bafes: duct bend with turning vanes

Visualisation cells These are used for visualisation (see Chapter 5) and mesh generation purposes only (see Extrusion on page 3-5) but are otherwise ignored during the flow analysis. The available types are: Shells two-dimensional surfaces similar to bafes that can be located anywhere within the mesh. Point and line cells these are effectively zero- and one-dimensional entities. They are particularly useful for importing and interpreting geometric details from external systems (see Importing Data from other Systems on page 4-1).

Cell properties Cells can be grouped together with the aid of so-called cell identity parameters. These parameters are as follows:
3-38

Cell type determines the cell type, as described above. Cell material assigns a given set of uid or solid material properties to the cells (see Cell Table on page 6-1). Cell colour determines the colour used when the cells are displayed (see
Version 3.26

Chapter 3

MESH CREATION Cells

also Cell Table on page 6-1). Cell porosity assigns a given set of porous properties to cells occupying a porous region (uid cells only; see also Chapter 10). Spin index used in cases involving multiple rotating reference frames (see Models for multiple rotating reference frames (implicit treatment) on page 16-2) to assign an axis of rotation and rotation speed to cells occupying the rotating region. Group number identies an object (shell surface, cell range, etc.) within the mesh that is associated with this cell type in some way. Cells imported from IGES les (see IGES Data File in the STAR GUIde system) are very often grouped together in this way. Surface lighting index determines the light-reecting (shading) properties of cells when they are illuminated on a screen display (see Special lighting effects on page 5-10). Processor number identies the processor (cpu) number to which the cells are allocated. This property is used only in STAR-HPC, the distributed memory, parallel-processing version of the code, for situations where the user wishes to perform a manual solution domain decomposition; see in Appendix H. Conduction thickness an optional property used in conjugate heat transfer cases. It applies only to solid-type cells that have been created by extruding bafe-type cells to a nite thickness (see Alternative treatment for bafe heat transfer on page 6-18) Radiation switch used to enable or omit radiative heat calculations in cells of this type (see Radiation Sub-domains on page 11-8) Initial free-surface identier determines the initial light and heavy uid distribution in free-surface and/or cavitation problems (see Chapter 15, page 15-3 and 15-6) Cell name optional alphanumeric label, used as additional cell identier.

An example of the use of this approach in identifying and classifying various regions within the calculation mesh is shown in Figure 3-42.

Version 3.26

3-39

MESH CREATION Cells

Chapter 3

Fluid 1 Porous region

Baffle

Solid 1 Fluid 2 Solid 2

Figure 3-42

Example of possible cell classication

All the above cell identity parameters can be tabulated using various pro-STAR operations, discussed in more detail in Chapter 6. Cell shapes To provide further flexibility in generating complex meshes, STAR accepts four basic fluid or solid cell shapes plus six trimmed (polyhedral) cell shapes normally generated by pro-am. In addition, there is a variety of degenerate shapes formed by collapsing various cell edges. The four basic shapes are as follows: hexahedra, triangular prisms, pyramids, tetrahedra.

These basic shapes are illustrated in Figure 3-43. Note that each of them can be distorted at will to fit the geometric requirements of the mesh.

3-40

Version 3.26

Chapter 3

MESH CREATION Cells 4 3 4 8 5 1 2 5 6 Hexahedron ( 1 = face number) Pyramid 3 y 5,5,5,5 7 6 2 1 2 1 4 3

3,3 7,7 1 1 5 6 Triangular prism 2

5,5,5,5

3,3

2 Tetrahedron

Figure 3-43

Basic uid or solid cell shapes

Figure 3-44 illustrates the six types of trimmed cells currently available. These are normally created by means of the pro-am module but may also be freely used elsewhere in pro-STAR. Referring to the identification numbers shown in Figure 3-44, the trimmed cells are formed as follows: (1) (2) (3,4,5) (8) a hexahedron with a corner cut off a hexahedron with an edge cut off hexahedral cells cut in such a way that the exposed face is either a ve or six-sided polygon a hexahedron with all its corners cut off (used to extrude six-sided faces to the surface of the model see the pro-am documentation)

Trimmed cells may be deleted and redefined at will in order to make further refinements to the shape of the mesh, see Command-driven facilities on page 3-44.

Version 3.26

3-41

MESH CREATION Cells 8 9 10 6 7 9 10 6

Chapter 3

8 7

5 4 1

3 2 (1) (2) 6 6 7 2 4 5

3 2 1

9 10

8 7

10 1

5 4 1

3 2 (3) 7 (4) 12 3 8 11

9 10

9 7 8

8 4 5

3 1 6 2 (5) (8) 5 6 1 2 4 3

Figure 3-44

Allowable trimmed cell shapes

Other specially-shaped cells (degenerate cells) can be formed by collapsing various cell edges, as long as no cell faces are eliminated in the process. Figure 3-45 depicts cells created by collapsing one, two, or three edges of a hexahedron. Note that collapsing three edges eliminates a face. Although this is not generally allowed, this particular shape is allowable as long as the vertices are in the exact order shown in Figure 3-45. For cells containing one or two collapsed edges, the exact numerical order is irrelevant as long as the general hexahedral vertex ordering is followed.

3-42

Version 3.26

Chapter 3

MESH CREATION Cells 7

8 5 4
E e dg

1 5 2,6

3 7

8 5 4 1 2 6

o 1C 2 Collapsed Edges
3C oll

p lla

sed

4,8 1 3 2,6 2

ap

sed

Ed

ge

5,6 1 Vertices must be numbered as shown

7,8

3,4

Figure 3-45

Allowable degenerate cell shapes

Two-dimensional cells such as baffles and shells can be triangles, quadrilaterals, pentagons or hexagons.The latter two categories are extensions to the basic pro-STAR repertory, equivalent to trimmed cells in three-dimensional meshes. These shapes are illustrated in Figure 3-46. Again, each of them can be distorted at will to fit the mesh requirements.
4 3 3,3

1 Quadrilateral 1 2

1 Triangle 1

2 6

5 2 5 4 Pentagon 4 Hexagon 3 3

Figure 3-46
Version 3.26

Basic bafe or shell shapes


3-43

MESH CREATION Cells

Chapter 3

pro-STARs capabilities regarding cell generation and manipulation can be sub-divided into command-driven and GUI-driven ones, described in the following sections. Command-driven facilities Creation, using a number of vertices appropriate to the cell type command C. This is illustrated in Figure 3-48 in terms of an arbitrarily-shaped hexahedral cell. Trimmed cell creation command CTRIM. This performs the same function as command C, but for trimmed (polyhedral) cells. Creation via the cursor, using the graphics cursor to pick vertices on the screen command CDX. Note that this command can be used for creating both ordinary and trimmed cell shapes. CTRIM and CDX are the only commands capable of creating trimmed cells within the standard version of pro-STAR. Generation of new sets of cells starting from an existing set command CGENERATE. The numbers of the constituent vertices for the new cells are determined by offsetting the vertex numbers of the base set (see Figure 3-47). Note that you can create the vertices for the new cells before or after execution of the command (but before any further plotting or manipulation of your model). Alternatively, vertices can be created by the command itself using VGENERATE or VREFLECT internally.

Command: CGEN , 3 , 5 , 1 , 4 , 1 116 117

118

119 120

16 17 9 11 12 5 6 7 1 2 8 3 9 4 10 105 Starting set 6 13 7 14 8 15 110 10 18 11 19 12 20 115 Generated sets

Figure 3-47

Cell set generation using CGENERATE

3-44

Version 3.26

Chapter 3

MESH CREATION Cells

Generation of cells by reecting a set of vertices about a given local coordinate axis command CVREFLECT. This is an extension of command VREFLECT in that the mirror-image vertices form the basis for new, automatically created cells. Cell couples (see Chapter 4, Couple creation) are also created automatically, if necessary. Modication of cell shapes by modifying one or more vertex numbers command CMODIFY. Adding line cells (see Cell shapes on page 3-40) along the perimeter of (a) a cross-sectional cut through the current cell set command VSECTION (see also the description of cross-sections in Chapter 5); (b) the intersection of the current cell set with a given shell type command VINTERSECT. Line cells can also be added at the location of one or more splines, as specied by command CSPLINE. Counting the currently dened cells command COUNT. Alternatively, this operation can be executed by choosing Utility > Count > Cells from the menu bar. Listing of the vertices making up a cell face command FLIST. This command is particularly useful when manipulating trimmed cells. Saving cell face denitions to a .fac le for use by other programs command FWRITE. The information written for each face consists of cell, face and constituent vertex numbers.

For further details on the function and application of cell commands, refer to the pro-STAR Commands volume. Cell orientation and correction
Command: C , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 8 7

K
6

J
3 4

1 2

Figure 3-48

Right-handed cell denition

The manner in which cells are defined is important. The constituent vertices must be specified in the correct order so as to obey the right-handed rule. This is
Version 3.26 3-45

MESH CREATION Cells

Chapter 3

illustrated in Figure 3-48 in terms of an arbitrarily-shaped hexahedral cell. The vertices also define a cell coordinate system, unique to each cell, whose I, J and K directions are also shown in that figure. The numerical scheme used to label vertices in Figure 3-43 and Figure 3-46 illustrates the correct right-hand-rule ordering of vertices for all basic cell and baffle/shell shapes. Also shown is the face numbering, which follows the same convention. Note that definition of the basic non-hexahedral cells, degenerate cells and triangular baffles requires repetition of some vertex numbers, in the manner illustrated in Figure 3-43, Figure 3-45 and Figure 3-46. The reason for this, in the case of cells, is that all the basic cell shapes can be regarded as degenerate hexahedra formed by collapsing cell faces to lines and/or points (note that only faces 4 and 2 are treated in this manner). The coincident vertices produced by this process are identified by assigning them the same indices. Thus, in Figure 3-43, the prism cell is produced by collapsing face 4 to a line and, in the indexing convention adopted, the two vertex pairs so formed are labelled (3,3) and (7,7). Otherwise, the numbering follows the usual right-hand convention. The pyramidal cell is formed by collapsing face 2 to a point, labelled (5,5,5,5) to indicate the four coincident vertices. The tetrahedron is constructed by a combination of the practices for the other two shapes, i.e. by reducing face 4 to a line and face 2 to a point. The orientation of collapsed cell faces is important in the vicinity of boundaries, as discussed in the description of the Import Grids STAR GUIde panel. Although pro-STAR can in principle handle meshes containing cells of arbitrary orientation, uniform or near-uniform alignment of the constituent cells can be very important in reducing the memory and computer time requirements of the final CFD model. This is particularly the case for meshes that are entirely or predominantly tetrahedral. A special command, TETALIGN, is therefore provided that will reorder the vertex numbering in such meshes in order to achieve the greatest possible degree of uniformity in cell orientation. If the cell orientation, as defined by the user, is not correct, there are automatic facilities for rectifying it. These are provided within the STAR GUIde environment (Fix Grid Problems panel). Cell set selection facilities Cells need to be grouped together, thus defining a cell set, for the purposes of mass manipulation or plotting. This is done by selecting one of the list options provided by the C-> button in the main pro-STAR window. The available options are as follows: 1. All puts all existing cells in the current set 2. None clears the current set 3. Invert replaces the current set with one consisting of all currently unselected cells 4. Surface selects all cells lying on the surface of the most recent plot and makes them the current set 5. New replaces the current set with a new set of cells 6. Add adds new cells to the current set 7. Unselect removes cells from the current set 8. Subset selects a smaller group of cells from those in the current set
3-46 Version 3.26

Chapter 3

MESH CREATION Cells

For the last four options, the required cells are collected by choosing an item from a secondary drop-down list, as follows: Type (Current) select all cells whose cell type index is currently highlighted in the cell table. Type, Group, Color, Material, Porosity, Spin select all cells of a given type or specic identity parameter (colour, porosity, material, spin, group). The required type or property is selected by clicking on a representative cell with the cursor. Zone use the cursor to draw a polygon around the desired cells. Complete the polygon by clicking the last corner with the right mouse button (or click Done outside the display area to let pro-STAR do it for you). Abort the selection by clicking the Abort button. Attach Shell select all shells or bafes attached to the current cell set. The latter may consist of uid/solid cells to which shells or bafes have been attached explicitly via one of the operations described on page 3-48. Note that the required shells may also have been created automatically by pro-STAR as a result of a GETBOUNDARY/ GETWALL operation (see page 9-7). Vertex Set (All) select cells with all constituent vertices in the current vertex set. Vertex Set (Any) select cells with at least one constituent vertex in the current vertex set. Vertex Set (Face) select cells that have all vertices making up any of their faces in the current vertex set. Cursor Select click on the desired cells with the cursor, complete the selection by clicking the Done button on the plot. Fluid, Solid, Baffle, Shell, Line, Point select all cells of the type chosen. Block select all cells contained in the current block set. Hexahedron, Prism, Pyramid, Tetrahedron select all cells of the shape chosen. Trimmed Type select either all trimmed cells (sub-option All) or only those that correspond to the type chosen in the drop-down list. Couples select cells that are part of a couple (Chapter 4, Integral and arbitrary connectivity). The secondary drop-down list enables all couple members (Both), the master cells only (Master), or the slave cells only (Slave) to be selected. Couple Set select cells that are part of a couple that is included in the current couple set. The secondary drop-down list enables all couple members (Both), the master cells only (Master), or the slave cells only (Slave) to be selected.

More cell set operations are available in the Cell List dialog (see Listing on page 3-51) or by typing command CSET (see the pro-STAR Commands volume for a description of additional selection options). GUI-driven facilities These are accessed via the Cell Tool, shown overleaf, which is activated by choosing Tools > Cell Tool from the main window menu bar.
Version 3.26 3-47

MESH CREATION Cells

Chapter 3

Commands:

CFIND CPLOT

CCROSS CZONE

CDELETE CCOMPRESS

CTCOMPRESS

The available facilities are: 1. Cell table operations These are performed by buttons Edit Types, Set Active Type and are described in Chapter 6, Cell Table. 2. Modication, Addition, Deletion These are performed by clicking one of the red-coloured buttons on the tool. Cell type modication is discussed in detail in Cell indexing on page 6-3. Regarding the other buttons: (a) Add Shells or Add Baffles causes shells or bafes to be added to the indicated faces of selected cells. The required shell or bafe type must also be selected by highlighting it in the cell table list at the top of the Cell Tool. The face selection is performed in one of the following ways: i) Enclosing the required cell faces within a polygon drawn on the screen with the cursor (option Zone). The action is terminated by clicking on the last corner with the right mouse button to complete the polygon;
3-48 Version 3.26

Chapter 3

MESH CREATION Cells

the Done button displayed outside the display area to let pro-STAR complete the polygon; the Abort button to abort the selection operation. ii) Clicking on the required cell faces with the screen cursor (option Cursor Select). The action is terminated by clicking the Done button displayed on the plot. iii) Selecting all faces located on the surface of the displayed mesh. The process, illustrated by Figure 3-49, starts at surface faces connected to a given seed vertex and radiates outwards. The seed vertex is selected with the screen cursor. The operation thus provides a useful alternative to picking faces with the cursor when working with intricate geometries that are not easy to display in their entirety on the screen. The selection process stops at the vertices contained in a vertex set, VSET, that is chosen in one of the following two ways: If Surface (Current Vertex Set) is selected, the currently dened set is used. If Surface (New Edge Vertex Set) is selected, pro-STAR performs operation V-> > New > Cell Set Edge automatically in order to assemble the new set. In the example shown below, seed vertex number 100 is used to add a shell of type 8 onto the inner surface of the mesh, where it is difcult to use options Zone or Cursor Select.
Commands: VSET , NEWS , EDGE CFIND , SHELL , 8 , 100

VSET selected

Seed vertex 100

Shell created

Figure 3-49

Surface cell manipulation using a seed vertex

(b) Delete Cells causes the selected cells to be deleted. The selection is performed using the methods described above for shell and bafe
Version 3.26 3-49

MESH CREATION Cells

Chapter 3

addition, only this time the cursor is used to indicate cells rather than cell faces. Note that: i) Option Zone selects cells along the full depth of the plot and does not act on surface cells alone. ii) The drop-down list provides an additional facility for deleting all cells in the currently dened cell set (option Cell Set). More cell deletion options are also available in the Cell List dialog, see Listing on page 3-51. 3. Import/Export Cell denitions are imported into pro-STAR by reading them from a .cel le click button Cell Read to display the dialog shown below. The information required is: (a) The input le name. pro-STARs built-in le browser may be used to help locate it (b) An offset to be added to vertex numbers upon input (c) The cell range, in terms of the rst and last cell number to read (d) An offset to be added to cell numbers upon input (e) An offset to be added to cell type indices upon input (f) Options to either Add the input cells to the end of the current list, disregarding cell numbers read from the le, or to use these numbers for overwriting current cell numbers (Modify) (g) The input le format either Coded or Binary

Command:

CREAD

The reverse operation, exporting cell denitions by writing them to a .cel le is performed by clicking button Cell Write. This displays the dialog shown below. The information required is: (a) The output le name. An existing le may be located using pro-STARs
3-50 Version 3.26

Chapter 3

MESH CREATION Cells

(b) (c) (d) (e)

built-in le browser. An offset to be applied to vertex numbers upon output The cell range, in terms of the rst and last cell number to write An option to save only cells of a specied type (Cell Table Number required) The output le format either Coded or Binary

Command:

CWRITE

4. Listing This is performed by clicking the Cell List button to activate the Cell List dialog shown below. Alternatively, select Lists > Cells from the main window menu. Cell denitions in terms of constituent vertices, cell type and cell table index are displayed in a scroll list in numerically ascending order. Note that: (a) For trimmed cells, the eight nodes of the underlying hexahedral cell are listed on the rst line (where the cell number appears), with a zero placed in any column which corresponds to a missing vertex. Extra lines listing the special vertices are displayed after this line. (b) For shells and bafes, the list displays the three-dimensional cell number and relevant face number to which the shell or bafe is attached. This information appears in the columns where the seventh and eighth cell vertices would normally be listed. The dialog contains option buttons that offer the following listing choices: (a) Show All Cells (b) Show Attached Cells on Shells/Baffles. (c) Show Cset Only Whatever the type of listing, cells included in the current set are marked by asterisks in the Cset column. To select specic cells from the list: (a) For single items, click the required cell on the list. (b) For two or more items in sequence, click the rst cell you want to select,
Version 3.26 3-51

MESH CREATION Cells

Chapter 3

press and hold down the Shift key, then click the last cell in the group.

Commands:

CLIST

CDELETE

CUNDELETE

CSET

Once the desired cells are selected, the following additional operations are possible: (a) Addition to (or removal from) the current set click the Add to Set/Remove from Set button. (b) Deletion click the Delete Cell button. (c) Modication of cell index click the Change Type button. This operation is covered in detail under Cell indexing on page 6-3. Note that: (a) Any cells that have been deleted up to this point can be reinstated, provided the Cell Compress operation has not been performed in the meantime. To reinstate all currently deleted cells, click the Undelete Cell button. (b) All operations performed within the Cell List dialog have an immediate effect on the cell denitions, reected by immediate changes to what is displayed in the list. However, any subsequent cell changes made outside this dialog box, e.g. by issuing commands via the pro-STAR I/O window, will not be listed. To display these changes, click the Update List button at the top of the box. 5. Checking Clicking Cell Check opens the Check Tool where a variety of checks on the validity of the current cell set may be performed (see Chapter 4, Microscopic checking).
3-52 Version 3.26

Chapter 3

MESH CREATION Multi-block Approach

6. Cell number compression This involves the elimination of all unused cell numbers corresponding to non-existent (e.g. deleted) cells and renumbering of the remaining cells click button Cell Compress. Note that any existing cell couple and post-processing data are renumbered accordingly. 7. Cell table compression Clicking button Cell Table Compress cleans up the cell table of any deleted or undened entries (see also Chapter 6, page 6-3). 8. Cell renement Click button Cell Refine to perform a cell renement operation, as discussed in Chapter 4, Mesh Renement. 9. Plotting This is performed by clicking on the Cell Plot or Replot button. pro-STAR plots cells in the current set in accordance with the relevant plotting parameters (see Plot Characteristics on page 5-3). Alternatively, select Plot > Cell Plot from the main window menu bar. Cell numbering Cell numbering is performed automatically as each cell is created and bears no relation to the associated cell vertex numbers. STAR-CD works in an inherently unstructured fashion, i.e. no particular ordering and numbering of cells is required. The only constraint imposed on the pattern of cell numbering is that the sequence must be continuous. However, it is possible to instruct the code to renumber a given cell range by sorting the coordinates of their centroids in a specified local coordinate system (command CREORDER). This results in cells being numbered according to their position in space, which may sometimes confer benefits such as ease of cell generation and alteration. The command is likely to be most useful for meshes imported from other CAD/CAE packages (see Importing Data from other Systems on page 4-1) that may generate cell numbering in a highly irregular manner. Command RESTRUCTURE will also achieve the same effect as it will optionally renumber cells as well as their constituent vertices. However, the command can only be applied to a set of cells already possessing a reasonable spatial structure.

Multi-block Approach
This approach relies on separating the overall geometry of the model from its mesh, with the latter being generated automatically for individual blocks. Users are therefore advised to take full advantage of these capabilities, especially in cases where the flow domain shape is relatively simple to dene, or can be readily divided into several constituent blocks.

There are two ways of employing block meshing: 1. The mesh block generation method (mesh block in a pre-dened coordinate
Version 3.26 3-53

MESH CREATION Multi-block Approach

Chapter 3

system). 2. The multi-block generation method (mesh blocks forming complex volumes). Their principal characteristics, advantages and disadvantages are as follows: Mesh block generation The method is implemented as two separate panels in the STAR-GUIde system. The rst generates three-dimensional meshes directly (see Create 3-D Grids using Simple Shapes). The second generates two-dimensional meshes consisting of shell or bafe cells and optionally expands them in the third direction to create a single-layer, 3-D mesh (see Create 2-D Grids using Simple Shapes). Its application is limited to standard coordinate systems, as shown in Figure 3-51. It is one of the fastest modes of mesh generation. As a consequence of the above, it is well-suited to testing and familiarisation with STAR-CD facilities. It can also be used to build up more complex models by changes to the origin location, coordinate axis orientation and type of coordinate system employed (see Figure 3-50).

Co-ord C Co-ord B

Co-ord A

Figure 3-50

Local coordinate system usage

3-54

Version 3.26

Chapter 3

MESH CREATION Multi-block Approach

Cylindrical

Cartesian

Spherical

Toroidal

Figure 3-51

Coordinate systems used with command VC3DGEN

Version 3.26

3-55

MESH CREATION Multi-block Approach

Chapter 3

Multi-block generation This is probably the most powerful and flexible of the block-meshing techniques. It is based on the concept of a block as a three-dimensional volume consisting of eight corners, defined by vertices, and twelve edges, defined by splines or straight lines [see Figure 3-52(a)]. For relatively simple shapes, the model geometry can be defined by a single block. More complicated shapes are represented by a set of conveniently shaped blocks (see Figure 3-52(b)]. The overall geometry can therefore be stored as one or more blocks. The latter may be generated using the special STAR-GUIde panels described in Multi-block Meshing Using STAR-GUIde Panels on page 3-60.

(a) Single block

(b) Multi-block

Figure 3-52

Block representation of model geometry

The main features of the block generation process are as follows: The model geometry and its associated mesh distribution denition are stored independently of each other. Mesh generation for individual blocks is performed separately from the above operations. The meshing process may also be applied repeatedly on the same block to implement successive meshing alternatives. In multi-block models, the number and distribution of cells (i.e. the mesh spacing) for each block may be dened separately. Alternatively, the spacing in a given direction can be dened for one block to start with and then replicated for a group of blocks. This requires the prior creation of a block set (see Block set selection facilities below) to collect the required blocks together. The block-meshing technique can utilise imported geometric data such as vertex coordinates and splines.

Blocks may be created or manipulated using a mixture of commands and GUI operations, as described in the next three sections.

3-56

Version 3.26

Chapter 3

MESH CREATION Multi-block Approach

Command-driven facilities 1. Generation of a single block command BLK 2. Generation of additional blocks by (a) applying an offset to the vertices of an existing set command BLKGENERATE (b) creating blocks for each cell in a specied range command BLKCELL
.

3. Counting the currently dened blocks command COUNT. Alternatively, this operation can be executed by choosing Utility > Count > Blocks from the menu bar. Block set selection facilities Blocks may be grouped together, thus defining a block set, for manipulation or plotting purposes. This is done by selecting one of the list options provided by the Bk-> button in the main pro-STAR window. The available options are as follows: 1. All puts all existing blocks in the current set 2. None clears the current set 3. Invert replaces the current set with one consisting of all currently unselected blocks 4. New replaces the current set with a new set of blocks 5. Add adds new blocks to the current set 6. Unselect removes blocks from the current set 7. Subset selects a smaller group of blocks from those in the current set For the last four options, the required blocks are collected by choosing an item from a secondary drop-down list, as follows: Cursor Select click on the desired blocks with the cursor, complete the selection by clicking the Done button on the plot window. Zone use the cursor to draw a polygon around the desired blocks. Complete the polygon by clicking the last corner with the right mouse button (or click Done outside the display area to let pro-STAR do it for you). Abort the selection by clicking the Abort button. Vertex Set (Any) the selected blocks must have at least one constituent vertex in the current vertex set. Vertex Set (All) all constituent vertices of the selected blocks must be in the current vertex set.

More block set operations are available in the Block List dialog (see Listing and further manipulation on page 3-58) or by typing command BLKSET (see the pro-STAR Commands volume for a description of additional selection options). GUI-driven facilities These are included in the Block Tool, shown below, which is accessed by choosing Tools > Block Tool from the main window menu bar.

Version 3.26

3-57

MESH CREATION Multi-block Approach

Chapter 3

Commands:

BLKDELETE

BLKPLOT

The available functions are: 1. Deletion This is performed by clicking one of the red-coloured buttons on the tool to (a) delete all blocks (Delete All Blocks), or (b) delete only those collected in the current block set (Delete Block Set). Further block deletion options are also available via the Block List dialog box, see Listing and further manipulation below. 2. Plotting This is performed by clicking the Block Plot or Replot button. pro-STAR plots blocks in the current set in accordance with the relevant plotting parameters (see Plot Characteristics on page 5-3). Alternatively, select Plot > Block Plot from the main window menu bar. 3. Listing and further manipulation This is performed by clicking the Block List button to activate the Block List dialog shown below. Alternatively, select Lists > Blocks from the main menu bar. Block denitions in terms of block numbers and constituent vertices are displayed in the scroll list in the upper half of the box. There is also a choice of listing all blocks or just the current set (marked by asterisks in the Set column). The choice is made simply by clicking either the Show All Blocks or the Show Block Set Only option button, respectively. To select blocks from the list: (a) For single items, click the required block on the list. (b) For a group of two or more contiguous items, click the rst block you want to select, press and hold down the Shift key, and then click the last block in the group.

3-58

Version 3.26

Chapter 3

MESH CREATION Multi-block Approach

Commands: BLKLIST

BLKDELETE BLKFACTORS

BLKMODIFY BLKEXECUTE

BLKSET BLKWALL

Once the desired blocks are selected, the following operations are possible: (a) Addition to (or removal from) the current set click the Add to Set/Remove from Set button. (b) Deletion click the Delete Blocks button. (c) Modication of a blocks shape by re-dening its constituent corner vertices type the new vertex number(s) in the appropriate text box underneath the list, then click the Modify Block button. (d) Specication (or re-specication) of a blocks mesh size and distribution. The following parameters can be typed in the appropriate text boxes: i) Cell index to assign to all cells in the block (see Cell Table on page 6-1 for a denition of cell indices). ii) Starting vertex and cell numbers use a non-zero number only to override the system defaults. iii) Number of cells in each coordinate direction. iv) Vertex increments and mesh spacing factors in each coordinate direction. These parameters are translated into block ll factors by clicking the Define Factors button. The actual cells and vertices are generated in a separate operation, by clicking the Create Cells and Vertices button. 4. Projection (mapping) of one or more block faces onto pre-dened shells. The block volume expands or contracts to accommodate the face movement. The shell number corresponding to the face that is to be mapped (in the sequence 1 to 6) should be typed in the appropriate text box at the bottom of the dialog
Version 3.26 3-59

MESH CREATION Multi-block Meshing Using STAR-GUIde Panels

Chapter 3

box. Note that all the above operations have an immediate effect on the block denitions, reected by immediate changes to what is displayed in the list. However, any subsequent block changes made outside this dialog box, e.g. by issuing commands via the pro-STAR I/O window, will not be listed. To display these changes, click on the Update List button at the top of the box. At the interface between two adjacent blocks whose meshes match each other structurally, there will be multiple vertices occupying an identical position in space. To ensure mesh continuity, it is important to merge such vertices with command VMERGE before proceeding further.

Multi-block Meshing Using STAR-GUIde Panels


pro-STAR provides a special panel, called Create Grids with Blocks (Fitted Shapes), for the purpose of mesh generation through the STAR-GUIde system. The philosophy behind this panel is based on multi-block mesh generation and relies on basic descriptions of the target model geometry being available in one form or another. The order in which all panel operations work is as follows: Specify the operation you want to perform Select all items involved in the operation Execute the operation

The minimum geometric information needed is the position of the vertices located on the corners of the target block(s). For complex shapes, detailed surface data in the form of shells and splines would also be provided. The steps involved in creating a multi-block mesh are as follows: Stage 1: Subdivide the model geometry into blocks Step 1 Define the edges of the blocks by fitting appropriate splines. If the block edges are straight lines, the position of corner points should be sufficient. Step 2 Create the blocks by specifying the eight corner points. Make sure that the vertices marking the block corners lie on the splines forming the edges. Step 3 If the block faces are to be mapped onto another surface, select the shells defining these surfaces and associate them with the appropriate block faces. By this stage, all geometric details of the model will have been captured as one or more pro-STAR block definitions. Stage 2: Identify and store all mesh-related parameters for the block Step 1 Specify the number of cells in the local I, J, K directions for each block, remembering that individual blocks can only be meshed in a structured way.

3-60

Version 3.26

Chapter 3

MESH CREATION Multi-block Meshing Using STAR-GUIde Panels

Step 2 Define the mesh distribution for each of the three local block directions. Stage 3: Create the mesh using data specied during Stages 1 and 2 The three stages outlined above and their associated steps are accessible through the Creating Grids with Blocks panel and its three tabs. Before attempting to use the panel, you should make sure that you have at least a set of vertices or surface shells from which the required entities (such as splines and block corner points) can be defined. The set of shells determining the models surface geometry may be either created internally using pro-STAR or imported from external CAD packages using the Import CAD/Surface Information STAR GUIde panel. Using the panel This section gives further details of the steps above in terms of actually using the Creating Grids with Blocks panel. It is assumed that you are familiar with selecting, displaying and manipulating various entities such as vertices, splines, shells, cells, etc. The geometry of the example model given in this section is represented by surface shells (see Figure 3-53). The manner of subdivision of this geometry into blocks is up to you. In this case, it was decided to use three blocks (see Figure 3-54). Stage 1 Step 1 In order to fit splines to the edges of the constituent blocks, you need to select vertices for these splines. The vertex selection is accomplished as follows: Select the Splines tab Choose option Vertex of Cell from the Select Items button group Select the manner of picking items from the graphics window via the Locate Items pop-up menu; in this case the choice can be closest to cursor Click the Create Spline button Move the cursor to the graphics window and mark the appropriate vertices using the left mouse button (see Figure 3-55). A list of these vertices should appear in the Located or Selected Items scroll list. To remove one or more of them from the selection, mark the list item(s) with the cursor and remove it with the Clear List Item button. When satised with the vertex selection, click the Done button to create and display the current spline (see Figure 3-56)

This process is repeated for all splines that will eventually form the block edges. Figure 3-57 shows the 24 splines that will be used to define the blocks which constitute the two arms of the model. Step 2 Display the splines using the spline selection facilities provided in the main pro-STAR window so as to confirm that the correct vertices have been chosen to mark the spline end-points. This is particularly important since these vertices also mark the block corners. To create a block:
Version 3.26 3-61

MESH CREATION Multi-block Meshing Using STAR-GUIde Panels

Chapter 3

Select the Blocks tab Click the Create Block button Choose option Vertex of Spline from the Select Items button group Use the cursor to mark the appropriate vertices at the eight corners of each block (see Figure 3-58). A list of these vertices should appear in the Located or Selected Items scroll list. When satised with the vertex selection, click the Done button to create and display the current block.

This process should be repeated for all blocks in the model. Step 3 To ensure that the block surfaces coincide with the shell surfaces defining the model geometry, it is sometimes necessary to map the block faces onto the shell surfaces. This is particularly important in this example, as the various blocks will be joined together along faces that need to be perfectly coincident (to avoid problems with arbitrary cell matching in the final mesh, see Couple creation on page 4-11). To map a block face to a shell surface: Select the Mesh tab Click the Map Face to Shells button. Note that option Block Face in the Select Items group is automatically selected. Mark the target block face with the cursor. Note that to pick the face furthest away from you, it is necessary to choose option furthest from you in the Locate Items pop-up. Choose option Cell Type ID from the Select Items group Mark the target shell surface with the cursor When satised with your selections, click the Done button to perform the mapping (see Figure 3-59)

This process must be repeated for all block faces that may participate in interfaces with arbitrary connectivity, or for any other block-face surface whose shape is not sufficiently well defined by the block-edge splines alone. By this stage, the full geometry of the model will have been stored in three pro-STAR block definitions. The next stage is to specify the mesh spacing along each individual block edge. Stage 2 Step 1 Select and display one of the blocks on the screen using the block selection facilities provided in the main pro-STAR window. Given the structural nature of the mesh, only three edges need to be marked for each block. Specify the number of cells along each edge as follows:
3-62

In the Mesh tab, click the Number of Cells button Note that option Block Edge in the Select Items group is automatically selected. Mark the edge in question with the cursor. Enter the number of cells along that edge (also called the meshing number) in the Numeric Parameter text box Match the edge with its corresponding meshing number by clicking the Done
Version 3.26

Chapter 3

MESH CREATION Multi-block Meshing Using STAR-GUIde Panels

button. This process needs to be repeated for the remaining blocks. Alternatively, you may first select all edges, irrespective of block, that share the same number of cells in a given direction; they will be displayed in the Located or Selected Items scroll list. Typing the meshing number and clicking Done will then assign that number to all of them (see Figure 3-60). Step 2 If non-uniform mesh spacing is required for any of the blocks: In the Mesh tab, click the Space Factor button Select the appropriate edge as described in Step 1 above Enter the required spacing factor in the Numeric Parameter box Match the edge with the spacing factor by clicking Done

By this stage, all geometry and mesh-related parameters will have been stored (see Figure 3-61). The next and final stage consists of generating the calculation mesh. Stage 3 Step 1 To choose the cell type for the cells to be created: In the Mesh tab, click the Cell ID button. This displays automatically the Cell Table Editor and the currently dened blocks Make your choice of cell type by highlight it in the editors scroll list and clicking Apply Close the Cell Table Editor Note that option Block in the Select Items group is automatically selected and that the cursor is active in the main window Select the block(s) to be meshed using the cursor. The block will be displayed in the Located or Selected Items scroll list Click the Done button to assign the chosen cell type to the selected blocks

This process should be repeated for all blocks. Step 2 To create the mesh: Put all the blocks in a set by choosing Bk > All in the main window Click the Generate Mesh button. This will automatically select the appropriate cell type for each block and will produce a mesh matching the geometric and parametric values specied in Stages 1 and 2. The resulting mesh for all three blocks is shown in Figure 3-62.

Other panel functions Other functions of the Creating Grids with Blocks panel that have not been covered so far are described below. In each case, detailed instructions on how to proceed with each operation are displayed on-line within the STAR GUIde panels.

Version 3.26

3-63

MESH CREATION Multi-block Meshing Using STAR-GUIde Panels

Chapter 3

Splines tab Once created, splines may be modied in a number of ways, including inserting additional vertices in them (Modify Spline), splitting a spline into two (Split Spline), joining two splines together (Join Spline) and nally deleting splines (Delete Spline). Splines can be chased across surfaces or through meshes. These functions require that the current cell set consists of shells. Chase Spline creates a spline with control points on the shell surface whilst Mesh Chase Spline keeps the control points on existing cell vertices. These functions are equivalent to command SPL,CHASE. Move Vertex allows a vertex (the rst in the list) to be moved to a new location or on top of an existing vertex (the second in the list).

Blocks tab When using the Modify Block button, option Block Vertices in the Select Items group is selected automatically. In this way, clicking on a block loads its eight dening vertices into the Located items list. They can then be selected and new vertices substituted in their place to change the block denition. The Block Plot button plots all blocks in the current set Using the Delete Block button automatically selects the Block option in the Select Items group. In this way, the block(s) to be deleted can be picked on the screen with the cursor.

Mesh tab Where blocks share common faces, the block factors from one block can be traced onto adjacent blocks using the Block Trace button. The mesh factors are traced through the current block set. This is equivalent to command BLKTRACE. Generate Factors is a composite operation combining the functionality of the Number of Cells and Block Trace buttons. The meshing number appropriate to the selected edge(s) is calculated by pro-STAR by dividing the edge length by the nominal cell size along that edge, typed in the Numeric Parameter box. All meshing numbers thus calculated are propagated through the current block set. The mesh factors (i.e. number of cells and face mapping) for a block can be set back to the default values with the Reset Factors button All cells in a given block can be deleted using the Delete Block Cells button

3-64

Version 3.26

Chapter 3

MESH CREATION Multi-block Meshing Using STAR-GUIde Panels

Figure 3-53

Surface shells from CAD package

Figure 3-54
Version 3.26

Blocking strategy
3-65

MESH CREATION Multi-block Meshing Using STAR-GUIde Panels

Chapter 3

Figure 3-55

Vertices picked for spline

Figure 3-56
3-66

Spline created
Version 3.26

Chapter 3

MESH CREATION Multi-block Meshing Using STAR-GUIde Panels

Figure 3-57

Splines dening block edges

Figure 3-58
Version 3.26

Selecting corner vertices


3-67

MESH CREATION Multi-block Meshing Using STAR-GUIde Panels

Chapter 3

Figure 3-59

Mapping block faces to shells

Figure 3-60
3-68

Dening block factors


Version 3.26

Chapter 3

MESH CREATION Multi-block Meshing Using STAR-GUIde Panels

Figure 3-61

Block structure

Figure 3-62
Version 3.26

Resultant mesh
3-69

Chapter 4

OTHER MESH OPERATIONS Importing Data from other Systems

Chapter 4

OTHER MESH OPERATIONS


In Chapter 3 the basics of creating a mesh were presented. This chapter rounds off the description of mesh-related operations by introducing some additional pro-STAR functions concerned with mesh and geometry data importing from external CAD/CAE systems connecting together separately-created mesh blocks checking the mesh for ill-shaped or inappropriately dened cells improving the quality of the mesh

The success of any of the above functions can be checked at any stage by appropriate mesh displays, as described in Chapter 5.

Importing Data from other Systems


This feature has been designed as a means of communication with other CAD/CAE packages. Its main functions are: To facilitate the integration of STAR-CD into an existing CAD/CAE environment where other packages are in use. To provide interfaces with widely-used packages. Those presently catered for are: ICEM CFD IDEAS ANSYS PATRAN NASTRAN PLOT3D CGNS To provide the means of importing both geometric and mesh data into pro-STAR. Geometry importing operations are available for the following types of data: IGES VDA STL (stereolithographic) Mesh data are imported using the Import Grids STAR GUIde panel. Surface data are imported using the Import CAD/Surface Information panel. There are also three command-driven utilities for reading mesh and geometry information from the following data visualisation systems: Ensight Gambit TGRID The commands for reading such data are ENSIGHT, GAMBIT and TGRID, respectively, and are described fully in the Commands volume. Where mesh data are involved, the imported entities are vertices (nodes), cells (elements) and, sometimes, boundary definitions. The imported mesh can be used
Version 3.26 4-1

OTHER MESH OPERATIONS Data exporting

Chapter 4

directly for STAR calculations or modified in pro-STAR prior to any calculations.

Data exporting
pro-STAR also provides facilities for exporting data to other CAD/CAE or visualisation systems. Those presently catered for are: ANSYS PATRAN NASTRAN IDEAS Ensight Fieldview CGNS Tecplot ICEM CFD Mesh data are exported using the Export Grids STAR GUIde panel. Post-processing data from a STAR analysis are exported using the Export Resultspanel. Command VRML is also available for writing a virtual reality (.vrml) le containing a specied range of shells already dened in your model. If vertex post-processing data exist in post register 4, they are written out for use in contouring; otherwise, only geometry data are written. For systems where no specific pro-STAR link is provided, it is still possible to export data, by selecting either option Generic in the Export Resultspanel or Tools > Convert > Generic from the main menu. This displays the Generic dialog shown below:

Command:

GENERIC

This operation is essentially a free-format output utility designed to produce data records in any suitable form on file case.gen. Obviously, the user needs to be familiar with the data format expected by the external software before attempting to use this function. The type of data to be exported, i.e. cell, vertex, or boundary, is defined as part of the output command format (see the description of command GENERIC in the pro-STAR Commands volume).

Mesh Structure
The STAR-CD code places very little restriction on the structure of meshes that are suitable for thermofluid simulations. This flexibility is achieved through:
4-2

the use of mixed cell shapes (i.e. hexahedra, tetrahedra, pyramids and prisms);
Version 3.26

Chapter 4

OTHER MESH OPERATIONS Mesh Structure

the unstructured character of the mesh; the ability to cope with mesh discontinuities across common interfaces (i.e. arbitrary interfaces and embedded mesh interfaces, discussed in this section).

A combination of the above features allows the most appropriate mesh structure, cell distribution and cell type to be used in a particular problem, to suit both flow conditions and the solution domain geometry. For arbitrary interfaces, the time and effort needed to mesh complex geometries is greatly reduced, thanks to the lack of restriction on mesh structure and connectivity on common faces of adjacent mesh blocks. This is illustrated in Figure 4-1, showing several mesh blocks of dissimilar and non-conformant mesh structure being joined together via arbitrary interfaces.

Figure 4-1

Mesh blocks joined by arbitrary interfaces

Furthermore, embedded meshing allows selective local refinement of the mesh in areas judged by the user to require higher computational resolution, due to the nature of the flow. The mesh connectivities allowed in STAR-CD can be classified under three headings: 1. Regular connectivity arises from a one-to-one correspondence between adjacent faces of neighbouring cells (see Figure 4-2(a)). 2. Integral connectivity arises at the interface between a nely-spaced mesh and a coarser mesh, often as a result of embedded mesh renement. The interface is dened in such a way that an integral number of small cell faces connect to one large face (see Figure 4-2(b)).
Version 3.26 4-3

OTHER MESH OPERATIONS Mesh Structure

Chapter 4

3. Arbitrary connectivity arises at the interface between two mesh regions that possess non-matching cell spacing and cell face shape (see Figure 4-2(c)). Each of the above cases is described below.

(a) Regular

(b) Integral

(c) Arbitrary

Figure 4-2

Two-dimensional examples of mesh connectivities

Regular connectivity This is the most common connectivity and arises naturally as a result of the mesh building operations described in Chapter 3. If the mesh is generated using extrusion or cell-layer methods (see Meshing techniques on page 3-3), no special action is required to establish the connectivity between adjacent cells. If the mesh is generated using a multi-block method, blocks are not automatically connected to each other. An example of such a case is shown in Figure 4-3(a) where the mesh was generated as three separate blocks, resulting in the discontinuities indicated in Figure 4-3(b). Such discontinuities need to be removed by merging coincident vertices at the interfaces between adjacent blocks (see Merging on page 3-25). Note that the above considerations also apply if a mesh is imported from an external system and then joined on to an internally-generated mesh, assuming of course that there is a one-to-one correspondence between cell faces in the adjacent cell blocks.

4-4

Version 3.26

Chapter 4

OTHER MESH OPERATIONS Mesh Structure

(a) Overall mesh

(b) Inter-block discontinuities

Figure 4-3

Three-block mesh and inter-block discontinuities

Integral and arbitrary connectivity This is typically encountered at the interface between blocks of differing mesh density, as shown in the examples of Figure 4-4 (for integral connectivity) and Figure 4-5 (for arbitrary connectivity). Models with this kind of connectivity exhibit the following characteristics: The meshes on either side of the interface are created independently and then explicitly joined together in a separate matching operation. Cell faces on one side of the interface are distinguished from those on the other by designating the former as master and the latter as slave faces. For maximum computational efciency, the side with the larger faces (and hence coarser grid spacing) should be designated as the master side. The placement of the blocks may be such that each master cell face is connected to a number of complete slave faces, as in Figure 4-4, or to parts of several slave faces, as in Figure 4-5. The number of such faces to which a single master face can be connected is arbitrary, but user-controlled. The matching (or joining) operation mentioned above creates special groupings of cells, called couples. Each couple consists of a master cell on one side of the interface plus its associated slave cells on the other side.

Version 3.26

4-5

OTHER MESH OPERATIONS Mesh Structure

Chapter 4

Figure 4-4

Illustration of integral mesh connectivity

Partial boundary

Figure 4-5

Illustration of arbitrary mesh connectivity

Given that the participating mesh blocks are created separately, the user needs to ensure that, when the coupling operation takes place, the surface defined by a couples slave faces matches that defined by the master face. Thus, the configuration shown in Figure 4-6 is illegal as it implies the existence of a gap (void) between the two sides of the couple interface.
4-6 Version 3.26

Chapter 4

OTHER MESH OPERATIONS Mesh Structure

Figure 4-6

Non-conformant master and slave faces

Note that in adjoining-block cases, the mesh connectivity is established solely by the matching operation. Merging of vertices should therefore not be attempted, even if some vertices in one block coincide with others in the neighbouring block. The mesh connectivity is established solely by the matching operation mentioned above (see also Couple creation on page 4-11). Embedded mesh renement As discussed in Mesh distribution and density on page 1-7, there is often a requirement for improved numerical accuracy over a given region of the solution domain. This requirement can be met by creating a finely-spaced mesh within or adjoining a coarser outer mesh and directly connected to it. Creating a fine mesh by internal subdivision of a coarser mesh is called embedded mesh refinement, an example of which is shown in Figure 4-7. The figure also illustrates the fact that multiple levels of refinement are possible (see Other couple functions on page 4-22). Because of the way they are created, embedded meshes fall naturally within the integral connectivity category. Therefore, an explicit coupling operation is needed to connect the refined portion to the rest of the mesh. However, there is now no need to define master and slave faces and the coupling can be done automatically, as described on page 4-24. Note that merging of coincident vertices at the coarse/fine mesh interface is optional; the code does not rely on vertex merging to establish mesh connectivity.

Version 3.26

4-7

OTHER MESH OPERATIONS Cell Couples

Chapter 4

Figure 4-7

Illustration of embedded meshing

Cell Couples
The Couple Tool Most GUI facilities relating to couples are performed using pro-STARs Couple Tool. This is accessed by selecting Tools > Couple Tool from the main window menu and displaying the dialog shown below. The tool then acts as the starting point for subsequent operations.

4-8

Version 3.26

Chapter 4

OTHER MESH OPERATIONS Cell Couples

Commands:

CPTYPE CPMODIFY

CPDISPLAY CPMERGE

CPDELETE CPCOMPRESS

Couple properties Couples may be grouped together on the basis of common properties. The latter are specified in terms of couple identity parameters, a concept entirely analogous to that for cells (see Cell properties on page 3-38). The couple table As with cells, the couple identity parameters need to be tabulated into couple tables. A couple table can be defined using pro-STARs Couple Table Editor, shown below and accessed from the Couple Tool by clicking Edit Types.

Version 3.26

4-9

OTHER MESH OPERATIONS Cell Couples

Chapter 4

Commands: CPTABLE CPTMODIFY CPTLIST

CPTNAME CPTDELETE

A selected set of couples can be indexed and differentiated in various ways with the aid of an entry in the couple table. The latter enables the user to specify the following parameters: Couple Index Group Number identies an object (shell surface, cell range, etc.) within the mesh that is associated with this kind of couple in some way Master Color determines the display colour of master cell faces Slave Color determines the display colour of slave cell faces Overlap Color determines the display colour of areas where master and slave faces overlap Partial Boundaries switch determining whether partial boundaries are allowed for the current couple type Tolerance partial boundary tolerance value (see below) Name an identifying name for the current couple type

The rules governing the use of the couple table are as follows: 1. All entries in the table are identied by an index, displayed under the Table # heading in the editors scroll list. A new entry is set up by selecting the next available number in the list and then specifying the couple properties. 2. Every couple in the model is associated with a couple table index. 3. One may use multiple couple types to differentiate between couples created in different parts of the mesh or that have different properties. A key property relates to Partial Boundaries and is selected by the editors Off / On buttons. These control the calculation and display of the exposed portions of partial boundaries, i.e. cell faces that are partly within the solution domain and partly exposed to the outside world (see the example of Figure 4-5 on page 4-6). If option Off is selected, partial boundaries are treated as ordinary boundaries, i.e. the exposed areas are not displayed, calculated or stored and the entire cell face area is considered to be a boundary. If option On is selected:
4-10 Version 3.26

Chapter 4

OTHER MESH OPERATIONS Cell Couples

(a) Exposed areas are calculated and stored in the problem geometry (.geom) le (b) Boundary displays show partial boundaries correctly (see the discussion on couple displays on page 4-20) (c) pro-STAR uses a user-specied fractional tolerance (typed in the Tolerance box) to determine whether differences in face area between arbitrarily-matched couples should give rise to partial boundary creation at the appropriate locations. Fractional differences less that the given tolerance are ignored and the relevant boundaries are treated as ordinary boundaries. Note that setting the tolerance to 1.0 is equivalent to disabling the partial boundary capability for that type of couple. 4. Another possibility for classifying couples is to index them on the basis of a common group number, typed in the Group Number text box. This groups together all couples belonging to a particular object, e.g. a distinct portion of the mesh. 5. The various kinds of couple created may be distinguished visually from each other by the colour index specied for master faces (Master Color), slave faces (Slave Color) and areas of overlap between master and slave faces (Overlap Color); see also the couple display options discussion on page 4-20. 6. Colour selection is facilitated by clicking the multi-coloured buttons next to the Master, Slave and Overlap Color boxes. These open a Color Palette panel where the desired colour is selected by simply clicking the appropriate square. The corresponding colour number is then automatically entered into the box. A couple table definition is confirmed by clicking the Apply button. Couple table entries may be displayed at any stage of the pro-STAR session, by opening the Couple Tool and inspecting the contents of the Couple Table scroll list. Any couple table setting may be changed to a different value simply by clicking Edit Types and then making the required changes within the Couple Table Editor. Couple table entries may also be deleted by clicking the Delete button. Note that all couples indexed to this entry must be deleted or changed to a different index before the table entry itself can be deleted. Couple indexing Couples are assigned an identity (couple table index) in one of the following ways: 1. Implicitly, by taking on the index that is active at the moment of their creation. The active couple type can be changed at any time, by selecting the type required in the Couple Tools scroll list and then clicking Set Active Type. The selection is conrmed on the list by a letter A against the active type. 2. Specifying an identity explicitly (see Couple creation below) 3. Collecting a set of couples (as described under Couple set selection facilities) and then changing their identity to the currently-active type. This is done by selecting Modify Type > Cpset in the Couple Tool Couple creation The coupling operation needed to join cell faces on each side of an interface between cell blocks is initiated by clicking Create Couples on the Couple Tool.
Version 3.26 4-11

OTHER MESH OPERATIONS Cell Couples

Chapter 4

This opens the Create Couples dialog shown below:

Commands:

CPCREATE

CP

CPTYPE

The panels operation depends on the method of selecting the cells that should be coupled together. The choice is made through one of the options in the Choose Cells menu, as follows: 1. Cursor Select dene a single couple, in terms of the master cell and its corresponding slave cells: (a) Specify the type of couple to be created by entering a couple table index in the box provided (see Couple indexing above). The currently active couple type is used as default. Alternatively, click Edit Types to enter the Couple Table Editor and then define and use a couple of the desired type. (b) Click Apply (c) Use the cursor to pick a master cell from the mesh displayed on the main pro-STAR window, followed by up to 17 slave cells. Note that using the command form of this operation (CP) allows the addition of slave cells to an existing couple denition, as well as enabling you to create a new couple. 2. Cell Range create multiple couples over a specied cell range. The required input is: (a) The type of couples to be created, as indicated in the Couple Type box (see Couple indexing above). The currently active couple type is used as default. Alternatively, click Edit Types to enter the Couple Table Editor and then define and use a couple of the desired type. (b) The range of cells that are candidates for coupling, in terms of the starting and nishing cell numbers and a cell number increment between the end points of the range. Click Apply to conrm your settings and start off the coupling process.
4-12 Version 3.26

Chapter 4

OTHER MESH OPERATIONS Cell Couples

3. Cell Set create multiple couples over a part of the mesh occupied by a specied cell set or subset. The required input is as follows: (a) Choose an option from the Master/Slave menu to indicate how the master and slave cells are to be selected: i) Search Entire Cell Set this is equivalent to the Cell Range option described above, except that the entire cell set is considered ii) Choose Cell Types assumes that all master cells are of a common type and all slave cells of a common (but different) type. The type corresponding to each category is indicated by using the screen cursor to select a representative member on the mesh plot (Cursor Select) entering the appropriate cell table index in the box provided (Specify). Note that all indices must refer to either uid or solid cells. iii) Choose Cell Groups similar to the previous option, only this time the distinguishing feature is the group number (see page 6-2) iv) Choose Attached Shell Types this assumes that separatelyindexed shells covering the slave and master faces have already been created using one of the shell addition options described on page 3-48. If the shells in question have not been created in pro-STAR but have been imported from external sources, it is important to associate them rst with their adjacent uid cells. The association operation may be performed using command CSHELL. (b) Specify the type of couples to be created in the Couple Type box (see Couple indexing above). The currently active couple type is used as default. Alternatively, click Edit Types to enter the Couple Table Editor and then define and use a couple of the desired type. Couple tolerances For all operations described above, pro-STAR determines the validity of potential couples using three user-definable tolerance values. These may be specified in advance via the Global Couple Tolerance dialog shown below. The dialog is accessed from the Couple Tool by clicking Couple Tolerance.

Command:

CPTOLERANCE

The tolerance values appearing in the dialog are used by the code when checking
Version 3.26 4-13

OTHER MESH OPERATIONS Cell Couples

Chapter 4

whether: Slave face vertices fall within the bounds of the master face (Vertex Face Tolerance box), as shown in Figure 4-8.
Cells 1 and 2 (slaves) Cell 3 (master) 1 2

Figure 4-8

Illustration of vertex tolerance checking

The planes of the master and slave faces match (Centroid Plane Tolerance, Normal Angle Tolerance boxes see Figure 4-6 on page 4-7).

The user may type alternative values for any of the tolerances or restore a previously altered value by clicking its Default button. The current choice is confirmed by clicking Apply. Couple set selection facilities Once the desired couples have been created, they may need to be grouped together for the purposes of mass manipulation or plotting. This is done by selecting one of the list options under the Cp-> button in the main pro-STAR window, thus defining a couple set. The available options are: 1. All puts all existing couples in the current set 2. None clears the current set 3. Invert replaces the current set with one consisting of all currently unselected couples 4. New replaces the current set with a new set of couples 5. Add adds new couples to the current set 6. Unselect removes couples from the current set 7. Subset selects a smaller group of couples from those in the current set For the last four options, the required couples are collected by choosing an item from a secondary drop-down list, as follows: 1. Partial Boundaries On select all couples whose partial boundary switch has been turned on 2. Partial Boundaries Off select all couples whose partial boundary switch has been turned off 3. Cell Set select couples based on the current cell set. If this option is chosen, the target couples are assembled by choosing a condition from a tertiary drop-down list as follows: (a) Any at least one couple member (master or slave cell) included in the current cell set
4-14 Version 3.26

Chapter 4

OTHER MESH OPERATIONS Cell Couples

(b) (c) (d) (e) (f) (g) (h)

All all members are in the current cell set None no members are in the current cell set Master the master cell is in the current cell set No Master the master cell is not in the current cell set Any Slave at least one slave cell is in the current cell set All Slaves all slave cells are in the current cell set No Slaves no slave cells are in the current cell set

More couple set operations are available in the Couple List dialog box (see Listing on page 4-17) or by typing command CPSET (see the pro-STAR Commands volume for a description of additional selection options). Couple manipulation In addition to the functions described under Couple creation, the following additional couple operations are available in the Couple Tool: 1. Deletion Select Delete Couples > Cpset to delete all couples in the current set. This operation may be reversed using command RECOVER. 2. Importing Couple denitions may be imported into pro-STAR by reading them from a .cpl le click Couple Read to display the dialog shown below:

Command:

CPREAD

The information required is: (a) File Name enter the input couple le name in the box provided or use pro-STARs built-in browser to locate an existing le
Version 3.26 4-15

OTHER MESH OPERATIONS Cell Couples

Chapter 4

(b) Couples To Read select one of i) All all stored couples ii) Range enter the desired couple range, in terms of the rst and last couple number to read (c) Cell Number Offset an offset to be added to cell numbers upon input (d) Couple Option select one of i) Add add the input couples to the end of the current list, disregarding couple numbers read from the le ii) Modify use the stored numbers to overwrite current couple numbers and add an optional Couple Number Offset to them (e) File Format the input le format, either Coded or Binary (f) Read Couple Type whether to read the couple type number from the le, either No or Yes. In the latter case, you may also add an optional Couple Type Number Offset to these numbers upon input. Note that there is no automatic check that the cells of a couple overlap or that the couples read in are unique. It is therefore important to use the merging and validation operations described further down in this section to check that the imported couples are correct. 3. Exporting Couple denitions may be exported by writing them to a .cpl le click Couple Write to display the dialog shown below:

Command:

CPWRITE

The information required is: (a) File Name enter the output couple le name in the box provided or use pro-STARs built-in browser to locate an existing le (b) Minimum/Maximum Couple Number enter the couple range concerned, in terms of the rst and last couple number to write. Keyword all will write all currently dened couples (c) Couple Number Offset an offset to be added to couple numbers upon
4-16 Version 3.26

Chapter 4

OTHER MESH OPERATIONS Cell Couples

output (d) Cell Number Offset an offset to be added to cell numbers upon output (e) File Format the output le format, either Coded or Binary 4. Listing Couple information is displayed by clicking Couple List which activates the Couple List dialog shown below. Alternatively, select Lists > Couples from the main window menu bar.

Command:

CPLIST

CPSET

CSET

CPDELETE

CPMODIFY

Couple denitions are shown as two separate scroll lists, one for the master and one for the slave cells. The MASTER list contains: (a) The couple number, in numerically ascending order. There is a choice of showing: i) Couples in the current couple set click Show Cpset Only. Items in this category are marked by asterisks in the Cpset column. ii) Couples with at least one member (master or slave cell) included in the current cell set click Show Couples with Cells in Cset Only iii) All couples click Show All Couples (b) The couple type index (c) The number of slave cells in the couple (d) The master cell number. Any master cells included in the current cell set
Version 3.26 4-17

OTHER MESH OPERATIONS Cell Couples

Chapter 4

are marked by asterisks in the Cset column (e) The master cell face number participating in the couple The SLAVE list contains: (a) The slave number, in numerically ascending order. Any slave cells included in the current cell set are marked by asterisks in the Cset column. (b) The slave cell number (c) The slave cell face number participating in the couple To select couples from the list: (a) For single items, click the required couple number. (b) For two or more items in sequence, click the rst couple you want to select, press and hold down the Shift key and then click the last couple in the group Once the desired couple(s) is selected, the following additional operations are possible: (a) Addition to (or removal from) the current couple set click Add to Cpset/Remove from Cpset (b) Deletion click Delete Couple (c) Addition of a slave cell to an existing (selected) couple click Add Slave to Couple. The user has a choice of picking the slave on the screen with the cursor (Cursor Select) or typing its cell number in the text box provided (Text Input) (d) Removal of a slave cell from an existing (selected) couple click Remove Slave from Couple. The slave cell to be removed must be selected rst in the SLAVE list. (e) Addition of a slave cell to (or removal from) the current cell set click Add Slave to Cset/Remove Slave from Cset. The slave cell to be added or removed must be selected rst in the SLAVE list. (f) Addition of a master cell to (or removal from) the current cell set click Add Master to Cset/Remove Master from Cset. The master cell to be added or removed must be selected rst in the MASTER list. In all couple modication operations above, the validity of the new couple is determined using the tolerances specied in the Global Couple Tolerance dialog (see Couple tolerances on page 4-13). 5. Validation click Couple Check to display the Couple Check dialog shown below. This checks that: (a) All cells in a given couple range exist and are either uid or solid. Depending on the option chosen in the Couples to Check pop-up menu, the couples examined may be: i) All all couples ii) CPset the currently dened couple set iii) Range an explicitly specied range of couples. If this option is
4-18 Version 3.26

Chapter 4

OTHER MESH OPERATIONS Cell Couples

chosen, the rst and last couple number plus an increment must be typed in the text boxes provided (b) (c) (d) (e) All uid cells in a couple have the same porosity and spin index A master face of a couple is not also a slave face in another couple A master cell of a couple is not also a slave cell in the same couple All slave faces in a couple overlap the master face to some extent. pro-STAR will calculate and display (in the I/O window) the total master, slave and overlap areas for all correctly matched couples in the range.

Command:

CPCHECK

In performing the above, pro-STAR checks whether slave face vertices fall within the bounds of their master face, to a tolerance supplied in the Vertex Tolerance box. The default value for this quantity is set in the Global Couple Tolerance dialog (see Couple tolerances on page 4-13). pro-STAR can also perform the following tasks: (a) Build (for further examination) a separate set containing all couples that failed any of the above criteria choose option Yes from the pop-up menu supplied for this purpose. (b) Look for invalid partial boundaries (see Figure 4-9), by checking the ratio of uncovered area to total area in couples that do not allow such boundaries choose On from the Partial Boundary Check menu. A warning is issued if this ratio exceeds the value specied in the Partial Boundary Area Tolerance box. (c) Remove from the couple denition any slave cells whose faces do not overlap at all with their master cell faces choose Yes from the Remove Non-Overlapping Slaves menu. If this option is not used, the slave cells in question are agged as errors.
Version 3.26 4-19

OTHER MESH OPERATIONS Cell Couples

Chapter 4

Note that: (a) Selecting Utility > Couples on Cell from the main menu bar produces a list of couples associated with each cell in a given cell range (command alternative CPCELL). This may be useful for validation exercises. (b) It is best to perform the merging operation (see item no. 6 below) before the check operation, as this will identify and x some couple problems (such as duplicate couple and slave cell denitions) 6. Merging, i.e. elimination of redundant couples click the Couple Merge button. This eliminates couples with identical master cell faces and removes duplicate couples. It also removes duplicate slave faces within a couple and faces that are dened as both slave and master within the same couple. 7. Compression click the Couple Compress button. This involves the elimination of all deleted couples and renumbering of the remaining ones. 8. Display choosing an item from the Couple Display drop-down list offers an alternative, purely visual means of checking whether the couples have been generated correctly. The command adds a representation of couples to cell faces on top of the current mesh plot. The best Cell Plot Type option to use for this purpose is Wire (Surface) or Hidden Line. The plot may be produced in a number of different ways, depending on the option chosen from the secondary drop-down list: (a) Off turn the couple display off (b) Masters Last plot slave faces followed by master faces and then colour the overlap areas in the overlap colour (c) Masters Only plot master faces only (d) Slaves Last plot master faces followed by slave faces and then colour the overlap areas in the overlap colour (e) Slaves Only plot slave faces only Note that the above options are also available from the main window menu by choosing Plot > Couple Display and then selecting one of the ve options (Slave, Master / Master / Master, Slave / Slave / None) in the drop-down menu. Furthermore, options a, b and d above are also available from the main window menu by choosing Plot > Cell Display > Couple Masters or Couple Slaves. The master, slave and overlap colours used for plotting are as dened in the The couple table on page 4-9. Note that only couples included in the current couple set and having faces in the current cell set will be displayed. When couples are created, some of the participating cell faces may be partly within the solution domain interior and partly exposed to the outside world, where they essentially constitute boundary surfaces. An example of this situation is shown in Figure 4-5. Such surfaces are called partial boundaries. The calculation and display of the exposed portions of such faces is controlled by a choice made in the Couple Table Editor dialog, as discussed on page 4-10. The editor is activated either from the Couple Tool, or by choosing Plot > Partial Boundaries from the main menu bar. If option Off is selected in this dialog, faces containing partial boundaries
4-20 Version 3.26

Chapter 4

OTHER MESH OPERATIONS Cell Couples

are not plotted, resulting in the jagged edge effect shown in Figure 4-9(a). If option On is selected, mesh displays show partial boundaries correctly, as in Figure 4-9(b). Note that because of the computational effort involved in identifying partial boundaries, the Off button should be selected if such boundaries are known to be absent. A convenient way of checking whether partial boundaries have been generated correctly is to use command LIVE,PARTIAL. This creates surface shells on the exposed parts of partial boundary faces that can be plotted on the screen for visual inspection. Partial boundary

(a) Partial boundaries off


Figure 4-9 Partial boundary illustration

(b) Partial boundaries on

9. Fixing the relative positions of master- and slave-face vertices click button Couple Freeze to display the Couple Freeze dialog shown below:

Command:

CPFREEZE

This dialog must be used as part of the following three-stage process: (a) Calculate and store the location of each slave-face vertex relative to the appropriate master-face vertices select Save from the Option menu, specify the name of the storage (.cpfz) le and click Apply.
Version 3.26 4-21

OTHER MESH OPERATIONS Cell Couples

Chapter 4

(b) Relocate the master-face vertices to new positions, using any of the available vertex manipulation functions. (c) Move the slave-face vertices so that they lie in the same positions, relative to the master-face vertices, that they occupied originally select option Map from the pop-up menu and click Apply. Vertices that are very close to an edge or corner will be moved so that they lie exactly on that edge or corner, depending on the value entered in the Tolerance box. Other couple functions A number of additional capabilities exist in connection with couple generation and manipulation, as follows: Generation a single couple, in terms of the master cell and its corresponding slave cells, while also specifying the face numbers of the cells to be coupled command CPFACE. This is useful in situations where the normal cell coupling algorithm does not work correctly, e.g. for highly irregular meshes involving abrupt changes in cell size and/or very warped cell faces. Multiple generation of additional couples, starting from a pre-dened range and offsetting the cell numbers in the starting range command CPGENERATE. Modication of a couple denition via changes to the master and/or slave cell numbers participating in the couple command CPMODIFY. The command may also be used to modify the particular cell faces that are to be coupled, or to swap the master and slave cell designations. Collecting together a given range of couples using the CPRANGE option of command CSET. Counting the currently dened couples command COUNT. Alternatively, this operation can be executed by choosing Utility > Count > Couples from the main menu bar.

Useful Points Points to note about coupling operations are: 1. Command CPFACE does not check the geometrical constraints discussed in Integral and arbitrary connectivity on page 4-5. The user is therefore free in principle to connect non-adjoining cell faces. Also, there is no check that a couple is unique, so it is important to use the merging and validation operations described under Couple manipulation to check that the couple in question is correct. 2. Any mesh smoothing operations (e.g. by command MORTHO) performed after a coupling operation can in principle invalidate the geometrical criteria on which the original coupling was based. The user is therefore advised to complete all smoothing and orthogonalisation operations before doing the cell coupling. 3. Vertices belonging to master and slave cells remain distinct from each other, even when they occupy the same physical position. Unlike regular meshes, only the cell connectivity is established by the Couple creation operations described earlier. 4. Coupled cell interfaces can normally coincide with uid/solid interfaces.
4-22 Version 3.26

Chapter 4

OTHER MESH OPERATIONS Mesh Renement

However: (a) It is possible to prevent the creation of couples across such interfaces using command CPFLAG. This may be useful if, for example, conjugate heat transfer is not going to be switched on during the analysis. (b) Conjugate heat transfer is not available at coupled cell interfaces for which the partial boundary option (see page 4-20) has been enabled. 5. Coupled cell interfaces must not coincide with (a) cyclic boundaries (see Cyclic Boundaries on page 7-27); (b) bafes (see Bafe Boundaries on page 7-23); (c) porous/non-porous material interfaces (see Chapter 10).

Mesh Renement
pro-STAR offers numerous facilities in the area of embedded mesh refinement, mostly in the form of commands. These may be put into three categories: 1. Subdivision into an arbitrary number of cells commands CREFINE (for hexahedral meshes) and TETREFINE (for tetrahedral meshes). Of these: (a) Command CREFINE performs the sort of cell subdivision illustrated in Figure 4-10. Pyramidal, tetrahedral and trimmed (polyhedral) cells cannot be subdivided with this command. Any such cells found in the range to be rened will simply be ignored. Renement for prismatic cells is possible but only for a uniform, even-numbered renement factor. If an odd-numbered factor is specied and a prismatic cell is encountered within the renement range, the nearest even-numbered factor is chosen instead and then applied uniformly in all local directions of that cell.
Commands: CREF , 3 ,,, 2 , 3 , 1 , MERGE CREF , 3 , 3 , 4 , 6 , 7 , 1 , MERGE

10

11

12

Figure 4-10
Version 3.26

Local mesh renement using the CREFINE operation


4-23

OTHER MESH OPERATIONS Mesh Renement

Chapter 4

Note that: i) It is possible to join up selected cells in order to coarsen a (structured) mesh along a given direction using CJOIN. This command performs the opposite function to that of CREFINE and is only valid for hexahedral cells. A similar command, CRSE, performs a mesh coarsening operation on the current cell set by grouping hexahedral cells into larger ones wherever possible. It also works for both structured and unstructured meshes. ii) The CREFINE function works best if the cells to be rened are oriented the same way (see Figure 3-48 on page 3-45 for an illustration of cell orientation). If this condition does not apply, it is advisable to use command CDIVIDE instead. CDIVIDE only requires that the (hexahedral) cells in question are part of a structured mesh and that they are already placed in a cell set by the user. The renement algorithm works in terms of local mesh directions I, J and K dened via command CDIRECTION. Connection of the newly created cells to the adjoining/surrounding mesh can be performed automatically by using option COUPLE. iii) CREFINE is also available as a GUI function, accessible from the Cell Tool by clicking button Cell Refine. This displays the dialog shown below:

Command:

CREFINE

The information required in the above dialog is: i) The number of cell subdivisions in each local mesh direction I, J, K ii) Cells to Rene choose the current cell set (Cset), all available cells (All) or cells selected with the cursor (Ccross) iii) Vertex Merge Option select Merge to merge coincident vertices within the coarse and rened meshes or None to suppress this operation iv) Couple Option selecting None prevents the formation of cell couples at the interface
4-24 Version 3.26

Chapter 4

OTHER MESH OPERATIONS Mesh Renement

between coarse and rened meshes, so the two remain unconnected. If the renement includes either the master or all slave cells in any existing couples, these couples will be deleted. Couple automatically creates couples at the coarse / rened interface. If the renement includes cells participating in any existing couples, these couples will rst be deleted and then recreated. All newly-created couples will be of the type shown in the Couple Type Number box (the currently active type by default). The desired mesh renement is effected by clicking the Apply button. (b) Command TETREFINE performs subdivision of tetrahedral cells in order to create embedded renement for tetrahedral meshes, as shown in Figure 4-11. Given the shape of the cells concerned, the only practical subdivision factor along each edge of the tetrahedra is 2 and this (xed) factor is in fact employed here. Note that the command still provides the normal option of merging coincident vertices to create mesh continuity. The creation of couples between the embedded mesh and its surroundings must be done separately by the user.

Figure 4-11

Local renement for tetrahedral meshes using TETREFINE

2. Mid-point subdivision of arbitrary meshes commands CMREFINE (for cell division) and SHREFINE (for shell division). Of these: (a) Command CMREFINE can perform only mid-point (2 2 2) subdivision but is very exible in most other ways. Thus, it will i) rene cells of any type ii) perform the renement in one, two or three directions, depending
Version 3.26 4-25

OTHER MESH OPERATIONS Mesh and Geometry Checking

Chapter 4

on the option chosen by the user in command CMROPTION iii) automatically create new couples and boundaries as necessary iv) write a new restart le in preparation for resuming the CFD analysis with the rened mesh that has just been created (see also Chapter 8, Solution Control with Mesh Changes) v) check whether the additional cells and vertices to be created can still be accommodated within pro-STARs current memory limits Note that the result of this operation is reversible, by using command CMUNREFINE, provided the cell, vertex and boundary numbers have not been compressed or otherwise renumbered. Also note that CMREFINE and CMROPTION are central to the operation of STAR GUIdes adaptive renement facilities (panel Rene, see also Chapter 8, Solution-Adapted Mesh Changes) (b) Command SHREFINE performs a 2 2 mid-point subdivision on surfaces composed of shells. The renement algorithm ensures that the new shell set gives a smoother representation of the underlying continuous surface. This command is therefore useful for creating a suitable shell density for the surface being modelled before extruding it into a 3-D mesh (see Extrusion on page 3-5).

Mesh and Geometry Checking


The calculation mesh needs to be checked in order to ascertain whether cells are smoothly distributed; cells are of acceptable shape; cells follow the STAR requirements, especially the right-hand rule; the overall problem geometry is well represented by the mesh; the overall mesh dimensions and volume are correct.

Thus checking is performed at two different levels: At the macroscopic level, covering the overall geometry and dimensions. At the microscopic level, covering individual cell deformity and non-compliance with STARs requirements.

Macroscopic checking At the macroscopic level, pro-STARs checking facilities can be accessed from the Utility menu in the main window. The following quantities can be checked: 1. The area of a surface select Utility > Calculate Area and then one of the following items to identify the surface in question (command alternatives ACROSS, AZONE, AREA): (a) Cell Faces select cell faces individually with the cursor on the current model geometry plot. The action is terminated by clicking on the Done button that is also displayed on the plot. (b) Cell Faces in Zone the cell faces making up the surface are those
4-26 Version 3.26

Chapter 4

OTHER MESH OPERATIONS Mesh and Geometry Checking

included within a user-specied polygon, drawn on the screen with the cursor. The action is terminated by clicking on i) the last point with the right mouse button to complete the polygon; ii) the Done button to let pro-STAR complete the polygon; iii) the Abort button to abort the selection operation. (c) Vertices the surface is that of polygon dened by a number of vertices (minimum 3). These are selected with the cursor in order around the polygon and may be located anywhere in the mesh (but should all lie in the same plane). The selection is terminated by clicking Done. (d) Boundaries select boundaries individually with the cursor on the current model geometry plot. The selection is terminated by clicking Done. (e) Boundary Set use the current boundary set (f) Boundary Region pick the required region with the cursor (g) Boundary Patch pick the required patch with the cursor Note that a running total of area is kept. This can be reset by selecting Calculate Area > Clear. 2. The volume of part of the mesh select Utility > Calculate Volume and then one of the following items to identify the volume in question (command alternative VOLUME): (a) Cell select cells individually with the cursor on the current geometry plot (b) Cell Set use the current cell set (c) All Cells use all currently dened cells As with area calculations, a running total of volume is kept. This can be reset by selecting Calculate Volume > Clear. 3. The distance between two vertices option Vertex Distance. The required vertices must be selected with the cursor from the current plot. pro-STAR also calculates the components of the distance vector in the local and global coordinate systems (command alternative VDISTANCE). 4. The geometric range covered by a given set of cells (options Cell Set, All Cells), vertices (Vertex Set, All Vertices), boundaries (Boundary Set, All Boundaries) or splines (Spline Set, All Splines). The displayed information consists of the minimum and maximum coordinate in each direction and the identifying numbers of the cells, vertices, etc. located at the end points (command alternative RANGE). For proper operation of the above functions, some form of surface plot (see Plot Characteristics on page 5-3) must be currently on display in pro-STARs main window. The numerical values of the desired quantities (area, volume, distance, etc.) are displayed in the Output window. Microscopic checking At the microscopic level, things to check for are:
Version 3.26 4-27

OTHER MESH OPERATIONS Mesh and Geometry Checking

Chapter 4

1. Correct mesh connectivity select Utility > Cells on Vertex. This nds all cells attached to a specic vertex, chosen with the cursor, and is thus useful in verifying that, say, two mesh blocks have been properly joined together (command alternative CVERTEX). 2. The extent of cell deformity and non-compliance with STAR requirements select Tools > Check Tool to display the Check Tool dialog shown below.

Commands:

CHECK

SORT

CFLIP

The CHECK function examines a number of cell properties, chosen from the Check Option pop-up menu at the top of the dialog box. The same checks may also be performed from within the STAR GUIde environment (Check Grid panel) and are described fully in the on-line Help system. The range of cells to be checked is selected from the adjacent pop-up menu (either All cells or only those in the current Cset). The CHECK function also allows all cells that do not pass any of the above tests to be automatically collected in a cell set, using the New Set option from the Set Option menu. The locations of such cells are also placed automatically in the post-processing registers (see Data Manipulation on page 9-21 for a description of registers) so they are available for plotting. Note that: The tetrahedral check does not carry any acceptable limit on the tetrahedral quality and therefore no cell set of the above kind is produced. However, the quality factors are still written automatically to post register no. 4, hence they can be plotted like any other cell property distribution. The connectivity check works in a similar fashion, in that a group of connected cells may be given its own individual colour and displayed in a
Version 3.26

4-28

Chapter 4

OTHER MESH OPERATIONS Mesh Quality Improvement

contour plot. Thus, if the overall mesh in your model is properly connected, all cells should be displayed in a single colour. The following points should also be borne in mind: 1. A given type of check is performed by choosing it from the Check Option pop-up menu and then clicking the Apply button. 2. The kind of information that is subsequently displayed in the scroll list is controlled by the following option buttons: (a) Show All Calculations shows the values of the property checked for the entire cell range under consideration. (b) Show Set Only shows only values belonging to cells that have failed the test (and are collected in a cell set). It is therefore important to select the New Set option mentioned above if anything is to appear in the scroll list. 3. The scroll list items can be sorted on the basis of the actual value of the property tested click on Sort. Note that this button is active only for check options Aspect Ratio, Face Warpage, Internal Angle, Area of Face and Negative Volume. The effects of the sorting operation can be undone by clicking on Unsort. 4. Cells with fundamental problems, i.e. (a) (b) (c) (d) (e) double vertices, negative volumes, overlaps, left-handed denitions, collapsed cell faces,

need to be corrected before proceeding further with the analysis. This is true both for imported meshes and for those created using pro-STAR. Left-handed cells can be corrected by the Check Tool by clicking the Fix Left-Handed button. More correction facilities are provided within the STAR GUIde environment (Fix Grid Problems panel). Command CFIX can also correct some of the above problems by re-dening cells through re-ordering of their constituent vertices. Mesh checking functions are very important, but overall checking may also be done quite effectively by visualising the mesh. This is achieved through the interactive plotting capabilities of pro-STAR, described in Chapter 5.

Mesh Quality Improvement


Some of the problems encountered during the mesh checking stage, i.e. those related to aspect ratio, internal angle or warpage, will not necessarily prevent STAR from running successfully, as the code is capable of dealing with highly deformed cells. It is nevertheless advisable to avoid extremely deformed cells, if at all possible, because they can at best delay numerical convergence and at worst cause numerical instability. Thus, the user should always attempt to improve the mesh quality using one of the following operations: 1. Orthogonalisation of a blocks constituent cells through the solution of elliptic
Version 3.26 4-29

OTHER MESH OPERATIONS Mesh Quality Improvement

Chapter 4

equations command MORTHO. This improves internal angles and/or warp angles but tends to atten out non-planar surfaces. Therefore, all vertices that should stay xed, such as those on a curved surface, must be collected together in a vertex set (see Chapter 3, Vertex set selection facilities) prior to using the MORTHO command on a target block. MORTHO can only be used on sections of a model that are block structured with uniform vertex increments in all three directions. 2. Smoothing of the vertices connected to the current set of cells in a given shell or 3-D mesh via algebraic smoothing (see Figure 4-12) command VSMOOTH. The effect of this operation is to move vertices so that distances between them are as equal as possible. All vertices that should stay xed must be collected together in a vertex set prior to using this command. Command VELLIPTIC performs a similar function, except that the smoothing algorithm is adjusted to take abrupt changes in curvature on the boundary into consideration. A GUI implementation of both commands is available in the Fix Grid Problems STAR-GUIde panel. Note that, for this operation, the cell set to be smoothed should not contain trimmed (polyhedral) cells.

Before

After

Figure 4-12

Vertex smoothing using VSMOOTH

3. Improving the cell shape commands VADJANGLE and UNSKEW. Their functionality is similar to that of command UNWARP (see below) except that they work on a cell-by-cell basis rather than on all cells simultaneously. VADJANGLE repositions vertices to minimise warpage, and to reduce the maximum internal angle to a user-specied value. Vertex movement is also restricted to a user-specied value. UNSKEW is used to decrease the internal angles of cells, by moving a vertex in the vicinity of the most attened part of the cell by a given distance. Since it is possible that by improving one cell one may inadvertently distort some of its neighbours, this command is best suited to improving cells next to free surfaces. A GUI implementation of both commands is available in the Fix Grid Problems STAR-GUIde panel. 4. Cell shape improvement command UNWARP. This attempts to improve the shape of cells within a given cell range by moving vertices so as to reduce the warpage of non-planar cell faces (see Microscopic checking on page 4-27 for a discussion of this concept). The process is time and memory intensive,
4-30 Version 3.26

Chapter 4

OTHER MESH OPERATIONS Mesh Quality Improvement

so the cell set to be worked on should be kept as small as possible. A GUI dialog for this operation, shown below, may be accessed from the Vertex tool (option Other > Unwarp):

Command:

UNWARP

The required input is: (a) A warp angle limit, above which corrective action is taken. (b) The maximum number of iterations to be performed by the smoothing algorithm. (c) A perturbation limit, below which vertices are not in fact moved. (d) An under-relaxation factor for the smoothing algorithm. (e) The maximum number of cell faces attached to any single vertex. If more faces are attached, the user will be prompted to repeat the operation with a greater value. Note that using a large value from the beginning of this operation can be very time-consuming computationally. (f) Normally, vertices on faces that satisfy the warp-angle criterion are not moved. However, selecting the Yes option from the Move Vertices pop-up menu overrides this and all vertices are moved until all faces satisfy the criterion. (g) All vertices that should remain xed should be collected together in a vertex set (VSET) before the UNWARP operation begins. Typically, such vertices are on the surface of the model. It is possible to instruct pro-STAR to create such a surface-vertex set automatically by selecting option Surface Vertices from the Fixed Vertices pop-up menu before clicking the Apply button. If for any reason this is not desirable, create the required set explicitly before entering the Unwarp dialog, select option Current Vertex Set from the menu and then click Apply.

Version 3.26

4-31

Chapter 5

MESH VISUALISATION

Chapter 5

MESH VISUALISATION
A system that allows the creation and use of complicated model geometries and meshes needs to be able to display these entities in a quick and clear manner. pro-STAR provides a large range of flexible and efficient tools for this purpose, showing the current state of the model at all stages of the modelling process. The display functions can be classified into the following groups: Range of data to be plotted Plot characteristics Entity to be plotted

Therefore, before a picture can be displayed on the screen, the above three attributes have to be specified. This may be done in one of the following ways: By clicking one of the buttons located along the top and left-hand-side of the main pro-STAR window, shown below. This method is especially convenient when generating successive mesh plots with different display attributes. By choosing options from the Plot menu By using one of the three mouse buttons (mainly for common plot-positioning and display operations)

Version 3.26

5-1

MESH VISUALISATION Data Range

Chapter 5

Data Range
The extent and range of data to be viewed or manipulated requires a certain amount of control since, for large models and data sets, there is normally no need to work on the entire model all at once. For this reason, pro-STAR provides a group of so-called database functions which allow selection of a subset of the available data for the purposes of model display use within other pro-STAR operations.

The types of entities for which subsets can be selected are accessed via coloured buttons on the left-hand-side of the main pro-STAR window: Cells button marked C > Vertices button marked V > Splines button marked S > Blocks button marked Bk > Boundaries button marked B > Couples button marked Cp ->

For each of the entities above: 1. The required data are selected via options in a buttons drop-down list or by means of the special set (green) buttons in the appropriate tool see Chapter 3 for a description of the Vertex, Cell, Block and Spline Tools and Chapter 4 for a description of the Couple Tool. Common selection methods are (a) (b) (c) (d) (e) numeric range, geometric range, terminal cursor selection (i.e. graphically), reference to another set already selected for a different entity, a property that is unique to the current entity (e.g. the material type lling a particular cell see Chapter 6).

2. Several selection methods are provided because it is not always possible or convenient to dene a set in terms of a single criterion. 3. The coloured buttons on the main window provide the same selection facilities as the corresponding entity tool and are therefore quicker and more convenient for assembling an entity set. 4. Although most commonly used for plotting, sets are also very useful when working in command mode. Thus, the selection can be employed by various commands that need to refer to a pre-dened set, e.g. VLIST,1,5,1,5 can be replaced by VSET,NEWS,VRAN,1,5,1 VLIST,VSET,,,5

5-2

Version 3.26

Chapter 5

MESH VISUALISATION Plot Characteristics

Plot Characteristics
Plot characteristic selection facilities enable the user to choose the most appropriate mesh display type for the current stage of the modelling process. As for database functions, mesh plot characteristics are chosen either via the Plot menu, shown below, or via action buttons and pop-up menus along the top and left-hand side of the main pro-STAR window.

Commands:

PLTYPE SURFACE EDGE PLMESH AXISUP PAN ZOOM OVERLAY CDISPLAY SHRINK MULTISEC PLDISPLAY LSWITCH WINDOW CLEAR

PLFACE NUMBER VSTYLE

Basic plot type denitions The available facilities are described below in terms of Plot menu choices and, where appropriate, button clicks or pop-up menu selections on the margin of the main window: 1. Plot type select Type to specify whether the output is: (a) A complete wireframe (see-through) plot option Normal. Note that line and point cells (see Cells on page 3-37) can be displayed only with this plot type. (b) A section cut through the model option Section. (c) A surface (hidden-line) plot option Qhidden or Ehidden. The rst option displays only forward-facing cell faces, whereas the second produces a proper surface plot. The Qhidden plot type is likely to be faster than Ehidden on vector-type display devices but provides little
Version 3.26 5-3

MESH VISUALISATION Plot Characteristics

Chapter 5

advantage on raster devices. The various graphical, Zone-type operations for quickly identifying cell faces (implemented as green-button options in the various tools) work as if the current plot is of type Qhidden regardless of the actual on-screen cell face visibility. (d) A clipped plot option Chidden. This is a combination of options (b) and (c), whereby a surface plot is clipped beyond a section plane cutting through the model. The portion of the models surface that is actually clipped is determined by the orientation of the normal to the section plane (see Additional display options, item no. 5). It is possible to reverse this orientation quickly and thereby display the surface that lies on the other side of the clipping plane by using command SNORMAL,REVERSE (e) A partial surface plot option Ihidden. This plots only the surfaces whose vertices lie entirely within the current vertex set. This is useful, for example, in displaying some of the interior features of a complex surface. 2. Surface plotting selecting Display > Surface displays only exterior surfaces of the cells making up the mesh. It can be very usefully employed in conjunction with Type > Normal to improve the legibility of a wireframe plot (it is turned on automatically for Qhidden/Ehidden plot types). If used in conjunction with Type > Section (see page 5-6) it hides the structure of the mesh along the cross-section being employed. 3. Combined Surface and Plot Type specication. The options described so far can also be selected from the Cell Plot Type pop-up menu in the main window as follows: (a) Wire (All) equivalent to Plot > Type > Normal plus Display > Surface > Off (b) Wire (Surface) equivalent to Plot > Type > Normal plus Display > Surface > On (c) Section (All) equivalent to Plot > Type > Section plus Display > Surface > Off. Note that the section plot parameters must be selected, as explained in page 5-6, before this plot type is chosen (d) Section (Surface) equivalent to Plot > Type > Section plus Display > Surface > On. Note that the section plot parameters must be selected, as explained in page 5-6, before this plot type is chosen (e) Quick Hidden Line equivalent to Plot > Type > Qhidden (f) Hidden Line equivalent to command term,,,vect (see Chapter 2, Plotting Functions) plus Plot > Type > Ehidden (g) Hidden Surface equivalent to command term,,,rast plus Plot > Type > Ehidden (h) Clipped Hidden equivalent to Plot > Type > Chidden (i) Interior equivalent to Plot > Type > Ihidden 4. Edge plotting select Display > Edge or click on the edge plotting button

in the main window. This facility can be used to plot only the (sharp) edges of the mesh formed by the current cell set (Type > Normal) or only exposed
5-4 Version 3.26

Chapter 5

MESH VISUALISATION Plot Characteristics

edges (Type > Ehidden). This is a useful tool for checking discontinuities within the mesh since they often manifest themselves as edges. 5. Mesh plotting select Display > Mesh or click on the mesh plotting button

in the main window to display mesh lines. When operating in extended graphics (Open GL) mode (see Chapter 2, Plotting Functions), there is also an option for setting the thickness of the displayed mesh lines. However, this facility is accessible only via command PLMESH. 6. Face plotting select Display > Faces to plot cell (or block) faces with colours keyed to the face numbers (face 1 is shown red, face 2 green, etc.). 7. Face shrinkage select Display > Shrink to shrink cell faces by a specied percentage of their original size (default 80%). This allows each cell to be viewed separately from its neighbours. 8. Number plotting selecting Number plus an option button from its drop-down list displays numbers relevant to the entity being plotted (vertex, cell, spline, etc.). The size of the font used for these numbers can be set using command TSCALE (see Chapter 2, Advanced screen control). Plot orientation The orientation and position of the plot can also be adjusted by specifying: The axis orientation selecting Up Axis plus an option button (X, Y, or Z) from its drop-down list denes the initial orientation of the axes and hence of the plotted object itself relative to the screen. A plot-centre position in terms of global coordinates command CENTER translates the plot around the screen. If no arguments are specied, the plot will be auto-centred. Command DISTANCE this will alter the size of the plot by changing the viewing distance from the displayed object.

Note that most of these operations can be performed more easily by using one of the methods below: 1. The View pop-up menu in the main window. This enables direct selection of the most common plot orientations via the following options: (a) Isometric viewing directions (1, 1, 1), (-1, 1, 1), (1, -1, 1), (1, 1, -1) (b) Axis viewing directions +X (1, 0, 0), -X (-1, 0, 0), +Y (0, 1, 0), -Y (0, -1, 0), +Z (0, 0, 1), -Z (0, 0, -1) (c) REVERSE reverses the viewing direction specied in (a) or (b) above (d) SNORMAL denes the viewing direction as being perpendicular to a previously dened section through the model (used in conjunction with section plotting, see page 5-6) 2. The mouse buttons, discussed in Mouse operations on page 5-15
Version 3.26 5-5

MESH VISUALISATION Plot Characteristics

Chapter 5

3. The plot orientation cube in the main window, shown below:

To rotate your model around the X, Y, and Z axes, move the sliders below and to the right of the guide cube shown above. After each rotation, a REPLOT operation is performed automatically to display the model from the new viewpoint. This facility is an alternative to command-driven model rotation functions (provided by commands VIEW, ANGLE and ROTATE) and is particularly useful with large models that are very slow to manipulate directly. Additional display options Extra plot manipulation options are also provided for the following: 1. Plot-centre translation item Pan enables you to shift (pan) the plot using the cursor to dene the new plot centre. 2. Plot enlargement selecting Zoom > On or clicking the Zoom In button in the main window enlarges a portion of the plot indicated with the cursor. Repeated zooming operations are possible. Plotting at the previously-selected magnication is done using option Back or by clicking the Zoom Back button. Selecting Off or clicking the Zoom Off button restores the plot to its original state. 3. Plot superposition selecting Display > Overlay enables superposition of multiple plots. It is also possible to superpose vertex, spline, couple (master or slave cell faces), block, block ll factor, patch or boundary plots on each other or on cell plots. This is done by selecting Cell Display plus the appropriate option button from its drop-down list. Note that this operation does not require prior selection of the Overlay option. Plot superposition may also be obtained by clicking the appropriate option button in the Cell Plot Display Options group on the main window. 4. Plot xing at the location and viewing distance dened by the previous plot command PLFIX. 5. Section plotting section displays (usually planar) cut through the model can be produced by selecting Type > Section, as mentioned above. The section is dened by: (a) A point through which the section plane passes command SPOINT. Non-planar sections (e.g. a cut made at constant radius in a local cylindrical coordinate system) are also possible using the SPOINT, LOCAL form of the command. (b) A normal to the section plane command SNORMAL. Alternatively, the section plane can be specied directly by clicking the
5-6 Version 3.26

Chapter 5

MESH VISUALISATION Plot Characteristics

Section Slice button in the main window (or by typing command SPOINT, CURSOR). This invites the user to draw a straight line on top of the current plot with the cursor. The section plane is then dened as being perpendicular to the screen plane and the line drawn represents the intersection between the two planes. Other points regarding this type of plot are as follows: (a) Multiple section planes may be created and displayed in quick succession using special facilities in the STAR GUIde system (see the Create Plots panel, Multiple Plane Plot tab). Note that in order to view the resulting plot properly, it may be necessary to turn on/off various display options and/or change the view. (b) Multiple sections can be automatically scaled for plotting either individually or as a group, depending on the setting chosen for command SECSCALE. Note, however, that direct user specication of the display attributes (see Plot orientation on page 5-5) will override the setting of this command. (c) If the Display > Surface option is currently active, the section plot will show only the cut through the perimeter of the current cell set rather than all interior lines. Furthermore, that cut can be turned into a tangible pro-STAR entity via command VSECTION. The latter creates a series of linked line cells all around the perimeter. (d) A section denition may be stored as a named collection of shells and vertices using command PSCREATE. Such a denition may then be recalled for different purposes, e.g. i) in order to be light shaded (see Special lighting effects on page 5-10) ii) used for plotting multiple hidden-line surfaces (see Basic plot type denitions on page 5-3) iii) used as a platform on which to map currently stored post data (see Chapter 9, Mapping and Copying Post Data) If necessary, the shells may be subsequently deleted using command PSDELETE. 6. Plot enhancement this is a collection of facilities to add various graphical elements to the plot, such as: (a) Individually selected items (border, plot title, date, etc.) making up the standard pro-STAR legend select Legend and then click the appropriate option button in the drop-down list. The most common plot types either include all legend items or none of them. These can be selected directly, by clicking on the Plot with/without legend buttons

in the main window, as required. Command PLDISPLAY allows the plot scale, title and coordinate system triad to be placed at a user-specied location using the screen cursor.
Version 3.26 5-7

MESH VISUALISATION Plot Characteristics

Chapter 5

(b) User-dened alphanumeric labels at specied locations command PLLABEL. The size of the font used for these labels can be set using command TSCALE (see Chapter 2, Advanced screen control). (c) User-dened pointer arrows at specied locations command PLARROW. (d) Local coordinate triads showing the position and orientation of local coordinate systems command PLLOCALCOOR. Alternatively, you may use the Coordinate Systems tool (see page 3-13) (e) A superimposed multi-dimensional grid in the global Cartesian. coordinate system command TICMARK. This is useful in, for example, selecting a cell range with the cursor on the basis of the cells geometric location. (f) Special symbols that mark the location of vertices in vertex plots select Vertex Style > Color (or Size or Style) to choose the symbols colour, size and appearance (i.e. solid dot, open dot, solid square, etc.). In each case, the choice is made in terms of a secondary drop-down list that displays the available options for the symbol property in question. 7. Plot window manipulation menu item Window repositions and re-sizes the plot window, or splits it into a specied number of sub-windows. Used in combination with Display > Overlay, this allows the production of a multi-window image on the screen. The available options are: (a) Default the normal setting, corresponding to the plotting window size illustrated in Appendix B. (b) Full expands the window to its maximum size. Note that display parameters are still shown at the bottom, next to the date and time display. (c) Pick permits selection of the desired size via the cursor. (d) Divide 1 1 resets the window division parameters. (e) Divide 1 2 (or 2 1 or 2 2) automatically divides the window into the selected number of sub-windows. (f) Activate 1 after a Divide operation, selects the rst sub-window for plotting. The Overlay option is turned on automatically. (g) Activate Next selects the next available sub-window. (h) Clear clears the entire graphics area. An additional option of automatically splitting the plot window into four sub-windows, each displaying a view of the mesh from a different direction, is provided by the Plot 4 views button in the main pro-STAR window.

This can provide a very useful, quick evaluation of the mesh created so far. 8. Coordinate display choosing Utility > Screen Locate from the main menu bar turns on the graphics cursor and gives a continuous read-out of its position in screen, global and local coordinates (equivalent to command SCLOCATE). Click a displayed cell face to print the coordinates of that face on pro-STARs I/O window, or terminate the action by clicking the Done button.
5-8 Version 3.26

Chapter 5

MESH VISUALISATION Plot Characteristics

Colour settings pro-STAR provides for the definition of a customised colour map, i.e. a table of basic colours and associated colour shades to be used when displaying a model on the screen. To define such a map, choose Tools > Color Tool from the menu bar to activate the Color Tool dialog shown below:

Commands: CLRTABLE

CLRLIST

CLRPENS

This box performs the following functions: 1. Displays a palette of all colours currently in use for model geometry or post-processing plots. The colours are identied by index numbers running from 0 to 40. Colour numbers 0 and 1 are the pro-STAR window background and foreground colours, respectively. Colours 2 through 20 show the range of colours used for geometry plots while colours 21 through 40 show the range for post-processing plots. Such a separation of colour indices means that it is possible to overlay analysis results on top of geometry plots. 2. Allows colour changes by clicking on any index box on the palette. This selects the corresponding colour, uses it to ll the large rectangle on the left and also displays the RGB (Red, Green, Blue) colour components as numeric values on the three RGB slider scales. You can modify any RGB component by dragging the appropriate slider until the desired effect is achieved. The desired changes are made permanent by clicking the Apply button at the bottom left-hand-side of the dialog box. Alternatively, colour component values can be altered simultaneously for a whole range of colour indices by using command CLRFILL. pro-STAR varies the component values so as to produce a smooth colour variation between the two end indices in the range. The fill can be performed in a number of different colour space models with different effects (i.e. filling from blue to red in RGB space gives shades of red through purple to blue but in HLS space it gives a rainbow effect).
Version 3.26 5-9

MESH VISUALISATION Plot Characteristics

Chapter 5

3. Sets the number of colours and the range of the colour scale to be used by vector or contour post-processing plots (see Chapter 9, Plot Manipulation). Clicking the Contour/Vector Color Scale button opens the Set Color Scale dialog shown below which provides the necessary controls; see the Options Help topic in STAR GUIde for an explanation of their function.

Command:

CSCALE

4. Sets all colours back to the original denitions supplied by pro-STAR select option Use Defaults from the pop-up menu. 5. Sets the post colours to a smooth scale ranging from red to blue select option Post - Smooth from the pop-up menu. The post scale depends on the number of colours specied under 3. above. 6. Sets the post colours to a smooth grey scale select option Post - Gray from the pop-up menu. The post scale depends on the number of colours specied under 3. above. 7. Sets the post colours to an alternate 20-colour scale select option Post Alternate from the pop-up menu. This option is useful in situations where more than 14 colours have been chosen under 3. above. 8. Plot the current colour map click on the Plot Color Table action button. The red, green, and blue values (in that order) for each geometry and post colour is also shown on the plot. Note that the X-Motif version of pro-STAR automatically searches for the highest depth pseudo colour, direct colour or true colour visual that exists for your screen and uses it. This may be overridden by specifying option -c when starting up pro-STAR (see Chapter 2, Running a CFD Analysis, Step 3). Special lighting effects These are used to apply light and shade effects on a models surface. The facilities provided work only in raster-type workstations that can display more than 16 colours; this is true for most modern workstations (see also Plotting Functions on page 2-32). The available functions are as follows: 1. Dene the total number of colours available to the output device (screen or hard copy) and the number of colour shades. The relevant values are entered in the text boxes labelled Total number of pens and Number of shades, respectively. The maximum number of pens available will be limited by the
5-10 Version 3.26

Chapter 5

MESH VISUALISATION Plot Characteristics

hardware you are using and it is possible to balance the number of colours in each shade with the number of different shades you need. This means that if you have a model with just one colour shade you can get a very smooth shade, but if you want many colour shades you will have a less smooth gradation. The light shades correspond to the geometry colours; if you have less shades than the 19 different geometry colours (2 through to 20) then they cycle through. Clicking the Apply button implements the values chosen and plots the colour shading scheme in the main pro-STAR window. 2. Dene the number and properties of the light sources that will illuminate the model click the Light Source button in the Color Tool to display the Light Source dialog shown below:

Commands:

LIGHT

LSWITCH

To dene a light source: (a) Select a light number in the scroll list (b) Enter the x-, y- and z-coordinates of a point dening the direction from which the light is coming from. The coordinates are entered in the rst three text boxes underneath the scroll list. Alternatively, enter a keyword in the rst text box to dene the light source direction in terms of the currently-dened viewing direction for the model. The available keywords are TOP, TOPLEFT, TOPRIGHT, LEFT, CENTER, RIGHT, BOTTOM, BOTLEFT and BOTRIGHT. (c) Enter the light source intensity number (range 0 1) in the fourth box. (d) Set the light source status (On / Off / Reverse) via the pop-up menu provided. Option Reverse reverses the light source direction. 3. Alter the active light shading effects, if required, by selecting an option from the Light Switch pop-up menu. The available options are: (a) Shade turns on Phong-style shading. The same effect can be obtained by clicking the light shading button in the main window

(b) Smooth adds Gouraud smoothing for more realistic lighting effects (c) Off turns off light shading on a global basis
Version 3.26 5-11

MESH VISUALISATION Plot Characteristics

Chapter 5

When the Smooth light shading effect is on, it is possible to make plots appear crisper at the models edges by selecting option Edge from the pop-up menu provided for this purpose. Note that light shading can also be activated from the main pro-STAR menu by choosing Plot > Light followed by one of items i iii above. An additional item, Follow View, automatically changes the light direction so that it always follows the viewing direction selected. This is useful when viewing the model interactively. 4. Dene various surface lighting properties for cell types possessing a given surface lighting index click the Light Material button in the Color Tool to display the Light Material dialog shown below.

Command:

LMATERIAL

The surface lighting index is assigned in the Cell Tool, as discussed in Chapter 6. As can be seen above, all available indices are pre-set to the same properties by default. To change any of these properties, select the required index in the scroll list and then enter values for the percentage of light energy due to ambient, diffuse and specular light (plus a specular lighting exponent) in the text boxes provided. Other special effects The Layer Tool and the LAYER command provide a powerful mechanism for building complex post-processing pictures by overlaying any combination of plotting elements. This tool is available only in OpenGL extended mode (see Chapter 2, Plotting Functions) and can be considered a replacement for the plot superposition facility and corresponding OVERLAY command described on page 5-6. As opposed to the latters overlaying of fixed 2-D plots to create an assembled image, the layer mechanism produces fully 3-D objects that can be viewed from any angle. To create a layer, first generate any type of plot (contour, vector, particle track, isosurface, etc.) in the main pro-STAR graphics window as usual. Continue by selecting Tools > Layer Tool from the main menu to open the Plot Layers dialog shown below:

5-12

Version 3.26

Chapter 5

MESH VISUALISATION Plot Characteristics

Command:

LAYER

In the above dialog, type a name for the new layer into the leftmost text box, then click the Store button to store the layer. Once a layer is stored, it is completely detached from the model. Subsequent changes to the cell set, post registers, and even the mesh itself will not change any stored layers. Thus, you can repeat the process of creating a plot and storing it in a layer to build complex overlays of multiple types of plots. Once a layer is stored, it can be manipulated using the above dialog or command LAYER. Specifically, the layer can be made visible or invisible or have its opacity changed by selecting it from the list, choosing the Visible or Invisible option from the pop-up menu and clicking the Apply button. Once a layer is no longer of interest, it can be deleted by selecting it from the list and clicking the Delete button. An example showing the overlay of three different objects is shown below. The first image shows a layer created with a standard geometry plot with the layer opacity set to 0.25:

Next, an isosurface layer is added:


Version 3.26 5-13

MESH VISUALISATION Plot Characteristics

Chapter 5

Finally, a contour plot on a section is created. Since the contour plot is the current plot (i.e. is not in a stored layer), its corresponding colour scale is also displayed:

The final state of the Plot Layers dialog showing the two stored layers is shown below:

5-14

Version 3.26

Chapter 5

MESH VISUALISATION Plot Characteristics

Command RENDEROPT provides additional flexibility when using extended mode plotting, by hiding or displaying non-cell features such as particle tracks, droplets, etc. if they happen to be behind a solid-shaded surface. It also controls the use of your machines memory for graphical operations and hence the speed of plotting. Mouse operations Special functions are assigned to the three mouse buttons upon entry into pro-STAR as an aid to plotting operations. These are as follows: Left mouse button down and drag Rotates your model around an axis in the screen XY plane Double-click left mouse button, Rotates the model around the screen Z-axis hold down and drag Centre mouse button down and Zoom the model in or out. Pulling the mouse drag towards you (mouse cursor moves down the screen) zooms in while pushing it away from you zooms out Double-click centre mouse but- Makes a zoom box from your initial position folton, hold down and drag lowing the mouse cursor until you release the button. This puts you in interactive zoom mode and nothing else can be done in pro-STAR until you either accept the zoom box (by clicking the left button inside the box) or you reject it (by clicking inside the NO box). Holding down the right button inside the zoom box and moving the mouse pans the box. Holding down the centre button and moving the mouse resizes it. NOTE: The zoom box always has the same aspect ratio as the current display window. Right mouse button down and Pans the model drag Double-click right mouse button Centres the mouse location in the plot window Note that the above special functions can be disabled at any time by choosing File > Disable Mouse from the menu bar.
Version 3.26 5-15

MESH VISUALISATION Plotted Entity

Chapter 5

Keyboard operations For the users convenience, a number of plotting-related operations are also provided as keystroke sequences. The available operations are accomplished by typing the following control-key combinations: Control-r issues a REPLOT command. Control-e or Control-o issues a ZOOM,OFF $REPLOT command Control-s issues a SAVE,casename.mdl command Control-q brings up the Quit pro-STAR dialog box Control-a issues a CSET,ALL command Control-z zooms in by a factor of 2, centring on the current cursor position Control-w zooms out by a factor of 2 Control-h activates the Help pointer for context-sensitive help

Plotted Entity
When both range and plot characteristics have been set, a mesh entity can be displayed on the screen using one of the following options in the Plot menu: Cell Plot for cells (alternatively, click the Cell Plot button in the main window) Vertex Plot for vertices Spline Plot for splines Block Plot for blocks Wall Plot for wall data, discussed in Chapter 9 as part of the post-processing operations

The above operations can also be performed by issuing commands CPLOT, VPLOT, SPLOT, BLKPLOT and WPLOT, respectively. Note that an additional command, TPLOT, can be used for moving mesh displays based on the user-supplied coding in subroutine NEWXYZ. This enables you to check the subroutine action without running STAR itself. Cell plots, in particular, are frequently drawn in several different ways. The default is to show all cells in the current set in a hidden-surface type of plot (see page 5-4). In order to speed up cell plotting, the following operations are recommended: 1. Click the Replot button in the main window (or choose option Replot from the Plot menu) to skip some of the time-consuming steps of the cell plotting operation. Replot is also used to speed up plotting in general by re-drawing the last plot, say, from a different angle or with different characteristics. This works as long as the set of items to be plotted remains unchanged. 2. Use the QuickDraw (QD) button on the main window when performing dynamic (mouse driven) rotations/translations/zooms of the on-screen mesh (see Mouse operations above)

During such operations, a much simpler (and therefore quicker to draw) representation of the mesh is displayed on-screen while you are trying to
5-16 Version 3.26

Chapter 5

MESH VISUALISATION Plotted Entity

achieve the desired position, viewpoint and magnication. The full picture is re-drawn when the mouse button is released. The QD button gives access to the following options: (a) Box During dynamic movement, only a simple rectangular box encompassing the mesh is displayed (b) Edge During dynamic movement, only a mesh-edge outline is displayed (c) Off The facility is turned off; the full mesh is drawn at all times The above options may also be selected via command QDRAW 3. Save the surface database used by the plotting operations to make hidden-line displays and read it back when necessary. (a) To perform a save surface operation, select INFO > Store Set/Surface/View and then click the Surfaces tab to display the dialog shown below:

Commands: SRFWRITE

SRFDELETE

The input required is as follows: i) Surf-File The name of the surface (.srf) le that will store the surface denition. If such a le already exists, pro-STARs built-in le browser may be used to help locate it. ii) Name An identier for the surface being saved, up to 80 characters long. Click Write to save the surface denition. (b) To delete a surface denition previously stored, use the same dialog as above and specify the following information: i) Surf-File The name of the surface (.srf) le containing the denition to be deleted. pro-STARs built-in le browser may be used to locate it. ii) Select Entry The location of the surface data to be deleted, as select from the list.
Version 3.26 5-17

MESH VISUALISATION Plotted Entity

Chapter 5

Click Delete to delete the surface denition. (c) To perform a restore surface operation, select INFO > Recall Set/Surface/View and then click the Surfaces tab to display the dialog shown below:

Commands:

SRFREAD

The required input is as follows: i) Surf-File The name of the surface (.srf) le containing the surface denition. pro-STARs built-in le browser may be used to help locate it. ii) Select Entry Select the particular surface data required by name from the list Click Recall to recall the surface denition. Note that a summary of surface data may be produced with command FSTAT. 4. Save the current plots attributes (i.e. viewpoint, distance, colour scale, size, etc.) into a plot table and read them back when necessary. This information is stored in pro-STARs save (.mdl) le when the current session is terminated. (a) To perform a save view operation, select INFO > Store Set/Surface/View and then click the Views tab to display the dialog shown below:

5-18

Version 3.26

Chapter 5

MESH VISUALISATION Plotted Entity

Commands:

PLSAVE

Select an empty location in the Select Position list, type a name (no spaces or commas) identifying the plot attributes being saved and then click Write. (b) To delete a view denition previously stored, use the same dialog as above. This time, select the denition by name from the Select Position list and then click Delete. (c) To perform a restore view operation, select INFO > Recall Set/Surface/View and then click the Views tab shown below:

Commands:

PLRECALL

Select the required view from the Select Entry list and then click Recall.

Version 3.26

5-19

Chapter 6

MATERIAL PROPERTY AND FLOW CHARACTERISATION Introduction

Chapter 6

MATERIAL PROPERTY AND FLOW CHARACTERISATION


The physical properties of the fluid and/or solid materials within the model are typically defined immediately after setting up the mesh and performing a thorough visual and numerical check on it. STAR can analyse problems containing arbitrary combinations of multi-stream uids, where there is no mixing of uid streams, porous materials, solids (conjugate heat transfer).

Introduction

Cell Table
The process of setting up properties is usually quite simple and relies on the concept of cell identity and the consequent use of the cell table, as discussed under Cell types on page 3-37. The cell table can be defined using pro-STARs Cell Table Editor, accessed by clicking the CTAB button on the left-hand side of the main pro-STAR window. All cells in the mesh can be indexed and differentiated in various ways with the aid of an entry in the cell table. This enables the user to specify a cell table index cell type material number colour table index porosity index spin index group number surface lighting material index processor number conduction thickness radiation switch initial free-surface identier identifying name

for a set of cells, as shown in the dialog below. The meaning of the various parameters that may be set in this table is described in Cell properties on page 3-38.

Version 3.26

6-1

MATERIAL PROPERTY AND FLOW CHARACTERISATION Cell Table

Chapter 6

Commands:

CTABLE CTDELETE

CTNAME CTCOMPRESS

CTMODIFY

CTLIST

The rules governing the use of the cell table are as follows: All entries in the table are identied by an index, listed under the Table # heading in the editors scroll list. A new entry is set up by clicking on the next available number in the list and then specifying the relevant cell properties. Every cell in the model is associated with a cell table index. All cells linked via a common index belong to a common Cell Type (Fluid, Solid, Baffle, etc.), selected from the editors pop-up menu. Different materials are identied by separate material property numbers, typed in the Material. Number text box. The default cell table index is number 1 and is associated with a uid whose material number is 1. By default, material number 1 refers to air properties at standard conditions. Cell indexing normally differentiates the cells material type. However, it can also be used purely for visual and/or selection purposes. Thus, in the diffuser model shown in Figure 6-1 there is a single material number (no. 1), corresponding to the one and only stream in the model, but the cells can be indexed to different colours or different types of surface shading (see Chapter 5). This is done by typing different values in the Color Table Index or Lighting Material text boxes, respectively. Colour selection is facilitated by clicking the multi-coloured button next to the Color Table Index box. This opens a Color Palette panel where the desired colour is selected by simply clicking the appropriate square. The corresponding colour number is then automatically entered into the box. Another possibility is to index cells on the basis of a common group number, typed in the Group Number text box. This groups together all cells belonging to a particular object, e.g. a distinct portion of the mesh. Such objects might typically be generated with the help of an external CAD package and
Version 3.26

6-2

Chapter 6

MATERIAL PROPERTY AND FLOW CHARACTERISATION Cell Table

imported into pro-STAR using IGES or VDA data les. Group numbers are normally generated automatically as part of the data import function (see Importing Data from other Systems on page 4-1). Cell table entries can be further identied by a name, typed in the Name box.

A cell table definition is confirmed by clicking the Apply button.

Cell index 1 Colour 2

Cell index 2

Cell index 3

Colour 3 Colour 4

Figure 6-1

Cell indexing to implement differentiation by cell colour

Cell table entries may be displayed at any stage of the pro-STAR session by clicking CTAB on the main window. Any identier, index, or reference number used in a cell table entry may be changed to a different value simply by selecting the entry in the Cell Table Editors scroll list and making the required changes. Cell table entries may also be deleted by clicking the Delete button. Note that all cells indexed to this entry must be deleted or changed to a different index before the table entry itself can be deleted. Tables that contain deleted (or undened) entries such as this may be cleaned up by clicking the Compress button. This removes all redundant entries and re-numbers the remaining ones. Cell indexing Cells are assigned an identity (cell index) using the Cell Tool shown overleaf. This may be done in two ways: 1. Implicitly, by taking on the index that is active at the moment of their creation. The active cell type can be changed at any time by highlighting the type required in the Cell Table list displayed by the Cell Tool and then clicking the Set Active Type button. The selection is indicated in the list by a letter A against the active type. 2. Explicitly, by collecting together a group of cells and then changing their identity to the currently-active type. This can be done by: (a) Pointing at the desired cells with the screen cursor choose option Modify Type > Cursor Select. The action is terminated by clicking the Done button displayed on the plot. (b) Changing all cells contained within a polygon drawn on the screen with the screen cursor choose option Modify Type > Zone. The action is terminated by clicking on i) the same point twice to complete the polygon; ii) the Close button displayed, to let pro-STAR complete the polygon;
Version 3.26 6-3

MATERIAL PROPERTY AND FLOW CHARACTERISATION Cell Table

Chapter 6

iii) the Abort button displayed, to abort the selection operation. (c) Changing all surface cells encountered when searching from a starting position given by a seed vertex (see the description on page 3-49). This can be done by choosing option Modify Type > Surface (New Edge Vertex Set) (or Surface (Current Vertex Set)). The seed vertex is selected with the screen cursor. (d) Changing all cells in the current cell set choose option Modify Type > Cell Set.

Commands:

CTYPE

CCROSS

CFIND

CZONE

CTCOMPRESS

Another method of making changes is via the Cell List dialog, shown overleaf. This may be displayed by clicking the Cell List button on the Cell Tool or choosing Lists > Cells from the main menu bar. The cell or cell range to be changed must first be highlighted with the mouse. To change the cell type, click Change Type, choose a different cell table index on the displayed Change Cell Table box and then click Apply.

6-4

Version 3.26

Chapter 6

MATERIAL PROPERTY AND FLOW CHARACTERISATION Multi-Stream and Conjugate Property Setting

Command:

CMODIFY

The result of the above process can be checked using the Check Tool, option Double Cells (see Microscopic checking on page 4-27). This will verify that a cell table entry exists for every cell within the range specified.

Multi-Stream and Conjugate Property Setting


The user is free to define as many material types (of the fluid or solid variety) as are necessary to represent the problem conditions. The most general case, involving multiple fluid streams in the presence of solids, is illustrated in the example below:

Stream 1 Metal plate Stream 2

Figure 6-2
Version 3.26

Multi-stream ow with solid material regions


6-5

MATERIAL PROPERTY AND FLOW CHARACTERISATION Multi-Stream and Conjugate Property Setting

Chapter 6

Setting up models Step 1 Create an appropriate set of cell types and material indices for your model during mesh generation, using the procedure described in Cell Table on page 6-1. The appropriate settings to be supplied via the Cell Table Editor for the example shown in Figure 6-2 are as follows: Stream 1

Metal plate

6-6

Version 3.26

Chapter 6

MATERIAL PROPERTY AND FLOW CHARACTERISATION Multi-Stream and Conjugate Property Setting

Stream 2

The Material Number indices 11, 12 and 13 above refer to the physical property sets associated with each stream and with the metal plate region. Note that different cell table indices 1, 2 and 4 are also assigned to each of these because each cell table index can only refer to one material number. In cases with multiple streams it is recommended that each stream is given a separate material number, even if streams have identical physical property sets. This is to allow each stream to have its own initialisation, reference values and residual normalisation. Step 2 Open the Thermophysical Models and Properties folder in STAR GUIde. For thermal problems, specify any special thermal transfer conditions (radiation, solar radiation or conjugate heat transfer) prevailing in your model by making the relevant selection(s) in the Thermal Options panel. Step 3 Set the physical properties of each fluid stream by opening sub-folder Liquids and Gases and then entering numerical values and/or selecting appropriate options in the Molecular Properties panel. Note that: The option chosen for density calculations determines whether the ow is treated as compressible or incompressible. Special considerations regarding the analysis of compressible flows are discussed in Compressible Flow on page 6-9 of this chapter. Non-Newtonian ow may be simulated by selecting the relevant molecular viscosity calculation option. The treatment of non-Newtonian uids is discussed further in Non-Newtonian Flow on page 6-11 of this chapter.

Each stream must be selected in turn via the Material # control at the bottom of the panel (see also the Liquids and Gases Help topic).

Version 3.26

6-7

MATERIAL PROPERTY AND FLOW CHARACTERISATION Multi-Stream and Conjugate Property Setting

Chapter 6

Step 4 If you have selected the conjugate heat transfer option, an additional sub-folder, Solids, will appear in the STAR GUIde tree structure. Specify the physical properties of the solid material by entering numerical values and/or choosing appropriate options in the Material Properties panel. If your model contains multiple solid regions possessing different properties, each region may be selected in turn via the Material # control at the bottom of the panel (see also the Solids Help topic). Step 5 For turbulent fluid streams, choose an appropriate option from the Turbulence Models panel. Further details are given in Turbulence Modelling on page 6-12 of this chapter. Step 6 For thermal problems, turn on the enthalpy equation solver in all fluid streams using the Thermal Models panel. The enthalpy equation solver for solid materials is activated simply by selecting option Conjugate Heat Transfer in the Thermal Options panel. Special considerations regarding the use of this option are discussed in Conjugate Heat Transfer on page 6-16 of this chapter. Step 7 Specify initial values for the flow variables in each fluid stream using the Initialisation panel (Liquids and Gases folder). The temperature distribution inside solid materials is specified via a separate Initialisation panel under the Solids folder. Step 8 Set the reference quantities (pressure and temperature) and monitoring cell location(s) for each stream using the Monitoring and Reference Data panel (Liquids and Gases folder). The reference temperature and monitoring cell location for solids is specified via a separate Monitoring and Reference Data panel under the Solids folder. Step 9 For buoyancy-driven or any other problems involving body forces, specify the necessary parameters using the Buoyancy panel. Special considerations regarding the use of this option are discussed in Buoyancy-driven Flows and Natural Convection on page 6-20 of this chapter. Step 10 If necessary, specify mass sources or additional source terms for the solution of the momentum, turbulence or enthalpy equation. The type of source is chosen by selecting the appropriate tab in STAR GUIdes Source Terms panel (sub-folder Sources): Mass specify mass sources or sinks, i.e. uid injection or withdrawal, to be used in the solution of the mass conservation equation (tab Mass). Special considerations regarding the use of subroutine FLUINJ for this purpose are discussed in Fluid Injection on page 6-21 of this chapter. Momentum specify momentum sources, e.g. a fan driving the ow at some location of your model, where the fan is not explicitly modelled (tab
Version 3.26

6-8

Chapter 6

MATERIAL PROPERTY AND FLOW CHARACTERISATION Compressible Flow

Momentum). Turbulence specify sources appropriate to the turbulence model used. These may be additional source terms or, in the case of the k- model, replacements for the existing terms (tab Turbulence). Enthalpy specify heat sources or sinks, e.g. radioactive sources in a nuclear reactor cooling problem (tab Enthalpy).

All property and thermophysical model settings in your problem may be inspected by selecting the relevant panels in the Thermophysical Models and Properties folder. In sub-folders Liquids and Gases and Solids, open each constituent panel in turn and scroll through the available materials. Alternatively, type command MLIST to display a brief or comprehensive listing of properties for any material in the Output window.

Compressible Flow
The theory behind compressible flow problems and the manner of implementing it in STAR-CD is given in the Methodology volume (Chapter 16, Compressible Flows). This section contains an outline of the process to be followed when setting up such problems and important points to bear in mind. Also included are cross-references to appropriate parts of the STAR GUIde on-line Help system, containing details of the user input required. Setting up compressible ow models Step 1 Go to panel Molecular Properties in STAR-GUIde and select each compressible fluid stream via the slider at the bottom of the panel. Step 2 Declare the flow as (ideal gas) compressible by selecting option Ideal-f(T,P) from the Density pop-up menu. This effectively switches on the compressibility calculations by making the density a function of both pressure and temperature. Step 3 Set up boundary conditions that are appropriate to the type of flow being analysed. These are as follows: Subsonic ow (Ma < 1 throughout the solution domain) Inow Stagnation conditions Inlet Inlet Inlet Outow Pressure Pressure Outlet (for steady ow, but see point no. 1 below) Wave transmissive (for transient ow)

Supersonic ow (Ma > 1 throughout the solution domain) Inow Inlet Inlet
Version 3.26

Outow Outlet Pressure


6-9

MATERIAL PROPERTY AND FLOW CHARACTERISATION Compressible Flow

Chapter 6

Transonic ow (Ma < 1 and Ma > 1 within the solution domain) Subsonic Inow Stagnation conditions Inlet Supersonic Inow Inlet Supersonic Inow Inlet Subsonic Inow Stagnation conditions Subsonic Outow Pressure Pressure Subsonic Outow Pressure Supersonic Outow Pressure Supersonic Outow Pressure

The user should refer to the on-line Help text for panel Define Boundary Regions (especially that for Inlet boundaries) for a description of how to set up boundary conditions for this type of flow. Useful points on compressible ow 1. The combination of inlet and outlet boundary conditions for subsonic ows presented under Step 3 above does not constitute, strictly speaking, a well posed problem. However, it is offered as an option for use in circumstances where the pressure is known at the inow (or at some other point inside the solution domain) but not at the outow. In such a case, users should designate the known pressure as the reference pressure and make sure the corresponding cell location lies as close as possible to the known location (e.g. the inlet boundary surface). The success of the simulation will depend on the magnitude of the Mach number. For the higher Mach numbers (e.g. Ma > 0.7) very low under-relaxation factors will have to be specied (e.g. 0.001 for pressure) in order to obtain a converged solution. 2. Special considerations apply to tetrahedral meshes or meshes containing trimmed (polyhedral) cells. If such meshes contain supersonic inlet boundaries then, to obtain a stable/convergent solution, it is necessary to create at least two cell layers immediately next to the boundary (see Figure 7-7 on page 7-23). If pro-STARs automatic meshing module is employed for this purpose, use its built-in mesh generation capabilities. If the mesh is imported from a package that lacks these facilities, you must extrude the mesh in a direction normal to the boundary and then shift the boundary location to the edge of the newly-created, layered structure. 3. In the case of a transonic problem with subsonic inow, residual normalisation for momentum (and k, if appropriate) is based on the momentum (and k, ) ux values at the inlet, as usual. However, because of the large difference in velocity magnitude between the inlet and the rest of the ow eld, this may place an unnecessarily stringent condition on the built-in solution convergence criterion (as discussed in Chapter 8, Output controls, this is based on the magnitude of the normalised residuals). In this situation, it could be more appropriate to inspect the convergence history of, say, mass and enthalpy and terminate the solution process after a sufciently large number of iterations. 4. For inviscid ows, it is possible to calculate temperature from a constant
6-10 Version 3.26

Chapter 6

MATERIAL PROPERTY AND FLOW CHARACTERISATION Non-Newtonian Flow

stagnation enthalpy relationship rather than the standard enthalpy equation. To do this, go to panel Thermal Models in STAR-GUIde and select option Stagnation Enthalpy from the Conservation pop-up menu. The appropriate stagnation temperature should then be typed in the Stagnation Temp. text box. 5. It could be advantageous, even when a steady state is sought, to do a transient calculation using the Pseudo-Transient Solution method. To do this, select option Pseudo-Transient from the pop-up menu in the Solution Method STAR GUIde panel. 6. In the case of ow through ducts of non-uniform cross-section where supersonic conditions are expected over the whole or part of the solution domain, it is sometimes necessary to under-relax the initial velocities. This is done by activating special ux under-relaxation using panel Miscellaneous Controls in STAR GUIde. This operation affects only the velocity initialisation.

Non-Newtonian Flow
The theory behind non-Newtonian flow and the manner of implementing it in STAR-CD is given in the Methodology volume (Chapter 16, Non-Newtonian Flows). This section contains an outline of the process to be followed when specifying non-Newtonian fluids and includes cross-references to appropriate parts of the STAR GUIde on-line Help system. The latter contains details of the user input required. Setting up non-Newtonian models Step 1 Decide whether the power law offers an adequate representation of the non-Newtonian fluid behaviour and what the value of the constants m and n in equation (1-6) of the Methodology should be. Alternatively, supply a suitable expression in subroutine VISMOL. Step 2 Go to panel Molecular Properties in STAR-GUIde and select the stream containing the non-Newtonian fluid via the slider at the bottom of the panel. Step 3 Use the Molecular Viscosity menu to either specify the model parameters m and n (option NonNewt, text boxes EM and EN) or call subroutine VISMOL (option User). Useful points on non-Newtonian ow 1. Bear in mind that constitutive relations for non-Newtonian ow are basically empirical curve-tting formulae. It is therefore inadvisable to use them beyond the range of the available data. 2. The model parameters are functions of temperature, pressure and composition. They may also be functions of the rate of strain tensors range II s (see equation (1-5) in Chapter 1 of the Methodology volume), over which the equation is tted. If any of these effects are signicant, they should be allowed for in user subroutine VISMOL.
Version 3.26 6-11

MATERIAL PROPERTY AND FLOW CHARACTERISATION Turbulence Modelling

Chapter 6

Turbulence Modelling
The theory behind the currently available models is given in Chapter 2 of the Methodology manual. A number of methods are also available for implementing the no-slip boundary conditions for turbulent flow, as follows: 1. Wall functions, applied to cells immediately adjacent to a wall. This method employs special algebraic formulae (described in Chapter 6, High Reynolds number turbulence models and wall functions of the Methodology volume) to represent velocity, temperature, turbulence parameters, etc. within the boundary layer that forms next to the wall; see Figure 6-3(a). The method is also appropriate for use with one-equation (k-l, Spalart-Allmaras), k- and Reynolds Stress models. An alternative, non-equilibrium type of wall function is also provided for taking pressure gradient effects into account (see equation (6-17), (6-18) and (6-19) in the Methodology volume) but this is available only for k- models (linear and non-linear). 2. Two-layer models, employed as combinations of a high Reynolds number (k-) model with a low Reynolds number (one-equation or zero-equation) model. The latter is applied to the near-wall region where the mesh should be nely spaced, as shown in Figure 6-3(b); see also Chapter 6, Two-layer models in the Methodology volume. You are free to combine the wall function and two-layer approach within the same problem, provided that a linear k- type model is in use and the two treatments are applied to different boundary regions. However, care must be exercised at transition points between the two methods. 3. Low Reynolds number models, in which viscous effects are incorporated in the k and transport equations. No special near-wall treatment (other than an optional denition of wall surface roughness) is therefore required; see also Chapter 6, Low Reynolds number turbulence models. Both low Re and wall function treatments may be used in the same problem, but only if they apply to separate streams. 4. Hybrid wall boundary condition, which offers a special wall treatment for low Reynolds number models independent of the normalised parameter y + . For nely spaced meshes, this is identical to the standard low Reynolds number treatment. For coarser meshes, it provides special algebraic formulae to represent velocity, temperature, turbulence parameters, etc. similar to ordinary wall functions (see also Chapter 6, Hybrid wall boundary condition). The choice of wall treatment (where relevant) is made in the Near-Wall Treatment tab of the Turbulence Models panel. If a two-layer model is employed, you will need to indicate the wall or baffle region to which it applies via the Define Boundary Regions panel.

6-12

Version 3.26

Chapter 6

MATERIAL PROPERTY AND FLOW CHARACTERISATION Turbulence Modelling

k - model

match location NWL y Low Re model (a) Wall function model (b) Two-layer models

Figure 6-3

Mesh spacing in the near-wall region

The following points should be borne in mind when considering the effectiveness or accuracy of a particular turbulence model or near-wall treatment: Wall functions 1. For reasons of accuracy, the normal distance y from the wall for near-wall cells (see Figure 6-3) should be such that the dimensionless parameter y + is kept within the limits 30 < y + < 100 , where: y C
+ 14 12

2. It is important to place y outside the viscous sublayer. This can be achieved by observing the lower limit on the value of y + . 3. The above considerations apply equally to both standard and non-equilibrium wall functions. The difference between the two is that the latter takes the pressure gradient into account. This provides more accurate results in terms of wall shear forces but has little effect on the character of the ow. 4. If the non-equilibrium option is chosen, the normal user inputs for wall roughness (specied via the Roughness pop-up menu for wall and bafe boundaries, see panel Dene Boundary Regions) are not applicable. Two-layer models 1. These should be preferred for non-equilibrium ows, as they produce improved friction and heat transfer predictions. Their use, however, will result in larger meshes within the model and hence signicantly higher calculation times. This is because the near-wall region requires a ner mesh than that needed by the wall function treatment. 2. In order to resolve properly the distributions of velocity and other variables within the near-wall region (i.e. at y + 40 ), it is necessary to ensure that it is spanned by about 15 mesh nodes. In general, this may require some trial and error adjustment of the mesh, since the near-wall region thickness is not known a priori. Once a suitable mesh density is chosen, the value of y + at the
Version 3.26 6-13

MATERIAL PROPERTY AND FLOW CHARACTERISATION Turbulence Modelling

Chapter 6

3.

4.

5.

6. 7.

8.

node next to the wall should be no larger than ~3 to resolve the velocity prole, but smaller to resolve the thermal prole. If the prescribed NWL thickness is not sufciently large to encompass the near-wall region throughout the stream in question (i.e. the switching location between high and low Re regions shown in Figure 6-3 lies outside the NWL in some places), the switching location there is assumed to be at the edge of the NWL and a warning message is issued on le case.info. In such cases, it is possible to increase the NWL thickness to a more suitable value and restart the calculations. There is an additional option for xing the above switching location to its current position. If this option is selected from the start of the analysis, its effect is to make the switching point distance equal to the NWL thickness. Note that solution convergence for the mixing length (zero-equation) model can be very slow in problems containing very low velocity regions near the wall, i.e. separated ow. The normal distances from the wall within which the two-layer model applies are written to le casename.ndt If you switch from a serial to a parallel (STAR-HPC) run, or if you change the number of processors employed in the parallel run, you will need to discard any existing le with extension .ndt. STAR should then be instructed to re-calculate the le contents for each processor. During post-processing, the partitioning of the mesh into (a) near-wall region cells where the one-equation model applies (b) other cells in the NWL (c) ordinary cells in the ow eld interior can be inspected by opening panel Load Data in STAR GUIde (Data tab), choosing Cell Data as the data type and then selecting option Two Layer from the Scalar Data scroll list. Option FMU allows inspection of the f distribution.

Low Re models 1. These should be preferred for non-equilibrium ows, for the same reasons as two-layer models. However, their use may require meshes that are even larger than those for the two-layer approach. 2. The default treatment assumes a smooth wall but the wall surface roughness may also be specied, if required. 3. In order to resolve properly the distribution of velocity and other variables, approximately 20 mesh nodes are needed within the near-wall region ( y + 40 ). The value of y + at the node next to the wall should then be ~1. Note that this meshing strategy differs from that for two-layer models, where approximately 15 mesh nodes are needed over the near-wall region. This means that a mesh designed for two-layer models will not necessarily be suitable for low Re models. 4. As with two-layer models, computing times are substantially greater than when using a wall function approach. 5. Normal distances from the wall for all cells in the stream where the low Re model applies are calculated and written to le casename.ndt
6-14 Version 3.26

Chapter 6

MATERIAL PROPERTY AND FLOW CHARACTERISATION Turbulence Modelling

It is important to note that les of this type, produced by the Low Re and Two-layer calculations, are not interchangeable. 6. It is recommended that such models are run in double precision. Hybrid wall boundary condition 1. The hybrid wall condition is an extension of low Reynolds number boundary conditions. It applies only to the following low Reynolds number turbulence models: (a) k- (linear, cubic and quadratic) (b) k- (standard and SST variants) (c) Spalart-Allmaras 2. The approach automatically selects a low Reynolds number wall treatment or a wall function, depending on the local ow eld and near-wall mesh spacing. It should be preferred in situations where (a) the normalised parameter y + is unknown, or (b) large variations in y + create uncertainties as to whether a low Reynolds number boundary treatment or a wall function is appropriate. Reynolds Stress models 1. Both the Gibson-Launder and SSG models are high Reynolds number models so they need to be used in conjunction with wall functions. 2. Since Reynolds Stress models solve additional transport equations for Reynolds Stress components, they consume a substantially greater amount of computing time compared to k- models. 3. The standard wall reection term used in the Gibson - Launder model is not suitable for impingement ows. In such circumstances, it will return the wrong distribution of the stress component normal to the wall. It is therefore advisable to use the term calculated by the Craft model instead. LES models 1. A transient analysis setting is required, although the problem being modelled may in reality be a steady-state one. 2. The recommended discretisation practices are as follows: (a) The implicit Euler scheme within the PISO algorithm (see Chapter 4, Fully implicit scheme in the Methodology manual) should be adopted for temporal discretisation. (b) The time step for the calculation should be selected so that the maximum Courant number is of the order of 0.5 (c) Central differencing is recommended for the discretisation of convective terms in the momentum equations. The MARS scheme with blending factor no smaller than 0.5, or Blended Differencing with blending factor higher than 0.9, can also be used (see Chapter 4, Higher-order spatial discretisation schemes in the Methodology manual). Changing the turbulence model in use This facility allows you to run a turbulent flow case by restarting from a simulation
Version 3.26 6-15

MATERIAL PROPERTY AND FLOW CHARACTERISATION Conjugate Heat Transfer

Chapter 6

done for the same case but with a different turbulence model. No special user input is required to run such a case, but note that this option is feasible only for solution (.pst) files created by STAR-CD Version 3.2. The table below illustrates the combinations allowed and the conversion formula adopted when STAR encounters a different turbulence model in the solution file to the one currently in force: FROM (Restart field) SpalartAllmaras k- type* k- (Wilcox and SST) Reynolds Stress (GL and SSG)
2

V2F

SpalartAllmaras

k t = C ---

k t = --

k k - t = C --- t = C ---

TO (New solution field)

k- type*

= C k Not needed Not needed

k- (Wilcox and SST) Reynolds Stress (GL and SSG)

= --------Ck

= --------Ck

= --------Ck

Not needed = C k

Not needed

V2F

Not needed = C k Not needed

* k-, k- Quadratic, k- Cubic, k- RNG, k- CHEN, k- Speziale, k- Suga Quadratic and Cubic

Conjugate Heat Transfer


The theory behind conjugate heat transfer models and the manner of implementing it in STAR-CD is given in Chapter 16, Conjugate Heat Transfer of the Methodology volume. This section contains an outline of the process to be followed when setting up this type of model and includes cross-references to appropriate parts of the STAR GUIde on-line Help system. The latter contains details of the user input required and important points to bear in mind when setting up problems of this kind.

6-16

Version 3.26

Chapter 6

MATERIAL PROPERTY AND FLOW CHARACTERISATION Conjugate Heat Transfer

Setting up conjugate heat transfer models Step 1 Specify the model regions occupied by the solids and fluids present and define their physical properties.
Material 1 steam

Heat flow Material 3 steel

Material 2 hot gas

Figure 6-4

Simple heat exchanger

In terms of the heat exchanger example shown in Figure 6-4, this requires the following actions (see also Multi-Stream and Conjugate Property Setting on page 6-5): Set up cell table entries for uid materials 1,2 and solid material 3 Assign all cells in the mesh to the appropriate cell type (1, 2, 3) as described in the section on Cell indexing on page 6-3. Specify the physical properties of each material Step 2 Turn on Conjugate Heat Transfer in the Thermal Options STAR-GUIde panel. Note that this also has the effect of switching on the temperature solver in solid materials. Step 3 Switch on the temperature solver in each fluid material using the Thermal Models panel. Step 4 Normally, STAR-CD treats the solid-fluid interface as part of the default wall region (region 0). However, unlike other parts of this region whose default thermal condition is adiabatic, the solid-fluid interface is treated as a conducting wall. Therefore: If an additional thermal resistance exists at the interface, dene the latter as a separate region and use the Dene Boundary Regions panel to specify it as a conducting wall having the required thermal resistance value (see the STAR GUIde Wall Help topic for more information) STAR uses default expressions to calculate heat transfer (lm) coefcients at all solid/uid interfaces, including those at external walls and bafes. You can supply alternative expressions for these quantities via subroutine MODSWF

Version 3.26

6-17

MATERIAL PROPERTY AND FLOW CHARACTERISATION Conjugate Heat Transfer

Chapter 6

Step 5 If a printout of temperature distribution in the model is required, use command PRTEMP to specify whether the printed values are absolute or relative to the datum temperature previously defined (see topic Reference Data in the STAR GUIde on-line Help system). Conjugate heat transfer in bafes Thermal conduction along the plane of a bafes surface is currently neglected (see the STAR GUIde Baffle Help topic for more information). However, this effect may still be modelled by expanding a bafe into a single layer of solid cells using command CBEXTRUDE (see also Chapter 3, Extrusion). The surrounding mesh is automatically adjusted to make room for the solid cells, as shown in Figure 6-5.
Before After

Ordinary baffle

Fully-conducting baffle

Figure 6-5

Fully-conducting bafe creation

Note that: Special cell shapes (such as prisms) are created at the edges of the solid cell layer, as shown in the exploded view of the bafe in Figure 6-5. This brings the bafe thickness down to zero and avoids the need to create coupled cells in those regions. The modelling of heat conduction will be slightly in error as a result of the introduction of the above articial cell shapes. A bafe of the kind described here may be attached directly to an external boundary or to internal boundaries such as solid-uid interfaces to model a conducting n. In the latter case, you need to make sure that the cell type assigned to bafe cells is different from that assigned to solid cells at the base of the bafe. Alternative treatment for bafe heat transfer It can be seen that the expansion process described above will create a disturbance in the fluid cells around the baffle and may result in a highly irregular mesh. In order to avoid this problem, a facility is provided for specifying a finite baffle thickness (to be used internally for heat conduction calculations) but without actually expanding the baffle to that thickness. Thus, the fluid flow calculations are based on
6-18 Version 3.26

Chapter 6

MATERIAL PROPERTY AND FLOW CHARACTERISATION Conjugate Heat Transfer

an undisturbed mesh structure. To use this facility, the following steps are needed: Step 1 Using the Cell Table Editor, create a separate baffle cell type and a separate solid cell type. The latter will be used to represent the conducting baffles. Step 2 Create the baffle cells in the appropriate mesh location using the baffle cell type defined in Step 1. Step 3 Apply command CBEXTRUDE to the baffle cells created in Step 2 and extrude them into solid cells using the solid cell type created in Step 1. Note that: Upon extrusion, the bafe cells will be removed from the mesh and replaced by the solid cells that they have been extruded into. If no solid cell type identication, ICTID, is supplied in the CBEXTRUDE command, the solid cell identication will be set as cell type 1. If no solid cell thickness, DT, is supplied in the CBEXTRUDE command (this is the normal practice), the default thickness will be applied, currently set at 0.2 10-3 m. Step 4 Go back to the Cell Table Editor and select the solid cell type defined in Step 1. Enter the actual conduction thickness in the box labelled Conduction Thickness Step 5 Turn on Conjugate Heat Transfer in the Thermal Options STAR-GUIde panel. Step 6 Apply the appropriate wall boundary condition to the solid cells created in Step 3. If none is specified, the default wall boundary condition for region number 0 will be used. This results in a conducting, no-slip wall. Note that: Conducting bafes of the same thickness DT specied in command CBEXTRUDE and of the same Conduction Thickness specied in the Cell Table Editor can share the same cell type. Conducting bafes that have a different DT or different Conduction Thickness must also have a different cell type. A conducting bafe that is attached to a solid base must have a different cell type to that of the solid to which it is attached.

Useful points on conjugate heat transfer 1. The On button in the Conjugate Heat Transfer section of the Thermal Options STAR-GUIde panel must always be used to turn on the solution of the energy equation in solids, even if the entire model is made up of solid cells. 2. It is usually advisable to run conjugate heat transfer simulations in double precision. This helps to overcome potential convergence problems arising as a
Version 3.26 6-19

MATERIAL PROPERTY AND FLOW CHARACTERISATION Buoyancy-driven Flows and Natural Convection

Chapter 6

3.

4.

5.

6.

result of a large disparity in thermal conductivity between uid and solid. The choice of single or double precision mode can be made when running STAR (see Chapter 2, Running a CFD Analysis, Step 6). A convenient way of modelling thermal contact resistance between two adjacent solid regions is to dene a bafe of suitable properties at the faces of the appropriate solid cells in one of the regions. In some situations the energy under-relaxation factor in uid regions has to be reduced below its default value of 1.0 to aid convergence. In such cases, we recommend that the corresponding factor for solids is left at 1.0. If your model contains an arbitrary or embedded mesh interface between the uid and solid cells, you will need to match cells on either side of the interface, as described in Chapter 4, Couple creation. If your model contains scalar variables, the only valid scalar boundary condition for walls located at the solid-uid interface is Adiabatic.

Buoyancy-driven Flows and Natural Convection


The theory behind flow problems of this kind and the manner of implementing it in STAR-CD is given in the Methodology volume (Chapter 16, Buoyancy-driven Flows and Natural Convection). The present chapter contains an outline of the process to be followed when setting up buoyancy-driven flows and includes cross-references to appropriate parts of the STAR GUIde on-line Help system. The latter contains details of the user input required and important points to bear in mind when setting up problems of this kind. Setting up buoyancy-driven models Step 1 Switch on the temperature solver using the Thermal Models STAR-GUIde panel Step 2 Switch on the density solver by selecting one of the following options from the Density pop-up menu in the Molecular Properties panel: Isobaric isobaric density variation (normally used for liquids) Ideal-f(T) density variation based on the Ideal Gas Law User-f(T) density variation based on user-dened relationships Step 3 Set up the problems initial conditions using the Initialisation panel controls Step 4 Define the reference pressure and temperature plus the reference pressure cell location using the Monitoring and Reference Data panel Step 5 Use the Buoyancy panel to specify suitable buoyancy parameters for your problem. Useful points on buoyancy-driven ow 1. Check the settings in STAR GUIdes Gravity panel (which determine the
6-20 Version 3.26

Chapter 6

MATERIAL PROPERTY AND FLOW CHARACTERISATION Fluid Injection

gravitational body force effects) before starting a buoyancy calculation. Also note that, if droplets and/or liquid wall lms are present in your model, gravitational effects for these features must be switched on separately. 2. It is usually advisable to run buoyancy-driven ow simulations in double precision. This is because the body force terms in the momentum equation are often so small compared to the other terms that they can be masked by the round-off error of the calculation. The consequences of working in single precision mode are oscillation in the residual values and non-convergence of the solution. The choice of single or double precision mode can be made when creating the STAR-CD executable code (see Chapter 2, Running a CFD Analysis, Step 6). 3. In multi-stream problems, the reference density and datum location should be dened stream-wise. 4. If you use the option for direct specication of the reference density, the latter should be assigned a realistic value based on the expected density variation in the uid. For simulations without pressure boundaries: (a) In steady-state calculations, unrealistic values can give rise to a body force that is out of balance with the piezometric pressure gradient. This can cause delay in the solution convergence. (b) In transient calculations, these initial disturbances could also produce unrealistic initial elds and therefore invalidate the results of the analysis. 5. If convergence problems are encountered, it is advisable to begin the calculations with a small amount of under-relaxation on both temperature and density, e.g. 0.9. The desired values may be entered in the corresponding Relaxation Factor boxes inside panel Relaxation and Solver Parameters in STAR GUIde. This measure often helps to stabilise the solution and promote convergence. 6. In problems of this type, there is very strong coupling between the temperature, scalar mass fraction and ow elds. It is therefore advisable to use the PISO algorithm which is more suitable for this type of coupling. 7. If convergence problems are encountered, it may be necessary to run the model in transient mode. This involves approaching the steady-state solution, if one exists, by means of time steps. The most convenient way of doing this is to use the single-transient solution mode (see Chapter 8, Default (single-transient) solution mode), since this way one does not need to set up load steps. 8. Buoyancy-driven ows with high Grashof number (i.e. Gr > 109) are sometimes naturally unstable (i.e. time-dependent without a single unique solution). In such cases, a converged steady-state solution cannot be obtained and you should opt for the transient approach. A method of calculating the time step size is given in the Methodology volume (Chapter 16, Buoyancy-driven Flows and Natural Convection).

Fluid Injection
The theory behind flow problems of this kind and the manner of implementing it in STAR-CD is given in the Methodology volume (Chapter 16, Local Fluid
Version 3.26 6-21

MATERIAL PROPERTY AND FLOW CHARACTERISATION Fluid Injection

Chapter 6

Injection/Extraction). This section contains an outline of the process to be followed when setting up fluid injection problems. Also included are crossreferences to appropriate parts of the on-line Help system, containing details of the user input required. Setting up uid injection models Step 1 Create a set of all cells where fluid injection or removal is to be take place. A separate cell table index number should be assigned to this set (see Cell Table on page 6-1). Step 2 Activate the injection facility using the Mass tab in STAR-GUIdes Source Terms panel. Step 3 Copy subroutine FLUINJ into the ufile sub-directory of your working directory, as described in Chapter 18, Subroutine Usage. Step 4 Insert appropriate code in subroutine FLUINJ using a suitable editor. Usually, the code specifies the mass flux injected or removed (on a per unit volume basis) for cells of the required type, so that a single value can be used for the entire cell set selected. An example of this is given in the sample coding supplied in subroutine FLUINJ. If only the total amount of mass injected is known, the required value may be obtained by dividing by the total volume of the cell set. Thus, you may need to calculate this volume first, either by choosing Utility > Calculate Volume > Cell Set from pro-STARs main menu bar or by using command VOLUME. If mass is being injected, specify all relevant properties of the incoming fluid (i.e. it is assumed that the fluid is bringing all its properties into the computational domain). The properties in question may be velocity components (U, V, W), turbulence parameters (k, ), temperature and chemical species mass fractions. If mass is being removed, only the mass flux needs to be specified as the withdrawn fluid is assumed to possess the (known) properties in its vicinity.

6-22

Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Introduction

Chapter 7

BOUNDARY AND INITIAL CONDITIONS


The process of defining boundaries in a model can be divided into two major steps: 1. Identify the location of individual, distinct boundaries (i.e. where the boundaries are). 2. Specify the conditions at the boundaries (i.e. what the conditions are). It is of the utmost importance that boundaries are chosen and implemented correctly, since the outcome of the simulation depends on them. Users should have a good understanding of the physical significance and numerical implications of different boundary conditions and should apply them correctly to their model. It is therefore advisable to refer to the relevant sections of the Methodology volume for guidance.

Introduction

Boundary Location
The two important geometrical features of boundaries are: 1. They are created on the outer surfaces of the mesh, except for: (a) so-called bafe boundaries, which are normally positioned at the interface of two cells; (b) uid/solid interface boundaries in conjugate heat transfer problems. 2. They are grouped into boundary regions. A boundary region consists of a group of cell faces that cover the desired boundary surface. Figure 7-1 shows a boundary region made up of nine cell faces.

Figure 7-1

Boundary region denition

The rules governing the use of boundary regions are as follows: Regions are numbered in an arbitrary manner by the user, in order to identify them. The indexing of boundary cell faces (or boundaries, for short) comprising a region is done automatically by pro-STAR, in a similar manner to the automatic cell numbering discussed in Cells on page 3-37. In the example shown in Figure 7-2, boundary nos. 1 to 9 are assigned to region 1.

Version 3.26

7-1

BOUNDARY AND INITIAL CONDITIONS Boundary Location

Chapter 7

7 4 1

8 5 2

9 6 3

Figure 7-2

Boundary cell face indexing

Thus, each boundary in the model is identified by a region number (user-defined) and composed of boundary cell faces that are automatically numbered by pro-STAR. pro-STAR offers two methods for setting up boundary regions: 1. Typing commands from the keyboard, as described below 2. Using the facilities of panel Create Boundaries in STAR GUIde (Regions tab) Command-driven facilities The available functions are as follows: Assignment of individual boundaries to a region using the screen cursor to mark the vertices of the target cell face command BDX. This is similar to command CDX used for cell generation. Assignment of boundaries to a region using the keyboard command BDEFINE. This requires input of the region number and the vertex numbers located at the corners of the target cell face, as shown in Figure 7-3. pro-STAR generates the boundary number automatically. Further boundaries can be created individually or generated from an existing set, using command BGENERATE. This creates additional boundaries by applying an offset to the vertices of the previously-dened set, as shown in Figure 7-4.

7-2

Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Boundary Location Command: BDEF , 5 , 1 , 2 , 7 , 6 Region no. 5

11

12

13

14

15

6 7 8 9 10

Figure 7-3

Boundary assignment for a single cell face


Commands: BGEN , BGEN , 4 , 1 , 1,1,1 2 , 5 , 1,4,1 Sets Vertex to be offset created

11

12

13

14

15

6 7 8 9 10

Figure 7-4

Boundary assignment for multiple cell faces

Modication of the constituent vertices of the boundary face command BMODIFY. Re-assignment of a boundary to a different region graphically command BCROSS. Conversion of a set of shells into a set of boundaries command BSHELL. The starting shells are not deleted by this process. Counting the currently dened boundaries command COUNT. The same operation can also be executed by choosing Utility > Count > Boundaries from the menu bar.
7-3

Version 3.26

BOUNDARY AND INITIAL CONDITIONS Boundary Location

Chapter 7

For further details on the function and application of boundary commands, refer to the pro-STAR Commands volume. Boundary set selection facilities Boundaries may need to be grouped together for the purposes of mass manipulation or plotting, thus defining a boundary set. This is done by selecting one of the list options provided by the B-> button in the main pro-STAR window. The available options are: 1. All puts all existing boundaries in the current set 2. None clears the current set 3. Invert replaces the current set with one consisting of all currently unselected boundaries 4. New replaces the current set with a new set of boundaries 5. Add adds new boundaries to the current set 6. Unselect removes boundaries from the current set 7. Subset selects a smaller group of boundaries from those in the current set For the last four options, the required boundaries are collected by choosing an item from a secondary drop-down list, as follows: Cursor Select click on the desired boundaries with the cursor, complete the selection by clicking the Done button on the plot Zone use the cursor to draw a polygon around the desired boundaries. Complete the polygon by clicking the right mouse button (or the Done button outside the display area to let pro-STAR do it for you). Abort the selection by clicking the Abort button. Region (Current) select all boundaries whose region number is currently highlighted in the boundary region table Region (Cursor Select) select all boundaries belonging to a given region. The required region is selected by clicking on a representative boundary with the cursor. Patch (Cursor Select) select all boundaries containing radiation patches (see Chapter 11, Step 5). The patches in question are selected by clicking with the cursor. Vertex Set (All) all constituent vertices of the selected boundaries must be in the current vertex set Vertex Set (Any) the selected boundaries must have at least one constituent vertex in the current vertex set Attach, Baffle, Cyclic, Degas (Phase Escape boundary condition used in Eulerian multi-phase problems), Freestream, Inlet, Internal, NonReective_Pressure, NonReective_Stagnation, Outlet, Pressure, Radiation, Riemann, Stagnation, Symplane, Transient, Wall all boundaries must be of the type selected, regardless of region number More boundary set operations are available in the Boundary List dialog (Boundary listing below) or by typing command BSET (see the pro-STAR Commands volume for a description of additional selection options).

7-4

Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Boundary Location

Boundary listing This is included in the Boundary List dialog shown below and is obtained by selecting Lists > Boundaries from the main menu bar. Boundary definitions in terms of constituent vertices, boundary type and region number are displayed in a scroll list in numerically ascending order. There is also a choice of listing all boundaries or just the current set (marked by asterisks in the Bset column). The choice is made by simply selecting the Show All Boundaries or Show Bset Only option, respectively. To select boundaries from the list: For single items, click the number of the required boundary. For two or more items in sequence, click the rst boundary you want to select, and then press and hold down the Shift key while you click the last boundary in the group.

Commands:

BLIST

BDELETE

BMODIFY

BSET

Once the desired boundaries are selected, the following additional operations are possible: 1. Addition to (or removal from) the current set click the Add to Set/Remove from Set button. 2. Deletion click the Delete Boundary button. 3. Change of boundary region click the Change Region button. This activates an additional dialog, shown below. To change the region type associated with the selected boundaries, choose a different region number on the displayed Change Region box and then click the Apply button.

Version 3.26

7-5

BOUNDARY AND INITIAL CONDITIONS Boundary Region Denition

Chapter 7

Note that all the above operations have an immediate effect on the boundary definitions, reflected by immediate changes to what is displayed in the list. However, any subsequent boundary changes made outside this dialog, e.g. by issuing commands via the pro-STAR I/O window, will not be listed. To display these changes, click Update List at the top of the dialog.

Boundary Region Denition


Having specified the location of all boundaries in the model, the next step is to dene their individual type (i.e. set the boundary condition); supply information relevant to that type.

The boundary types available at present are: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. Inlet Outlet Pressure Non-reective pressure Stagnation Non-reective stagnation Wall Bafe Symmetry plane Cyclic Free-stream transmissive Transient-wave transmissive Riemann Invariant Attachment Radiation Internal Phase-escape (Degassing)

The extent of the information required to define each boundary properly depends in many cases on the variables being solved. For example, in problems using the k- model, an inlet boundary needs information concerning the turbulence quantities k and . In most cases, the appropriate variables are activated automatically as a result of choosing a given modelling option, e.g.
7-6 Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Boundary Region Denition

In the Molecular Properties STAR GUIde panel, the ideal gas option for density will switch the density solver on In the Turbulence Models panel, any of the K-Epsilon options will switch on the k, and viscosity solver

Note that: 1. In the case of a variable such as temperature, you need to switch on the temperature solver explicitly (in panel Thermal Models) before proceeding with region denitions. 2. Specication of alternative sets of variables needed to completely dene boundaries of type Inlet or Pressure is possible, as discussed in the sections dealing with such boundaries. 3. It is possible to check for common mistakes in prescribing boundary conditions (e.g. boundary velocities specied in an undened local coordinate system) by using the facilities available within the Check Everything STAR-GUIde panel. 4. Boundary regions may be given an optional alphanumeric name to help distinguish one region from another more easily. The easiest way of applying a desired boundary condition to a given region is via the STAR GUIde system; go to the Dene Boundary Conditions folder and open the Define Boundary Regions panel, as in the example shown below:

Version 3.26

7-7

BOUNDARY AND INITIAL CONDITIONS Boundary Region Denition

Chapter 7

The number and purpose of the text boxes appearing in the panel and whether they are active or not depends on the type of condition selected; which variables are being solved for.

On the other hand, all forms of the panel possess a number of common features, listed below: 1. New regions are dened by: (a) Selecting an unused region in the boundary regions scroll list (b) Choosing the desired boundary condition via the Region Type menu options. The effect of this is to immediately display input boxes for supplying boundary values for all ow variables required. (c) Typing an optional name in the Region Name text box 2. Modication of existing regions is performed in a similar way. The changes are made permanent by clicking the Apply button. 3. Additional boundary regions with identical properties to a pre-dened base region set may also be generated by typing command RGENERATE in the pro-STAR I/O window. 4. Selected region denitions can be deleted by clicking Delete Region. 5. The Compress button eliminates all deleted or undened regions from the boundary regions scroll list and renumbers the remaining ones contiguously. 6. All free surfaces in your model that are neither dened as boundaries nor explicitly assigned to a region will become part of region no. 0 (shown in the example above). The latters properties may be specied in the same way as for any other region. By default, this region is assumed to be a smooth, stationary, impermeable, adiabatic wall. 7. Non-uniform or time-varying conditions may be specied for some boundary types. This is done by choosing one of the following from the Options menu (the default setting, Standard, means constant and uniform conditions): (a) User specify the required conditions in one of the user subroutines listed below (see also Chapter 18): i) ii) iii) iv) v) vi) vii) viii) ix) x) BCDEFI Inlet BCDEFO Outlet BCDEFP Pressure BCDNRP Non-reective pressure BCDEFS Stagnation BCDNRS Non-reective stagnation BCDEFW Wall or Bafe BCDEFF Free-stream transmissive BCDEFT Transient-wave transmissive BCDEFR Riemann invariant

The panel also displays a Define user coding button. Click it to store the default source code in sub-directory ufile, ready for further editing. (b) Table use values stored in a table le as boundary conditions. The le name is of form case.tbl (see Chapter 2, Table Manipulation) and
7-8 Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Boundary Region Denition

may be entered in the Table Name text box. Alternatively, the le may be selected using pro-STARs built-in browser. Note that whilst one table can be applied to multiple boundary regions, multiple tables cannot be applied to the same boundary region. A list of valid dependent variable names that may be used in tables is given for each boundary type in the sections that follow. In addition, the coordinate system used in a table must be the same as the coordinate system specied for its associated boundary regions. Table values are actually assigned to a boundary by STAR during the CFD analysis stage. This is done as follows: i) Table data are mapped onto the appropriate boundary region in the mesh ii) Boundary face-centre coordinates are compared with the table coordinates iii) Variable values at face centres are calculated from the table data using inverse distance-weighted interpolation iv) The resulting values are assigned to the boundary for the whole duration of the analysis Figure 7-5 shows an example of using a table to assign boundary conditions to a computational boundary. The coordinates and user-supplied values are stored at the nodes of the table data grid and the STAR ow variables are stored at the boundary face centres. In the example, boundary values at face centre 1 are calculated as a weighted average of the table data located at ABCD. Similarly, values at face centre 2 are a weighted average of the table data located at EFGH.
Table data map Boundary mesh Table data node

A 1 F 2 G H E

Boundary face centre

Figure 7-5

Mapping and interpolation of table data onto a boundary

Please also note the following: i) It is possible to produce contour or vector plots of the boundary
Version 3.26 7-9

BOUNDARY AND INITIAL CONDITIONS Inlet Boundaries

Chapter 7

conditions specied by the table, as a means of checking that the table values have been entered correctly. To do this, click Plot Boundary after you have read in the table and then specify which ow variables you wish to plot. ii) The use of boundary condition tables is not supported for cases using the load-step method to dene transient conditions (see Chapter 8, Load-step based solution mode) (c) GT-POWER set up a link with the GT-POWER engine system simulation tool (see Chapter 10 in the Supplementary Notes). This provides automatic updating of boundary conditions at inlet and/or pressure boundaries during engine simulation runs. Note that this facility becomes active only after the relevant option has been selected in the Miscellaneous Controls panel. (d) Rad. Eq. Tip impose a radial equilibrium condition by specifying the static pressure at the tip of a turbomachinery case. (e) Rad. Eq. Hub impose a radial equilibrium condition by specifying the static pressure at the rotor hub of a turbomachinery case.

Inlet Boundaries
Introduction This condition describes an inflow boundary and thus requires specification of inlet fluxes for mass momentum turbulence quantities energy chemical species mass fraction

as appropriate. The same boundary type may also be used to specify an outflow condition (i.e. negative inlet). Note that boundary values are needed only for variables pertinent to the problem being analysed (see Boundary Region Definition on page 7-6). In specifying turbulence quantities, it is possible to select in advance the form in which the required boundary values will be input. It is also possible to specify how mass influx is treated under subsonic compressible flow conditions. The choices are made in the Define Boundary Regions panel for inlets, as shown in the example below, and are fully described in the Inlet on-line Help topic.

7-10

Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Inlet Boundaries

Useful points 1. If the Flow Switch and Turb. Switch settings are changed after velocity components and turbulence boundary conditions have been input, the existing values are not converted in any way, but are interpreted differently. You should therefore use Define Boundary Regions to correct these values. 2. Boundary values for turbulence in streams using a Reynolds Stress model may be specied solely in terms of k and instead of Reynolds Stress components. If this option is chosen, turbulence conditions at the boundary are assumed to be isotropic. 3. At negative inlets, i.e. inlet boundaries with velocity components pointing out of the solution domain, values for temperature, turbulence quantities and chemical species mass fractions are ignored. 4. Special considerations apply to tetrahedral meshes or meshes containing trimmed (polyhedral) cells. If such meshes contain supersonic inlet boundaries then, to obtain a stable/convergent solution, it is necessary to create at least two cell layers immediately next to the boundary (see Figure 7-7 on page 7-23). If pro-STARs automatic meshing module is employed for this purpose, use its built-in mesh generation capabilities. If the mesh is imported from a package that lacks these facilities, you must extrude the mesh in a direction normal to the boundary and then shift the boundary location to the edge of the newly-created, layered structure. 5. If boundary conditions are set using a table (see page 7-8), the permissible variable names that may appear in the table and their meaning is as follows: (a) U U-component of velocity
Version 3.26 7-11

BOUNDARY AND INITIAL CONDITIONS Outlet Boundaries

Chapter 7

(b) V V-component of velocity (c) W W-component of velocity (d) TE Turbulence kinetic energy or intensity, depending on the Turb. Switch setting (e) ED Turbulence kinetic energy dissipation rate or length scale, depending on the above setting (f) UU - Reynolds stress component (g) VV - Reynolds stress component (h) WW - Reynolds stress component (i) UV - Reynolds stress component (j) VW - Reynolds stress component (k) UW - Reynolds stress component (l) T Temperature (absolute) (m) DEN Density (n) Scalar_name Mass fraction; use the scalar species name, e.g. H2O, N2 etc. as the scalar variable name(s) You must also ensure that the coordinate system used is the same as the coordinate system specied in the Define Boundary Regions panel.

Outlet Boundaries
Introduction This condition should be applied at locations where the flow is outwardly directed but the conditions are otherwise unknown. There are two types of outlet boundary: 1. Prescribed ow split boundary. The conditions that must be observed are: (a) The specied split factor f s must be positive. (b) Flow splits for all outlet regions belonging to a given uid stream should sum to unity, i.e.

fs = 1

(7-1)

(c) This type of boundary must not be used in combination with a pressure or a stagnation pressure boundary within the same uid stream. 2. Prescribed mass outow rate boundary. The conditions that must be observed in this case are: out must be positive. (a) The specied outow rate m (b) This type of boundary must be used in combination with at least one pressure boundary. The desired boundary type is imposed via the Define Boundary Regions panel for outlets, as shown in the example below, and is fully described in the Outlet on-line Help topic.

7-12

Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Pressure Boundaries

Useful points 1. Outlet boundaries of the two basic types described above must not coexist in the same stream. 2. For solution stability and accuracy, outlet boundaries should be used only far downstream of strong recirculation regions, where it is reasonable to expect true outow everywhere on the boundary. 3. Prescribed mass outow boundaries are recommended for obtaining fully developed ow in pipes, channels, etc. 4. The difference between outow conditions described using negative inlet as opposed to prescribed mass outow boundaries is that the former prescribes both the velocity distribution as well as the mass rate, whereas the latter prescribes only the mass rate. 5. If boundary conditions are set using a table (see page 7-8), only one variable name FSORMF, is allowed. The meaning of this variable is either ow split or mass outow rate, depending on the Condition pop-up menu setting described above. Note that the variable must be a function of time only.

Pressure Boundaries
Introduction This condition specifies a constant static pressure or piezometric pressure on a given boundary. For turbomachinery cases, it is also possible to specify the static pressure at the tip or hub and impose a pressure distribution that satisfies radial equilibrium. The direction and magnitude of the flow are determined as part of the solution. Thus, if the ow is directed outwards, the values of the other variables are extrapolated from the upstream direction; if the ow is directed inwards, the values are obtained from the supplied boundary conditions.

In specifying turbulence quantities, temperature or mass fraction, it is possible to select in advance the way in which these quantities will be determined. The choices are made in the Define Boundary Regions panel for pressure boundaries, as shown in the example below, and are fully described in the Pressure Boundary
Version 3.26 7-13

BOUNDARY AND INITIAL CONDITIONS Pressure Boundaries

Chapter 7

on-line Help topic.

Useful points 1. For a given uid stream, pressure boundaries must not coexist with outlet boundaries of the Flow Split type. 2. Analyses with multiple pressure boundaries inherently converge more slowly than those where the inlet ow rates and ow splits have been specied. 3. Numerical instability may occur when large or curved surfaces are used as pressure boundaries. 4. It is advisable to choose a reference pressure that is of the same order as the pressure values on the boundaries. For example, if the model contains two boundaries at 10 and 11 bars a reasonable reference pressure would be 10 bars. This practice will help to avoid start-up difculties and to minimise problems due to machine round-off errors. 5. If the Turb. Switch setting is changed to Zero Grad after turbulence boundary conditions have been input, the values already supplied are ignored. 6. If the piezometric setting is chosen for problems involving buoyancy driven ow, you must ensure that the datum level location and density (as specied in the Buoyancy panel) are for a point lying on the pressure boundary itself. 7. In cases where a pressure boundary coexists with another pressure or stagnation boundary, it is recommended that the user supplies an estimate for the maximum velocity within the solution domain in the relevant text box of the Initialisation panel (see also Flow Field Initialisation on page 7-41). 8. To obtain a stable/convergent solution for tetrahedral meshes or meshes containing trimmed (polyhedral) cells, use of the UVW On option (i.e. explicit velocity specication, see the Pressure Boundary STAR GUIde
7-14 Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Stagnation Boundaries

panel) is recommend. 9. Any type of mesh may be used for problems containing radial equilibrium boundaries but only one such region must be employed in the model. Note also that in cases of high circumferential velocity gradients in the radial direction, the user may change the number of averaging intervals to capture the problem details more accurately. The default interval value (50) is however adequate for most cases. 10. If boundary conditions are set using a table (see page 7-8), the permissible variable names that may appear in the table and their meaning is as follows: (a) (b) (c) (d) (e) PR Pressure (relative) TE Turbulence intensity ED Turbulence length scale T Temperature (absolute) Scalar_name Mass fraction; use the scalar species name, e.g. H2O, N2 etc. as the scalar variable name(s)

11. Do not use tabular input together with the Mean On option (see the Pressure Boundary STAR GUIde panel) as this will overwrite the table data.

Stagnation Boundaries
Introduction This condition is typically used on a boundary lying in a large reservoir where fluid properties are not significantly affected by flow conditions in the solution domain. It normally appears in compressible flow calculations, but you may also employ it for incompressible flows. Information relevant to such a region is supplied in the Define Boundary Regions panel for stagnation boundaries, as shown in the example below, and is described in the Stagnation Boundary on-line Help topic.

Version 3.26

7-15

BOUNDARY AND INITIAL CONDITIONS Stagnation Boundaries

Chapter 7

Useful points 1. If a uid stream contains a stagnation boundary, it must also contain a pressure boundary. 2. Boundary values for turbulence in streams using a Reynolds Stress model may be specied solely in terms of k and instead of Reynolds Stress components. If this option is chosen, turbulence conditions at the boundary are assumed to be isotropic. 3. It is recommended that the user supplies an estimate for the maximum velocity within the solution domain via the relevant text box of the Initialisation panel (see also Flow Field Initialisation on page 7-41). This will ensure that the calculations start with a reasonable initial velocity eld. 4. For a given uid stream, stagnation boundaries must not co-exist with outlet boundaries of the Flow Split type. 5. To obtain a stable/convergent solution for tetrahedral meshes or meshes containing trimmed (polyhedral) cells, it is necessary to create at least two cell layers immediately next to the boundary (see Figure 7-7 on page 7-23). If pro-STARs automatic meshing module is employed for this purpose, use its built-in mesh generation capabilities. If the mesh is imported from a package that lacks these facilities, you must extrude the mesh in a direction normal to the boundary and then shift the boundary location to the edge of the newly-created, layered structure. 6. If boundary conditions are set using a table (see page 7-8), the permissible variable names that may appear in the table and their meaning is as follows: (a) DCX Direction cosine for U-component of velocity
7-16 Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Non-reective Pressure and Stagnation Boundaries

(b) (c) (d) (e) (f)

DCY Direction cosine for V-component of velocity DCZ Direction cosine for W-component of velocity PSTAGB Stagnation pressure (relative) TSTAG Stagnation temperature (absolute) TINTB Turbulence kinetic energy or intensity, depending on the Turb. Switch setting (g) TLSCB Turbulence kinetic energy dissipation rate or length scale, depending on the Turb. Switch setting (h) Scalar_name Mass fraction; use the scalar species name, e.g. H2O, N2 etc. as the scalar variable name(s) You must also ensure that the coordinate system used is the same as the coordinate system specied in the Define Boundary Regions panel.

Non-reective Pressure and Stagnation Boundaries


Introduction This type of boundary condition was specially developed for turbomachinery applications. It may only be used in situations where the working fluid is an ideal gas and the flow is compressible. Furthermore, it requires the presence of periodic (cyclic) boundaries in a transverse direction relative to the dominant flow direction, as illustrated in Figure 7-6 below. Circumferential direction Wall

Cyclic boundary

Flow (axial) direction Cyclic boundary Wall


Figure 7-6 Example of non-reecting boundary mesh structure

Boundaries of this kind are frequently used as non-reflective pressure/stagnation pairs. The information required for each type represents the average dependent variable values that need to be satisfied by the CFD simulation and is supplied in the Define Boundary Regions panel. The relevant form of this panel for
Version 3.26 7-17

BOUNDARY AND INITIAL CONDITIONS Non-reective Pressure and Stagnation Boundaries

Chapter 7

non-reflecting stagnation boundaries is shown in the example below and is fully described in the Non-reflective Stagnation Boundary on-line Help topic.

The panel for a non-reflecting pressure boundary is shown below and is fully described in the Non-reflective Pressure Boundary on-line Help topic.

Useful points 1. Non-reective pressure and stagnation conditions impose a number of restrictions on the type of mesh employed at the boundary surface: (a) The boundary must contain only quadrilateral faces, aligned along the circumferential direction as shown in Figure 7-6. (b) The cell layer adjacent to the boundary must contain only hexahedral cells 2. Such conditions cannot be assigned to boundary region no. 0.
7-18 Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Non-reective Pressure and Stagnation Boundaries

3. Each strip of boundary faces along the circumferential direction must be assigned to a different non-reective region number. However, these regions can have the same boundary conditions. 4. The boundary surface must be delimited by cyclic boundaries along the transverse direction, as shown in Figure 7-6. 5. If N is the number of cells along the circumferential direction, the maximum number of harmonics to be used by the Discrete Fourier Transform algorithm is N/2 -1. The minimum number is 0. 6. To ensure that the analysis runs smoothly, it may be necessary to start the simulation by using standard pressure and stagnation boundary conditions over a number of iterations. This can then be followed by a restart run where the non-reecting boundaries have been applied. 7. At present, certain physical features must not be present in cases containing non-reective boundaries. The excluded features are: (a) (b) (c) (d) (e) (f) (g) Chemical reactions and scalar variables Radiation Reynolds Stress and V2F turbulence models Two-phase ow Moving meshes Liquid lms Free surface and cavitation

8. If boundary conditions are set using a table (see page 7-8), the permissible variable names that may appear in the table and their meaning is as follows: (a) Non-reective pressure boundaries i) PR Pressure (relative static) ii) TE Turbulence kinetic energy or intensity, depending on the Turb. Switch setting iii) ED Turbulence kinetic energy dissipation rate or length scale, depending on the above setting (b) Non-reective stagnation boundaries DCX Direction cosine for U-component of velocity DCY Direction cosine for V-component of velocity DCZ Direction cosine for W-component of velocity PSTAGB Stagnation pressure (relative) TSTAG Stagnation temperature (absolute) TINTB Turbulence kinetic energy or intensity, depending on the Turb. Switch setting vii) TLSCB Turbulence kinetic energy dissipation rate or length scale, depending on the above setting The user must also ensure that the coordinate system used is the same as the coordinate system specied in the Define Boundary Regions panel. i) ii) iii) iv) v) vi)

Version 3.26

7-19

BOUNDARY AND INITIAL CONDITIONS Wall Boundaries

Chapter 7

Wall Boundaries
Introduction STARs implementation of wall boundaries involves a generalisation and extension of the no-slip and impermeability conditions commonly used at such surfaces. Thus, a wall boundary may be defined as: Of the no-slip or slip type. The latter is applicable to inviscid ows (in practice is set to 1030 Pa s). The no-slip boundary conditions for turbulent ow are implemented using one of three methods, as discussed in Chapter 6, Multi-Stream and Conjugate Property Setting, Step 5. Smooth or rough. Moving or stationary. A wall may move within the surface it denes. If motion normal to that surface is desired, use the moving mesh features discussed in Chapter 16, Moving Meshes. Permeable or impermeable to heat and/or mass ow. Resistant or not to heat ux due to a thermal boundary layer or intervening solid material. Radiating or non-radiating (see also Chapter 11).

As with other boundaries, wall boundary values are needed only for variables pertinent to your problem (see also Boundary Region Definition on page 7-6). These are specified via the Define Boundary Regions panel for walls, shown in the example below, and are fully described in the Wall on-line Help topic.

7-20

Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Wall Boundaries

Thermal radiation properties In thermal radiation problems: 1. Values for thermal emissivity, reectivity and transmissivity [dimensionless] are required (see also Chapter 11). These should be typed in the text boxes provided. 2. The thermal absorptivity is calculated as (1- reectivity - transmissivity). 3. The defaults are those for a black body (emissivity equal to 1.0, reectivity and transmissivity equal to 0.0). 4. It is important that the transmissivity value specied at Adiabatic walls is equal to 0.0 Kirchoffs law (emissivity = absorptivity) is not enforced by the solver. For your wall boundary condition to obey Kirchoffs law, you must enter the condition: emissivity = absorptivity = 1 - transmissivity - reflectivity Solar radiation properties In solar radiation problems: 1. External walls must be declared as Exposed or Unexposed to incident radiation, by selecting the appropriate option from the Solar Heating pop-up menu. Note that: (a) This option does not apply to internal walls (i.e. bafes and solid/uid interfaces) (b) The external DTRM method distinguishes between direct and diffuse solar radiation (see topic Solar Radiation). However, the above option affects both of them equally. 2. The thermal resistance of an exposed wall to incident solar radiation is neglected. 3. Walls can be made transparent to incident radiation, in which case a value of transmissivity [dimensionless] should be supplied in the text box provided. Thus, the direct solar radiation received by walls can be (a) absorbed, (b) reected as diffuse radiation, or (c) transmitted. 4. Direct radiation transmitted through transparent walls (e.g. windows), is tracked along the angle of solar inclination (specied via the Solar Radiation option in the Thermal Options panel) until it falls on an obstructing surface. 5. The remaining user input depends on the problem conditions: (a) If only solar radiation is present: i) The reected diffuse radiation is neglected ii) The absorptivity is calculated as (1 transmissivity) (b) If both thermal and solar radiation are present: i) The code treats the two radiation components separately ii) Values of reectivity and transmissivity for each component are
Version 3.26 7-21

BOUNDARY AND INITIAL CONDITIONS Wall Boundaries

Chapter 7

supplied in separate text boxes and the corresponding absorptivity calculated as (1 reectivity transmissivity) iii) Choosing the internal DTRM method for radiation calculations has the effect of making the solar transmissivity equal to the thermal transmissivity. iv) If the FASTRAC method is in use, it is important that the transmissivity value specied at Adiabatic walls is equal to 0.0 The user input required under the various combinations of thermal and/or solar radiation conditions may be conveniently summarised in the table below:
.

Table 7-1: Summary of thermal radiation property requirements Property Condition Emissivity Thermal Thermal & Solar Solar Useful points 1. For stationary mesh cases, only velocities in directions parallel to the wall surface may be specified, e.g. a planar wall can move only within its own plane. For moving mesh cases, all velocity components should in general be specified. 2. Wall function and two-layer models can be used with any kind of mesh. However, for tetrahedral meshes or meshes containing trimmed (polyhedral) cells, it is advisable to create at least one cell layer immediately next to the wall boundary (see Figure 7-7 below). If pro-STARs automatic meshing module is employed for this purpose, use its built-in mesh generation capabilities. If the mesh is imported from a package that lacks these facilities, you must extrude the mesh in a direction normal to the boundary so that the wall is located at the edge of the newly-created, layered structure. 3. The practice recommended above is particularly important for wall boundaries that strongly inuence the character of the ow. 4. If boundary conditions are set using a table (see page 7-8), the permissible variable names that may appear in the table and their meaning is as follows: (a) (b) (c) (d) (e) (f) U U-component of wall velocity V V-component of wall velocity W W-component of wall velocity TORHF Wall temperature (absolute) or heat ux RESWT Wall thermal resistance Scalar_name Mass fraction at the wall; use the scalar species name, e.g. H2O, N2 etc. as the scalar variable name(s) (g) Scalar_name-RSTSC Wall resistance for a given species, e.g.
Version 3.26

Reflectivity Y Y Y N (=0)

Absorptivity N (=1-R-T) N (=1-R-T) N (=1-R-T) N (=1-T)

Transmissivity Y Y Y Y

Exposure N Y Y

Y Y N (=0) N (=0)

7-22

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Bafe Boundaries

H2O-RSTSC, N2-RSTSC, etc. You must also ensure that the coordinate system used is the same as the coordinate system specied in the Define Boundary Regions panel.

Figure 7-7

Example of tetrahedral plus layered mesh structure

Bafe Boundaries
Introduction Baffles are zero-thickness cells within the flow field. They represent solid or porous regions whose physical dimensions are much smaller than the local mesh dimensions, as shown in the example of Figure 7-8.

Figure 7-8

Example model with bafes: duct bend with turning vanes

Baffle cells are normally defined via the Cell Tool, as described in Chapter 3, page 3-46. If no boundary conditions are specified for the baffle surfaces, they are assumed to be smooth, stationary, impermeable, adiabatic walls. If one needs to specify any other conditions, it is necessary to define special boundaries (called
Version 3.26 7-23

BOUNDARY AND INITIAL CONDITIONS Bafe Boundaries

Chapter 7

bafe boundaries) explicitly on the baffle surfaces. These boundaries can then be grouped into regions and the Define Boundary Regions panel can be used to apply the desired conditions, as shown in the example below.

The discussion of porous media in Chapter 10 also applies, in a modified form, to porous baffles. Thus, it is possible to calculate such a flow by formulating the porous media equation in terms of a pressure drop, p , across the baffle. The definition of the baffle resistance coefficients is also adjusted to account for this change. Obviously, it is now necessary to provide only one pair of such coefficients. Setting up models Inputs for baffle regions are very similar to inputs for walls, including a choice between wall functions and the two-layer model (see the Baffle on-line Help topic). There are a few exceptions which are noted below: 1. It is usually possible to impose different boundary conditions on either side of the bafe. As shown in the example dialog above, conditions for Side 1 are supplied rst. It is then necessary to click the Apply button, which displays the Side 2 dialog and a message to enter appropriate parameters for that side. Once this is done, the process should be completed by clicking Apply a second time. 2. The numbering of the sides is based on the manner in which the bafe was dened. Side 1 is the outward normal side as dened by the cross product of
7-24 Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Bafe Boundaries

two vectors pointing from the rst node to the second node and from the rst node to the fourth node, as shown in Figure 7-9.
4 3,3

1 Side 2 2 Side 1

1 Side 2 2 Side 1

Figure 7-9

Numbering convention for various bafe shapes

Another way of determining side numbers is to view the bafe cell and consult the cell denition. If the ordering of the cell vertices is counter clockwise, you are viewing Side 1. 3. The fact that the boundary conditions can be designated separately for each side enables the user to have one side moving and the other stationary or one side isothermal and the other side adiabatic. The conditions can be mixed in any combination with two exceptions: (a) If the thermal boundary condition for Side 1 of the bafe is Conduction, STAR calculates the one-dimensional heat transfer across the bafe based on the local temperature and ow conditions on either side. This choice of boundary condition naturally excludes a different choice for Side 2 and therefore the Wall Heat pop-up menu is deactivated for that side. An exception to this rule occurs when thermal radiation is switched on, in which case radiation properties for both sides of the bafe need to be supplied. (b) In a similar way, if the bafe is porous, only one set of resistance coefcients is needed. The required values are supplied as input for Side 1. Since these naturally apply to the entire bafe, no input is necessary for Side 2. Specific input required for baffles is fully described in the STAR GUIde Baffle Help topic. The user should supply values first for Side 1 and then for Side 2 (with the exceptions noted above). Thermal radiation properties In thermal radiation problems: 1. Values for thermal emissivity, reectivity and transmissivity [dimensionless] are required (see also Chapter 11). These should be typed in the text boxes
Version 3.26 7-25

BOUNDARY AND INITIAL CONDITIONS Bafe Boundaries

Chapter 7

provided. 2. The absorptivity is calculated as (1 reectivity transmissivity). 3. The defaults are those for a black body (emissivity equal to 1.0, reectivity and transmissivity equal to 0.0). 4. It is important that the transmissivity value specied at adiabatic (Zero Flux), xed temperature (Fixed), or xed ux (Flux) bafes is equal to 0.0 The effect of baffle transmissivity is taken into account during the view factor calculations. Therefore, any changes in transmissivity during the run (for example, as part of a transient calculation) will activate beam tracking and a re-calculation of view factors. Note that use of transparent baffles is restricted to surface-exchange radiation only and thus excludes participating media radiation. Note also that Kirchoffs law (emissivity = absorptivity) is not enforced by the solver. For your baffle boundary condition to obey Kirchoffs law, you must enter the condition: emissivity = absorptivity = 1 - transmissivity - reflectivity Solar radiation properties In solar radiation problems, user input depends on the problem conditions: 1. If solar radiation only is present: (a) It is assumed to be completely absorbed by the bafe (i.e. absorptivity = 1) (b) The reected diffuse radiation is neglected (c) As a result, no user input is required 2. If both thermal and solar radiation are present: (a) Values for emissivity, reectivity and transmissivity [dimensionless] are supplied separately for each radiation component (b) Choosing the internal DTRM method for radiation calculations has the effect of making the solar transmissivity equal to the thermal transmissivity. Therefore, only a reectivity value needs to be supplied for the solar component. (c) If the FASTRAC method is in use, it is important that the transmissivity value specied at adiabatic (Zero Flux), xed temperature (Fixed), or xed ux (Flux) bafes is equal to 0.0 The user input required under the various combinations of thermal and/or solar radiation conditions may be conveniently summarised in the table below:

7-26

Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Symmetry Plane Boundaries


.

Table 7-2: Summary of thermal radiation property requirements Property Condition Emissivity Thermal Thermal & Solar Solar Useful points 1. For stationary mesh cases, only velocities in directions parallel to the baffle surface may be specified, e.g. a planar baffle can move only within its own plane. For moving mesh cases, all velocity components should in general be specified. 2. If boundary conditions are set using a table (see page 7-8), the permissible variable names that may appear in the table and their meaning is as follows: (a) (b) (c) (d) (e) (f) U U-component of bafe velocity V V-component of bafe velocity W W-component of bafe velocity TORHF Bafe temperature (absolute) or heat ux RESWT Bafe thermal resistance Scalar_name Mass fraction; use the scalar species name, e.g. H2O, N2 etc. as the scalar variable name(s) (g) Scalar_name-RSTSC Bafe resistance for a given species, e.g. H2O-RSTSC, N2-RSTSC, etc. Y Y N (=0) N (=0) Reflectivity Y Y Y N (=0) Absorptivity N (=1-R-T) N (=1-R-T) N (=1-R-T) N (=1) Transmissivity Y Y Y N (=0) Exposure N N N

You must also ensure that the coordinate system used is the same as the coordinate system specied in the Define Boundary Regions panel.

Symmetry Plane Boundaries


Symmetry boundaries are used for two purposes: 1. To reduce the size of the computational mesh by placing the boundary along a plane of geometrical and ow symmetry. 2. To approximate a free-stream boundary. No user input is required beyond definition of the boundary location. The quantities set to zero at the boundary are: The normal component of velocity The normal gradient of all other variables

Cyclic Boundaries
Introduction Cyclic boundaries impose a repeating or periodic flow condition on a pair of
Version 3.26 7-27

BOUNDARY AND INITIAL CONDITIONS Cyclic Boundaries

Chapter 7

geometrically identical boundary regions, numbers 1 and 2 in the example of Figure 7-10. Selected scalar variables are forced to be equal at corresponding faces on the two regions. As shown in Figure 7-10, velocity components are also equalised in a common local coordinate system specified by the user. Such boundaries thus serve to reduce the size of the computational mesh. This is illustrated by the example of Figure 7-11, showing a cascade of repeating baffles.

U2 V1 V2 U1

Cyclic boundary 2 YL U1 = U2 V1 = V2 W1 = W2 L RL

Cyclic boundary 1

XL

Local cylindrical system

Figure 7-10

Cyclic conditions dened using a local coordinate system


Cyclic boundary 1

Inlet

Cyclic boundary 2

Figure 7-11

Regular cyclic boundaries with integral match

Setting up models Cyclic boundaries are defined using STAR GUIde panels in the following multistage process:
7-28 Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Cyclic Boundaries

1. In panel Create Boundaries, use tab Regions to set up a pair of regions, of identical size and shape, and designate them as cyclic 2. In tab Cyclics, specify a number of parameters that enable them to be matched to each other geometrically and which take into account the mesh characteristics at either end. This involves the following considerations: (a) Specication of suitable coordinate increments (offsets) that allow one member of the pair to be located if one starts at the other member. A local coordinate system in which the regions are matched is also specified. (b) Whether the regions form a regular cyclic (as in Figure 7-11) or an anticyclic pair (as in Figure 7-12). The latter appears in problems where all flow variable profiles have to be reversed in a specified direction of the matching coordinate system. This operation also reverses the coordinate value of each boundary face in that direction before adding the corresponding offset. Thus, placing the coordinate system origin on an axis of symmetry and choosing its location carefully can eliminate the need for offsets, as in the anticyclic system shown in Figure 7-12.
Cyclic boundary 1

Local Cartesian coordinate system

Cyclic boundary 2

Figure 7-12

Partial anticyclic boundaries with integral match

(c) Whether there is a one-to-one correspondence between boundary faces on either side of the cyclic pair, as in the examples shown in Figure 7-11 and Figure 7-12. This requires a so-called integral matching operation. If no such correspondence exists, typically because one side is more nely meshed than the other (as in Figure 7-13), the system requires an arbitrary matching operation. The latter is similar to matching cell faces on either side of an interface between mesh blocks (see Chapter 4, Integral and arbitrary connectivity). It thus involves matching of so-called master boundary faces on one side of the cyclic pair with slave faces on the other side. 3. In tab Cyclics, nish up by performing the geometric matching operation between boundary faces on either side of the pair to form so-called cyclic sets. Note that the same operation may also be performed manually, whereby each
Version 3.26 7-29

BOUNDARY AND INITIAL CONDITIONS Cyclic Boundaries

Chapter 7

cyclic set and the boundaries contributed by each cyclic pair member are named explicitly using command CYCLIC. The list of cyclic pairs can also be extended with the CYGENERATE command, beginning from a pre-existing starting set.

Figure 7-13

Cyclic boundaries with arbitrary match

4. In panel Dene Boundary Regions, specify the physical cyclic boundary conditions that exist between the members of the pair, as shown below:

These can be of two types: (a) Ordinary cyclic conditions, whereby all ow variable values on one member are matched with the corresponding values on the other member. (b) Partial cyclic conditions, whereby the matching process is subject to an additional constraint of either a prescribed pressure drop or a xed mass ow rate across the cyclic pair. An example of a xed mass ow rate system, representing one half of a continuous loop ow system, is shown in Figure 7-12. For thermal problems, the bulk mean temperature on the inow side of the cyclic pair is also required.
7-30 Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Cyclic Boundaries

Note that: (a) PROSTAR distinguishes between the inlet and outlet sides of a partially cyclic pair by assigning a pressure drop or ow rate to one member that is equal in magnitude but of opposite sign to that for the other member. The sign convention is as follows: i) Pressure Drop + Inlet Outlet ii) Flow rate + Outlet Inlet (b) Partial cyclic conditions can only be applied to boundaries matched in Cartesian coordinates (c) Such conditions are not available for chemical species mass fractions and cannot be used in variable-density ows (d) Arbitrary cyclic matching (see page 7-29 above) is not allowed for partial cyclic conditions Cyclic set manipulation All currently defined cyclic sets are shown in the Cyclic Set List below:

Commands:

CYLIST

CYDELETE

CYCOMPRESS

The list may be displayed by choosing Lists > Cyclic Sets from the main menu bar. The sets are numbered and listed in numerically ascending order, together with their constituent master and slave boundary numbers for arbitrarily matched regions (see page 7-29 above). There is a choice of showing all cyclic sets (click button Show All Cyclic Sets) or just those with at least one member (master or slave boundary) in the current boundary set (click button Show Cyclic Sets with Boundaries in Bset Only). Items in the second category are marked by asterisks in the Bset column. To select cyclic sets from the list:
Version 3.26

For single items, click the required set number. For two or more items in sequence, click the rst set you want to select, press
7-31

BOUNDARY AND INITIAL CONDITIONS Free-stream Transmissive Boundaries

Chapter 7

and hold down the Shift key and then click the last set in the group. Once the desired sets are selected, the following operations are possible: Deletion click on the Delete button. Compression click on the Compress button. This involves the elimination of all deleted cyclic sets and renumbering of the remaining ones.

A third operation, for validating arbitrarily matched cyclic boundaries, is implemented in the Check Everything panel. The operation checks that all sets in a given range exist and reference arbitrarily-matched cyclic regions; there is overlap between boundaries on the two sides of the cyclic set; the overlapping areas from either side match up.

All checks are performed to within a specified tolerance.

Free-stream Transmissive Boundaries


Introduction This type of boundary may be used only in models involving supersonic free streams where the working fluid is an ideal gas. The facility enables shock waves generated in the interior of the solution domain to be transmitted, without reflection, through the boundary to the wider region (free stream) surrounding the domain. Flow can be out of the solution domain (compression waves) or into the solution domain (expansion waves). In either case, boundary values of scalar variables are extrapolated from the solution domain interior. In the case of turbulent inflow (expansion waves), the turbulence quantities have to be specified as part of the user input. To set up boundaries of this kind, you need to: 1. Decide on an appropriate location for the boundary, preferably parallel to the main (supersonic) stream. 2. Supply values in the Define Boundary Regions panel for all free-stream properties, as shown in the example below. The required input is fully described in the Free-stream Transmissive Boundary on-line Help topic.

7-32

Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Free-stream Transmissive Boundaries

STAR calculates the magnitude and direction of the flow at the boundary as part of the analysis, based on the simple wave theory given in [3] and [4]. Useful points 1. A value of temperature at the boundary is obligatory. The user must therefore ensure that temperature calculations are activated, via the Thermal Models panel, before dening the boundary conditions. 2. Boundary values for turbulence in streams using a Reynolds Stress model may be specied solely in terms of k and instead of Reynolds Stress components. If this option is chosen, turbulence conditions at the boundary are assumed to be isotropic. 3. To obtain a stable/convergent solution for tetrahedral meshes or meshes containing trimmed (polyhedral) cells, it is necessary to create at least two cell layers immediately next to the boundary (see Figure 7-7 on page 7-23). If pro-STARs automatic meshing module is employed for this purpose, use its built-in mesh generation capabilities. If the mesh is imported from a package that lacks these facilities, you must extrude the mesh in a direction normal to the boundary and then shift the boundary location to the edge of the newly-created, layered structure. 4. Boundary conditions specied in a table will be applied only if uid is entering the solution domain from the outside. If this is not the case, i.e.the ow is parallel to the boundary or crossing it from inside the domain, boundary values will be extrapolated from interior values and the table data will not be used. 5. If boundary conditions are set using a table (see page 7-8), the permissible variable names that may appear in the table and their meaning is as follows:
Version 3.26 7-33

BOUNDARY AND INITIAL CONDITIONS Transient-wave Transmissive Boundaries

Chapter 7

(a) (b) (c) (d) (e) (f)

UINF U-component of velocity VINF V-component of velocity WINF W-component of velocity PINF Pressure (relative) TINF Temperature (absolute) TEINF Turbulent kinetic energy or intensity, depending on the Turb. Switch setting (g) EDINF Turbulent kinetic energy dissipation rate or length scale, depending on the Turb. Switch setting You must also ensure that the coordinate system used is the same as the coordinate system specied in the Define Boundary Regions panel.

Transient-wave Transmissive Boundaries


Introduction This type of boundary may be used only in transient, compressible ows where the working fluid is an ideal gas. It enables transient waves to leave the solution domain without reflection. STAR uses the simple wave theory to calculate conditions behind the wave and to specify such conditions at the boundaries. To set up boundaries of this kind, you need to: 1. Decide on an appropriate location for the boundary 2. Supply values in the Define Boundary Regions panel for all dependent variables, representing conditions outside the boundary (at infinity). The required input is fully described in the Transient-wave Transmissive Boundary on-line Help topic.

7-34

Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Transient-wave Transmissive Boundaries

STAR-CD calculates the magnitude and direction of the flow at the boundary as part of the analysis, based on the transient wave theory given in [3] and [4]. Useful points 1. A value of temperature at the boundary is obligatory. The user must therefore ensure that temperature calculations are activated, via the Thermal Models panel, before dening the boundary conditions. 2. Boundary values for turbulence in streams using a Reynolds Stress model may be specied solely in terms of k and instead of Reynolds Stress components. If this option is chosen, turbulence conditions at the boundary are assumed to be isotropic. 3. To obtain a stable/convergent solution for tetrahedral meshes or meshes containing trimmed (polyhedral) cells, it is necessary to create at least two cell layers immediately next to the boundary (see Figure 7-7 on page 7-23). If pro-STARs automatic meshing module is employed for this purpose, use its built-in mesh generation capabilities. If the mesh is imported from a package that lacks these facilities, you must extrude the mesh in a direction normal to the boundary and then shift the boundary location to the edge of the newly-created, layered structure. 4. Boundary conditions specied in a table will be applied only if uid is entering the solution domain from the outside. If this is not the case, i.e.the ow is parallel to the boundary or crossing it from inside the domain, boundary values will be extrapolated from interior values and the table data will not be used. 5. If boundary conditions are set using a table (see page 7-8), the permissible
Version 3.26 7-35

BOUNDARY AND INITIAL CONDITIONS Riemann Boundaries

Chapter 7

variable names that may appear in the table and their meaning is as follows: (a) (b) (c) (d) (e) (f) UINF U-component of velocity VINF V-component of velocity WINF W-component of velocity PINF Pressure (relative) TINF Temperature (absolute) TEINF Turbulent kinetic energy or intensity, depending on the Turb. Switch setting (g) EDINF Turbulent kinetic energy dissipation rate or length scale, depending on the above setting

You must also ensure that the coordinate system used is the same as the coordinate system specied in the Define Boundary Regions panel.

Riemann Boundaries
Introduction This type of boundary is typically employed in external aerodynamics simulations and may be used only if the working fluid is an ideal gas. It enables weak pressure waves to leave the solution domain without reflection and is valid for both steady-state and transient problems. To set up boundaries of this kind, you need to: 1. Decide on an appropriate location for the boundary 2. Supply values in the Define Boundary Regions panel for all dependent variables, representing conditions outside the boundary (at infinity). The required input is fully described in the Riemann Boundary Help topic.

7-36

Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Riemann Boundaries

STAR-CD calculates the magnitude and direction of the flow at the boundary as part of the analysis, based on the Riemann invariant theory given in [7]. Useful points 1. Check that the density of the stream to which such a boundary belongs is set to Ideal-f(T,P) 2. Boundary values for turbulence in streams using a Reynolds Stress model may be specied solely in terms of k and instead of Reynolds Stress components. If this option is chosen, turbulence conditions at the boundary are assumed to be isotropic. 3. A value of temperature at the boundary is obligatory. The user must therefore ensure that temperature calculations are activated, via the Thermal Models panel, before dening the boundary conditions. 4. To obtain a stable/convergent solution for tetrahedral meshes or meshes containing trimmed (polyhedral) cells, it is necessary to create at least two cell layers immediately next to the boundary (see Figure 7-7 on page 7-23). If pro-STARs automatic meshing module is employed for this purpose, use its built-in mesh generation capabilities. If the mesh is imported from a package that lacks these facilities, you must extrude the mesh in a direction normal to the boundary and then shift the boundary location to the edge of the newly-created, layered structure. 5. Boundary conditions specied in a table will be applied only if uid is entering the solution domain from the outside. If this is not the case, i.e.the ow is parallel to the boundary or crossing it from inside the domain, boundary values will be extrapolated from interior values and the table data
Version 3.26 7-37

BOUNDARY AND INITIAL CONDITIONS Attachment Boundaries

Chapter 7

will not be used. 6. If boundary conditions are set using a table (see page 7-8), the permissible variable names that may appear in the table and their meaning is as follows: (a) (b) (c) (d) (e) (f) UINF U-component of velocity VINF V-component of velocity WINF W-component of velocity PINF Pressure (relative) TINF Temperature (absolute) TEINF Turbulent kinetic energy or intensity, depending on the Turb. Switch setting (g) EDINF Turbulent kinetic energy dissipation rate or length scale, depending on the above setting (h) Scalar_name Mass fraction; use the scalar species name, e.g. H2O, N2 etc. as the scalar variable name(s) You must also ensure that the coordinate system used is the same as the coordinate system specied in the Define Boundary Regions panel.

Attachment Boundaries
Attachment boundaries are used for the following two purposes: 1. To dene the interface between cells that may be connected or disconnected from each other (see Chapter 16, Cell Attachment and Change of Fluid Type). 2. To dene the interface between mesh blocks that slide past each other, either in an integral or arbitrary manner (see Regular sliding interfaces on page 16-19 and Arbitrary Sliding Interfaces on page 16-22).

Two input parameters are needed: A local coordinate system in which the boundaries are to be matched An alternate boundary region number

The second parameter is required for cell layer attachment cases and serves to maintain appropriate boundary conditions in the solution domain if the cells on either side of the interface become disconnected. The alternate boundary region must be of wall or inlet type. Examples of cases requiring attachment boundaries are given in Chapter 16.
7-38 Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Radiation Boundaries

Useful point 1. To obtain a stable/convergent solution for meshes containing trimmed (polyhedral) cells, it is necessary to create at least two cell layers immediately next to the boundary (see Figure 7-7 on page 7-23). If Pro*am is employed, use its built-in mesh generation capabilities for this purpose. If the mesh is imported from a package that lacks such facilities, you must extrude the mesh in a direction normal to the boundary and then shift the boundary location to the edge of the newly-created, layered structure.

Radiation Boundaries
Radiation boundaries are used for the purpose of separating a region of your model where radiation effects are important from other regions where such effects are negligible. This type of boundary only influences radiation calculations and is completely transparent to the fluid flow and non-radiative heat transfer in your model.

Two input parameters are needed (see also Chapter 11): 1. The boundary radiation temperature [K], normally set to a value close to the expected temperature in the surrounding area 2. The boundary surface emissivity [dimensionless], normally set to 1.0 The location and properties of such a boundary should be chosen so that: Radiant energy passing through it escapes to the outside world with minimal back-radiation into the region where it emanated. The escaped radiation should be low enough not to inuence the outside regions. Its presence does not adversely affect the accuracy of the calculations inside the radiative sub-domain(s) If a coupled-cell interface exists between the radiative and non-radiative sub-domains, the boundary must be placed on the cells that are inside the radiative sub-domain.

Phase-Escape (Degassing) Boundaries


This type of boundary appears exclusively in Eulerian multi-phase problems (see Chapter 14 of this volume) and represents a degassing free-surface bounding a two-phase system of gas bubbles in a liquid, corresponding to the dispersed and
Version 3.26 7-39

BOUNDARY AND INITIAL CONDITIONS Internal Regions

Chapter 7

continuous phases, respectively. The boundary conditions applied to each phase are as follows: 1. For the continuous phase, the boundary acts like a slip wall, allowing the liquid to ow parallel to the boundary surface without friction 2. For the dispersed phase, the boundary acts like an opening allowing bubbles to escape into the surrounding medium, unless retained within the solution domain by the drag forces acting on them. No further user input is required on the Define Boundary Regions panel. Note that only one boundary of this type should be present in your model.

Internal Regions
These are arbitrary surfaces, defined in the same way as ordinary boundaries but placed on any cell faces within the solution domain so as to form internal surfaces. They are used purely for monitoring engineering data such as mass flux (see panel Monitor Boundary Behaviour) so no further user input is required on the Define Boundary Regions panel. Internal regions do not affect the flow field in any way; STAR simply calculates the monitored data values at the specified regions surface and stores them for subsequent display as a function of time or number of iterations (see panel Engineering Data). The same monitored data values are available at internal regions as at an open boundary region, except that: Item Heat Flux is not available Field values are taken from the neighbouring cell centres and are not interpolated to the boundary Item Enthalpy In/Out is based on convection only, so it will be zero in solid materials

Each face of an internal region belongs to a neighbouring cell, such that the mass flux is defined as being positive when it leaves this cell through the face. This in turn determines the faces orientation and, for consistent calculation of the total mass flux through the region, it is important that all its faces are oriented the same way. The choice of which cell an internal region face belongs to is made when that face is defined. Commands BFIND, BCROSS, and BZONE do this by picking a cell face, as do their associated GUI operations, and are therefore suitable for this purpose. On the other hand, commands BDEF, BGEN and BDX should not be used to define internal region faces as they do not involve the explicit selection of a cell face and hence the orientation of the internal region face is indeterminate. Caution should also be exercised when generating internal regions automatically, for example by cell refinement. When visualising internal regions, their orientation is indicated using an arrow normal to the boundary and whose direction indicates the direction of positive flux, as shown in Figure 7-14 below.

7-40

Version 3.26

Chapter 7

BOUNDARY AND INITIAL CONDITIONS Boundary Visualisation

Figure 7-14

Internal region display

Boundary Visualisation
As described in Boundary set selection facilities on page 7-4, boundaries can be collected into sets. The currently defined set can then be displayed on top of the calculation mesh by choosing Cell Plot Display Option Bound from the main window and re-plotting. The cell faces representing the boundaries will be marked by distinctive fill patterns and colours, characteristic of the boundary type represented. Boundary faces will be superimposed on any kind of plot already displayed on the screen other than a section plot. Note that the boundary display option may also be selected by choosing Plot > Cell Display > Boundaries from the menu bar. Alternatively, you may type commands BDISPLAY, ON or CDISPLAY, BREGION in the I/O window.

Flow Field Initialisation


Steady-state problems User action depends on whether the solution is to start from the initial state of the model (initial run) or to continue from a previously computed solution (restart run). Initial runs Initial conditions for flow field variables are assigned in STAR-GUIdes Thermophysical Models and Properties folder: For uid eld variables, use panel Initialisation in the Liquids and Gases sub-folder. Note that there is a separate Turbulence tab for initializing turbulence parameters. If this is done by specifying the initial turbulence intensity I and length scale l, the turbulence kinetic energy k and dissipation rate are computed as follows:
7-41

Version 3.26

BOUNDARY AND INITIAL CONDITIONS Flow Field Initialisation

Chapter 7

k = 1.5 U I k = ------l
1.5

2 2

(7-2) (7-3)

where U is the initial velocity magnitude. For turbulence models other than the k- type, the turbulence scales ( for k- models or t for the Spalart-Allmaras model) are computed automatically. For chemically reacting ows, you may also need to use panel Initialisation in the Additional Scalars sub-folder to specify initial mass fractions for chemical species. In conjugate heat transfer problems, another panel also called Initialisation in the Solids sub-folder can be used to specify initial temperatures in solid materials. Restart runs Various options for this operation are available in panel Analysis (Re)Start within the Analysis Preparation/Running folder. If option Standard Restart is chosen, the solution from a previous run serves as the starting point for the current run. If Initial Field Restart is chosen in this panel in combination with one of the Code Initialization options in the Initialisation panel, the built-in procedure only corrects the mass fluxes to satisfy continuity. The Initial Field Restart option should be chosen if any change has been made to the boundary conditions or reference quantities (pressure and/or temperature). Special considerations apply to cases where the restart also involves a change in the mesh configuration, typically a refinement of a coarser starting mesh. These are covered in Chapter 8, Solution Control with Mesh Changes. Transient problems In transient problems, all flow field variables should be given the correct values for the problem at hand. Depending on the physical conditions being modelled, this can be done in one of the following ways: 1. Specify uniform values select option Manual Initialization in the Initialisation panel and option Constant in the Values pop-menu. Type values for each variable in the text boxes provided. Turbulence parameters, scalar mass fractions and solid temperatures may be initialised as described in section Initial runs above for steady-state cases. 2. Set values through a user-supplied subroutine select option Manual Initialization in the Initialization panel and option User in the Values pop-menu of each relevant tab. Specify the required distributions in subroutine INITFI. 3. Read in a previously computed distribution that corresponds to the desired setting select an option from the Analysis (Re)Start panel (usually Initial Field Restart plus one of the options in the Initial Field Restart pop-up menu depending on the problem at hand). Option Standard Restart should be chosen to start the analysis from a previously computed steady-state solution. This option must also be used for all moving mesh cases.

7-42

Version 3.26

Chapter 8

CONTROL FUNCTIONS Introduction

Chapter 8

CONTROL FUNCTIONS
At this stage of modelling, the following tasks should have been completed: 1. Mesh set up 2. Fluid property and thermouid model specication 3. Denition of boundary type and location The penultimate task before a STAR analysis run is to set the parameters that control that run. This consists of setting various parameters that affect the progress of the numerical solution algorithm used by STAR; specifying the type and amount of run-time output and post-processing data.

Introduction

The user should also decide whether the problem is steady-state or transient so as to perform the appropriate operations for the above tasks.

Analysis Controls for Steady-State Problems


Solution controls Solution control parameters have a strong influence on the progress of the analysis, so it is important to have a basic understanding of their significance and effect during a run. You are therefore advised to refer to Chapter 7 in the Methodology volume for a detailed discussion of under-relaxation and other solution control topics. STAR-CD offers two alternatives for calculating steady-state solutions: Conventional approach uses an iterative method employing underrelaxation factors Pseudo-transient approach under-relaxation is replaced by time marching to the converged solution in fixed-length time steps. Note, however, that an under-relaxation factor (default value 0.2) is still used on the pressure equation. The pseudo-transient solution mode can be usefully employed in cases such as high-speed compressible flow where STAR-CDs built-in initialisation procedure fails to produce a good initial flow field. It is sometimes necessary to solve such problems using a truly transient solution method, in which case the Default (single-transient) solution modeapproach described later in this chapter should be adopted.

The task of setting up solution controls for either of these methods can be divided into the following steps: Step 1 Start up the STAR GUIde system and then define the type of problem you are solving by selecting Steady State from the Time Domain pop-up menu in the Select Analysis Features panel Step 2 Go to the Solution Controls folder and open the Solution Method panel. From the pop-up menu at the top of the panel select:
Version 3.26 8-1

CONTROL FUNCTIONS Analysis Controls for Steady-State Problems

Chapter 8

Steady State for conventional steady-state runs. Also choose the numerical algorithm to be used (see topic Steady-State Solution). In every case, specify the maximum residual error tolerance (i.e. maximum acceptable level of remaining error in the solution), plus any additional parameters required by the algorithm you have chosen. Pseudo-Transient for pseudo-transient runs. Select the numerical algorithm to be used (see topic Pseudo-Transient Solution), plus any additional parameters required by the algorithm you have chosen. The maximum residual error tolerance (i.e. maximum acceptable level of remaining error in the solution) should also be specified; the normalised residuals are displayed on the screen and also saved on le case.run, as in ordinary steady-state runs. Step 3 In the Primary Variables panel, inspect the solution status for flow variables and material properties (see topic Equation Status) to confirm that the right variables will be solved for. Step 4 Check the Relaxation and Solver Parameters (under-relaxation factors, number of calculation sweeps and residual error tolerances for each solution variable). Step 5 Choose one of the available Differencing Schemes. Note, however, that in STAR-HPC runs the QUICK and SFCD differencing schemes revert by default back to UD at the inter-processor boundaries. This means that results will be slightly different as compared with those from a sequential run. It is suggested that other, more suitable higher-order differencing schemes now available in STAR-CD, such as LUD and MARS, should be used with STAR-HPC if high spatial discretisation accuracy is required. Output controls Having set the solution control parameters, the next task is to choose the type and volume of output from the forthcoming STAR run. The bulk of this output consists of solution variable values at cell centroids. Output controls can be applied by going to the Output Controls folder in the STAR GUIde system and following the steps below: Step 6 Consider whether detailed printout on the solution progress is required and if necessary specify the appropriate settings in the Monitor Numeric Behaviour panel. If you wish to use the alternative residual normalisation method described in the Methodology volume (Chapter 7, Completion tests) issue command ANORM from the pro-STAR I/O window. Step 7 Decide whether you want to follow the progress of the analysis by generating various types of monitoring data at every iteration. If so, go to the Monitor Engineering Behaviour sub-folder and use one or both of the following panels:
8-2

Monitor Boundary Behaviour select one or more boundary regions and


Version 3.26

Chapter 8

CONTROL FUNCTIONS Analysis Controls for Steady-State Problems

the type of monitoring information to be generated for them Monitor Cell Behaviour select one or more sub-domains, dened in terms of cell sets, and the type of monitoring information to be generated for them

The requested data are stored in special files (case.erd and case.ecd for boundary and cell data, respectively), from where they may be displayed as pro-STAR graphs at the end of the analysis (see panel Engineering Data in the Post-Processing folder) or read by an external post-processing package. Step 8 Specify the manner of saving mesh data for use in post-processing and/or restart runs via the Analysis Output panel (Steady state problems). If desired, go to the Additional Output Data section to select any wall data to be included in the solution (.pst) file. This is important, as these settings will affect the availability of data for post-processing. You can also select what wall data are to be printed (i.e. displayed on your screen) and stored in the .run file at the end of the run. For both post and print control parameters, it is up to you to check the default settings and change them, if necessary, according to the type of problem being analysed. Other controls Step 9 Go to the Sources sub-folder and inspect the Source Terms panel to see if any additional information (such as extra source terms for flow variables) is needed to completely describe your problem. Note that STAR-CD provides special switches and constants for activating various beta-level features in the code, or for turning on calculation procedures designed for debugging purposes. These are found in the Switches and Real Constants panel and are normally used only after consultation with CD adapco. An alternative way of performing this function is to enter special debugging instructions into the Extended Data panel, accessible from the Utilities menu in the main window (or issue command EDATA). Step 10 Go to the Analysis Preparation/Running folder and open the Set Run Time Controls panel: For conventional steady-state runs, enter the maximum number of iterations (or calculation loops, see Steady state problems). For pseudo-transient runs, specify the time step size and the maximum number of time steps. A variable step magnitude may also be specied via user subroutine DTSTEP, by selecting option User in the Time Step Option pop-up menu (see Steady state problems (Pseudo-transient)). Step 11 To complete the controls specification, you need to decide whether the analysis is to start from initial conditions or restart from a previous run. Set the appropriate solution controls in the Analysis (Re)Start panel.

Version 3.26

8-3

CONTROL FUNCTIONS Analysis Controls for Transient Problems

Chapter 8

Analysis Controls for Transient Problems


Transient problems can be divided into three groups: 1. Systems whose ow, thermal and chemical elds are originally in thermodynamic equilibrium and which are subjected to a set of non-equilibrium boundary conditions at the start of the calculation. The systems response is to gradually approach a new steady state. Such problems can be analysed in STAR either in the steady-state or transient mode; some buoyancy driven ows are best run in transient mode (see also Chapter 6, Buoyancy-driven Flows and Natural Convection). 2. Systems whose boundary conditions change in a prescribed fashion, e.g. due to opening and shutting of ow valves. 3. Inherently unstable systems that never reach a steady state and exhibit either (a) a cyclic (or periodic) behaviour, as in some vortex shedding problems, or (b) chaotic behaviour, as in some buoyancy driven ows. Procedures for solving all of these problem types are described below. Default (single-transient) solution mode This procedure, referred to as the single-transient solution mode in earlier versions of STAR-CD, is the quickest and easiest way of setting up transient problems. It is also suitable for steady-state compressible or buoyancy driven flows that require close coupling between the momentum, enthalpy, chemical species and density equations. Other important characteristics are: It is fully supported by pro-STARs STAR GUIde interface It can accommodate problems with time-varying boundary conditions through the use of tables (see Chapter 2, Table Manipulation) Changes in boundary region type (e.g. a pressure boundary changing to a wall boundary) are also possible but require stopping and restarting the analysis at those times when such changes occur

The single-transient mode provides an alternative to the Load-step based solution mode discussed below, by eliminating the need for a transient history file and explicit load step definitions. It is in fact equivalent to performing a single load step, hence the name single transient. To use this approach, follow the procedure below. Solution controls Step 1 Start up the STAR GUIde system and then define the type of problem you are solving by selecting Transient from the Time Domain pop-up menu in the Select Analysis Features panel. Step 2 Go to the Solution Controls folder and open the Solution Method panel. Select appropriate parameters for the PISO numerical solution algorithm (this is the only algorithm available in this case, see topic Transient problems). Also select the time differencing scheme required.

8-4

Version 3.26

Chapter 8

CONTROL FUNCTIONS Analysis Controls for Transient Problems

Step 3 Display the Primary Variables panel and check that the solution parameter settings are appropriate for your case. If there is any need for alterations, consult Transient calculations with PISO on page 1-15 of this volume for information and advice. Output controls The output to be produced by a transient run is chosen in a similar manner to that for steady-state problems. However, since the volume of data that can be generated is potentially very large, additional controls are provided to limit the amount to what is absolutely essential. Step 4 Go to the Output Controls sub-folder and open the Monitor Numeric Behaviour panel. Select an option for displaying and storing information on the solution progress in the form of either global rates of change of flow variables or normalised residuals. The latter is appropriate when analysing problems that are essentially steady-state in character. Therefore, the solution is deemed to have reached a steady state and the analysis stops if the residuals are to fall below the specified maximum residual error tolerance (see also Chapter 7, Completion tests in the Methodology volume). Step 5 Open the Analysis Output panel (Transient problems). 1. In the Post tab, specify control parameters for the wall data that will be written to the solution (.pst) le and/or printed and saved in the .run le at the end of the run, in the same manner as for steady-state problems. 2. In the Transient tab, specify control parameters for data destined for: (a) The transient post data (.pstt) le. The difference between this and the usual solution (.pst) le is as follows: i) File case.pst only contains analysis results for the last time step. These form a complete set of all cell data relevant to the current problem and the le can therefore be used to restart the analysis. ii) File case.pstt, on the other hand, contains user-selected data, such as cell pressures, wall heat uxes, etc. written at predetermined points in time. These are dened by the parameters entered in the Transient tab. The file is therefore suitable for post-processing runs but cannot be used to restart the analysis. (b) The data display appearing on your screen at predetermined points in time (not necessarily the same as the ones specied for the post data). This information is also saved in the run history (.run) le. The Transient tab control parameters must be used with care since they could cause excessively large data files to be written. On the other hand, they must not be used too sparingly as they may fail to record important data. If the analysis is split into several stages, as is usually the case with large models and/or lengthy transients, it is advisable to give the .pstt file produced at the end of each stage a unique file name. This helps to spread the output produced amongst several files
Version 3.26 8-5

CONTROL FUNCTIONS Analysis Controls for Transient Problems

Chapter 8

and thus eases the data management and manipulation processes. Step 6 Specify any other output controls required, e.g. whether you want to generate monitoring data at every time step, in the same manner as for steady-state problems (see Analysis Controls for Steady-State Problems, Step 7). Other controls Step 7 Specify any other necessary controls in the Sources and Other Controls sub-folders, in the same manner as for steady-state problems. Step 8 Go to the Set Run Time Controls panel (Analysis Preparation folder) and specify: 1. The analysis run time 2. The method of calculating the time step size and the total number of time steps, see Transient problems Step 9 To complete the controls specification, you need to decide whether the analysis is to start from initial conditions or restart from a previous run. Set the appropriate solution controls in the Analysis (Re)Start panel. Load-step based solution mode This older procedure allows for all intricacies in the transient problem specification, including variable boundary conditions. However, it is more complex to set up and maintain as it requires definition of so-called load steps (see Load step characteristics below) and their storage in special transient history files. Other important characteristics are: It is driven by its own special user interface, the Advanced Transients dialog, accessed by selecting Modules > Transient in pro-STARs main menu bar Time variations may be specied only in terms of load steps, as described in the sections to follow; the use of tables is not permissible It is part of the recommended procedure for setting up moving-mesh cases dened via pro-STAR events (see Chapter 16, Moving Meshes)

Load step characteristics For problems involving changing boundary conditions, the main considerations are: To dene the variation in boundary conditions as a series of events which occur over a period of time. These events, called load steps in pro-STAR terminology, represent a transition from one state of the boundary conditions to another with increasing time. To divide each load step into several time increments, or time steps.

The allowable variations in the boundary conditions are as follows: 1. Step where the boundary values change discontinuously from one state to the next, see Figure 8-1(a).
8-6 Version 3.26

Chapter 8

CONTROL FUNCTIONS Analysis Controls for Transient Problems

2. Ramp where the values change linearly between the state at the beginning of the load step to that at the end, see Figure 8-1(b). 3. Function of time where the variation is arbitrary and is prescribed via a user subroutine. Any combination of load step types can be specified, as shown in Figure 8-1(c)(d).
Boundary condition value Boundary condition value

S 1

S 2 (a)

S 3

S 4 Time

R 1

R 2

R 3

R 4 (b)

R 5 Time

Boundary condition value

Boundary condition value

S 1

S 2

R 3 (c)

R 4

R 5 Time

R 1

R 2

R 3

R 4 (d)

S 5

S 6 Time

Figure 8-1

Representation of boundary value changes by load steps

The difference between the available alternatives is illustrated in Figure 8-2 for load step number n and a time increment of DT. The following information is specified every time a load step is defined: 1. The number of time steps to be performed. 2. The boundary values prevailing at the end of the load step. 3. The manner in which the boundary values should vary between the start and end of the load step. The action of the program is then as follows: (a) For step settings, the value at the start and at all intermediate times is kept equal to value at the end time, as specied in stage 2. above. (b) For ramp settings, the value at the start is made equal to that specied at the previous load step. All intermediate values vary linearly between the start and end values, as shown in Figure 8-2. (c) For user settings, values between the start and end times vary in an arbitrary manner, according to what is prescribed in the user-supplied subroutine (see Figure 8-2).

Version 3.26

8-7

CONTROL FUNCTIONS Analysis Controls for Transient Problems Boundary condition value

Chapter 8

Load step n1

A Load step n User coding Ramp B Step Load step n+1

DT Time

Figure 8-2

Types of change in boundary conditions

Some examples of different load step sequences are shown in Figure 8-1 where the letters S and R denote a step or ramp setting respectively. Load step denition The user should bear in mind the following points when defining load steps: 1. Special considerations apply if the very rst load step has a ramp setting. This is because there is no previous load step to x the value of its starting point. The problem is resolved by dening an extra, dummy load step which merely serves to supply the required boundary value. Examples of this situation are shown in Figure 8-1, cases (b) and (d). 2. At each new load step, the user is free to modify any existing boundary region denition. For example, boundaries that were previously outlets can now become walls and vice versa. However, new boundary regions cannot be added or existing ones deleted, nor can the physical extent of the boundaries be modied in any way. The user must therefore plan the models boundary region denitions adequately before starting a transient analysis. A step setting is always imposed at every boundary type change. 3. When the boundary values at the start and end of a load step are identical, the sole purpose of dening the load step would be to permit subdivision of time into discrete time steps so as to track the transient behaviour of the ow eld. 4. The time step size can vary from one load step to the next to suit the problem conditions. The size should be small enough to meet the following two targets: (a) Stability of the numerical solution algorithm, by minimising the cumulative error in the numerical solution.
8-8 Version 3.26

Chapter 8

CONTROL FUNCTIONS Analysis Controls for Transient Problems

(b) Capture of the transient details of the ow. A good way of testing the sufficiency of the time step size is by calculating the Courant number Co, a dimensionless quantity given by v t Co = ----------l (8-1)

where v and l are a characteristic velocity and dimension, respectively. Note that in compressible flows v should be replaced by v + c , where c is the velocity of sound. For optimum results, the user should calculate the Courant number in two ways: 1. Cell-wise, by setting v to an estimated local velocity and l to the corresponding local mesh dimension (e.g. cell diagonal). The time step should be chosen such that the maximum Courant number does not exceed 100. 2. Globally, by setting v to the estimated average velocity in the ow eld and l to a characteristic overall dimension of the model (e.g. pipe length in pipe ow). The time step should be chosen so that it is commensurate with the time scale of the physical process being modelled. Although precise gures cannot be given for all cases, a Courant number derived from this criterion is typically in the range 100 to 500. The user should inspect the time steps derived in these two ways and select the smallest one for use in the analysis. Solution procedure outline The overall task of setting up parameters for a load-step based transient calculation can be divided into the following steps: Solution controls Step 1 Start up the STAR GUIde system and then define the type of problem you are solving by selecting Transient from the Time Domain pop-up menu in the Select Analysis Features panel. Step 2 Go to the Solution Method panel (Solution Controls folder) and select appropriate parameters for the PISO numerical solution algorithm (this is the only algorithm available in this case, see topic Transient problems). Step 3 Display the Primary Variables panel and check that the solution parameter settings are appropriate for your case. If there is any need for alterations, consult Transient calculations with PISO on page 1-15 of this volume for information and advice. Note that this information is stored for each load step in file case.trns. Therefore, if any changes are needed to these parameters after your load steps have been defined, you will need to retrieve the load step information, make the changes and then save the information back in the .trns file (see the description of Step 5 and Step 6 below)
Version 3.26 8-9

CONTROL FUNCTIONS Analysis Controls for Transient Problems

Chapter 8

Step 4 In the Monitor Numeric Behaviour panel (Output Controls sub-folder), select an option for displaying and storing information on the solution progress in the form of either global rates of change of flow variables or normalised residuals. The latter is appropriate when analysing problems that are essentially steady-state in character. Therefore, the solution is deemed to have reached a steady state and the analysis stops if the residuals are to fall below the specified maximum residual error tolerance (see also Chapter 7, Completion tests in the Methodology volume). Load step controls Step 5 Choose Modules > Transient from the menu bar to activate the Advanced Transients dialog shown below. Select option Advanced Transients On by clicking the action button at the top right-hand side of the dialog. Type the maximum load step number that will be specified in the text box provided and then click Initialize to set up a file (case.trns) for storing all transient history information (i.e. changes in boundary conditions, distribution and length of time steps, etc.). This is a binary file that works very much like the normal pro-STAR problem description (.mdl) file, but is used only in transient problems. The files name is entered in the Transient File text box. For a restart run, click the Connect action button to retrieve existing load step information. Note that a number of different files can be utilised in a given run, by first clicking Disconnect to release the current file and then connecting to a new one, as specified in the Transient File text box. pro-STARs built-in file browser may be used to locate the required file(s). If necessary, a revised maximum load step number should be typed in the box provided.

8-10

Version 3.26

Chapter 8

CONTROL FUNCTIONS Analysis Controls for Transient Problems

Commands:

TRFILE LSCOMPRESS MVGRID TDSCHEME CDTRANS

LSTEP LSRANGE CPRINT CPOST

LSLIST LSGET CPRANGE SCTRANS

LSSAVE LSDELETE WPRINT WPOST

Step 6 Select a time differencing scheme from the Temporal Discretization pop-up menu. Option Implicit selects the (default) fully implicit first order scheme while Crank-Nicholson selects the Crank-Nicholson second order scheme. The latter gives more accurate solutions but requires more memory and smaller time steps. If a blended scheme is required, select the Crank-Nicholson option and then type an appropriate blending factor (in the range 0 1 ) in the text box provided (see also Chapter 4, Crank-Nicholson scheme in the Methodology volume). Finally, your choice of time differencing scheme should be confirmed by clicking Apply. Step 7 Supply in a sequential manner all information needed to completely define each load step. The current load step should be indicated by highlighting it in the scroll list with the mouse. The required information depends on the time-varying character of the problem and can consist of:
Version 3.26 8-11

CONTROL FUNCTIONS Analysis Controls for Transient Problems

Chapter 8

1. Basic parameters of the load step type these in the text boxes underneath the load step list. The available parameters are: (a) Load step identifying number. (b) Number of time steps. (c) Time increment per time step if the option button next to this text box is selected, pro-STAR will look for time increment denitions in user subroutine DTSTEP. Any number typed in the text box will be available to the subroutine as a default value. (d) A choice of step or ramp setting for changes in the boundary conditions (note that the ramp setting cannot be chosen if the User option is already selected in step (c) above). (e) Output frequency of print and post-processing data (see Output controls below). 2. Redenition of the boundary type, e.g. changing from wall to outlet boundary conditions and vice versa to simulate the operation of an exhaust valve in a reciprocating engine see Boundary Region Denition on page 7-6. 3. Modication of selected boundary values, without changing the boundary type, as shown in Figure 8-1 see page 7-8 in the section on Boundary Region Denition. 4. Unusual boundary value changes, i.e. other than step-wise or ramp-wise see option User in the section on Boundary Region Denition on page 7-8. The desired variation should be calculated in the appropriate user subroutine (BCDEFI, BCDEFO, BCDEFS, BCDEFP, BCDEFF, BCDEFT, or BCDEFW, see Boundary condition subroutines on page 18-5). These routines should supply the required values at every time step and for all boundary regions affected. Any region not covered in this way will take on the usual ramp or step variation specied during the basic load step parameter setting. Remember that in cases where the boundary conditions are to vary linearly from the start of the calculation, it is necessary to supply the boundary conditions at the start of the calculations. This is achieved by introducing a dummy first load step with ramp setting. With the exception of the boundary condition, all other data for such a load step are ignored. Output controls The output to be produced by a transient run is chosen in a similar manner to that for steady-state problems. However, since the volume of data that can be generated is potentially very large, additional controls are provided to limit the amount to what is absolutely essential. These controls are implemented in the Advanced Transients dialog and can be sub-divided into a number of basic steps as described below. Note that they are part of the definition for a given load step and can be repeated as necessary during subsequent load steps to achieve the desired fine control over the type and volume of output. Step 8 Decide whether printed output is required. If so, specify:
8-12

The printout frequency (in terms of a time step interval) by typing a suitable
Version 3.26

Chapter 8

CONTROL FUNCTIONS Analysis Controls for Transient Problems

value in the Print Freq. text box. The cell variables (e.g. velocities, pressure, temperature, etc.) to be printed click the appropriate Cell Print selection button underneath the desired variable(s). The part of the mesh over which the above quantities will be printed type a suitable cell range in terms of starting, nishing and increment cell number in the text boxes provided. The wall variables (e.g. shear forces, heat uxes, etc.) to be printed click the appropriate Wall Print selection button underneath the desired variable(s).

If some of the cell or wall variables to be printed are additional scalar variables such as chemical species mass fraction, they are specified via the Scalars Select selection button (see Chapter 17, Multi-component Mixing, Step 9). Step 9 Decide whether post-processing information is required. If so, specify: The output frequency (in terms of a time step interval) by typing a suitable value in the Post Freq. text box. The cell variables (e.g. velocities, pressure, temperature, etc.) to be stored click the appropriate Cell Post selection button underneath the desired variable(s). The wall variables (e.g. shear forces, heat uxes, mass uxes, etc.) to be stored click the appropriate Wall Post selection button underneath the desired variable(s).

If some of the cell or wall variables to be written are additional scalar variables such as chemical species mass fraction, they are specified via the Scalars Select button (see Chapter 17, Multi-component Mixing, Step 9). All the above information is written to a special transient post data (.pstt) file. The difference between this and the usual solution (.pst) file is as follows: File case.pst contains the calculation results of only the last time step. These form a complete set of all cell data and the le can therefore be used to restart the analysis. File case.pstt, on the other hand, contains user-selected data, such as cell pressures, wall heat uxes, etc. written at predetermined points in time dened by the parameter typed in the Post Freq. text box. The le is therefore suitable for post-processing runs but cannot be used to restart the analysis.

The Print and Post Freq. parameters above must be used with care since they, together with their associated print and post file operations, may cause excessively large data files to be written. On the other hand, they must not be used too sparingly as they may fail to record important data. If the analysis is split into several stages, as is usually the case with large models and/or lengthy transients, it is advisable to give the .pstt file produced at the end of each stage a unique file name. This helps to spread the output produced amongst several files and thus eases the data management and manipulation processes.

Version 3.26

8-13

CONTROL FUNCTIONS Analysis Controls for Transient Problems

Chapter 8

Other load step and general solution controls Step 10 Store each completed load step definition in the transient history (.trns) file by clicking on the Save action button. The parameters of the saved definition are displayed in the Load Step scroll list. Step 11 Once all the necessary load steps have been defined, set the total number of load steps to be performed during the next STAR analysis by typing the starting and finishing load step number in the text boxes provided. Confirm by clicking the Apply button. Note that all the above operations have an immediate effect on the transient settings, reected by immediate changes to what is displayed in the dialog box. However, any subsequent changes made outside this box, e.g by issuing commands via the pro-STAR I/O window, will not be shown. To display these changes, you will need to click the Update button at the bottom of the dialog. Step 12 In addition to the load-step specific information described above, you may also request additional, detailed information that applies to the run as a whole. This includes: Values of the eld variables at a monitoring cell location at each time step. The desired location is specied in the Monitoring and Reference Data STAR-GUIde panel. One monitoring cell must be selected for each different material present in the model. Various types of engineering data, as selected from the Monitor Engineering Behaviour panels for specified grid and/or boundary regions. These are also produced at each time step. Input data, boundary conditions and locations, inner iteration statistics, etc. These options are set in the Monitor Numeric Behaviour panel. Step 13 Specify any other necessary controls in the Sources and Other Controls sub-folders, in the same manner as for steady-state problems. Step 14 The total number of time steps for the run is normally equal to the sum of all time steps in each load step, as defined in Step 7. However, this total may be set independently via command ITER, which may effectively stop the run in the middle of a load step. Step 15 To complete the controls specification, you need to decide whether the analysis is to start from initial conditions or restart from a previous run. Set the appropriate solution controls in the Analysis (Re)Start panel. Other transient functions Before initiating a transient run, the user is free to review and modify the existing set of load step definitions. The relevant facilities available in the Advanced Transients dialog are:
8-14 Version 3.26

Chapter 8

CONTROL FUNCTIONS Using Error Estimates

Modication highlight the load step to be changed, type values for the modied parameters and click Save. Deletion highlight the load step to be deleted and click Delete. Compression of the transient history le clicking Compress eliminates all deleted steps and renumbers the remaining ones.

Additional points to bear in mind about transient problems are: 1. An analysis can most conveniently be performed in stages, using an initial and several restart runs. When specifying a restart run, you must remember to (a) read in the state of the model as it was when the last run nished, using the Analysis (Re)Start STAR-GUIde panel (Standard Restart option) (b) reconnect to the transient history (.trns) le, as described in page 8-10, Step 5 of this section, if additional load steps are to be specied. 2. Along with time-varying boundary values and boundary conditions, you may also elect to vary the geometry of his model, e.g. by moving the mesh in a cylinder-and-piston problem. This can be done by selecting On in the Moving Grid Option pop-up menu at the top of the Advanced Transients dialog. This operation also requires either (a) a user-dened subroutine (NEWXYZ) to calculate the vertex coordinates as a function of time, or (b) the use of special commands provided in the EVENTS module (see Chapter 16, Moving Meshes). These permit changes to both vertex locations and cell connectivities. The modied vertex coordinates are also written to the transient post data (.pstt) le and can be loaded and plotted during post-processing.

Using Error Estimates


STAR-CDs built-in error estimation method (see Chapter 4, Error Estimation in the Methodology volume) may be used in the following ways: Steady-state ow Error estimation may be turned on either before starting the analysis or after completing it. In the former case, you will need to open the Monitor Numeric Behaviour panel (Output Controls sub-folder) and select one or both of the error estimation option buttons. To estimate errors after completing the analysis: Step 1 Go to the Output Controls sub-folder and open the Monitor Numeric Behaviour panel. Select one or both of the error estimation option buttons. Step 2 Go to the Analysis Preparation/Running folder and open the Set Run Time Controls panel. Set the number of iterations to 1. Step 3 Open the Analysis (Re)Start panel and choose option Standard Restart.
Version 3.26 8-15

CONTROL FUNCTIONS Using Error Estimates

Chapter 8

Step 4 Save file case.prob and then exit from pro-STAR Step 5 Re-run STAR. The run will finish after only one iteration. Whichever way you do it, the estimation process will always write a file called case.err. This contains the spatial error estimate for all flow variables being solved apart from pressure. Transient ow In this case, one should ideally activate the error estimation process before starting the analysis, since the error accumulates as the analysis advances in time. To do this, go to the Output Controls folder, open the Monitor Numeric Behaviour panel and select one or both of the error estimation option buttons; specify the frequency with which error estimates will be saved by entering an appropriate value in the Write Frequency for Residuals box.

Note that this must be done before writing file case.prob. In transient flow there are two types of error present, those resulting from spatial discretisation, as in steady ow, and those resulting from temporal discretisation. On completion of the run, the spatial errors will be stored in file case.err and the total (spatial + temporal) errors in file case.terr. Both are written in the same format as transient post data files. The spatial errors may then be used to aid grid refinement (see Solution-Adapted Mesh Changes). Spatial error estimates may also be produced by a restart run at the end of the analysis, as described in the section on Steady-state flow, but remembering to set the Write Frequency for Residuals value to 1. Viewing the results To view the estimated spatial errors, return to pro-STAR, go to the Post-Processing folder in the STAR GUIde system and follow the steps below: Step 1 Open the Load Data panel. In the File(s) tab: Select option Transient (this is because both .err and .terr les are formatted like transient post les) In the File Name box, specify the error le to be searched Click Add File to List and Open Transient Post File to load the le Choose the time step to be examined (or last iteration performed for steady-state runs) in the Select Time Step list and click Store Iter/Time

Step 2 In the Data tab, select data type Cell or Cell & Wall/Bound to access the error estimates for the desired solution variables. Note that: If you need to look at velocity errors, it is advisable to load the velocity magnitude (stored in the Pressure variable) rather than individual components
Version 3.26

8-16

Chapter 8

CONTROL FUNCTIONS Solution Control with Mesh Changes

There are no separately available pressure error estimates

Step 3 Go to the Create Plots panel and display the error distribution using one of the available plot types. The total error estimate for transient cases may be inspected in a similar manner.

Solution Control with Mesh Changes


The discussion so far in this chapter assumes the usual condition of identical mesh geometry between restart runs. However, it sometimes becomes apparent that changes in mesh geometry applied part-way through the solution process will improve the quality of the final result. For example, inspection of the current solution file may reveal that mesh refinement is needed in some part of the mesh to resolve the flow pattern adequately. Rather than beginning a new analysis from scratch with a new, refined mesh, STAR-CD allows redefinition of the mesh and resumption of the analysis (via a restart run) from the currently available solution. This requires a special mapping operation, called SMAP, that utilises the existing solution (.pst) file to create a new data file with extension .smap that corresponds to the re-defined mesh. STAR reads this new file to restart the analysis. Mesh-changing procedure A description of the steps necessary for performing a mesh-changing operation requiring refinement is given below. Note that although restarting with a refined mesh is typical, the same rules apply to any other mesh re-definition, e.g. coarsening, changing cell shapes, or even creating a cell structure that is physically larger (or smaller) overall than the original configuration. Step 1 Check the directory of your current (coarse-mesh) model to confirm that a pro-STAR model (.mdl) file and a STAR solution (.pst) file exist. Save these by copying them into other files of your choosing, say case.mdl to case-coarse.mdl and case.pst to case-coarse.pst. Step 2 Start a pro-STAR session and read in the coarse-mesh model. Perform whatever mesh refinement operations are necessary (see, for example, Other couple functions on page 4-22). Step 3 Signal to STAR that the next run will restart from a special, mapped data file that is still to be created. To do this, go to the Analysis Preparation/Running folder in the STAR GUIde system and display the Analysis (Re)Start panel. Select options Initial Field Restart and Restart (Smapped) from the Restart File Option and Initial Field Restart pop-up menus, respectively. Step 4 Save all information for the refined mesh, including the restart mode specification above. The files to be saved are:
Version 3.26 8-17

CONTROL FUNCTIONS Solution Control with Mesh Changes

Chapter 8

case.mdl select File > Save Model case.geom select File > Write Geometry File case.prob select File > Write Problem File

Step 5 Restore the original coarse-mesh model as follows: Choose File > Resume From in the main pro-STAR windows menu bar. Read the original mesh by specifying case-coarse.mdl as the model le and click Apply. Go to the Post-Processing folder in STAR GUIde and display the Load Data panel. Read the original solution data by specifying case-coarse.pst as the solution le name and then clicking Open Post File

Step 6 Select those coarse-mesh cells that should be used in the mapping process and put them in a cell set (see Cell set selection facilities on page 3-46). This is because SMAP operates only on cells in the current set. This set may include both fluid and solid cells and will normally contain all cells in the model. The SMAP operation itself is initiated by choosing Utility > Solution Mapping from the main window menu bar to display the Smap/Tsmap dialog shown below:

Commands:

SMAP

TSMAP

The required input is as follows: 1. A pro-STAR model le name, specied in the Model File box. This le will contain the rened mesh denition (case.mdl in this case). If necessary, use pro-STARs built-in le browser to locate the le. 2. An output le name for the mapped data (case.smap, as specied in Step 3 above). 3. Instructions on how to assign ow variable values to any ne-grid cells that may lie outside the domain dened by the coarse-grid cells. The available Outside Options are:
8-18 Version 3.26

Chapter 8

CONTROL FUNCTIONS Solution-Adapted Mesh Changes

(a) Default use default values, as dened in panel Initialisation of sub-folder Liquids and Gases in STAR-GUIde (b) Nearest use values from the nearest cell neighbours (c) Zero use a value of 0.0 Note that the default mapping algorithm is selected by the Use Smap button. Clicking the Use Tsmap button activates a slightly different algorithm that attempts to enforce global conservation on the fine-grid domain. Other ways in which this option differs from the standard option are as follows: 1. It is applicable only to fluid cells 2. Only two Outside Options are available, Nearest and Zero. 3. The volume made up by the ne-grid cells should be fully contained within the volume of the coarse-grid cells. This condition may be satised within a tolerance (specied as a volume fraction) entered in the Volume Tolerance box. Step 7 Terminate the pro-STAR session without writing a model file, as this would save the original coarse-grid data. Other noteworthy points are: In moving mesh problems containing removed cells (see Cell-layer Removal/Addition on page 16-14), do not include such cells in the set for mapping if option Use Tsmap is to be used. If any bafes are present in the coarse-grid domain to be rened and mapped, delete the bafes before renement and redene them after renement. Do not change the reference temperature in the restart run. To visualise the outcome of the mapping operation, use the Load Datapanel in STAR GUIdes Post-Processing folder. The .smap le can be manipulated just like a normal solution (.pst) le, by accessing it via the File(s) tab and then loading eld values via the Data tab. The mapped data may then be checked by plotting contours but note that only Cell Data should be used for this purpose.

Solution-Adapted Mesh Changes


Section Solution Control with Mesh Changes of this chapter shows how to transfer a solution from one mesh to another. In that section, Step 2 simply states that you need to perform whatever mesh refinement operations are necessary. This section aims to show how these changes can be made using the solution from a previous run as a guide. The most frequently used refinement procedures have been assembled in the Adaptive Refinement panel of the STAR GUIde system. This caters for mesh refinement based on the results of a previous run. One may employ a refinement operation based on the solution error estimate discussed under Using Error Estimates on page 8-15; the results are stored in an error (.err) file
8-19

Version 3.26

CONTROL FUNCTIONS Solution-Adapted Mesh Changes

Chapter 8

the gradients of variables stored in the solution (.pst) le the solution residuals stored in the residuals (.rpo) le

Note that the .err and .rpo files are mutually exclusive. For each of the above files, one may choose the flow variable and selection method to be employed. A typical refinement session would consist of the following steps: Step 1 Go to the Analysis Preparation/Running folder in the STAR GUIde system and open the Adaptive Refinement panel. In the Refinement Criteria tab, choose a criterion by selecting the appropriate sub-tab. Usually one would choose the error estimates stored in file case.err. The flow variable on which to base the refinement depends on the application. For flow-dominated problems, the velocity magnitude or the turbulence kinetic energy have been found to give good results; for chemical reaction- dominated problems, the temperature might be a better choice. Note that: Using the Percent of Cells selection method allows you to closely control the number of cells selected for renement. You may perform multiple selections based on different variables and different criteria; the selection results are accumulated into a compound cell. set You may abandon your current selection at any stage and start again by clicking the New button. Step 2 Go to the Set Modifications tab and select set modification options, e.g. The Near Wall Cell Options may be used to ensure that near-wall cells are left unrened when limitations on the magnitude of y+ need to be observed. The nal set can be grown, i.e. expanded to include neighbouring cells, to account for inaccuracies in the error estimate and to prevent large differences in renement level between neighbouring mesh regions.

Check the set to be refined visually by plotting it. If necessary, last-minute modifications can be made to this set using the standard pro-STAR cell set utilities (see Set Manipulation on page 2-21). Step 3 Once the required cells are finally selected, the Rene tab enables you to rene them using a simple 2 2 2 subdivision, recreate the cell connectivity, prepare the resulting new model for the next run. This last step entails mapping the old solution to the new geometry, changing the solution mode to a restart run from the resulting .smap le and redening the monitoring and pressure reference cells, if these were within the area that has been rened.

Note, however, that there are many other ways to proceed. Consider filling the volume occupied by the chosen cells with one or more blocks (maybe after a little padding out) and then specifying block factors to build a mesh with progressive, concertina-style refinement. You may also choose to fill the volume with a
8-20 Version 3.26

Chapter 8

CONTROL FUNCTIONS Solution-Adapted Mesh Changes

completely new mesh built by any pro-STAR operation or imported from an external package (see Importing Data from other Systems on page 4-1). The reverse effect, coarsening the mesh, may by achieved via one of the above methods or by using the CJOIN command.

Version 3.26

8-21

Chapter 9

POST-PROCESSING Introduction

Chapter 9

POST-PROCESSING
Post-processing is an essential part of any CFD work. Given the complexity and varied nature of flow conditions catered for by STAR, it is important for users to be familiar with the overall post-processing capabilities available in pro-STAR. The latter contains facilities that are used in both the pre- and post-processing phase of modelling. These facilities generally fall into the following categories: 1. Database operations for collecting together groups of cells and vertices. 2. Action operations for plotting cell, vertex or wall data. 3. Plot characteristic functions that determine the plot type, viewing angle, plot options, display mode, etc. Computed results from STAR can be analysed in two basic ways, as follows: 1. By looking at the data printed during the course of the calculations and stored in the run-time output (.run) le. The data are presented in tabular form and are further discussed in Chapter 19. 2. By employing the post-processing facilities available in pro-STAR to display the results graphically. This is done in combination with the plotting functions already mentioned, by selecting various options in one of the STAR GUIde panels. Additional facilities are also available in the Post menu, the Graph menu or the Animation Module. In this chapter, a step by step approach will be adopted to look at the different post-processing options available using the GUI facilities. For more detailed information on how these are implemented in command form, refer to the pro-STAR Commands volume.

Introduction

Data Loading and Display Set-up


STAR results can be displayed and analysed by producing the following types of plot: Vector plots of velocity elds Figure 9-1. Contour plots of scalar quantities Figure 9-2. Isometric surfaces of scalar quantities Figure 9-3. Contour and vector plots of wall data Figure 9-4. Particle tracks Figure 9-5. X-Y graphs Figure 9-6. Animated displays.

Version 3.26

9-1

POST-PROCESSING Data Loading and Display Set-up

Chapter 9

Figure 9-1

Vector plot of velocity magnitude

Figure 9-2
9-2

Contour plot of temperature


Version 3.26

Chapter 9

POST-PROCESSING Data Loading and Display Set-up

Figure 9-3

Isometric plot of temperature

Figure 9-4
Version 3.26

Contour plot of wall heat transfer coefcients


9-3

POST-PROCESSING Data Loading and Display Set-up

Chapter 9

Figure 9-5

Particle tracks

Figure 9-6
9-4

Graph plot comparing results from two different meshes


Version 3.26

Chapter 9

POST-PROCESSING Data Loading and Display Set-up

Whichever of the above options is chosen, several operations need to be performed before the data can be displayed for analysis. These operations are most commonly initiated from one of the STAR GUIde panels and sometimes from the Post menu, shown below, in the main pro-STAR window.

Commands:

CAVERAGE FLUXSUM

VAVERAGE PCROSS

TRINTERPOLATE

The basic steps needed for post-processing are as follows: Step 1 Retrieve all basic information on the desired model by resuming from the pro-STAR model file (a file with extension .mdl) choose File > Resume Model. Step 2 Load the analysis results calculated by STAR for this model: For steady-state runs, these are stored in a solution le with extension .pst For transient runs, the results are usually stored at pre-defined time intervals in a special post data (.pstt) file. pro-STAR permits loading of these results according to the time at which they were computed. However, the standard solution (.pst) file is also available, representing the state of the flow system at the very end of the transient run.

Facilities for loading either or both file types are available in STAR GUIdes Load Data panel, located under the Post-Processing folder, and are grouped within the File(s) tab. Note that: 1. It is possible to check the contents of the currently loaded .pst le before starting to use it by issuing command PLIST. 2. If some of the information in the .pstt le is not required, it is possible to discard the unwanted data and retain only the portion up to a given time step by using command TRUNCATE. This can be useful when producing particle track plots in problems where the solution becomes non-physical after a certain time. 3. If the currently-loaded .pstt le does not contain information at the desired point in time, values at the next available time step are used instead. It is, however, possible to override this default by turning on a linear interpolation process that calculates data at the precise time required, using values stored at the time steps on either side of the interpolation point. To do this, select Post
Version 3.26 9-5

POST-PROCESSING Data Loading and Display Set-up

Chapter 9

> Trinterpolate from the main menu bar and then choose one of the options in the drop-down list displayed, as follows: (a) Caverage automatic averaging of all loaded cell values (option All) or just those in the current cell set (option Cset) to give vertex values (b) Vaverage automatic averaging of all loaded vertex values to give cell values (c) Both averaging is performed with both the above loading operations, for all cells (option All) or only those in the current cell set (option Cset) (d) None no averaging At this stage, both pre- and post-processing data should be available to the current pro-STAR session. Step 3 Choose the part of the model on which post-processing will be performed. This is done using the coloured set-selection buttons on the left-hand side of the main pro-STAR window. If the whole model is to be displayed, option All should be selected. Otherwise, a wide range of options is available to suit all requirements (see also Set Manipulation on page 2-21 and the description in the pro-STAR Commands volume). Step 4 Choose the desired plot characteristics from the option buttons provided in the main window or from the Plot menu in the main menu bar (see also Plot Characteristics on page 5-3). These may include the following: 1. Plot type, e.g. surface, wireframe, section select an item from the Cell Plot Type pop-up or the Plot > Type list. The choice may depend on the variable being post-processed. For example, contour plots of pressure cannot be made using the Normal (i.e. wireframe) option. For a full list of legitimate options see Appendix E. 2. Geometric display use option buttons in the main window or the equivalent Plot menu options. These turn various display attributes on or off. The available facilities include: (a) Mesh, edge or surface display. (b) Number display for cells, vertices, contour values, etc. Step 5 Choose the direction from which to view the model and also its general orientation, as discussed in Chapter 5, Plot Characteristics on page 5-5. Step 6 In cases involving section plots, it is necessary to make further choices concerning the position of the section see the discussion beginning on page 5-6 for the details of section plane definition. A plotting operation at this stage (e.g. Plot > Cell Plot) will only display the mesh geometry. To display values of the solution variables further steps are required, as explained in Basic Post-processing Displays on page 9-9.
9-6 Version 3.26

Chapter 9

POST-PROCESSING Data Loading and Display Set-up

Step 7 Load the appropriate post-processing data in the computers memory, ready for manipulation, plotting, or printing. The data can include: vector quantities, i.e. velocity components or mass uxes; scalar quantities, e.g. pressure (piezometric, static, or total), temperature, wall data (e.g. heat transfer coefcients), geometric information (e.g. vertex coordinates for moving meshes), etc.

Facilities for accessing the above information are provided in STAR GUIdes Load Data panel, located under the Post-Processing folder, and grouped within the Data tab. The available data types are: Cell Data load cell-centred values for solution variables Cell and Wall/Boundary Data load vertex values generated by interpolation from cell-centred values Boundary Data load solution variable boundary values Wall Data load wall data calculated by STAR

In addition to the STAR GUIde facilities, the following two data loading options are available from the Post menu in the main pro-STAR window: 1. Get User Data Get user data from any outside source (stored in le case.usr) and then plot or manipulate them exactly as if they had been read from a STAR solution le. This option activates the Get User Post Data dialog shown below:

Commands:

GETUSERDATA

ULOAD

The above dialog allows a complete specication of the data to be expected, as follows:
Version 3.26 9-7

POST-PROCESSING Data Loading and Display Set-up

Chapter 9

(a) File name pro-STARs built-in le browser may be used to locate it. (b) Data Type cell or vertex data (c) Registers depending on what sort of data are to be read, this option effectively denes their destination in terms of post-processing register numbers (see The OPERATE utility on page 9-21). The available options are: i) Scalar one data item per record, stored in Register 4. ii) Vector three data items per record, stored in Registers 1-3. iii) Both four data items per record (three vector plus one scalar), stored in Registers 1-4. iv) All six data items per record (three vector plus three scalar), stored in Registers 1-6. v) Register 1 - 6 one data item per record, stored in the specied register. (d) Note that the above options are not applicable to SMAP-type les. File Type if option User is selected, you must type a FORTRAN format specication describing the data record structure in the text box at the bottom of the dialog. Option Free species that the input le is in free format, i.e. it contains elds of arbitrary length separated by commas. Cell Offset offset to be added to cell or vertex numbers upon input Heading and Units type in a heading and units denition. These are used as labels for any plots made subsequently. Post Registers if option Initialize is selected, the post registers are initialised to zero before reading in new data. By choosing No Initialization, you are able to add the new data to what is already in the registers.

(e) (f) (g)

Finally, the input le is read by clicking the Apply button. The GETUSER operation reads a block every time it is executed and loads the data encountered in up to ve post registers. Thus, if the item of interest is the turbulent viscosity distribution (VIS), the operation needs to be performed twice and the viscosity ends up in register no. 2. To subsequently access a variable in the rst block, it is necessary to close the le rst and then perform another GETUSER operation. pro-STAR also offers facilities for reading in data from les that are compliant with the CFD General Notation System (CGNS) specication and storing them in memory for printing, plotting and other manipulation. These facilities are presently available only in command form, viz. CGGCELL for cell-centred data and CGGVERTEX for vertex-centred data. The data le name defaults to the last CGNS grid imported, i.e. it is of form case.cgns. 2. Save User Data This is the reverse of Get User Data and works via the Save User Post Data dialog shown below. It is used to write a (.usr) le containing cell, vertex or wall data currently stored in pro-STARs post registers.

9-8

Version 3.26

Chapter 9

POST-PROCESSING Basic Post-processing Displays

Command:

SAVUSERDATA

The required input is as follows: (a) File name (b) Registers specify where the data are located via an appropriate selection, as in the Get User operation. (c) File Type specify the le format, as in the Get User operation. (d) Range specify the range or set of cells/vertices for which to write post data (not applicable to wall data). The le itself is written by clicking the Apply button.

Basic Post-processing Displays


Plot specication Depending on the type of data stored by the operations described in the Data Loading and Display Set-up section, you will need to choose a plot option. The appropriate choice is made via the Plot Options pop-up menu on the left-hand side of the main pro-STAR window. Additional plotting options may also be chosen from the Plot drop-down menu, shown below, in the menu bar:

Version 3.26

9-9

POST-PROCESSING Basic Post-processing Displays

Chapter 9

Commands:

POPTION

PLTYPE

CPLOT

VPLOT

WPLOT

A drop-down list opening from item Options offers the following choices: 1. The Geometry option is the default setting and is used for displaying the model geometry and mesh structure. 2. The Vector option is used for displaying post-processing data that possess both magnitude and direction (e.g. velocity vectors, force vectors, etc.). 3. The Contour option is used for plotting scalar variables (e.g. pressure, temperature, density, etc.). 4. A facility for displaying a contour plot of a scalar quantity with superimposed vector arrows is available via option Vect+Cont. 5. The Isosurface option is used to display constant-value surfaces for a given scalar variable. The value for which the isometric surface is to be plotted must be typed in the dialog box displayed when this option is selected. An isosurface may be stored as a named collection of shells and vertices using command PSCREATE. Such a denition may then be recalled for different purposes, e.g. i) in order to be light shaded (see Special lighting effects on page 5-10) ii) used for plotting multiple hidden-line surfaces (see Basic plot type denitions on page 5-3) iii) used as a platform on which to map currently stored post data (see Mapping and Copying Post Data on page 9-27); for example, a temperature distribution may be mapped on a pressure isosurface If necessary, the shells may be subsequently deleted using command PSDELETE.
9-10 Version 3.26

Chapter 9

POST-PROCESSING Basic Post-processing Displays

The choice of plot option can also depend on the type of plot chosen (see the discussion on plot type selection in Data Loading and Display Set-up, Step 4, on page 9-6). This point is further illustrated by the examples given below. The user should refer to Appendix E for a full list of permissible combinations. Example 1 Displaying the velocity field by velocity vector arrows. 1. Store all velocity vector data (i.e. U, V, W) in memory by selecting the corresponding option buttons in the Load Cell Post Data dialog. 2. Choose Plot > Type > Normal to display the model in wire frame mode. 3. Choose Plot > Options > Vector to plot the data as velocity vector arrows. The above choice is usually not very useful because of the overwhelming amount of information which may be displayed simultaneously (see Figure 9-7). Alternative choices can be made as follows: Plot > Type > Qhidden only data on the free surfaces of the mesh will be plotted. Plot > Type > Ehidden note that the velocity arrows are coloured according to a scale based on velocity magnitude (Figure 9-8). Plot > Type > Section data on a pre-dened section(s) will be plotted, as discussed in Data Loading and Display Set-up, Step 6, on page 9-6 (Figure 9-9).

Example 2 Displaying the pressure or any other scalar quantity as a contour plot. 1. Store the pressure data in memory, ready to plot, by selecting Pressure in the Load Vertex Post Data dialog. 2. Choose Plot > Options > Contour. Contour plots of scalar data can only be plotted on surfaces. This reduces the choice of plot types to the following: Plot > Type > Qhidden line contour plots on the free surfaces of the mesh (Figure 9-10). Plot > Type > Ehidden line or lled-colour contour plots on the free surfaces of the mesh (Figure 9-11). Plot > Type > Section line or lled-colour contour plots on user-dened surfaces (Figure 9-12).

Example 3 Displaying temperature contours with superimposed velocity arrows at a section. 1. Choose Plot > Type > Section. 2. Store the three components of velocity plus temperature by selecting U, V, W and Temperature in the Load Cell Post Data dialog. The subsequent choices are:
Version 3.26 9-11

POST-PROCESSING Basic Post-processing Displays

Chapter 9

Plot > Options > Vect+Cont the plot will show contours of temperature with superimposed (uncoloured) velocity vectors (Figure 9-13). Plot > Options > Vector this will display the same information as before but now the velocity vectors are coloured according to a scale based on the temperature level at each location (Figure 9-14).

Plot display The next step is to actually display the specified plot on the screen. This is done via one of the plotting options in the menu, as follows: Cell Plot plots data for the calculation mesh. Wall Plot plots wall data on the automatically-created shells at the wall surfaces (see Data Loading and Display Set-up, item , on page 9-7). The new shells must be included in the currently dened cell set before this function is used. Using Options > Vector with wall data allows one to plot surface force components rather than velocity components. Vertex Plot plots vector data superimposed on a vertex plot.

Please note that option Cell Plot is the one normally used to plot interpolated vertex data. Vertex Plot is simply an alternative method of displaying the same information, as shown in Figure 9-15. Option Replot can also be used at this stage as long as the database set for cells, vertices, or wall shells (see Data Loading and Display Set-up, Step 3, on page 9-6) does not change from one plot to the next; there is an existing plot on display.

9-12

Version 3.26

Chapter 9

POST-PROCESSING Basic Post-processing Displays

Figure 9-7

Full velocity eld vector plot

Figure 9-8

Velocity plot on mesh surfaces

Figure 9-9
Version 3.26

Velocity plot on a section


9-13

POST-PROCESSING Basic Post-processing Displays

Chapter 9

Figure 9-10

Line contour plot on mesh surfaces

Figure 9-11

Filled-colour contour plot on mesh surfaces

Figure 9-12
9-14

Filled-colour contour plot on a section


Version 3.26

Chapter 9

POST-PROCESSING Basic Post-processing Displays

Figure 9-13

Temperature contours combined with uncoloured velocity vectors

Figure 9-14

Velocity vectors coloured according to temperature

Figure 9-15
Version 3.26

Velocity vector plot produced by VPLOT


9-15

POST-PROCESSING Plot Manipulation

Chapter 9

Plot Manipulation
Flow field velocity vector plots can be manipulated using facilities in STAR GUIdes Create Plots panel, located under the Post-Processing folder. A tab called Vectors within this panel allows the following plotting operations: Changing the size of the velocity vectors by a given factor (Vector Scale options), as illustrated by Figure 9-16. Changing the shape of the arrows representing the velocity vectors (Vector Arrows options), as illustrated by Figure 9-17. Interpolation (mapping) of velocity vectors to a uniform grid (Presentation Grid options), as illustrated by Figure 9-18. Reducing (thinning out) the number of plotted vectors by a specied factor (Thin Vectors slider), as illustrated by Figure 9-19.

Contour plots of scalar post data can also be manipulated, as follows: Reducing (thinning out) the number of labels used in line contour plots by a given factor, as set on the Thin Vectors slider of tab Vectors. This effect is illustrated by Figure 9-20. Changing the range and number of colours used for lled-colour contour plots or line contour plots, depending on the setting specied by command TERMINAL (see Plotting Functions on page 2-32). This operation is performed in another tab called Options and its effect when applied to a lled-colour plot is illustrated by Figure 9-21.

Furthermore, pro-STAR caters for changes to the basic colour table currently in use, by adjusting the RGB values of the colour map index (see Colour settings on page 5-9). The standard background/foreground colour combination can also be reversed by choosing Plot > Background > Reverse from the menu bar. Finally, the displayed plot can also be labelled using a combination of commands such as: HEADING changes the heading and units description on the plot label SUBTITLE enables input of up to two subtitles for the plot PLLABEL enables user-dened alphanumeric labels at specied locations PLARROW enables user-dened arrows at specied locations POPTION changes the format of the legend values, based on the standard E, F and G FORTRAN format descriptors. For example, the command POPT,CONT,F11.5 species that the legend contour values be displayed using 5 decimal places instead of the usual 4 signicant gures.

9-16

Version 3.26

Chapter 9

POST-PROCESSING Plot Manipulation

Figure 9-16

Size change of velocity vectors

Figure 9-17

Shape change of velocity vector arrows

Version 3.26

9-17

POST-PROCESSING Plot Manipulation

Chapter 9

Figure 9-18

Velocity vector mapping on a uniform grid

Figure 9-19

Reduction in number of plotted vectors

9-18

Version 3.26

Chapter 9

POST-PROCESSING Plot Manipulation

Figure 9-20

Reduction in number of contour labels

Version 3.26

9-19

POST-PROCESSING Plot Manipulation

Chapter 9

Figure 9-21

Colour change of contour plots

9-20

Version 3.26

Chapter 9

POST-PROCESSING Data Manipulation

Data Manipulation
The OPERATE utility pro-STAR provides a utility for cell, vertex, boundary and wall data manipulation by allowing various mathematical operations to be performed on any post data or geometry data items loaded from one or more data files. This utility is activated by choosing Post > Operate from the menu bar to display the Post Register Operations dialog shown below:

Command:

OPERATE

Geometry or post data items (over the entire mesh) can be stored at any time in so-called register numbers 1 to 6; the latter are selected via the various Register pop-up menus appearing in the dialog. These registers are in fact the same thing as the memory locations described in Data Loading and Display Set-up, Step 7 on page 9-7. However, whereas with utilities such as GETCELL or GETVERTEX the data items are simply stored in up to six registers, with the OPERATE utility it is possible to manipulate them further. The required operation is chosen from the Function pop-up menu. This in turn controls the number of Register pop-up menus that appear within the Operation window and the context in which they are presented, i.e. the contents of that window are always appropriate to the operation selected by the user. A typical data manipulation process using this utility can be divided into three stages as follows: 1. Store the cell or vertex data in registers 1 to 6. Note that: (a) The normal pro-STAR convention is that vector post data are stored in registers 1, 2, and 3, corresponding to the X, Y and Z directions. Scalar post data are stored in register 4. This convention applies when data are read in via the normal loading utilities such as GETCELL. (b) The OPERATE utility also contains scalar loading functions. These offer greater exibility regarding the register(s) into which data are loaded. The available functions are: i) Load Cell Data similar in functionality to GETCELL; also allows loading of cell centroid coordinates (in a specied local coordinate system, if required), volumes and areas (for shells or bafes). ii) Load Vertex Data similar in functionality to GETVERTEX. iii) Load Boundary Data similar in functionality to GETBOUNDARY; also allows loading of boundary centroid coordinates (in a specied local coordinate system, if required) and
Version 3.26 9-21

POST-PROCESSING Data Manipulation

Chapter 9

areas. iv) Load Wall Data similar in functionality to GETWALL; allows loading of wall centroid coordinates (in a specied local coordinate system, if required) and areas. v) Load User Data similar to GETUSERDATA but with far fewer options. (c) Note that, although the choice of storage registers for input data is entirely up to the user, some of the operations performed in the next stages (e.g. plotting) do assume that the convention given in a) above has been observed. 2. Perform the required operation on the stored data (vector arithmetic, algebraic function, trigonometric function, etc.). The operands are selected from the Register pop-up menus on the right-hand side of the = sign. Clicking the Apply button places the result of the operation in the register selected via the pop-up on the left-hand side, overwriting any data that may be there already. The available operations are grouped as follows: (a) Multi-Register operations are performed on values stored in two or more registers, as indicated on the right-hand side of the = sign. The result is stored in the register indicated on the left-hand side of the = sign (see the description of command OPERATE in the pro-STAR Commands volume for a full list of functions). (b) Single-Register as above, except that only one register appears on the right-hand side. (c) Scalar/Vector as above, except that the available functions require a register specication plus a constant value. The latter is typed in the text box provided. 3. Optionally save the outcome of the operation. The available functions are: (a) Put Cell Data performs the reverse operation to Load Cell Data, i.e. data currently stored in a given register are written back to the solution le as the cell item indicated. (b) Save to File saves data currently stored in a given register to a (.usr) le in binary or coded format. For wall data, there is a choice of associating each value with either its corresponding wall shell number or the four vertex numbers constituting the shell. (c) Register Keys prepares pro-STAR to plot i) the contents of registers 1 - 3 as vector quantities (option Vector), or ii) the contents of registers 1 - 6 as ux quantities (option Flux). In this case, each register should contain the ux value corresponding to each of the six faces of a given cell. The next task is normally to print, summarise or plot the outcome of the above operations. The following examples illustrate some of the possibilities:

9-22

Version 3.26

Chapter 9

POST-PROCESSING Data Manipulation

Example 1 Translation of velocity vectors from the calculated rotating frame of reference to a stationary one. 1. Load the STAR output data by selecting Post > Load Static Post File from the menu bar and then choosing the required (.pst) le. 2. Activate the Post Register Operations dialog. Load the X-component of calculated velocity in register 1, by choosing Load Cell Data > Velocity U-component from the Function pop-up menu. 3. Repeat for components Y and Z, storing them in registers 2 and 3. 4. Assuming that the system is rotating around the Z-axis of a local cylindrical coordinate system 11 at 3000 rpm, re-calculate the velocity components currently stored in registers 1 to 3 in a stationary reference frame. To do this, choose Multi-Register > Reframe(r*w) from the Function pop-up menu and then type values for the coordinate system number (ICSYS) and rotational speed (Omega) in the text box provided. 5. Plot the re-calculated velocity vectors: (a) Set pro-STAR up to plot registers 1-3 as vector quantities choose Register Keys > Vector from the Function pop-up menu. (b) Select Plot > Options > Vector from the menu bar, followed by Cell Plot. 6. Scalar data for contour plotting can only be stored in register 4. Therefore, to produce contour plots of velocity magnitude, activate the Post Register Operations dialog and choose Multi-Register > Vmagnitude from the Function pop-up menu. This calculates velocity magnitudes from data in registers 1 to 3 and stores the result in register 4. 7. To plot the data, choose Plot > Options > Contour from the menu bar, followed by Cell Plot. Example 2 Looking at the difference in pressure fields between two solution data files XXold.pst and XXnew.pst. 1. Read the rst le by selecting Post > Load Static Post File from the menu bar and then specifying XXold.pst as the input le name. Click Apply. 2. Store eld values of pressure (at cell vertices) for XXold in register 1 by choosing Post > Operate > Load Vertex Data > Pressure from the menu bar. Also type the appropriate material index number in the text box provided and click Apply. 3. Read the second le by selecting Post > Load Static Post File from the menu bar and then specifying XXnew.pst as the input le name. Click Apply. 4. Store eld values of pressure (at cell vertices) for XXnew in register 2 by repeating the previous choices in the Post Register Operations dialog, making sure that register 2 is selected as the destination register. 5. Calculate the difference between the two pressure elds and store in register 4 for contour plotting. To this end, choose option Multi-Register > Subtract in the dialog and select Register 4, Register 1 and Register 2 from the register pop-up menus, in that order. To plot the data, choose Plot > Options > Contour from the menu bar, followed by Cell Plot.
Version 3.26 9-23

POST-PROCESSING Data Reporting

Chapter 9

Other data manipulation utilities Option Change in the Post menu provides an alternative way of changing and manipulating post data. It is implemented via the Change Post Data dialog shown below:

Command:

CHANGE

This utility enables linear transformation of post data using coefcients A and B (supplied in the text boxes provided), as follows: New Value = A * (Old Value) + B (9-1)

The register(s) whose data are to be modied is selected by clicking one or more of the Register option buttons. This utility can modify individual post values, or the values of a range (or set) of cells or vertices; the appropriate choice is made via the pop-up menu provided. Option Caverage in the Post menu creates a set of vertex data over a given cell set or the entire mesh. The process relies on inverse distance-weighted averaging of the available cell-centre values. The vertex data can then be used to produce smooth contour plots rather than discontinuous ones. The difference between data generated by this operation and those obtained via Post > Get Vertex Data is that the latter takes into account user-specied and program-calculated boundary values. Thus, vertex data on the boundaries produced with Caverage really represent near-boundary rather than actual boundary values. Note that the equivalent command for this operation, CAVERAGE, offers additional options regarding cell range selection and the manner of data averaging at coupled cell interfaces. The inverse of the above operation, i.e. averaging vertex values to create cell-centre values, can be performed by selecting option Vaverage from the Post menu. This might be useful in situations where the vertex values have been generated externally and the cell values are needed to start a STAR run. Command UNITS may be used to translate data from SI to English units and vice versa prior to further post-processing.

Data Reporting
In addition to its graphic capabilities, pro-STAR also provides facilities for processing and reporting post data values in numerical, printed form. These are as follows:
9-24 Version 3.26

Chapter 9

POST-PROCESSING Data Reporting

1. Displaying currently selected cell or vertex post data to the screen choose Lists > Post Registers from the menu bar to activate the Post Register Data dialog shown below. The contents of all post registers are displayed in a scroll list, in numerically ascending cell number. There is also a choice of listing all data or just those in the current cell or vertex set (marked by asterisks in the Set column). The choice is made simply by clicking Show All Data or Show Set Data Only, respectively.

Commands: Note that:

PRINT

UPDATE

(a) The dialog also provides access, via appropriately labelled buttons, to the OPERATE and CHANGE tools for manipulating post register data (see pages 9-21 and 9-24, respectively). Data items created with these tools are included in the display automatically. (b) An Update List button is provided so that the list can be updated if changes are made to the sets or to the post register data outside the Post Register Data dialog. (c) The panel also contains a sorting function, which causes the post data to be displayed in numerically-descending order. The latter is determined by the actual, Sort (Actual), or absolute, Sort (Abs), values of the (scalar) quantities stored in register 4. The Unsort button undoes the effect of the sorting operation. (d) Any post data changes performed with the manipulation tools can be made permanent by clicking the Update File button. This writes the modied cell data back to the solution (.pst) le (no changes are made to boundary values). For example, a le with some badly-converging pressure spikes could be smoothed and then used to restart the STAR
Version 3.26 9-25

POST-PROCESSING Data Reporting

Chapter 9

analysis, hopefully resulting in a converged solution. 2. Interpolating and displaying currently selected post data at user-dened points within the solution domain command SENSOR. These points are dened using one or more vertices and the values at such locations are interpolated from those at nearby cells. The vertices used for this purpose do not have to be attached to any of the cells in the mesh; they only need to be located within the ow eld. The extracted values may be useful for comparing the numerical solution to experimental results obtained at those locations. SENSOR is a multi-function command and should be used as shown in the following example: Extraction of velocity components at 10 points dened by vertices 100 to 109. (a) Get the cell-centre post data for velocity by choosing Post > Get Cell Data from the menu bar and select all velocity components. (b) Select a range of ten existing vertices to act as sensor points SENSOR,ADD,100,109,1 (c) Scan the mesh to check that the target vertices are within the ow eld and to calculate the velocities SENSOR,SCAN,ALL (d) Display the velocity components at vertices 100 to 109 on the screen SENSOR,PRINT 3. Pointing to a desired location on a surface contour plot with the cursor in order to display the (interpolated) value of the variable at that location choose option PCross in the Post menu. Obviously, this can be done only if a plot is already displayed on the screen. 4. Summarising and displaying sums, averages, minimum and maximum values and locations command SUMMARIZE. This facility works on the post data items that are currently stored in registers. 5. Displaying interpolated post data in a section plane command SPRINT. The plane in question is dened in the manner described in Chapter 5, page 5-6. As with all other functions in pro-STAR, cell data are treated as constant within each cell, whereas vertex data are interpolated linearly to the desired plane. 6. Integrating post data items over a user-dened section plane command INTEGRATE. The plane in question is dened in the manner described in Chapter 5, page 5-6. 7. Calculating aerodynamic coefcients command ACOEFF. This facility works in conjunction with values of total force components at the wall, loaded via the Wall Post Data dialog. A set of wall shells, enveloping the object whose coefcients are to be calculated, must also be created using a CSET operation. 8. Calculating the mass ux crossing an individual cell face or a set of cell faces choose Post > Flux Sum from the menu bar and then select one of the
9-26 Version 3.26

Chapter 9

POST-PROCESSING Mapping and Copying Post Data

drop-down list options. The required faces can be picked individually with the cursor (Pick Cells), or collectively (Zone) by drawing a polygon around them. Alternatively, an existing set of shells with a distinct cell index can be selected (Shell Type). Clearly, this operation requires some kind of mesh surface plot to be on display in pro-STARs main window. Note that a running total of both uxes and areas is kept and printed in the Output window. This total can be reset to zero by selecting option Initialize. All displayed data can also be diverted to a file for later review and analysis. The relevant procedure is illustrated by the following example: 1. Switch the program output from the terminal to the user-dened data le (e.g. case.dat) by typing: OFILE,case.dat 2. Use the appropriate function that will write the desired data on the data le, e.g. PRINT,CSET 3. Switch the program output back to the terminal screen OFILE,SCREEN

Mapping and Copying Post Data


pro-STAR provides commands for mapping and copying post data items from an existing mesh (i.e. the mesh used for the calculation) on to any arbitrary volume or surface. These facilities can be used for both presentation and data export to alternative meshes. Command DGENERATE is used for generating or copying post data. It enables the creation of a new data set from an existing cell or vertex post data set. This is useful for presenting results calculated in models with an axis or plane of symmetry, where the symmetric or cyclic nature of the flow has been used to reduce the extent and size of the mesh. The cells and vertices onto which the data are to be copied are created first. This is followed by command DGENERATE to generate a new set of post data. Note that the offsets used in DGENERATE should be the same as those used in generating the cells or vertices being considered. Mapping of post data items onto both arbitrary surfaces and volumes is possible. The pro-STAR command for this function is PMAP, enabling mapping of the currently stored post data on a surface consisting of shells, a volume consisting of cells, or cross-sections defined by command PSCREATE. The required steps are as follows: Step 1 Create the shells, cells or sections onto which the data are to be mapped and assign a unique cell index to them. A convenient way of generating shells is via the LIVE command.

Version 3.26

9-27

POST-PROCESSING Particle Tracking

Chapter 9

Step 2 Select (using a CSET operation) the set of cells from which the mapping data are to be extracted. These should envelop the cells or shells to be mapped. Step 3 Store the post data required for mapping using the options provided by the Load Cell Post Data dialog (see page 9-7). Step 4 Issue command PMAP to map the stored post data from the existing model onto the target cells or shells. For example, to map pressure from a cell set given by CSET on to cell type 5 GETC,P PMAP,5,CSET It is also important to ensure that the mesh onto which data are to be mapped occupies the same physical space as the mesh from which data are extracted does not share any vertices with it (if mapping vertex data)

Particle Tracking
pro-STAR provides facilities for calculating and displaying particle tracks on top of an existing mesh plot. These facilities may be accessed by expanding the Particle Tracks sub-folder, located within folder Post-Processing in the STAR GUIde system. The available facilities are sub-divided into two groups: Particle track generation see panel Create Particle Tracks Particle track plotting see panel Plot Droplets/Particle Tracks

What is provided is purely a post-processing utility that calculates and displays tracks on the basis of data from an existing flow field, i.e. the presence of the particles does not influence the flow field. However, the particles themselves can be assigned a volume and a density so as to take the effect of body forces into account. Such forces are encountered, for example, in gravitational or rotating field problems. In all cases, the progress of particles through the flow field is calculated using a 2nd-order accurate Runge Kutta numerical integration scheme that advances the particle position from one point in time to the next using a given timestep size. The latter effectively controls the tracking process; as its value decreases, the particle tracks become more accurate and less likely to cross a boundary erroneously, but the tracking calculation takes longer. In transient cases, the integration time step accounts for the actual analysis time recorded in the transient data file. Thus, interpolation is used to approximate the fluid velocity in between the analysis timesteps if the tracking timestep is smaller. Users should be very clear about the distinction between this type of particles and the ones used in two-phase Lagrangian flow (see Chapter 13). The latter are real entities forming part of the physical make-up of the problem being modelled. Therefore, all equations governing their behaviour are solved by STAR as part of the overall analysis. On the other hand, the particles described below are virtual
9-28 Version 3.26

Chapter 9

POST-PROCESSING Particle Tracking

entities defined and used solely within pro-STAR for the purpose of flow visualisation. Before plotting any tracks, a mesh or problem geometry display should already exist on the screen. The track coordinates themselves may be read from a track data (.trk) file by choosing Lists > Tracks > Load Data from the menu bar in the main pro-STAR window. This opens the Particle/Droplet Track Data dialog and then reads in and displays all available information in that file, as shown below.

Command: Useful Points

PTPRINT

1. Sometimes, it is the position of particles at a given point in time that needs to be plotted, as opposed to continuous traces of the particle positions. Such a display can be created by rst typing command PTREAD to interpolate the available data at the time point in question. The required particle distribution may then be displayed using the facilities of the Plot Droplets/Particle Tracks panel in STAR GUIde. Note that this kind of plot is particularly useful for displaying droplet distributions in problems involving two-phase Lagrangian ow (see Chapter 13). 2. Once a particle track has been calculated, it is possible to create a number of equally spaced vertices along its path using command PTVERTS. These vertices may be used as sensors (see page 9-26) for calculating the value of any vector or scalar post data item along the path, or for any other purpose deemed suitable by the user. 3. If the mesh display currently on screen is moved, enlarged or rotated (say, via the mouse or one of the display controls in the main window) the track display is redrawn so that its spatial relationship to the problem geometry remains unaltered.
Version 3.26 9-29

POST-PROCESSING Graph Displays

Chapter 9

4. There are some situations where the default plot characteristics (colours and line widths) of particle tracks are not appropriate. Command PTOPTION allows these characteristics to be modied on a per-particle or per-group basis. The command works in both X and Extended graphics mode (see Chapter 2, Plotting Functions).

Graph Displays
pro-STAR contains extensive utilities for presenting results in graphical form. The basic principles involved in graph production are as follows: Any ow variable or other physical quantity, whether available within pro-STAR or produced by an external program, can be plotted against any other such quantity. Prior to plotting, a series of values for that quantity have to be loaded into a special storage location called a graph register. A graph is produced by plotting the contents of any register against those of another register according to a user-supplied specication. One or more graphs can be combined into a unique display entity called a frame. The frame denition also incorporates a description of how to draw other essential graph elements such as axes, legends and labels. A graph plot may consist of one or more frames. In the latter case, it is necessary to provide a description of how the various frames are to be arranged within the composite plot.

Consequently, the steps needed to set up and plot graphs are as follows: 1. Select and load the required data 2. Specify the type and properties of the graph(s) in which they will appear 3. Display the data These are described in the next few sections. The necessary facilities for performing these steps are provided by various panels in STAR GUIdes Graphs sub-folder. Some of these facilities are duplicated by options in the Graph menu inside the main pro-STAR window. The Graph Tool, accessed by choosing Tools > Graph Tool in the menu bar, also includes some of the most common operations. Data loading In this step the user specifies the data to be loaded into the graph registers. The most common operations are implemented in the seven STAR GUIde panels grouped under the Extract/Graph Data sub-folder. These handle the following types of data: Field Data External Data Residual History Data Engineering Data Analysis History Data Particle Data User Data

In most cases, as well as loading the data, you are also able to check them by
9-30 Version 3.26

Chapter 9

POST-PROCESSING Graph Displays

producing a default graph. A number of additional facilities for creating, manipulating and storing register data are available only in command form, as follows: 1. Parameter values dened as part of a pro-STAR loop (see Chapter 1, Loops in the pro-STAR Commands volume) may be loaded into a graph register command GPARAM. 2. x-y values can be extracted from an existing graph and then inserted into a specied pair of x- and y-registers command GPUT. 3. Advanced operations for calculating derivatives, integrals, Fourier series coefcients, etc. can be performed on curves represented by a pair of register data command RCALCULATE. 4. Sets of x-y data can be extracted from graph registers, interpolated, and then stored in post registers command GMAP. This is useful for mapping one-dimensional proles of data into selected locations within a STAR model. Graph customization Once suitable data have been loaded into graph registers, the user may proceed to plot them as a graph using pro-STARs default settings. In most cases, however, a certain amount of customization of the graph appearance will be needed before one can produce exactly what is required on the screen. This is done using STAR GUIdes Customize Graphs panel. The panel is split into a number of tabs, each offering a different customization function which the user may employ or not, depending on the desired graphs appearance and complexity. Details on the purpose and mode of operation of each tab are given in the on-line Help text for this panel. Other plot enhancement features, such as user-defined pointer arrows and extra labels that can be superimposed on the graph are also possible see Chapter 5, page 5-7. Data display The actual graph display is performed on the basis of current graph plot settings, as follows: From within the STAR GUIde environment (any panel in the Graphs sub-folder) click: Draw Frame > Current to draw the frame currently selected Draw Frame > Overlay to draw the frame on top of any other plot currently displayed in the pro-STAR graphics window. Draw All Frames to draw all frames dened so far

From the Graph menu, choose option: Locate to re-size and/or re-position a frame in the graphics window. Gdraw to plot a frame. Gredraw to re-draw the last frame displayed, incorporating any changes in the user-specied plotting parameters. Gpick to display the value of a graph point picked on the chosen frame with the cursor. Alternatively, use command GPICK. Note that this operation is not
9-31

Version 3.26

POST-PROCESSING Animation

Chapter 9

valid for pie charts. Gpan to translate (pan) the centre of the graph to a location indicated with the cursor. Alternatively, use command GPAN. Note that this operation is not valid for polar graphs and pie charts. Gzoom,on to zoom in (i.e. magnify) a portion of the graph selected via the cursor; repeatedly if desired. Each zoom setting must be conrmed by clicking the Yes button before the frame is re-drawn. Gzoom,back/Gzoom,off display the frame using the previous or original sizing parameters, respectively. Command GZOOM performs the same function.

In all the above cases, the desired frame is selected from a drop-down list. pro-STAR normally operates with a default of 20 graph registers. To modify this value, click button Change Number of Registers on any panel in STAR GUIdes Graphs sub-folder and then enter the required number in the pop-up window provided. Note that if some graph data are already loaded, it is necessary to clear the currently allocated registers first and reset all graphical parameters to default values. This is done by clicking Graph Reset in the STAR GUIde panel or by selecting Graph > Greset from the menu bar.

Animation
The purpose of the animation facility is to produce a set of sequential pictures with minimal effort. If displayed in quick succession, these pictures give rise to the animation effect. In general, the sequence of images is designed to display either movement of an object (by changing the view of that object) or a visualisation of a time-dependent analysis (i.e. the results of a transient simulation). The user must specify the type of data to be displayed and how they vary with time. pro-STAR contains some simple but effective tools to help generate very complex animation sequences using either a models geometry or a CFD solution produced by STAR, or both. To this end, pro-STAR can generate the individual frames required to produce a final animation that could last several minutes in length (or longer, if required). These frames can then be combined to create a MPEG, AVI, QuickTime or GIF animation that can be played back in a variety of environments, from TVs to computers. It should also be noted that pro-STAR cannot compile the end animation. Currently, this has to be done using any suitable external software that can import pro-STAR images and arrange them sequentially to produce a movie. Therefore, creating an animation is normally a two-stage process involving generation of on-screen image sequences within pro-STAR production of a real-time lm/movie using appropriate software outside pro-STAR. The choice of this software is up to the individual user and is not provided with STAR-CD.

The above process is described in detail in the rest of this section. pro-STAR animation effects Before anything can be animated, something needs to change. Surprisingly, even
9-32 Version 3.26

Chapter 9

POST-PROCESSING Animation

for steady-state analysis results, a number of different things can be varied in time to make a static solution come to life. It is thus possible to animate virtually anything the user does on a day-to-day basis using pro-STAR, such as changing the view, plot type, cell set, etc. For a transient solution, an obvious time-varying element is already present and can be utilized effectively to make true time-varying animations, including combinations of other effects. Lists of useful items to change for both steady and transient cases are given below. These are not exhaustive lists and users should feel free to think of other options that might be useful for their own applications. For steady-state analyses, the following are useful items to animate: Geometry and solution result rotations, zooms and translations (see Chapter 5, Additional display options) Translucency changes (OpenGL sessions only) and explosion views Tracking of droplets along their path, see Particle Tracking on page 9-28 Particle track segment animation (see the STAR GUIde Particle Tracks Help topic) Cross-section sweeps through the geometry and static solution results (see the Multiple Plane Plot Help topic) Isosurface sweeps through static solution results (see the IsoSurface Help topic)

For transient results, the following can also be included: Full time-varying changes in any solution variable or secondary quantity Inclusion of moving-mesh effects

Of particular interest is the use of split-screen effects, where different results are animated in different sections of the screen at the same time. Some example frames from animations created by the CD-adapco Group are shown below:

Version 3.26

9-33

POST-PROCESSING Animation

Chapter 9

Figure 9-22

Animation frame examples

Animation sequence denition and display There are three basic approaches to creating animation sequences in pro-STAR 1. Using the SCDUMP command 2. Using the Animation tool 3. Using pro-STAR loops and these are described in the following sections Command SCDUMP pro-STAR can capture screen images in batch mode using command SCDUMP. When the command is issued with a given image format and frame number, all further REPLOT or CPLOT type operations are saved in a file as well as being displayed on screen. This also includes any background images built up using the OVERLAY command. The file formats supported by SCDUMP are:
9-34 Version 3.26

Chapter 9

POST-PROCESSING Animation

XWD X-Windows Dump (X-Motif version only) GIF Graphics Interchange Format PS1/2 Bitmap Postscript EPS1/2 Bitmap Encapsulated Postscript RGB Red-Green-Blue (SGI only)

In general, the GIF format is recommended for most animations. The following command sequence shows how the command is used as part of a script: SCDUMP,GIF,1001 REPLOT SCDUMP,OFF This would produce a GIF image with file name casename001001.gif. If additional images need to be created as part of a looping process, the sequence can be expanded as follows: *SET,FRM,1001,1 *DEFINE,NOEX !- Loop commands start here ! !- Loop commands end SCDUMP,GIF,FRM REPLOT SCDU,OFF *END An alternative to using bitmaps directly is to save the images to the neutral plot file using the TERMINAL command. The neutral plot file can then be converted to individual PostScript files using a batch program, with the PS files then being converted further or used directly, as required. The Animation tool The starting point for this method is pro-STARs Animation tool, shown below. This is accessed by selecting Modules > Animation from the menu bar. The upper section of the dialog is organised similarly to a video recorder images saved to a file (the neutral plot file) can be replayed using the control buttons. The sequence of images to be recorded requires the setting of frame denitions, and sequence parameters.

These parameters can be saved and retrieved from a file, but are not part of the data written in the pro-STAR model (.mdl) file.

Version 3.26

9-35

POST-PROCESSING Animation

Chapter 9

Commands:

RECRD TERMINAL

NPLOT NFILE

SCRIN SCROUT

PLAYBACK

It can be seen that the primary animation dialog contains a slider showing the frame number, a set of buttons for controlling the viewing and recording of an animation sequence within pro-STAR, plus a set of pop-up menus, text boxes and buttons for setting up the animation sequence. The following list describes each of the items on the dialog: Manipulation of neutral plot file images Rewind moves the Frame Number slider back to frame 1. Stop stops the recording or playback of the animation sequence currently in progress. Play starts the playback of a recorded sequence from a neutral le, beginning at the current frame number. Faster increases the speed of the current playback by skipping frames. Clicking on this button repeatedly continues to increase the speed of the playback. Play 1 allows you to step through a recorded sequence by playing back one frame at a time.

General animation Record generates the plots for the current sequences. Plots are generated either on the screen or saved to the neutral le, depending on what has been selected in the Output Device pop-up menu. This works by creating a batch le (of form case.ani) to store all the pro-STAR frame plotting commands and then reads back and executes these commands to produce the required animation.While writing the batch le, the RECORD operation also generates values for the following two variables: (a) TIME the time corresponding to each frame, as supplied by the user.
9-36 Version 3.26

Chapter 9

POST-PROCESSING Animation

(b) FRAM the frame number itself, beginning at the start of the sequence. These variables can be used, for example, to dene the point at which particle information is to be read or to calculate the time step value for which data must be loaded from a transient post le. Output Device allows you to select between the screen, the neutral plot le or a bitmap le for the output medium of a Record operation. It is suggested that Screen be selected initially for testing a particular animation sequence since if you click Record, the animation sequence will be displayed directly on the screen. Having satised yourself with the animation setup, switch to Neutral File to save the sequence to that le for later playback, if desired. Alternatively, the Bitmap File option can be used to directly save up to 20 images to memory. These can be replayed afterwards using the SCRIN command. Output File Name enter the name of the neutral plot (.plot) le to be saved after a Record operation, having selected the appropriate option in the Output Device pop-up. The same le name is used for a Play operation. pro-STARs built-in le browser may be used to locate the required le. Number of Frames in Sequence enter the total number of frames used within a particular sequence. Start with a small number during testing and increase this number for nal production. Number of Playback Loops enter the number of times that a sequence will be replayed after Play is started. Current Sequence Name enter a name for the current sequence. You can dene multiple sequences, each with a different name, to show different animations of the same model. Animation Setup Information File enter a le name (of form case.anim) for saving the setup information dened in the animation module. The same le should also be used to retrieve the information. Make sure that you use this facility to save your settings as animation parameters are not stored in the pro-STAR model (.mdl) le. Select Sequence select the desired sequence from the pop-up menu or create a new one using option New. In the latter case, its name can be entered in the Current Sequence Name text box. Edit Frame Definitions specify plot parameters for selected frames within a particular sequence, chosen from the pop-up menu (see Frame denitions below). Edit Sequence Parameters specify plot parameters for the current sequence (see Sequence parameters below). Read Setup Info from File Read sequence denitions from a le. Save Setup Info to File Write the current sequence denitions to a le.

Frame definitions The information required for frames within an animation sequence is: 1. Display parameters for the starting frame 2. Display parameters for the ending frame The desired choice, First Frame or Last Frame, is made via the Edit Frame Denitions pop-up menu. The selection pops up another dialog, the Animation
Version 3.26 9-37

POST-PROCESSING Animation

Chapter 9

Graphics Parameter Block dialog shown below, that enables entry of the required values.

Command:

AOPTION

The necessary input includes the view, centre, distance, lighting and section parameters for the plot displayed in the frame (see also Plot Characteristics on page 5-3). These values can be copied from the current settings by clicking the Copy pop-up or can be entered manually. Confirm the values by clicking Apply. Sequence parameters Each sequence requires the definition of plot parameters that cannot change within the sequence. These are supplied by clicking the Edit Sequence Parameters button and displaying the Animation Plot Command dialog shown below. The parameters are entities described in Chapter 5 and are selected via a series of pop-up menus such as plot type plot options commands used to generate the initial and subsequent plots (CPLOT, WPLOT, REPLOT, etc.)

In addition, you can enter additional commands (in the Pre-/Post-Animation Sequence scroll lists) to be executed before and after each particular plot. These might be used to change labels, to issue a system command that saves the plot to a film recorder, or to do anything else that you can imagine. Also note that command GRAY produces the grey scale patterns that are used to correct colour variations when filming the animation.

9-38

Version 3.26

Chapter 9

POST-PROCESSING Animation

Commands:

AOPTION

TMSTAMP

Time Stamps A time stamp is a graphical or numerical counter showing the analysis time corresponding to the currently displayed analysis result. If a transient simulation is being animated, it is possible to add such a stamp anywhere on the screen and choose its display format, e.g. a moving bar, by using one of the Time Stamp Type menu options in the above dialog. The time stamps available are: Bar Bar type stamp Cylinder Piston type stamp Crank Crank angle type stamp

and are illustrated in the Figure below:

Bar
Figure 9-23

Cylinder
pro-STAR time stamp options

Crank

The stamps screen size and location is set via the X1, Y1 and X2, Y2 boxes, representing the x- and y- coordinates of opposite corners of the time stamp box. The latters background and fill color can also be set, by entering suitable colour indices in the Outline and Fill boxes, respectively.
Version 3.26 9-39

POST-PROCESSING Animation

Chapter 9

Two time control parameters are supplied, which affect the way a particular time stamp is displayed. An example sequence of commands within a loop would be: *GET,DTIM,TIME TMSTAMP,BAR,0.0,1.0,,,10.1,1,12,2 TMSTAMP,TIME,DTIM Alternatively, the time value may also be displayed on screen using command PLLABEL as follows: *GET,DTIM,TIME TSCA,1,24 PLLA,1,FORMAT,1,1,10.7,2.3 DTIM Time (s): ,F6.1 In the above examples, DTIM is used as variable that can be displayed on screen using a formatted FORTRAN statement (F6.1). Examples Two examples are provided here, illustrating the use of the Animation tool in pro-STAR. The first is a general introduction on how to produce a simple animation quickly; the second involves more advanced use of the panels and other pro-STAR features. Example 1 This example shows how a model can be rotated and zoomed upon simultaneously on the screen display. The animation is then saved in a neutral plot file. Any suitable geometry can be used for this purpose. Set the initial view and plotting options for the model, using either the GUI or commands. For example: WINDOW 0 0 13 10 PLDIS OFF ALL PLDIS ON LOGO 1.2 11 8 VIEW 1 1 1 PLTY EHID PLME OFF LIGHT 1 ON 1 2 3 DIST AUTO CPLOT In the main Animation Module dialog, set the Output Device to Screen and the Number of Frames in Sequence to 20. The default Current Sequence Name, Sequence#1, will be used here. Next select First Frame from the Edit Frame Denitions pop-up menu. When the Animation Graphics Parameter Block dialog appears, select option Current Plot from the Copy pop-up menu. The settings for the initial frame will be lled in the appropriate boxes on the panel. Click the Apply button to conrm the settings.
Version 3.26

9-40

Chapter 9

POST-PROCESSING Animation

Set the nal view options, including zooming in on the model, by typing the following commands in the I/O window: VIEW 1 -1 1 REPLOT ZOOM ON

In the Animation Graphics Parameter Block dialog, click the End of Animation Sequence radio button. Then, as before, choose the Current Plot option from the Copy pop-up menu. Again, the appropriate settings will be lled in automatically in the text boxes of the panel. Enter a value of 2 (seconds) in the Time box, click Apply to conrm the settings and then Close. In the main Animation Module dialog, click the Edit Sequence Parameters button. This will open up the Animation Plot Command dialog. In this panel, select Replot from the Command for Initial Plot pop-up menu. All other settings can be left at their default values. Click Close. In the main Animation Module dialog, click the Record button. This will create a batch (.ani) le to store all the frame plotting commands and then read them back in to produce the required animation. The sequence will be displayed on screen. To permanently save the animation to a le, change the Output Device selection to Neutral File and accept the default Output File Name. Click the Record button again. The animation images will now be stored on le. Use the video control buttons to replay the images as for a normal video recorder.

Example 2 This example animates a particle track (.trk) file and introduces some additional features of the Animation Module. The particle file can be created as part of a STAR analysis (for cases involving droplets) or via the particle track post option in pro-STAR. The animation is run for the time interval 0 - 5 seconds. Command PTREAD is used to read the particles from the track file at various time points in the sequence. Since the example needs to store particles in memory, a problem-specific version of pro-STAR will need to be created using the prolinkl utility. This should be dimensioned according to the number of tracks created for the model. Set the initial view and plotting options for the model, using either the GUI or commands. It is advisable to use the EDGE ON option to make the solution domain transparent and thus enable viewing of particles in the models interior. For example: WINDOW 0 0 13 10 PLDIS OFF ALL PLDIS ON LOGO 1.2 11 8 VIEW 1 1 1 PLTY QHID EDGE ON DIST AUTO CPLOT Set up the particle display options:

Version 3.26

9-41

POST-PROCESSING Animation

Chapter 9

DOPT DOPT DOPT DOPT DOPT

EDGE AFTER NOHIDDEN REPLOT PERIM 1 FILL COLO 4 VECTOR NONE RADI CONS 0.06

In the main Animation Module dialog, select Screen for the Output Device and set the Number of Frames in Sequence to 25. This time, sequence number 2 will be used for the animation. This is done by selecting New from the Select Sequence pop-up menu. Type the name, Particles, in the Current Sequence Name text box. Then choose First Frame from the Edit Frame Denitions pop-up. In the Animation Graphics Parameter Block dialog, choose the Current Plot option from the Copy pop-up menu. Set the Time value back to 0. Click the Apply button to conrm these settings. Then select the End of Animation Sequence radio button. Since initial and nal view points will be the same in this case, choose the First Frame option under the Copy pop-up. Set the Time value to 5, click Apply and then Close. In the main Animation Module dialog, click the Edit Sequence Parameters button. This will open the Animation Plot Command dialog box. Set the option for both the Command for Initial Plot and the Command for Subsequent Plots pop-up menus to Dplot. Also ensure that the Plot Type pop-up is set to Qhidden, as in the original display. To read particle tracks before the animation is created, enter commands PTREAD case.trk TIME DOPT FILL COLO 4 in lines 1 and 2, respectively, of the Pre-Animation Sequence Commands scroll list. Parameter TIME is generated automatically during the Record operation and contains the time corresponding to the particular frame that is plotted next. Finally, turn on the time stamp by choosing the Bar option in the Time Stamp Type pop-up. Enter the following values into the text boxes for the time stamp location parameters: X1 1.5 Y1 1.0 X2 3.0 Y2 1.4 Color Index for Outline 1 Color Index for Fill 4 This will apply a bar type time stamp with a white outline and blue ll to the bottom left corner of the screen. Click Close. In the main Animation Module dialog, click the Record button and view the resulting output. Then change the Output Device setting to Neutral File and accept the default Output File Name. Click the Record button again and, once complete, view the animation using the video control panel. Save the sequence parameters to le case.anim by clicking the Save Setup Info to File button. These parameters can be retrieved at a later time by
Version 3.26

9-42

Chapter 9

POST-PROCESSING Animation

clicking the Read Setup Info from File button. Animation loops Another alternative for creating animations is to use pro-STAR loops (see also Chapter 1, Loops in the pro-STAR Commands volume). The results will the same as for the other methods but the set-up procedure is simplified by the use of a loop. Some examples are provided below. Model geometry animation This includes changing things like viewing direction, zoom position, degree of rotation, translucency, etc. as shown in the following examples: Rotating the model The model can be rotated using the VIEW, ROTATE or ANGLE commands, or any combination thereof. It is important to keep the lighting direction the same for all frames, which can be done by setting it to the view direction at each new position.
!-User to define:

*SET,RVAL,0.5 $!-Set rotation value (degrees/frame) *SET,NOFF,100 $!-Set number of animation frames
!-End of user defined values

PLFIX,ON *SET,FRM,1001,1 *DEFI,NOEX ROTATE,X,RVAL *GET,VWX,VWX *GET,VWY,VWY *GET,VWZ,VWZ LIGHT,1,ON,VWX,VWY,VWZ SCDU,GIF,FRM REPLOT SCDU,OFF *END *LOOP,1,NOFF,1 Changing the translucency This is a useful effect to show the original geometry and then fade to show the internal components. The translucency is introduced through command CLRTABLE and starts off with a value of 1.0 (opaque) before fading to 0.3. Note that this option is only available when running the OpenGL version of pro-STAR.
!-User to define:

*SET,ETVA,0.3 $!-Set ending translucency value *SET,NOFF,50 $!-Set number of animation frames
!-End of user defined values

*SET,TVAL,1.0,1 - ETVA / NOFF * -1 *SET,FRM,1001,1 *DEFI,NOEX CLRT,GEOM,2,,,,TVAL RP19,,1 SCDU,GIF,FRM


Version 3.26 9-43

POST-PROCESSING Animation

Chapter 9

REPLOT SCDU,OFF *END *LOOP,1,NOFF,1 Animating section sweeps An animated section sweep through a display of the analysis results can be easily defined as shown below. The user only needs to input the sweep direction (command SNORM), the starting and ending section values (for command SPOINT) and the total number of animation frames required. A loop can then be defined to sweep through the model and produce individual images of each section.
!-User to define:

*SET,XMIN,-0.5 $!-Set starting section value *SET,XMAX,0.5 $!-Set ending section value *SET,NOFF,200 $!-Set number of animation frames SNORM,1,0,0 $!-Set section normal direction
!-End of user defined values

PLTY,SECTION LOAD,, GETC,VMAG CAVER,CSET POPT,CONT EDGE,ON SECS,OFF CPLOT *SET,FRM,1001,1 *SET,SINC,XMAX - XMIN / NOFF *SET,SPVAL,XMIN,SINC *DEFI,NOEX SPOINT,SPVAL,SPVAL,SPVAL PLTB,ON SCDU,GIF,FRM REPLOT SCDU,OFF PLTB,OFF *END *LOOP,1,NOFF,1 Animating isosurface sweeps An isosurface sweep can be defined in a similar way to the section sweep above. Additional options, such as PMAP, can also be introduced if desired. The isosurface shells are created using command PSCREATE but are removed at the end of each loop using command PSDELETE.
!-User to define:

*SET,ISTA,-20 $!-Set starting isosurface value *SET,IEND,10 $!-Set ending isosurface value *SET,NOFF,200 $!-Set max number of animation frames (use
PSDELE for more) 9-44 Version 3.26

Chapter 9

POST-PROCESSING Animation !-End of user defined values

LOAD,, GETC,P CSET,NEWS,FLUID CAVER,CSET CSCA,14,USER,ISTA,IEND POPT,CONT PLTY,EHID *SET,IINC,IEND - ISTA / NOFF *SET,IVAL,ISTA,IINC *DEFI,NOEX CTDEL,ALL *GET,MXCT,MXCT CSET,NEWS,FLUID POPT,ISOS,IVAL PSCREATE,,ISOSURF,, CSET,NEWS,TYPE,MXCT + 1 POPT,GEOM CPLOT OVER,ON CSET,NEWS,FLUID POPT,GEOM EDGE,ON SCDU,GIF,FRM CPLOT SCDU,OFF PSDELE,1,20,1,ALL EDGE,OFF OVER,OFF *END *LOOP,1,NOFF,1 Animating steady-state droplet or particle tracks All droplet or particle track information is stored in file casename.trk. Even for a steady-state analysis, a time component is available in this file which tracks the position of the particle over time. This time position can be accessed using command PTREAD and droplets plotted using command DPLOT.
!-User to define:

*SET,PSTA,0.0 $!-Particle start time *SET,PEND,0.5 $!-Particle end time *SET,NOFF,200 $!-Set number of animation frames
!-End of user defined values

DOPT,EDGE,AFTER,HIDDEN,REPLOT DOPT,PERIM,1 DOPT,FILL,COLO,4 DOPT,VECTOR,NONE DOPT,RADI,CONS,0.05 *SET,PINC,PEND - PSTA / NOFF


Version 3.26 9-45

POST-PROCESSING Animation

Chapter 9

*SET,PTIM,PSTA,PINC *SET,FRM,1001,1 *DEFI,NOEX PTREAD,,PTIM DSET,ALL PLTB,ON SCDU,GIF,FRM DPLOT,ALL SCDU,OFF PLTB,OFF *END *LOOP,1,NOFF,1 Animating Transient Results A transient result naturally has a time varying element associated with it and as such makes for the most natural of all animation sequences. Any of the quantities saved in the .pstt file can be animated using the basic loop definition given below. However, note also the following recommendations: As the number of frames required to produce an animation is usually higher than the number of results saved in the .pstt le, command TRINTERPOLATE can be used to interpolate linearly between the time values stored. Command CSCALE should be used to x the colour scale for the animation sequence, so that the colours used in each frame remain consistent. For plotting velocity vectors, the VESCALE,,VMAG option should be used to maintain velocity-vector plotting length consistency from frame to frame.
!-User to define:

*SET,TIME,0.0,0.10
!-End of user defined values

TRLOAD,, POPT,CONT PLTY,EHID CSET,NEWS,FLUID TRINTERPOLATE,ON,CAVER,CSET *SET,FRM,1001,1 *DEFI,NOEX STOR,TIME,TIME GETC,VMAG SCDU,GIF,FRM CPLOT SCDU,OFF *END *LOOP,1,NOFF,1 Storing animations pro-STAR offers three methods of storing animations for subsequent replay:

9-46

Version 3.26

Chapter 9

POST-PROCESSING Animation

1. Neutral plot les. These les are stored on disk and contain frame data in device-independent format. In addition: (a) They can be dened as binary les which allows them to be read and written much faster than formatted les (b) A le name is associated with each le, so that multiple les can be opened and closed independently of each other (c) pro-STAR can read these les directly and display their contents via the replay facilities in the main Animation dialog 2. On X-Window and GL based machines, it is possible to store successive screen images as bitmaps and then replay them. This is more memory intensive but faster than using neutral plot les. The main limitations are that a maximum of only twenty frames can be produced and these cannot be stored permanently for later viewing. For example, command SCROUT,5 saves the present screen image to memory in location no. 5. To re-display this frame at a later stage in the current pro-STAR session, command SCRIN,5 would be used. Since storage of these frames can consume a large amount of memory, command SCRDELETE should be used where possible to remove unwanted frames. 3. The third method involves saving pro-STAR images as binary les to disk. These can then be processed externally using suitable imaging tools to produce video images for recording on a VHS (or other) tape. Further details are given in the section on Movie making. Movie making This section outlines the necessary steps required to produce a real-time movie animation for a STAR-CD model. It also includes various tips and recommendations that users might find useful should they wish to produce such an animation. Movie making basics Animations are made up of individual frames, i.e. a set of static images that, when displayed in rapid sequence, result in an animation. In pro-STAR, the choice of frame image formats is restricted to GIF, PostScript, XWD and RGB (for SGI machines). More information on these is provided below. Of importance when making an animation are a number of basic items, such as frame rate frequency, image size and animation sequencing. Each of these will be discussed below together with some good practise/rule of thumb advice. Frame rate Most animations require between 24 and 30 images per second to provide a smoothlooking result. Decreasing the number to around 12 to 15 per second still provides a good result, but fast transitions will become more obvious and jerky. For the sake of argument, 25 frames per second provides a good working value and makes the time values easier to calculate. This will be the base value used in all discussions and examples in this document. It is also recommended that, for typical pro-STAR effects such as section sweeps or particle animations, around 200 to 250 frames be created, resulting in between 8 to 10 seconds worth of real-time animation. This is
Version 3.26 9-47

POST-PROCESSING Animation

Chapter 9

usually enough to emphasize the effect of something without making the animation too slow or boring to watch. The frame rate is usually decided by the individual animation compilation software, so this value should be known prior to image generation. pro-STAR has no influence on the frame rate and can be simply programmed to generate as many images as required. In this sense, one can link a time variable in pro-STAR to an actual animation frame rate frequency and work with real time values when making an animation. More details on this will be given later. File Format and Naming Convention The choice of image file format (e.g. GIF, TIFF, JPEG, BMP, RGB, etc.) is again usually dependent on the tool used to compile the animation. For convenience, the GIF image format is recommended as it is efficient, versatile and can be easily converted to other formats if required. Most animation tools also support this format directly. It is also usual that most animation tools require a sequentially numbered list of input files. Typical naming conventions are: lename001.gif lename.001 pro-STAR can generate images in the format casename000001.ext, where ext stands for the image format extension (gif, xwd, etc.). If necessary, a simple script can be written to convert these file names to the required format for the animation tool. Image Size and Quality Whenever possible, the pro-STAR screen size should be made as large as possible in order to capture bitmap images of the highest quality. Most animation packages can take a given image size and reduce it to a standard size, suitable for playing back in presentations and on TV screens. As long as a reduction is being made and not an enlargement, the quality of the bitmap will still be reasonable after processing. However, this is also dependent on the final movie format chosen and what compression scheme (if any) is used. Movie file formats and software A number of movie formats are available for compiling the final animation. Some common formats include MPEG, Microsoft AVI, Apple QuickTime and GIF. Again, the choice of format is up to the user and usually dependent on the choice of animation software used to process the pro-STAR images. A relatively cheap but powerful package is Adobes Premiere, but many others are available on the market. Image File Manipulation Once the basic images have been created using any of the techniques described in the Animation sequence definition and display section, it is up to the user to decide how best to process them and produce an animation. For users with access to a SGI Unix machine with suitable imaging tools and graphic cards installed, the following guidelines can be used to produce an animation in QuickTime or AVI format.
9-48 Version 3.26

Chapter 9

POST-PROCESSING Animation

In a suitable X-term window, with the pro-STAR output files casename00????.gif present, issue the following Unix commands: To produce an AVI movie:
makemovie -f avi -c jpeg -o movie.avi casename00????.gif

To produce a QuickTime movie:


makemovie -f qt -c jpeg -o movie.qt casename00????.gif

The above SGI Unix command makemovie has additional options which users should investigate on their own if interested in advanced movie-making facilities.

Version 3.26

9-49

Chapter 10

POROUS MEDIA FLOW Setting Up Porous Media Models

Chapter 10

POROUS MEDIA FLOW


The theory behind flow problems of this kind and the manner of implementing it in STAR-CD is given in Chapter 8 of the Methodology volume. The present chapter contains an outline of the process to be followed when setting up a porous media problem and includes cross-references to appropriate parts of the on-line Help system. The latter contains details of the user input required and important points to bear in mind when setting up problems of this kind.

Setting Up Porous Media Models


Step 1 Index the cells in the area where distributed resistance exists. This requires the use of cell tables (see Chapter 6). As an example, consider the specification of a filter in the pipe shown in Figure 10-1.
cell index 1 cell index 2 cell index 1

flow in

flow out

filter

Figure 10-1

Flow through lter in a pipe

For the non-ltered regions (using cell index 1, uid material property index 12 and porous material index 0) the Cell Table Editor would look as follows:

For the ltered region (using cell index 2, uid material property index 12 and porous material index 11) the Cell Table Editor would look as follows:

Version 3.26

10-1

POROUS MEDIA FLOW Setting Up Porous Media Models

Chapter 10

The reason for using an identical fluid property index (i.e. 12) is that both regions are in the same stream. Step 2 Supply property values (resistance coefficients and porosity) for the porous region using the Resistance and Porosity Factor STAR-GUIde panel. If your model contains multiple porous regions possessing different properties, each region may be selected in turn via the Porous Material # control at the bottom of the panel (see also the Porosity Help topic).

Coordinate system 5 x2 (cylindrical) x1 x1 = r 5 x x2 = 3 x3 = z z r

14

z 12 Coordinate system 1 x2 (Cartesian) x1 = x x 1 x1 x2 = y 3 x3 = z y x Honeycombs

Figure 10-2

Coordinate system denition in pipe with honeycomb sections

Thus, for the example shown above, the Resistance and Porosity Factor panel
10-2 Version 3.26

Chapter 10

POROUS MEDIA FLOW Setting Up Porous Media Models

settings for the two honeycomb sections should be as follows: First honeycomb section Porous material index 12 Local coordinate system 1 Flow is along the x- (x1-) direction, hence the value chosen for the resistance coefcients (7) is assigned to Alphax1 and Betax1 The porosity value (0.5) is required only for transient analyses

Second honeycomb section Porous material index 14 Local coordinate system 5 Flow is along the - (x2-) direction, hence the value chosen for the resistance coefcients (7) is assigned to Alphax2 and Betax2 The porosity value (0.5) is required only for transient analyses

Version 3.26

10-3

POROUS MEDIA FLOW Useful Points

Chapter 10

Step 3 Consider whether, as a consequence of special conditions in your problem, additional input is required for each porous material. Specifically: 1. If turbulence effects are important, specify the relevant parameters using the Turbulence Properties STAR-GUIde panel. 2. If there is heat transfer present, specify an effective thermal conductivity and turbulent Prandtl number using the Thermal Properties STAR-GUIde panel. 3. If the problem requires calculation of chemical species mass fractions, the effective mass diffusivity and turbulent Schmidt number for each species need to be specied via the Additional Scalar Properties STAR-GUIde panel. 4. If you are doing a transient analysis, enter an appropriate value in the Porosity box (see also page 8-2 of the Methodology volume).

Useful Points
1. All porous media properties can be modied by a user subroutine (PORCON, PORDIF, PORKEP, POROS1 or POROS2). 2. and should always be positive numbers 3. Excessive values of and should be avoided. In cases such as honeycomb structures where cross-ow resistances are much higher than those in the ow direction, the difference in and between one direction and the other should be limited to four orders of magnitude.
10-4 Version 3.26

Chapter 10

POROUS MEDIA FLOW Useful Points

4. Avoid setting = 0 because this can cause K i 0 as V 0, leading to a potentially unstable situation. 5. When calculating resistance coefcients from expressions involving pressure drops, remember that the pressure drops are based on unit lengths in each direction. 6. Bear in mind the difference between velocity magnitude V and velocity component u i in your coefcient calculations. 7. Special considerations apply to modelling systems incorporating porous bafes (see Bafe Boundaries on page 7-23). Note that bafes may also be used to model a ow resistance at the interface between a uid and a porous region, by placing bafes of suitable properties on the faces of the appropriate porous cells. 8. For examples of porous media ow, refer to the Methodology volume (Chapter 8, Examples of Resistance Coefcient Calculation) and to Tutorial 2.5, Tutorial 2.6 and Tutorial 2.7 in the Tutorials volume. 9. In simulations involving moving meshes, porous media must not be used in areas where there is internal relative mesh motion (cell expansion or contraction). 10. As a result of the particular method used in STAR to calculate pressure gradients at cells on either side of the uid-porous interface, you need to ensure that porous regions are at least two cell layers thick in any coordinate direction. 11. Coupled cell interfaces (see Chapter 4, Cell Couples) must not coincide with porous/non-porous material interfaces

Version 3.26

10-5

Chapter 11

THERMAL AND SOLAR RADIATION Radiation Modelling for Surface Exchanges

Chapter 11

THERMAL AND SOLAR RADIATION


The theory behind problems of this kind and the manner of implementing it in STAR-CD is given in Chapter 9 of the Methodology volume. The present chapter contains an outline of the process to be followed when setting up a thermal radiation model and includes cross-references to appropriate parts of the on-line Help system. The latter contains details of the user input required and important points to bear in mind when setting up problems of this kind.

Radiation Modelling for Surface Exchanges


Step 1 Open the Thermal Options panel in STAR GUIde and select one of the following calculation methods from the Radiation menu: 1. Discrete Transfer - Internal VF Calc, making sure that option Non-Participating is also selected. This choice is valid only if a CFD mesh has already been dened. 2. Discrete Transfer - FASTRAC VF Calc. This method automatically sets up the model for surface exchange and does not rely on a mesh being present. Continue by entering all necessary modelling parameters, as explained in topic Thermal Radiation. Step 2 If present, solar radiation effects can be included by selecting Solar Radiation On and then entering all necessary modelling parameters, as explained in topic Solar Radiation. Note that thermal and solar radiation calculations are independent of each other. A solar radiation only analysis may thus be performed without going through Step 1 above. Solar radiation may enter the solution domain through any open boundary, as well as through transparent walls; see Solar radiation properties on page 7-21 for a description of how the latter are specified. Step 3 In the CFD mesh covering the medium lying between the models radiating surfaces: 1. Inspect the Cell Table Editor entries for cell types assigned to this medium and ensure that their Radiation option is set to On 2. In the Liquids and Gases folder, assign thermal properties to the fluid regions via the Molecular Properties panel 3. Turn on the temperature solver in the Thermal Models panel Step 4 In the Define Boundary Regions panel, specify radiative surface properties for all boundaries apart from symmetry and cyclic ones. Thus: 1. If only thermal radiation is modelled: (a) Specify emissivity, reectivity and transmissivity of all wall, bafe and solid/uid interface boundaries, as necessary. The description given in Thermal radiation properties on page 7-21 (for walls) and on page 7-25
Version 3.26 11-1

THERMAL AND SOLAR RADIATION Radiation Modelling for Surface Exchanges

Chapter 11

(for bafes) should be read before entering values in this panel. (b) Specify the radiation temperature and emissivity at escape surfaces, i.e. boundaries of type Inlet, Outlet, Pressure Boundary, Stagnation Boundary, Free-stream Transmissive Boundary, Transient-wave Transmissive Boundary and Riemann Boundary. The required values are entered in the boxes labelled T Radiation and Emissivity. Note that if the FASTRAC method has been chosen, the T Radiation value is not used. Instead, the Surrounding environment temperature specied in the Thermal Options panel is used to define what is visible through such open boundaries. Note also that the Emissivity value must be set to 0.0 2. For problems involving both thermal and solar radiation, as well as the above parameters, you also need to specify values for the solar reectivity and transmissivity. These are required at walls, bafes, or solid/uid interfaces. The description given in Solar radiation properties on page 7-21 (for walls) and on page 7-26 (for bafes) should be read before entering such values. 3. For problems involving only solar radiation, the transmissivity of wall boundaries is the only user input required. Step 5 Specify radiation patches unless your problem involves only solar radiation. Tab Patches in panel Create Boundaries contains most facilities necessary for this task. If you are using the Internal method, you may also create patches via one of the following command-driven options: 1. By specifying the four vertex numbers that dene a boundary face to be included in the patch command BDEFINE. 2. As above, using the cursor to pick the required vertices from the current plot command BDX. 3. By converting a set of shells into a patch command BSHELL Please also note that: Patches generated for use by the Internal method cannot also be used by the FASTRAC method. The FASTRAC patch specication procedure is different from that for the Internal method. Moreover, the patches are not generated until after the view factor calculation procedure has been initiated (see Step 7 below). Escape surfaces do not need to be patched if the FASTRAC method has been chosen. Step 6 Check the patches created using one of the following methods: 1. Select Patch from the Cell Plot Display Options in the main pro-STAR window 2. Choose Plot > Cell Display > Boundary Patches from the main menu bar 3. Type commands BDISPLAY, PATCH or CDISPLAY, ON, BPATCH in the I/O window The next cell plot will then display boundaries coloured according to patch number
11-2 Version 3.26

Chapter 11

THERMAL AND SOLAR RADIATION Radiation Modelling for Participating Media

instead of according to boundary type. Step 7 The action here depends on your choice of view factor calculation method: If you have chosen Discrete Transfer - Internal VF Calc, write the geometry and problem les in the usual way and then run STAR. The view factor and any solar radiation ux calculations are performed at the start of the analysis. In moving mesh cases, view factors are re-calculated at every time step. View factors are saved in a binary le (case.vfs) and are retrieved from that le in a restart run. If you have chosen Discrete Transfer - FASTRAC VF Calc, go to the Analysis Preparation/Running folder, open the Run Analysis Interactively panel and start up the external program that calculates the view factors. On completion, the results are stored in le case.nvfs. Subsequent actions are as for the Internal method but using the .nvfs le instead.

Radiation Modelling for Participating Media


This approach is most commonly used to model the radiative effects of a fluid filling the space between radiating solid surfaces. However, STAR-CD is also capable of calculating radiative heat transfer through transparent solid regions, which may then be treated in a similar manner to the intervening fluid. This enables you to make a realistic assessment of, for example, the effect of objects such as windows on the overall heat transfer within an enclosure. The necessary steps for participating media analysis are as follows: Step 1 1. Open the Thermal Options panel in STAR GUIde and select one of the following calculation methods from the Radiation menu: (a) Discrete Transfer - Internal VF Calc, making sure that option Participating is also selected. (b) Discrete Ordinates. The participating media radiation option is turned on automatically. 2. Continue by entering all necessary modelling parameters, as explained in topic Thermal Radiation 3. If your problem contains solid regions (including transparent ones) turn on Conjugate Heat Transfer Note that inclusion of solar radiation effects is not currently possible for this type of analysis. Step 2 Using the Cell Table Editor: If transparent solid cells are present, index them to a separate cell type and assign a solid material number to them Select option On from the Radiation menu for all uid and transparent solid cell types in your model
11-3

Version 3.26

THERMAL AND SOLAR RADIATION Radiation Modelling for Participating Media

Chapter 11

Step 3 Go to the Liquids and Gases folder: 1. Assign thermal properties to the uid regions via the Molecular Properties panel 2. Turn on the temperature solver in the Thermal Models panel and click Show Options. In the Participating Media section, specify bulk radiative properties (absorption and scattering coefficients) for the fluid lying between the radiating surfaces. The Conservation and Enthalpy settings in this panel do not affect the radiation solution. Step 4 If transparent solids are present, go to the Solids folder: 1. Assign thermal properties to the solid regions via the Material Properties panel 2. Assign radiative properties (absorption and scattering coefficients) to the solid regions via the Radiative Properties panel Step 5 In the Define Boundary Regions panel, specify surface radiative properties for all boundaries apart from symmetry and cyclic ones. Thus: 1. Specify emissivity, reectivity and transmissivity of all wall, bafe and solid/uid interface boundaries, as necessary. The description given in Thermal radiation properties on page 7-21 (for walls) and on page 7-25 (for bafes) should be read before entering values in this panel. 2. Specify the radiation temperature and emissivity at escape surfaces, i.e. boundaries by type Inlet, Outlet, Pressure Boundary, Stagnation Boundary, Free-stream Transmissive Boundary and Transient-wave Transmissive Boundary. The required values are entered in the boxes labelled T Radiation and Emissivity. Note that: All boundaries are assumed to be diffuse (i.e. their radiative properties are not dependent on the direction of radiation incident on or leaving the surface). The absorptivity of the solid-uid interface (1 - transmissivity - reectivity) should be consistent with the absorptivity of the solid material dened in Step 4. Coupled-cell interfaces should not coincide with the fluid-solid interface. Step 6 If you have chosen the Discrete Transfer - Internal VF Calc method, create radiation patches for all relevant boundary regions, including external boundaries of solid cells. This process is as described in Radiation Modelling for Surface Exchanges, Step 5 and 6. Step 7 Write the geometry and problem files in the usual way and then run STAR. If the initialization stage completes successfully, you will see an echo of the specied modelling parameters in the .info and .run les.
11-4 Version 3.26

Chapter 11

THERMAL AND SOLAR RADIATION Capabilities and Limitations of the DTRM Method

If you have chosen the Discrete Transfer - Internal VF Calc method, the view factor calculations are performed at the start of the analysis. In moving mesh cases, view factors are re-calculated at every time step. View factors are also saved in a binary le (case.vfs) and are retrieved from that le in a restart run. Participating media data are stored in another binary le (case.pgr) and then retrieved from it in a restart run. If you have chosen the Discrete Ordinates method, the STAR solver is called every n iterations during the run to solve the radiative transfer equation (where n is the value specied in the Thermal Options panel). The solver allocates and frees memory each time, which is reported. In addition, the solver prints out a residual history for the solution of the radiative transfer equation, as well as a summary of the computation. At convergence, the displayed value for the Imbalance quantity should be small compared to heat uxes of engineering interest. This indicates that the net radiation emission from the medium equals the net absorption into the boundary. If all boundaries are adiabatic and there are no other energy source terms, both the net boundary emission and the net media emission will separately reach very small values.

Capabilities and Limitations of the DTRM Method


1. The radiation modelling facility should not be used in problems containing partial boundaries (see Figure 4-9 on page 4-21 for an illustration of the partial boundary concept) 2. Lagrangian particle radiation may be modelled by setting Constant 82 to a non-zero value equal to the particle emissivity. For coal combustion cases, this operation may be performed via the NOx/Radiation panel in STAR GUIde. 3. Conducting walls (solid-uid interfaces) should have their transmissivity set to either 1 or 0, depending on whether radiative heat transfer through the solid material is to be considered. If radiation in the solid is on, the transmissivity at the solid-uid interface must be 1, otherwise it must be 0. 4. At present, the FASTRAC method does not apply to problems containing symmetry or cyclic boundary regions. 5. Escape or open ow boundaries (inlet, outlet, pressure, etc.) require an assumption regarding the radiation passing through these boundaries and emitted from outside the solution domain. The Internal method assumes that this externally emitted radiation is coming from a surface of given temperature that coincides with the escape boundary surface. The FASTRAC method assumes that a distant environmental black body emits radiation at a given temperature. These differing assumptions lead to slightly different results. In addition, the Internal method allows specication of different radiation temperatures at each open boundary whereas FASTRAC assumes that all open boundaries "see" the same environmental surface. 6. Radiation patches cannot be applied to boundaries assigned to the default wall region (region no. 0). If you need to turn on radiation modelling in a problem containing such boundaries, you will need to re-assign them rst to a non-zero wall region number.
Version 3.26 11-5

THERMAL AND SOLAR RADIATION Capabilities and Limitations of the DTRM Method

Chapter 11

7. The accuracy of the radiation calculations depends on the patch size since quasi-uniform radiation properties are assumed for a patch. The accuracy of the view factor calculations depends on both the patch size and the number of beams emitted per patch. For maximum accuracy: (a) Patches should be planar. (b) The aspect ratios of patches should be close to 1.0. (c) If you are using the internal view factor calculation method, any renement of patches should be followed by an increase in the number of beams, so that all patches are resolved adequately (see Patch and beam denition on page 9-2 of the Methodology volume for a discussion of this point). (d) Patches should not span multiple regions unless the assumption of quasi-uniform radiation properties is valid over those regions. However, acceptable results may be obtained even if one or more of the above conditions are not fully met. 8. If the wrong patch number is assigned to a cell face during the patch denition process (internal view factor calculations only), the mistake can be rectied either: (a) numerically via the BMODIFY command, or (b) graphically (using the screen cursor) via the BCROSS command. 9. Patches dened as part of the internal view factor calculation can be stored in a le (case.bnd) and read back from it using the normal boundary export and import facilities provided in panels Export Boundaries and Import Boundaries, respectively. 10. The default number of beams used in the Internal view factor calculation process (100) may be sufcient for coarse patches. In situations where a patch is created for every boundary cell face, the number of beams may need to be increased (between 1600 and 2500 for typical radiation problems) in order to resolve adequately the patches present in the system. The external calculation method uses a xed number of beams (1,024). 11. The CPU time for internal view factor calculations increases in proportion to the number of patches multiplied by the number of beams. The CPU time for radiation heat transfer calculations increases in proportion to the number of patches. The external view factor calculations are also dependent on the number of patches but the CPU time required is considerably reduced. 12. STAR-HPC runs are not feasible for problems involving participating media radiation. 13. STAR-HPC runs for problems involving solar radiation are only feasible if the FASTRAC method has been chosen. 14. Surface-exchange problems using the Internal calculation method can be run in STAR-HPC mode, but the view factors have to be calculated in single-processor mode. To do this, run the case for zero iterations on a single processor and save the view factor (.vfs) le. 15. As stated on page 11-3, Step 7, internally calculated view factors for moving mesh cases are re-calculated at every time step. Therefore, in view of the previous restriction, STAR-HPC runs for problems involving both radiation
11-6 Version 3.26

Chapter 11

THERMAL AND SOLAR RADIATION Capabilities and Limitations of the DORM Method

and a moving mesh are not feasible. At present, external view factor calculations cannot be used in moving mesh cases. 16. Note that command PATCH generates only shell surfaces. It cannot be used to create radiation patches.

Capabilities and Limitations of the DORM Method


1. The discrete ordinates model (DORM) does not need radiation patches and the computational overheads involved in their use. In addition, to facilitate switching from a discrete transfer (DTRM) to a discrete ordinate (DORM) model for the same problem, STAR will accept geometry les with or without patches. 2. Nevertheless, using DORM can still add signicantly to the CPU time and memory needed for a given CFD analysis. For this reason, users are encouraged to plan their analyses conservatively until they gain experience with the CPU time and memory requirements of their model. The run-time output for the DORM calculation will echo the memory requirements (see Step 6 above). 3. The memory requirements of the calculation depend on your choice of angular discretization. The table below gives a guide to memory usage per 100,000 cells. Note that this holds for single-precision calculations and a grey medium.
.

Table 11-1: Approximate memory required for DORM analysis Ordinates 8 24 48 80 Angular discretization S2 S4 S6 S8 Additional memory per 100,000 cells 45 MB 55 MB 75 MB 95 MB

4. The model may be run in the normal way under STAR-HPC. However, the solution history for a serial run will be different from that for a parallel run. Although the radiative transfer equation is similar to a normal transport equation, there is no equivalent of the diffusion term and so the equation is not elliptic. To solve this equation efciently, a specialized solver that follows the directions of each ordinate is used. Thus, in the STAR-HPC environment, some domains may receive the information about certain directions only after it has crossed through the other domains. Nevertheless, converged solutions in serial and HPC calculations are identical. 5. Coupling between the ordinate directions at cyclic and symmetry boundaries approximates such boundaries as diffuse. 6. DORM is fully compatible with all cell shapes and connectivities supported by pro-STAR (polyhedral cells, coupled cells, bafe cells, etc.) 7. DORM can also be used to model surface-exchange problems (i.e.
Version 3.26 11-7

THERMAL AND SOLAR RADIATION Radiation Sub-domains

Chapter 11

non-participating media analyses). Since the participating media mode is always on, the absorption and scattering coefcients must be set to zero for such cases. 8. At present, DORM does not support cases involving (a) transparent solids (i.e. the solid-uid interfaces should have zero transmissivity) (b) radiation sub-domains (c) Lagrangian particle radiation (d) moving-mesh cases

Radiation Sub-domains
In some problems, radiation effects are important only within a restricted sub-domain of the overall solution domain, e.g. when doing a complete thermofluid analysis around a car body, where radiation calculations are only necessary under the car bonnet. Under such circumstances, it is possible to confine the radiative heat transfer treatment to the part of the model where it is relevant, thus avoiding the lengthy calculations needed for a full radiation analysis. The following steps are then necessary: Step 1 In the Thermal Options STAR GUIde panel, turn on the radiation calculations by selecting option Discrete Transfer - Internal VF Calc and then specify all necessary radiation parameters. Step 2 Using the Cell Table Editor: Create a separate cell type for all cells occupying the sub-domain that is subject to the radiative treatment For this cell type only, turn the Radiation option On Step 3 In the Create Boundaries panel, create the necessary number of special Radiation boundaries so as to completely separate the radiative from the non-radiative part of the domain. Step 4 Within the radiative sub-domain, use the Define Boundary Regions panel to specify radiation properties for all boundary regions, including the special boundaries created above (see also Chapter 7, Radiation Boundaries). Step 5 Create patches on all boundaries surrounding the radiative sub-domain, including the radiation boundaries, as described in Radiation Modelling for Surface Exchanges. Step 6 Write the geometry and problem files in the usual way and then run STAR.

11-8

Version 3.26

Chapter 12

CHEMICAL REACTION AND COMBUSTION Introduction

Chapter 12

CHEMICAL REACTION AND COMBUSTION


STAR-CD allows for two kinds of chemical reaction: Homogeneous the reaction occurs within the bulk of the uid Heterogeneous the reaction takes place only at surfaces, such as in catalytic converters

Introduction

Heterogeneous reactions are currently implemented via user-supplied subroutines or the STAR/KINetics package. Homogeneous reactions are grouped into three distinct types: 1. Unpremixed/Diffusion reactions of this type occur when the fuel and oxidant streams enter the solution domain separately, as in a Diesel engine. The reactions may be sub-divided into the following groups: (a) Local Source these include eddy break-up, chemical kinetic, and hybrid models (see Local Source Models on page 12-2 for more details) (b) Complex Chemistry these model the reaction system by including the full reaction mechanism (see Complex Chemistry Models on page 12-6 for more details). They also allow use of the STAR/KINetics package if the user has a STAR/KINetics licence. (c) Presumed Probability Density Function (PPDF) these include single and multiple fuel implementations and the Laminar Flamelet model (see Presumed Probability Density Function (PPDF) Models on page 12-3 for more details) 2. Partially Premixed combustion of this type is one of the essential features in Gasoline Direct Injection engines, where combustion occurs in a non-uniform mixture. The reactions may be sub-divided into the following groups: (a) Local Source, of the type mentioned above (b) Complex Chemistry, of the type mentioned above (c) Regress Variable, represented by a Flame Area Evolution (FAE) model 3. Premixed reactions of this type occur when the fluid initially has a uniform composition, as in a spark ignition engine (a) Local Source, of the type mentioned above (b) Complex Chemistry, of the type mentioned above (c) Regress Variable, represented by various eddy break-up and ame-area models (see Regress Variable Models on page 12-5 for more details) The theory behind reaction models of the local source and PPDF type is described in Chapter 10 of the Methodology volume. Regress variable models are normally used in engine combustion simulation and are described separately in Chapter 11. In some cases, the model describing the main chemical reaction(s) may need to be supplemented by subsidiary models that describe:
Version 3.26

Ignition mechanisms
12-1

CHEMICAL REACTION AND COMBUSTION Local Source Models

Chapter 12

Emission of pollutants, typically NOx products. Special considerations apply to modelling NOx-type reactions, as discussed in NOx Modelling on page 12-16. Application Specic models, such as engine knock

All these models together constitute a so-called chemical reaction scheme. Note that: Chemical schemes are dened and numbered individually Chemical scheme denitions can exist independently of any streams or scalar variables. However, they need to be explicitly assigned to a stream before they can be used in your simulation. Each uid stream may be associated with only one chemical reaction scheme. However, this association may be changed by the user to suit problem requirements or to try out alternative reaction models. Special considerations apply to modelling coal combustion; these are discussed in the section on Coal Combustion Modelling on page 12-17.

Local Source Models


The main characteristics of this group of models are as follows: 1. Up to 30 chemical reactions may be dened per scheme 2. The reactions are irreversible 3. Each reaction is associated with a single chemical species designated as the leading reactant (equivalent to fuel in a combustion reaction). This species characterises the reaction and is consumed by it. The remaining reacting species are dened as reactants. 4. The products of a reaction are dened as products. However, (a) if a product of a reaction participates as a reactant in a second reaction, it should be specied as a leading reactant or ordinary reactant, as appropriate; (b) if a product is transported into the solution domain from an external source, it also should be specied as a reactant. 5. The distribution of products within the solution domain can be calculated algebraically, provided that the products are generated only within the domain. 6. If all incoming streams consist of identical fuel-to-reactant ratios (in transient cases the initial elds must also have the same ratio), the reaction process is termed premixed (see Premixed reaction/homogeneous systems on page 10-4 of the Methodology volume). If this is not the case, the process is either of the diffusion or the partially premixed type and the user needs to solve an additional scalar transport equation for the mixture fraction (total mass fraction of burned and unburnt fuel, see Diffusion reaction / non-homogeneous systems on page 10-5). 7. STAR-CD automatically sets up mixture fraction scalars for each leading reactant in diffusion and partially premixed reactions. However, it is the users responsibility to ensure that boundary conditions for both leading reactant and mixture fraction are specied correctly and that they are the same for both of
12-2 Version 3.26

Chapter 12

CHEMICAL REACTION AND COMBUSTION Presumed Probability Density Function (PPDF) Models

them. 8. The reactions themselves are dened by specifying the amounts (in kilomoles) of the participating leading reactants, reactants and products. For example, the input required for the following reaction (combustion of methane) CH 4 + 2O 2 CO 2 + 2H 2 O is Reaction (1) Leading reactant (fuel) (1) Reactant (1) Product (1) Product (2) kmol 1 2 1 2 (12-1)

CH 4 O2 CO 2 H2 O

9. pro-STAR includes facilities for checking that mass is conserved for each reaction.

Presumed Probability Density Function (PPDF) Models


Models of this type are described in Chapter 10, Presumed-PDF (PPDF) Model for Unpremixed Turbulent Reaction in the Methodology volume. These fall into two main groups: Single-fuel PPDF, where only one type of fuel and one type of oxidiser are present, though each of these may enter the combustion system through more than one inlet. Multiple-fuel PPDF, where two types of fuel and one type of oxidiser are present.

The main features of each group are: Single-fuel PPDF 1. The basic equations solved are for the mean mixture fraction f and its variance g f (see Chapter 10, Single-fuel PPDF in the Methodology volume). 2. There is a choice between equilibrium chemistry models (these assume a local instantaneous chemical equilibrium) and a laminar flamelet model that allows for non-equilibrium effects (such as flame stretch) 3. When using equilibrium models: (a) The PDF integration may be performed in two ways: i) By employing a numerical integration technique ii) By expressing all instantaneous values of the variables as polynomials of the mixture fraction and then doing the integration analytically. Polynomial coefficients may be supplied by the user read in from a built-in database stored in le ppdf.dbs
Version 3.26 12-3

CHEMICAL REACTION AND COMBUSTION Presumed Probability Density Function (PPDF) Models

Chapter 12

calculated by the CEA (Chemical Equilibrium with Applications) program [5, 6]. This is an auxiliary program that computes the chemical equilibrium composition of a mixture. This program is included in the STAR-CD suite and is used in conjunction with the built-in PPDF model. (b) There is a choice between adiabatic and non-adiabatic PPDF. For adiabatic PPDF: i) The mixture density and temperature are calculated numerically or from polynomials in f. Note that these polynomials are based on molar fractions. ii) Since temperature is calculated independently, the Constant specic heat property option with default values may be used For non-adiabatic PPDF, the density is calculated from the ideal gas law and the temperature from the enthalpy transport equation. (c) The mass fractions of all other chemical species related to the reaction are dened as additional scalar variables and calculated numerically or from the user-supplied polynomials in f, as above. (d) Up to forty eight such species can be specied by the user. 4. When using the laminar amelet model, the PDF integration is always performed numerically and the results stored in a look-up table which is characterised by its mean mixture fraction, mixture fraction variance and strain rate. There is also a choice between an adiabatic and a non-adiabatic model, as above. Multiple-fuel PPDF 1. Four equations are solved, for the progress variables f p (primary fuel mixture fraction), f s (secondary fuel mixture fraction), g f (primary fuel variance) and g (variance of variable , see Chapter 10, Multiple-fuel PPDF in the Methodology volume). 2. Only an equilibrium chemistry model is available in this case 3. The PDF integration is always performed numerically Other noteworthy points about PPDF models are: 1. In order to increase the efciency of combustion systems by increasing the temperature of incoming oxidisers, the use of vitiated air containing combustion products is a viable option. The basic PPDF model, which assumes that only fuel and air enter the system, cannot be used for this kind of problem. However, STAR-CDs implementation has been extended to allow up to four dilutants to enter the combustion system. The basic setup is the same as that used for the standard PPDF model. However, additional transported scalars are dened to represent the dilutants; therefore, additional boundary conditions need to be dened for them. It is emphasised that PPDF with dilutants can only be used in conjunction with the single-fuel, equilibrium chemistry model plus the non-adiabatic PPDF option.
12-4 Version 3.26

Chapter 12

CHEMICAL REACTION AND COMBUSTION Regress Variable Models

2. The multiple-fuel PPDF option may also be used to model a system containing only one type of fuel but two different types of oxidiser.

Regress Variable Models


Models in this group solve a transport equation for a regress variable representing the combustion process and are described in the Methodology volume, Chapter 11. Their main features are: 1. The regress variable b dened by equation (11-4) in the Methodology volume is the transported variable and is a passive scalar 2. All physical scalar variables participating in such schemes are linearly related to b 3. Regress variable models may be classied into two groups: (a) Flame-area models, discussed in section Premixed combustion in spark ignition engines and also in Partially premixed combustion in spark ignition engines of the Methodology volume: i) The Weller ame area model makes use of the wrinkling factor , which is either obtained from an algebraic relationship given by equation (11-36) or from the solution of a transport equation ii) The CFM-ITNFS model employs a transport equation for the ame area density , given by equation (11-10) iii) The Weller 3-equation model requires the solution of equations for both wrinkling factor and mixture fraction iv) All have their own ignition models (b) Eddy break-up models, used in a manner similar to that described above under Local Source Models. 4. The one-step reaction representing the combustion process is associated with a single chemical species designated as the leading reactant (or fuel). This species characterises the reaction and is consumed by it. The remaining reacting species are dened as reactants. 5. The reaction is irreversible and is dened by specifying the amounts (in kilomoles) of the participating leading reactants, reactants and products. 6. pro-STAR includes facilities for checking that mass is conserved. 7. If all incoming streams consist of identical fuel-to-reactant ratios (in transient cases the initial elds must also have the same ratio), the reaction process is termed premixed (see Premixed reaction/homogeneous systems on page 10-4 of the Methodology volume). If this is not the case, i.e. the process is of the partially premixed type, an additional scalar transport equation for the mixture fraction needs to be solved. The only regress variable model that may be used in partially premixed systems is the Weller 3-equation model. 8. STAR-CD automatically sets up mixture fraction scalars for each leading reactant in diffusion and partially premixed reactions. However, it is the users responsibility to ensure that boundary conditions for both leading reactant and mixture fraction are specied correctly and that they are the same for both of them.
Version 3.26 12-5

CHEMICAL REACTION AND COMBUSTION Complex Chemistry Models

Chapter 12

9. Exhaust gases present in EGR (Exhaust Gas Recirculation) systems are taken into account by dening active scalars for each exhaust gas species and solving additional transport equations for their mass fraction (see also Chapter 11, Exhaust Gas Recirculation in the Methodology volume).

Complex Chemistry Models


The complex chemistry model supports two types of format for reaction mechanism definition. One of them is the CHEMKIN format which is supported in conjunction with a STAR/KINetics licence (the user should refer to the STAR/KINetics manual for details). The other is STAR-CD native format and this is described below. In order to use STARs complex chemistry model, a reaction mechanism file called cplx.inp&& has to be created by the user for each chemical scheme in which a complex chemistry model is applied. The characters && at the end of the file name represent the chemical scheme number in which the complex chemistry model is applied. For example, if such a model is applied in chemical scheme no. 2, the reaction mechanism file should be called cplx.inp02. STAR will write an echo file cplx.inp&&-echo for each cplx.inp&& file it has read, so that users can ensure settings have been correctly applied. File cplx.inp&& contains the reaction formula, chemical kinetic data and keywords and extra parameters for special reactions, as outlined below: Reaction formula denition The general form of a reaction formula is given by n1 R1 m1 + n2 R2 m2 + = n1 P 1 m1 + n2 P 2 m2 + A E Here, n 1 , n 2 , , n 1 , n 2 , are the stoichiometric coefficients which could be integer or real numbers, R 1 , R 2 , , P 1 , P 2 , are species names, m 1 , m 2 , , m 1 , m 2 , are the mass fraction exponentials, A is the pre-exponential factor (in units of cm-mole-sec-K), the temperature exponent and E the activation energy of the Arrhenius rate constant (in cal/mol). If the mass fraction exponentials are equal to 1, they are not written into the corresponding echo file (cplx.inp&&-echo). Rules: There are no spaces between stoichiometric coefcients n i , n i and species names. If n i or n i are equal to 1, they can be omitted. m i and m i must be separated by at least one space from the species name. If the value of m i or m i is not specied, it will be assumed that m i = n i or mi = ni . Character = is used for reversible reactions; for irreversible reactions. There is no + character between the pre-exponential factor, A, and the nearest species name. A, and E are separated by at least one blank space. Everything following the ! character is treated as a comment The + character should not be used in a real number expression. For example, 1.2E+05 should be written as 1.2E05. The maximum number of reactants or products in a single reaction must not exceed 5

12-6

Version 3.26

Chapter 12

CHEMICAL REACTION AND COMBUSTION Complex Chemistry Models

Three-body reaction denition To define a three-body reaction, add a line starting with the keyword M after the reaction formula, i.e. / M / A / 1 / B / 2 / Rules: Keyword M must be enclosed by two / characters and is not case sensitive A, B, are species names and 1 , 2 , are the corresponding efciency factors. They are separated by at least one blank space.

The Landau-Teller reaction To define a Landau-Teller reaction, add a line starting with the keyword RLT after the normal reaction formula, i.e. / RLT / B C Rules: Keyword RLT must be enclosed by two / characters and is not case sensitive B and C are the Landau-Teller parameters and are separated by at least one blank space If the reaction is a three-body reaction as well, a new line is added starting with / M / and the third body efciency factors

The Lindemann fall-off reaction To define a Lindemann fall-off reaction, add a line starting with the keyword LOW after the reaction formula, i.e. / LOW / A L L E L Rules: Keyword LOW must be enclosed by two / characters and is not case sensitive A L , L , and E L are the pre-exponential factor, temperature exponent and activation energy, respectively, of the low pressure limit and are separated each from each other by at least one blank space The corresponding values for the high pressure limit are assumed to be those given above as part of the reaction formula denition If the reaction is a three-body reaction as well, a new line is added starting with / M / and the third body efciency factors

The Troe fall-off reaction To define a Troe fall-off reaction, add two lines starting with keywords LOW and TROE, respectively, after the reaction formula, i.e. / LOW / A L L E L

Version 3.26

12-7

CHEMICAL REACTION AND COMBUSTION Complex Chemistry Models

Chapter 12

/ TROE / a b c d Rules: The denition of keyword LOW is the same as above The pre-exponential factor, temperature exponent and activation energy values for the high pressure limit are assumed to be those given above as part of the reaction formula denition Keyword TROE must be enclosed by two / characters and is not case sensitive a, b, c and d are the corresponding Troe parameters (d is optional) If the reaction is a three-body reaction as well, a new line is added starting with / M / and the third body efciency factors.

The SRI fall-off reaction To define a SRI fall-off reaction, add two lines starting with the keywords LOW and SRI, respectively, after the reaction formula, i.e. / LOW / A L L E L / SRI / a b c d e Rules: The denition of keyword LOW is the same as above The pre-exponential factor, temperature exponent and activation energy values for the high pressure limit are assumed to be those given above as part of the reaction formula denition Keyword SRI must be enclosed by two / characters and is not case sensitive a, b, c, d and e are the corresponding SRI parameters and are separated from each other by at least one blank space. If the reaction is a three-body reaction as well, a new line is added starting with / M / and the third body efciency factors.

An example reaction mechanism file is shown in Table 12-1. Table 12-1 2.24E4 0. H + O2 = OH + O O + O = O2 2.62E16 0.84 / M / H2/2.40/ H2O/5.40/ CH4/2.00/ CO/1.75/ CO2/3.60/ HCO = CO 1.2 + H 5.00E12 0. /M / CO + O = CO2 1.80E10 0. / LOW / 6.020E14 0. H + CH2 = CH3 6.0E14 0. / LOW / 1.04E26 2.76 / TROE / .7830 74.0 2941.0 CH + N2 = HCNN 3.1E12 0.150 / M / H2/2.0/ H2O/6.0/ CH4/2.0/ CO/1.5/ CO2/2.0/
12-8

16795 0 19208 2385 3000 0. 1600 6964 0.0 ! modied

Version 3.26

Chapter 12

CHEMICAL REACTION AND COMBUSTION Setting Up Chemical Reaction Schemes

Table 12-1 / LOW / / TROE / 0.667 1.3E25 235.0 3.16 2117.0 740 4536.0

Setting Up Chemical Reaction Schemes


Step 1 Go to the Select Analysis Features panel and choose option Chemical Reaction from the Reacting Flow menu. Click Apply. The Reacting Flow sub-folder will appear in the NavCenter tree, nested inside folder Thermophysical Models and Properties. Step 2 Open the Reacting Flow sub-folder to display a second sub-folder called Chemical Reactions. This contains all panels needed to fully define a chemical reaction scheme. Step 3 Go to the Chemical Reactions sub-folder, open panel Scheme Definition and select a free scheme number using the Chemical Scheme # scroll bar at the bottom of the panel. You must then: Specify the basic reaction type (Unpremixed/Diffusion, Partially Premixed, Premixed, or Heterogeneous/Surface) by choosing an option from the Reaction Type menu Select the most appropriate reaction model for your problem from the Reaction Model menu. The menu options depend on the reaction type specied above. For some models, you will also need to specify the form of their Implementation or the method of calculating the Unburnt Gas Temperature, as explained in the Scheme Definition Help topic. Step 4 In the Reaction System panel, use the on-line help provided to assist you in specifying the relevant chemical reaction definitions, control settings and model parameters. pro-STAR associates all chemical species defined in this panel with additional scalar variables of the same name and also does a stoichiometric check for every reaction. The required scalars and their properties are retrieved from pro-STARs built-in database. Note that: If a species cannot be mapped to a material in a database, a warning is displayed in the Output window and a fresh scalar of that name (but with undened properties) is created and added to the scalars list. You should therefore go to the Molecular Properties (Scalar) panel to specify the missing properties before proceeding further. It is also important that definition of all material (stream) properties via panel Molecular Properties has already been completed before any scalar properties are defined. If the mass fraction of a non-reacting species is to be included in the calculations, assign a scalar variable to the species via the Molecular Properties (Scalar) panel and put it at the end of the existing scalars list.
12-9

Version 3.26

CHEMICAL REACTION AND COMBUSTION Setting Up Chemical Reaction Schemes

Chapter 12

The parameters of a reaction can be redened at any time by selecting its parent scheme via the Chemical Scheme # scroll bar and then making the necessary changes. Step 5 In the Ignition panel, choose an ignition model or ignition start-up scheme, depending on the chemical scheme type defined in Step 3 Step 6 If required, go to panel Emission and activate the built-in pollutant emission models for NOx and/or soot Step 7 Some schemes allow the inclusion of knock modelling as part of the overall chemical reaction simulation process. Parameters for this model may be specified in panel Knock. Step 8 If the Coupled Complex Chemistry model is in use, go to panel Solution Controls to select the appropriate solution method controls and to perform the necessary species-to-scalar mapping. Step 9 Go back to Step 3 and repeat the above process until all schemes have been defined. Step 10 Assign a reaction scheme to every stream in your model using the Scheme Association panel. Note that it is not necessary to assign every available scheme to one of the streams. This allows you to define redundant schemes and then experiment with different schemes for the same stream, by performing separate analyses for each combination. In multi-stream problems where each stream has a different scalar composition, the Additional Scalars panel (Equation Behaviour sub-folder) enables you, in effect, to select which scalars exist in what stream. It is strongly recommended to make use of pro-STAR Constants 64, 89 and 90 when running combustion cases. Their effect is as follows: Setting Constant 64 = 2 will constrain calculated values for all active scalar mass fractions to the range 0.0 1.0. Thus, numerical under- and over-shoots that can destabilize the solution process may be avoided Constant 89 can be assigned to the minimum allowable temperature calculated by STAR Constant 90 can be assigned to the maximum allowable temperature

Useful points for local source and regress variable schemes 1. You are strongly recommended to perform stoichiometric checks for every reaction, especially if Step 4 above found missing scalars that were subsequently dened manually. To do this, click the Check Stoichiometry button in the Reaction System tab when you have nished setting up the model and before writing data to the problem (.prob) le. 2. For steady-state problems involving reactions that use a hybrid model,
12-10 Version 3.26

Chapter 12

CHEMICAL REACTION AND COMBUSTION Setting Up Chemical Reaction Schemes

3.

4.

5. 6. 7.

8.

9.

10.

experience so far has shown that the best practice is to obtain a converged solution rst, using only the eddy break-up model for all reactions. The chemical kinetic model should then be employed by selecting the Combined/User option and the analysis continued using the hybrid model until the nal solution is obtained. The steady-state under-relaxation factors for temperature T and all scalar variables representing transported mass fraction, mixture fraction, etc. should be identical. The recommended range is 0.3 to 0.7. Note that this factor has no effect for scalars calculated by other means, e.g. by an internal algebraic equation. The residual error tolerance for temperature and all scalar variables can be tightened from the default value of 0.01 to 0.001. This will increase the number of sweeps per PISO iteration but will improve the accuracy. The turbulent Prandtl and Schmidt numbers for all scalar variables should be identical. For premixed ames, the value of mixture fraction is known and remains constant throughout the analysis. When dening stream material properties via the Molecular Properties panel in STAR-GUIde, you are recommended to choose option Polynomial in the Specic Heat pop-up menu. This will load suitable polynomials from the CHEMKIN or CEC thermodynamic databases [1, 2]. A polynomial variation for molecular viscosity and thermal conductivity can be specied in the same way. For mass diffusivity, set via the Diffusivity panel in STAR-GUIde, the Constant option is recommended for maximum efciency, particularly in the case of turbulent combustion. If the same reaction appears in more than one scheme, user input can be reduced by employing command RSTATUS to copy the reaction denition from a previous scheme to the current one. If modelling considerations demand it, individual reactions in multi-step reaction systems can be turned on or off at appropriate points in the simulation. This may be done by selecting Off in the Status pop-up menu corresponding to the reaction concerned. Chemical reactions (especially those for combustion) commonly take place in a stream where air is the background material. Given that the nitrogen component is often chemically inert and therefore does not appear in a chemical reaction equation, it is convenient to include N2 as a separate scalar to represent the background material. Therefore: (a) If N2 does not appear in a reaction denition, pro-STAR will automatically set up an extra active scalar called N2. By default, its physical properties are those for nitrogen and the solution method is set to Internal (see panel Additional Scalars). The value of the N2 mass fraction returned by STAR is such as to make the mass fractions at every cell sum to 1.0 (b) If N2 is present in a reaction denition, N2 will be set up like any other scalar and its solution method will be set to Transport.

11. If you are modelling an EGR system, the recirculated gases must be explicitly dened as active transported scalars within STAR Guides Additional
Version 3.26 12-11

CHEMICAL REACTION AND COMBUSTION Setting Up Chemical Reaction Schemes

Chapter 12

Scalars folder. These must also be given names that are different from those of the parent species participating in the chemical reaction and make sure that their properties (as dened in the Molecular Properties (Scalar) panel) are correct. STAR will then be able to distinguish between species representing products of the chemical reactions and the ones coming from the EGR stream. 12. Complex chemistry models must be run in double precision. Chemical reaction conventions The following conventions should be observed when typing reaction definitions in the Reaction System panel: 1. Enter the symbol as two consecutive characters -> 2. Specify the leading reactant as the rst chemical substance on the left-hand side of the reaction equation. Its name will appear in the Leading Reactants list at the bottom of the panel, once the reaction details are conrmed. 3. Specify up to three ordinary reactants taking part in the reaction(s). Their names will appear in the Reactant Parameters list, once the reaction details are conrmed. 4. If a reaction constituent only occurs on the right-hand side of all reaction equations, it will be assumed to be a product and its name will appear in the Products list. However, if you wish this constituent to be a reactant (see, for example, point no. 4. on page 12-2), type the symbol [R] immediately after its name. 5. In multiple reaction schemes, the normal rule for what may appear as a product is as follows: (a) Reaction 1 is allowed to produce leading reactants 2 to 30 as products (b) Reaction 2 is allowed to produce leading reactants 3 to 30 as products (c) Reaction 3 is allowed to produce leading reactant 4 to 30 as products . . . (d) Reaction 29 is allowed to produce leading reactant 30 as a product (e) Reaction 30 is not allowed to produce any leading reactants For example, the two equations in the following scheme CH 4 + 1.5 O2 CO + 2H 2 O [ r ] CO + 0.5 O 2 CO 2 should be dened in the order shown above and not the other way round in order to satisfy this rule. The system in this example also includes an inux of H 2 O from an external source so that both O 2 and H 2 O are reactants in this case. Therefore, the symbol [R] needs to be entered after the latters name. 6. Note that, point no. 5 above notwithstanding, STAR will still allow one reaction only to create a product that has already been dened as the leading reactant of a previous reaction.
12-12 Version 3.26

Chapter 12

CHEMICAL REACTION AND COMBUSTION Setting Up Chemical Reaction Schemes

Useful points for PPDF schemes 1. In single-fuel PPDF models, the quantities f and g f are automatically assigned by STAR-CD as scalar numbers 1 and 2. For the multiple-fuel model, the quantities f p , g f , f s and g become scalar numbers 1 to 4, respectively. 2. Any additional variables are assigned to further scalars, beginning with scalar number 3 (single-fuel) or 5 (multiple-fuel). This can be conrmed by displaying a STAR-GUIde panel that contains a Scalar list (for example, Initialisation in the Additional Scalars folder). 3. In adiabatic PPDF applications: (a) Remember that only the quantities given in item 1 above are calculated from transport equations. Temperature, density and all other variables are calculated internally. However, if any additional non-reacting scalars are dened (see Setting Up Chemical Reaction Schemes, Step 4) these are solved in the normal way. (b) pro-STAR provides a reminder that density is no longer calculated by one of the normal options. Thus the density setting in the Molecular Properties panel is automatically changed to read PPDF. (c) Polynomial coefcients should be supplied in terms of molar fractions (kmol/kmol). However, scalar concentrations for initial and boundary conditions should be specied as mass fractions. (d) If the molecular weights of all scalar species are correctly specied, STAR will output the calculated species concentrations in terms of mass fractions. However, if all species molecular weights are assigned the same value, the output will be in terms of species mole fractions. 4. In non-adiabatic PPDF applications, check the information displayed by the STAR-GUIde interface to ensure that: (a) Option Active is selected from the Inuence pop-up menu for all chemical species (Molecular Properties (Scalar) panel in folder Additional Scalars) (b) Option Chemico-Thermal is selected from the Enthalpy pop-up menu (Thermal Models panel in folder Liquids and Gases) (c) The Ideal-f(T,P) option is used for density (see topic Density) (d) The Polynomial option is used for specic heat (see topic Specic Heat) (e) The scalar species concentrations are specied in terms of mass fractions 5. If the PDF is to be calculated by numerical integration, a number of control parameters should be specied. These are illustrated in the Figure below:

Version 3.26

12-13

CHEMICAL REACTION AND COMBUSTION Setting Up Chemical Reaction Schemes

Chapter 12

MF

N1 0

N2

fs

}
Ni Ni+1 1

NF

Figure 12-1

Control parameters for PDF integration

The quantities shown in Figure 12-1 are dened as follows: (a) f s stoichiometric mass fraction (b) N F mixture fraction points. This is the total number of locations where chemical equilibrium calculations are performed. (c) MF multiplying factor. This is the number of points added between any two adjacent points, such as N i and N i + 1 . These extra points are used for improving the resolution of the calculation and their values are extrapolated from those at N i and N i + 1 . The total number of points Nt used in the integration is given by (12-2) N t = ( MF + 1 ) ( N F 1 ) + 1 . (d) P F integration partition. This parameter represents the percentage of points used to resolve the region between 0 and f s in the mixture fraction space, i.e. the number of points in this region is given by ( P F 100 ) N t 6. When using the laminar amelet model, the following points should be borne in mind: (a) Each amelet library refers to a different strain rate. A typical example might be to have 6 amelet libraries at strain rates of 0, 25, 50, 200, 400 and 1000 s-1. (b) Calculating amelet libraries may be very time consuming. Therefore, when creating a new library, you should consider restarting the calculation from the nearest available strain rate wherever possible. However, if the difference in strain rate is quite large and convergence becomes difcult, it will be necessary to specify a new set of initial conditions and start again. (c) STAR-CD provides an option for either specifying the inlet strain rate or
12-14 Version 3.26

Chapter 12

CHEMICAL REACTION AND COMBUSTION Setting Up Chemical Reaction Schemes

calculating it via a built-in code. For simplied reaction mechanisms, try the rst alternative combined with the restart option from a previously converged strain rate. For more complex mechanisms, you may want to try the second alternative, check what strain rate the code calculates, and then change the initial conditions accordingly. When the initial conditions are sufciently close to the desired strain rate, you may be able to select the rst alternative with a restart option to achieve a solution. (d) The results of each amelet library calculation are printed out in a separate output panel. You should always inspect that panel to ensure the displayed values are reasonable. (e) If your problem setup contains multiple reaction scheme denitions, any laminar amelet model(s) should appear at the top of the reaction scheme list. Useful points for complex chemistry models 1. The distinction between premixed, partially premixed and unpremixed combustion made in the pro-STAR GUI is irrelevant for complex chemistry models, since transport equations are solved for all species (or one of them is calculated as 1 Y i ). Hence, this model is available for all the above reaction types. 2. The calculation of reaction rates can be very time-consuming. Users may therefore specify, via Constant 173, a temperature limit below which reaction rates will not be calculated. The default value of this limit is 300 K but may be re-set as necessary. 3. The steady-state complex chemistry solver employs an internal sub-timestep whose default value is 105. Users may change this value via Constant 154. Normally, a very small sub-timestep value will result in the calculation of large reaction rates, which could in turn make the solution of the steady-state transport equations unstable. On the other hand, if the value is too large, the chemistry solver will become very time-consuming. 4. For very stiff problems, the maximum number of sub-timesteps may need to be increased beyond its default value, currently set at 500. This is done via Constant 192. Users can also change the chemistry solvers relative and absolute convergence tolerance via Constants 123 and 124, respectively. The default values for these are set at 104 and 1010, respectively. 5. There is a balance between robustness and convergence rate. The latter may be increased by higher values of the species under-relaxation factor, but users should be careful that the stability of the solution is not sacriced at the same time. 6. For steady-state cases, it is recommended that the initial species distribution should correspond to a non-combustible mixture, such as air. Useful points for ignition models 1. Shell and 4-step ignition models: Option Use Heat of Reaction in the Reaction System STAR GUIde panel is valid only when the pro-STAR-dened specic heat polynomial coefcients are used. When the reaction is exothermic, the heat of reaction value is negative. For an
Version 3.26 12-15

CHEMICAL REACTION AND COMBUSTION NOx Modelling

Chapter 12

endothermic reaction, the value is positive. 2. CFM ignition model: In problems where only a part of the solution domain is being simulated, you need to specify (via Constant 142) a geometrical factor whose value is the fraction of the ame kernel area in the partial (simulation) domain relative to the entire domain. For example, for a wedge-shaped solution domain in a cylindrical system and with the ignition point lying on the axis, this value should be 360 , where is the angular extent of the wedge. The default value of the above factor is 1.

NOx Modelling
NOx concentration is usually low compared to other species in combustion systems. As a result, it is generally agreed that NOx chemistry has negligible influence and can be decoupled from the main combustion and flow field calculations. The recommended procedure for performing a NOx analysis is as follows: Step 1 Set up the combustion model as usual. Step 2 In the Chemical Reactions folder of STAR GUIde, open the Emission panel and then go the NOx section. Select option On from the NOx Model menu to activate STAR-CDs built-in NOx subroutines. Step 3 Turn on the appropriate NOx production mechanism from the Thermal, Prompt or Fuel menus (see Chapter 10, NOx Formation in the Methodology volume). Option User in any of these menus enables you to perform the necessary calculations via subroutine NOXUSR. If option On is selected for Thermal NOx, specify values for the required constants as explained in the on-line help topic for NOx. Step 4 Check that pro-STAR has created an extra passive scalar variable called NO, by opening the Molecular Properties (Scalar) panel in the Additional Scalars folder and inspecting the currently defined scalars. If the problem requires the prediction of fuel NOx (this is only applicable to nitrogen-containing fuels, e.g. coal), check that an additional passive scalar called HCN has also been created. Step 5 If your model provides for the calculation of OH and H mass fractions, their values will be used in equation (10-84) of the Methodology volume to implement the extended Zeldovich mechanism. Step 6 For steady-state problems, make sure that a sufficient number of iterations has been performed for the solution of NO and (if present) HCN to have converged.

12-16

Version 3.26

Chapter 12

CHEMICAL REACTION AND COMBUSTION Soot Modelling

Soot Modelling
The current soot model is applicable only to unpremixed and partially premixed reactions and is activated via the Emission panels Soot section in STAR GUIde. The only user input required is four scaling factors, see equation (10-120) and (10-121), that determine the magnitude of the contribution from each source term. For example, a decrease in the value of the scaling factors for positive source terms (surface growth and particle inception) results in slower formation of soot. In diffusion flames, this can shift the point of maximum soot volume fraction further downstream. A typical range for these factors is 0.5 5.0 and their default value is 1.

Coal Combustion Modelling


Coal combustion models involve two-phase flow with complex solid and gas phase chemical reactions. To reduce CPU time, it is recommended to run such a simulation as a two-stage process using the STAR GUIde system. Thus, initially the problem is run isothermally. Then, once a reasonably converged solution is obtained, the problem is re-run with coal combustion turned on. An outline of the steps involved and recomendations on model set-up at each stage of the process is given below: Stage 1 Run the model as an isothermal (non-reacting) problem and obtain a converged solution which effectively serves as an initial condition for the flow field. Step 1 Generate a mesh for the problem as usual and check that the steady-state analysis mode has been chosen in the Select Analysis Features panel Step 2 Check that the temperature calculation is switched on in the Thermal Models panel (Liquids and Gases sub-folder) and select an appropriate turbulence model in the Turbulence Models panel. Step 3 Define all boundaries and set up boundary conditions throughout, including appropriate temperature distributions at inlet boundaries. Step 4 Run the case until a reasonable flow field is established (see Note 1 below). Stage 2 Turn on coal combustion and generate the final solution as follows: Step 1 Go to the Select Analysis Features panel and choose option Coal Combustion from the Reacting Flow menu and Lagrangian Multi-Phase from the Multi-Phase Treatment menu. Click Apply. The Coal Combustion sub-folder will appear in the NavCenter tree, nested inside folders Thermophysical Models and Properties > Reacting Flow. An additional sub-folder, Lagrangian Multi-Phase, will also open in the NavCentre tree. At the same time, pro-STAR will set up your model
Version 3.26 12-17

CHEMICAL REACTION AND COMBUSTION Coal Combustion Modelling

Chapter 12

automatically for this type of analysis, using the Constant Rate, 1st-Order Effect and Mixed-is-burnt sub-models as defaults for volatiles, char and gas combustion, respectively. Step 2 If radiation effects are to be modelled, go to the Thermal Options panel in folder Thermophysical Models and Properties and select the appropriate radiation model, as described in Chapter 11 of the User Guide (see also Note 2 below). Step 3 Go to the Coal Combustion sub-folder and supply or modify data in each of its panels in turn: In the Coal Composition panel, enter coal composition data and click Apply. The data supplied in this panel can be stored in a le called coal.dbs by entering a coal name and clicking Save to D/B. Alternatively, you can read the coal composition from an existing le by clicking Open D/B. Data entered in the Proximate analysis tab should be supplied on an air dried basis. Data in the Ultimate analysis tab should be supplied on a ash-free basis, where C + H + O + N + Chlorine (Cl) + Sulphur (S) = 1. The Cl and S components are then assumed to be ash. If Cl and S need to be included in the calculations, these components can be modelled separately via user subroutine PARUSR at a later point. Details of this method are given in Chapter 5 of the Supplementary Notes volume describing coal blend modelling. This chapter also covers all other aspects of this type of model, such as specifying the components and reaction rates for the different coals in the blend. Supply the coal Q factor, which is an adjustment for volatile matter, in the Miscellaneous tab. Studies have shown that under certain heating conditions, a signicantly higher amount of volatile matter can be devolved than that measured by the standard proximate analysis test. This effect is accounted for by the Q factor which is dened by (V*/VM) = Q (12-3)

where V* is the volatiles yield and VM the proximate analysis matter. Also in the Miscellaneous tab, enter the net caloric value of the fuel and the fraction of total nitrogen in the volatiles. Finally, choose the volatiles specic heat option (see Note 3 below).

In the Sub Models panel, select the desired models for volatiles, char and gas combustion. To speed up convergence, the Constant Rate scheme should be selected initially in the Volatiles tab. The initial devolatilisation temperature should be set to that of the primary inlet flow containing the coal particles (this will help with initialising the temperature field and instigating ignition). After the rest of the coal particle parameters have been set, the problem should be run using an Initial Field Restart (panel Analysis
Version 3.26

12-18

Chapter 12

CHEMICAL REACTION AND COMBUSTION Coal Combustion Modelling

(Re)Start) from the isothermal solution obtained in Stage 1 and run for several hundred iterations or until a reasonably stable solution is reached. The devolatilisation temperature should then be raised to a more realistic level (e.g. 550 K) and the model run once again using a Standard Restart until a stable solution is reached. The Single Step or 2-Competing steps model should then be chosen. These require values for pre-exponential factors and activation energy that should be determined experimentally or taken from the available literature (as is the case with the default values used by STAR). The solution should then be re-run with a standard restart (see Notes 4 and 5 below regarding changing parameters or submodels in this panel). In the Char tab, select one of the three char models available. Char rates can be determined experimentally or taken from the literature. In the Gaseous Combustion tab, select either Mixed-is-Burnt (fast chemistry approach) or the 1-step or 2-step EBU models. When this is set, pro-STAR will create the appropriate scalars and select the transport or internal solution method for them, depending on the model chosen. Char oxidation products can be changed for specific gaseous combustion models using Constant 120, as explained in Switches and constants for coal modelling below.

In the NOx/Radiation panel, turn on the NOx generation and/or coal particle radiation options, as required. Note that, if the latter is chosen, you should already have set up your model for radiation calculations as described in Chapter 11. Note that particle radiation can be used only with the Discrete Transfer (DTRM) model. Enter the particle emissivity value. The NOx model can be turned on near the end of the solution as it has only a small effect on the overall ow eld. In the Control/Printout panel, specify the required solution control and printout parameters. It is sometimes necessary to initially reduce the under-relaxation factor of the particle source term (to as low as 0.1) in order to achieve a stable solution. The factor may be increased later on in the solution. The iteration number at which particle source term averaging starts should be set to a high value to ensure a converged solution can be reached (see Note 6 below). Step 4 Go to Chemical Reactions sub-folder and open the Emission panel. Turn on the appropriate NOx models, i.e. thermal, fuel and prompt NOx. Then go to the Scheme Association panel and click Apply to assign the chemical reaction schemes defined above to the current fluid stream. Step 5 Go to the Initialisation panel (Additional Scalars sub-folder) and set up an appropriate initial mass fraction for the carrier fluid (e.g. for air YO2 = 0.233, YN2 = 0.767). Step 6 Go the Lagrangian Multi-Phase folder, check the settings for the Lagrangian two-phase modelling scheme and make any changes/additions necessary for
Version 3.26 12-19

CHEMICAL REACTION AND COMBUSTION Coal Combustion Modelling

Chapter 12

defining coal particle initial positions, entrance behaviour and physical properties (panel Droplet Physical Models and Properties): Turbulent dispersion can be turned on in the Global Physical Models tab to predict a realistic particle track behaviour. In the Droplet Properties tab, ensure that all values of Hfg in the Component Properties list are set to 0. Step 7 Switch off the heat and mass transfer time scale calculation by going to the Switches and Real Constants panel (Other Controls sub-folder) and setting constants C71 and C72 to 1.0. Step 8 Go to the Thermal Models panel and check that options Static Enthalpy and Chemico-Thermal have been selected for the enthalpy equation. Step 9 Go to the Scalar Boundaries panel (Dene Boundary Conditions folder) and adjust the scalar mass fractions at the inlet boundaries. Step 10 Go to the Analysis (Re)Start panel (Analysis Preparation/Running folder) and set up the analysis as a restart run, beginning from the solution obtained in Stage 1. Step 11 Run the case until the solution converges or reasonably small residuals are achieved. Useful notes 1. If the coal model is turned off to run the case in non-reacting mode, it may be necessary to rst turn off /delete the chemical scheme denition already set-up in the Scheme Denition panel. 2. To avoid solution instabilities and reduce computer time in radiation cases, it is advisable to run the simulation for several hundred iterations with radiation turned off before switching it back on to complete the simulation. 3. In the Coal Composition panel (Miscellaneous tab) you have three options for setting the volatiles specic heat: (a) Coal CV (the recommended option) uses the enthalphy of volatiles calculated from the heat balance of the coal combustion for both char and volatiles. (b) CH4 assumes that all volatiles are methane. (c) Mass Weighted considers the mixture of volatile components and calculates the overall volatile enthalphy as the sum of the products of mass fraction and enthalpy for each individual volatile component, i.e. H = Y i hi 4. If you change any parameter in the Coal Composition panel, the chemical reaction scheme is changed and therefore the gas combustion scheme in the Sub Models panel must be reset. When you re-apply the gas composition scheme, this also resets the scalars involved. Therefore, you must
12-20 Version 3.26

Chapter 12

CHEMICAL REACTION AND COMBUSTION Coal Combustion Modelling

(a) reapply the scheme association, (b) initialise the additional scalars for the background uid, (c) reset Hfg = 0 for all components in the Lagrangian Droplet Physical Models and Properties panel, and (d) dene scalar boundary conditions for the inlet. 5. Accurate modelling can be achieved through input of appropriate values for devolatilisation and char rates. Manipulating these values can increase the solution accuracy, while changes in the turbulence models employed can lead to more accurate prediction of the ow aerodynamics. 6. The iteration number at which to begin source term averaging should be set to a high value so as to ensure that a stable initial flow field has been achieved (and also to ecomomize on computer time expended). This number has a default setting of 50 iterations and should be altered to a value suitable for establishing a stable ow eld. This may be done by setting Constant 24 whose use is described in Chapter 12, Steady-state SIMPLE and SIMPISO in the User Guide. 7. When discretising the coal particle size distribution, it is important to include some sub-5 micron particles. This enables a stable ame to be established in the immediate vicinity of the burner inlets. 8. When starting the coal combustion calculations in Stage 2, it is important to use the constant rate devolatilisation option for all particles, and to make the devolatilisation temperature equal to the particles initial temperature. This is the numerical equivalent of lighting up the combustion system in a real-life situation. Switches and constants for coal modelling It is sometimes advisable to define some of the following pro-STAR Constants and Switches when setting up a coal model: Constant 24 see Note 6 above Constant 64 = 2 constrain active scalar values to the range 0.0 1.0 Constant 71 = 1 deactivates the mass transfer time scale Constant 72 = 1 deactivates the heat transfer time scale Constant 82 species the coal particle emissivity in radiation problems Constant 88 species the maximum coal particle temperature Constant 89 species the minimum carrier fluid temperature limit Constant 90 species the maximum carrier fluid temperature limit Constant 120 species special options for the char reaction, as follows: (a) Constant 120 = 0 use the default V3.26 settings (b) Constant 120 = 1 the char reaction product is CO (c) Constant 120 = 2 the char reaction products are CO and CO2, where Y CO T * ----------- = A exp --------- T Y CO2 and the default values are A = 3.0108 and T* = 30,193
Version 3.26 12-21

(12-4)

CHEMICAL REACTION AND COMBUSTION Coal Combustion Modelling

Chapter 12

Constant 70 used for changing the value of A in conjunction with Constant 120 Constant 74 used for changing the value of T* in conjunction with Constant 120 Switch 71 species an implicit calculation of the source terms in the particle energy equation (can improve algorithm stability)

Special settings for the Mixed-is-Burnt and Eddy Break-Up models When Constant 120 is used, the following settings are also required depending on the combustion model that has been chosen: For Mixed-is-Burnt: Constant 120 = 0 no extra scalars need to be dened; the product of the char reaction is CO2 Constant 120 = 1 two extra scalars are needed, to be dened in the Additional Scalars > Molecular Properties panel: (a) MIX_CO this is a passive scalar representing the CO mixture fraction and is to be solved by a transport equation. The latter is specied in panel Analysis Controls > Solution Controls > Equation Behavior > Additional Scalars panel by choosing option Transport from the Solution Method menu. (b) CO this is an active scalar to be solved algebraically. This is specied in panel Analysis Controls > Solution Controls > Equation Behavior > Additional Scalars panel by choosing option Internal from the Solution Method menu. Constant 120 = 2 three extra scalars are needed, to be dened in the Additional Scalars > Molecular Properties panel: (a) MIX_CO this is a passive scalar representing the CO mixture fraction and is to be solved by a transport equation. The latter is specied in panel Analysis Controls > Solution Controls > Equation Behavior > Additional Scalars panel by choosing option Transport from the Solution Method menu. (b) MIX_CO2 this is a passive scalar representing the CO2 mixture fraction and is to be solved by a transport equation. The latter is specied in panel Analysis Controls > Solution Controls > Equation Behavior > Additional Scalars panel by choosing option Transport from the Solution Method menu. (c) CO this is an active scalar to be solved algebraically. This is specied in panel Analysis Controls > Solution Controls > Equation Behavior > Additional Scalars panel by choosing option Internal from the Solution Method menu. For Eddy Break-Up: One-step model Constant 120 cannot be used because the char reaction product can only be CO2
12-22 Version 3.26

Chapter 12

CHEMICAL REACTION AND COMBUSTION Coal Combustion Modelling

Two-step model Constant 120 = 0 no extra scalars are needed; the char reaction product is CO Constant 120 = 2 no extra scalars are needed; the char reaction products are CO and CO2

Version 3.26

12-23

Chapter 13

LAGRANGIAN MULTI-PHASE FLOW Setting Up Lagrangian Multi-Phase Models

Chapter 13

LAGRANGIAN MULTI-PHASE FLOW


The theory behind Lagrangian multi-phase problems and the manner of implementing it in STAR-CD is given in the Methodology volume, Chapter 12. The present chapter contains an outline of the process to be followed when setting up a Lagrangian multi-phase simulation, including details of the user input required and important points to bear in mind when setting up problems of this kind.

Setting Up Lagrangian Multi-Phase Models


Step 1 Go to panel Select Analysis Features in STAR GUIde and choose option Lagrangian Multi-Phase from the Multi-Phase Treatment menu. Click Apply. The Lagrangian Multi-Phase folder will appear in the NavCenter tree, containing a number of panels that are appropriate to this type of analysis. Step 2 In the first panel, Droplet Controls, set various solution control parameters (see the on-line Help text for more details). The same panel also defines how droplet parcel initial conditions (entrance behaviour and location) are to be specified. The available options are: Spray injection with atomization use one of the built-in nozzle and atomisation models (see Chapter 12, Nozzle ow models and Atomisation models in the Methodology volume). These are especially useful in internal combustion engine studies. Explicitly defined parcel injection explicit (manual) setting of all required quantities. This option also allows the use of distribution functions for the droplet diameters. User Subroutine specify everything via a user subroutine Step 3 The second panel, Droplet Physical Models and Properties, defines dispersed phase heat, mass and momentum transport mechanisms (including inter-droplet and wall collisions), plus droplet physical properties. Several different droplet types may coexist in your model, so properties are specified for each individual type. Step 4 The folders remaining panels relate to splitting droplets into parcels for modelling purposes and defining the latters entrance behaviour (initial velocities and entrance properties). How this is done depends on the option chosen in Step 2; the folder will display the appropriate panel for each choice: 1. Spray injection with atomization opens a single panel, Spray Injection with Atomization, in which you specify the fuel mass flow rate entering the solution domain through an injection nozzle. The liquid fuel is converted into droplets whose injection velocity depends on the nozzle model characteristics. In addition, a number of atomisation models are employed to determine the distribution of droplet diameters and velocity directions on exit from the nozzle. 2. Explicitly defined parcel injection opens the following two panels:
Version 3.26 13-1

LAGRANGIAN MULTI-PHASE FLOW Setting Up Lagrangian Multi-Phase Models

Chapter 13

(a) Injection Denition sets up parcel entrance conditions, in terms of either velocity and rotation components or nozzle parameters (b) Injection Points defines parcel entrance locations The association between conditions and locations is made by first dividing parcels into injection groups that share the same entrance conditions. All entrance locations defined subsequently are then assigned to one of these groups. The concept is illustrated by the example shown in Figure 13-1 below:
Droplet Type 1 Momentum ON Heat transfer ON Properties of Heptane Droplet Type 2 Momentum ON Heat transfer OFF Properties of Water

Injection Group 1 Injection Denition Constant Diam. Wi = 5 m/s mT = 0.05 kg/s 2 parcels/point

Injection Group 2 Injection Denition Rosin-Ram PDF Vi = 2 m/s mT = 0.02 kg/s 3 parcels/point

Injection Group 3 Injection Denition Normal PDF Wi = 7 m/s mT = 0.05 kg/s 1 parcel/point

Injection Points Set 1: Line, 3 pts Set 2: Circle, 6 pts

Injection Points Set 1: Single point Set 2: Line, 8 pts

Injection Points Set 1: Boundary, 12 pts

Set 2, 6pts

Set 2, 8pts

Set 1, 12 pts

Set 1, 3pts
Single Parcel Set 1, 1pt Injection Point

Figure 13-1

Illustration of terminology for explicitly dened parcel injection

3. User Subroutine opens a single panel, Droplet User Subroutine, that calculates all parcel initial conditions through user coding
13-2 Version 3.26

Chapter 13

LAGRANGIAN MULTI-PHASE FLOW Setting Up Lagrangian Multi-Phase Models

Note that the Spray injection and Explicitly defined options are mutually exclusive. Thus, if you change your mind about which method to use for specifying initial conditions, you will need to go back to panel Droplet Controls, pick the other method and overwrite the previous definitions. On the other hand, User Subroutine may be used in conjunction with either of the above options, i.e. STAR will take the definitions supplied in subroutine DROICO into account as well as the spray or explicit definitions. Step 5 Check the result of the parcel initialisation process graphically by displaying the parcels in the context of a plot of the domain into which they are launched, as illustrated in Figure 13-2:

Figure 13-2

Plot of droplet initial conditions

This is done by going to the Post-Processing folder, panel Plot Droplets/Particle Tracks and using the plotting facilities of the Droplets tab, as explained in the on-line Help text. Alternatively, choose Post > Get Droplet Data from the main window menu bar to display the Load Droplet Data dialog shown below and perform the same function from there.

Version 3.26

13-3

LAGRANGIAN MULTI-PHASE FLOW Data Post-Processing

Chapter 13

Data Post-Processing
pro-STAR provides special facilities for visualising the results of a Lagrangian multi-phase flow analysis. These facilities fall into the following two categories: 1. Static displays these show the location of one or more droplets at a given point in time. Alternatively, they may also be used to show successive positions of a given droplet as it progresses through the solution domain. The droplets are represented by small circles, as shown in Figure 13-3. The circle size and colour can be made to depend on a variety of local droplet properties.

Figure 13-3

Static display illustration

2. Trajectory displays these show droplet tracks, either as continuous trajectories or as animated streaks, whose rate of progress through the solution domain can be controlled by the user, as illustrated in Figure 13-4.

13-4

Version 3.26

Chapter 13

LAGRANGIAN MULTI-PHASE FLOW Data Post-Processing

Figure 13-4

Trajectory display illustration

Static displays Steady-state problems Step 1 Read the required droplet data from the track (.trk) file generated automatically by STAR for Lagrangian flow problems. To do this, use panel Plot Droplets/Particle Tracks, tab Droplets. Step 2 If necessary, use command DTIME to specify a time range over which you want droplet track data to be plotted. The display will then include only locations visited by droplets during this time interval. Step 3 Use the Droplets tab controls to choose options appropriate to the plot you want to create. Note that a droplet display may be superimposed on a post data plot by choosing Plot > Cell Display > Droplets from the main window menu (or by issuing command CDISPLAY, ON, DROPLET) before the cell plotting operation. If the plot is a contour plot and the droplet fill colour varies according to a physical property, a secondary scale will be displayed for that droplet property. If the droplets are filled with a single arbitrary colour, and droplet velocity vectors are displayed, the secondary scale will correspond to droplet velocity magnitude, as represented by the vector colours.

Version 3.26

13-5

LAGRANGIAN MULTI-PHASE FLOW Data Post-Processing

Chapter 13

Step 4 Select a set of parcels whose progress through the solution domain is to be displayed. The selection procedure is analogous to that described in Chapter 3 regarding sets of cells, vertices, splines, etc. Thus, sets may be selected by a coloured button marked D -> on the left-hand-side of the main window a similar button labelled Dp in the Droplets tab typing command DSET in the I/O window. This provides the most extensive range of selection options.

The set selection facilities available via the D -> or Dp buttons are as follows: 1. 2. 3. 4. 5. 6. 7. All puts all parcels in the set None clears the current set Invert selects all unselected parcels and clears the current set New replaces the current set with a new set of parcels Add adds new parcels to the current set Unselect deletes parcels from the current set Subset selects a smaller group of parcels from those in the current set

For the last four items, the target parcels may be assembled by choosing an option from a secondary drop-down list, as described below. In every case, what constitutes a valid option depends on how droplet data were read into pro-STAR: 1. For all loading choices, option Cell Set selects parcels that are contained within the physical space occupied by the current cell set. If the choice was Track File (see Step 1 on page 13-5), all droplet tracks whose initial positions fall within the current cell set are selected. 2. If the loading choice was Droplet Initial Conditions (see Step 5 on page 13-3) or Current Post Data File (see Step 2 on page 13-8), the following options are available: (a) Cursor Select click on the desired parcels with the cursor; complete the selection by clicking the Done button on the plot (b) Zone use the cursor to draw a polygon around the desired parcels. Complete the polygon by clicking the last corner with the right mouse button (or click Done outside the display area to let pro-STAR do it for you). Abort the selection by clicking the Abort button. 3. If the loading choice was Current Post Data File, the following options are available: (a) Active select all active parcels (b) Stuck select all parcels that have stuck to a wall and become immobilised Note that droplet set information is not saved in the restart (.mdl) file on completion of the post-processing run Step 5 Display the selected parcels as a series of droplet circles by clicking Droplet Plot in the Droplets tab
13-6 Version 3.26

Chapter 13

LAGRANGIAN MULTI-PHASE FLOW Data Post-Processing

The locations of the circles represent the points where a parcel intersects cell boundaries as it travels from the beginning to the end of its path through the mesh. Step 6 If detailed numerical information is required on the selected parcels, choose Lists > Tracks from the main window menu bar to open the Particle/Droplet Track Data dialog. Select the track file and then click Load Data to read in and display all available information in that file, as shown below:

The required information is displayed by clicking the appropriate parcel number (shown in the Track column) with the mouse. The same information (but in a different format) can also be displayed on the I/O window by typing command PTPRINT. Special data requirements In some situations, the user may require the following additional information: 1. The position of a range of parcels at a given point in time, as opposed to a specied parcel at a series of time points. The data needed for such a display may be obtained by interpolation of the available data at the time point in question using command PTREAD. Continue by specifying the appropriate parcel set and then use the Droplets tab in STAR GUIde to display the required droplet distributions. Note that the time specied in PTREAD is independent of any time information specied via command DTIME (see Step 2 above) 2. The age of all currently-loaded parcels, given by command DAGE. A parcels age is dened as the interval between the time when the rst parcel entered the solution domain and the time when the parcel in question hits a wall or exits from the solution domain. Age is calculated from data in the track (.trk) le and may be used as the basis for selecting a parcel set, via
Version 3.26 13-7

LAGRANGIAN MULTI-PHASE FLOW Data Post-Processing

Chapter 13

command DSET. This information may be listed in the I/O window using command DLIST. Transient problems Step 1 Decide which time step is to be inspected and then load the corresponding data (from file case.pstt), using STAR GUIdes Load Data panel (File(s) tab). If more than one transient file is available, pro-STAR will locate the right one automatically. Step 2 Open panel Plot Droplets/Particle Tracks (Droplets tab) and read the contents of the transient file by selecting option Current Post Data File from the pop-up menu at the top. Step 3 Choose appropriate options in the Droplet Plot Options section of the same tab, as for Steady-state problems. Step 4 Select the desired parcel set using the most appropriate of the methods described under Steady-state problems. Step 5 Plot droplets by clicking the Droplet Plot button. Step 6 Information about a range of parcels at the current time step can also be displayed in the I/O window using command DLIST. For example, DLIS,1,50,2,OTHER will list the density, diameter, mass, droplet count and temperature of every second parcel between 1 and 50. Information on parcel age is also obtainable with this command (having first executed command DAGE). In transient problems, age is defined as the interval between the time when the first parcel entered the solution domain and the current time. Trajectory displays Trajectory displays are basically droplet track displays. These are plotted as continuous trajectories or animated streaks, using the options provided in panel Plot Droplets/Particle Tracks (Droplets tab). As for particle tracks generated at the post-processing phase, the data required for such plots are stored in file case.trk. This file is generated automatically during the Lagrangian multi-phase analysis for both transient and steady-state calculations. Note that: It is also possible to print position, velocity and other droplet data stored in case.trk for each track using command PTPRINT. The data in this le will be overwritten if the user generates post-processing particle tracks without rst saving the droplet data.
Version 3.26

13-8

Chapter 13

LAGRANGIAN MULTI-PHASE FLOW Engine Combustion Data Files

Engine Combustion Data Files


In addition to the normal results files, engine combustion cases also produce additional output data (.spd) files, written by STAR if the Lagrangian multi-phase and/or combustion simulations options are in use. One such file is produced for every material stream in your model and contains both fuel droplet data (represented as globally averaged quantities) and general engine data. The information in this file may also be displayed in graphical form using the utilities provided in STAR GUIdes Graphs folder (see panel External Data). The meaning of the quantities appearing in the file is as follows: Name T-Step Time Crank_Ang. Average_P Average_T Average_d Meaning Time step number Elapsed time at this time step [s] Crank Angle [degrees] Cylinder absolute average pressure [pa] Cylinder absolute average temperature [K] Cylinder average density [kg/m3]

Cylinder_Mass In-cylinder mass [kg] Tot_Inj_Lqui Cur_mas_Fue Evaporated Evaprt_% Leading_par Distance Velocity V_mag Idr Sauter_D AngMom_X AngMom_Y AngMom_Z Mass_Burnt %Evap_Burnt Total injected mass [kg] Total mass of liquid phase [kg] Total evaporated mass [kg] Ratio of total evaporated mass to the total injected mass [%] Unused Unused Unused Unused Unused Sauter mean diameter [m] Fluid angular momentum w.r.t. the X-axis of the local coordinate system used in the model [kg/m2s] Fluid angular momentum w.r.t. the Y-axis Fluid angular momentum w.r.t. the Z-axis Burnt fuel mass [kg] Burnt fuel as a percentage of fuel evaporated

Version 3.26

13-9

LAGRANGIAN MULTI-PHASE FLOW Useful Points

Chapter 13

Heat_Release_R Heat release rate [J/s] ate Scalar Mass of scalar no. i [kg]

Note that, depending on the model, some of the above data may have no meaning.

Useful Points
1. The above treatment is strictly valid only for droplets whose physical dimensions are appreciably smaller than those of a typical mesh cell through which they travel. It is recommended that the total droplet volume (i.e. volume of a typical droplet times the number of droplets in the parcel) should not exceed 40% of this cell volume. 2. In steady-state models using the coupled approach, it is recommended to start the analysis by obtaining a solution that does not include the dispersed phase. The latter should then be introduced into the calculated ow eld and the analysis continued to the nal, complete solution. This procedure should make it easier to obtain a solution by reducing the computer time required. 3. In steady-state models using the uncoupled approach, the computer time required may again be reduced by obtaining the solution in two stages. First, a converged solution without the dispersed phase should be calculated. The dispersed phase should then be introduced and the desired solution obtained in one iteration only. 4. In transient analyses involving droplets that move faster than their surrounding uid, the Courant number used for estimating a reasonable time step size (see Chapter 8, Load step denition) should be based on the droplet rather than the uid velocity. 5. STAR-CDs default treatment for heat transfer coefcients can be combined with user-calculated mass transfer coefcients and vice-versa. In practice, however, the user will most probably want to use the same calculation procedure for both of them. 6. Complex or unusual physical conditions relating to momentum, heat and mass transfer between droplets and the continuous phase can be accommodated by supplying user subroutines DROMOM, DRHEAT and DRMAST that describe each transfer process, respectively. Similarly, special conditions relating to the momentum, heat and mass transfer behaviour of droplets at wall boundaries can be specied by supplying the required relationship via subroutine DROWBC.

13-10

Version 3.26

Chapter 14

EULERIAN MULTI-PHASE FLOW Introduction

Chapter 14

EULERIAN MULTI-PHASE FLOW


The theory behind problems of this kind is given in the Methodology volume, Chapter 13. This chapter contains an outline of the process to be followed when setting up an Eulerian multi-phase analysis. Also included are cross- references to appropriate parts of the on-line Help system, containing details of the user input required.

Introduction

Setting up multi-phase models


Step 1 Switch on the Eulerian multi-phase simulation facility using the Select Analysis Features panel in STAR GUIde: Select Eulerian Multi-Phase from the Multi-Phase Treatment menu Click Apply. pro-STAR checks if another multi-phase simulation option (Lagrangian, Free Surface, Cavitation) is already on. If so, it issues a warning message and turns it off. An additional sub-folder called Eulerian Multi-Phase now appears in the NavCenter tree, within the Thermophysical Models and Properties folder. Step 2 Set up the mesh and define the boundary region locations as usual. At present, only part of the full STAR-CD boundary type set is available for this kind of analysis. The permissible options are: 1. 2. 3. 4. 5. 6. 7. 8. 9. Inlet Outlet Pressure Wall Non-porous bafe Cyclic Symmetry Degassing Attachment

Note that: The above list contains an additional boundary type, Degassing, valid only for Eulerian multi-phase ows. This permits dispersed phase mass to escape into the media surrounding the solution domain (see also Chapter 7, Phase-Escape (Degassing) Boundaries in this volume). Your problem should not contain more that one boundary of this type. Only the currently available boundary types, as listed above, can be set up via the Create Boundaries panel. Step 3 Open the Thermophysical Models and Properties folder and use each of its sub-folders to provide relevant information about your problem. Note that:
Version 3.26

Thermal/solar radiation is not supported in this version of the code.


14-1

EULERIAN MULTI-PHASE FLOW Setting up multi-phase models

Chapter 14

Use the Liquids and Gases panels to specify physical properties and special ow conditions in your model. Note that: (a) Only a single material (or stream) is allowed at present, so the Material # slider in each panel remains set to 1. (b) Where appropriate, data are entered per phase, with the number of phases currently restricted to two. Of these, no. 1 is treated as the continuous and no. 2 as the dispersed phase. (c) Molecular Properties compared to single-phase problems, only a restricted range of options is available for evaluating physical properties. The specication process and permissible options are common to both phases. (d) Turbulence Models if turbulent ow conditions prevail, specify a method for calculating the turbulence characteristics of both phases and also the turbulence-induced drag (e) Thermal Models if heat transfer is present in the analysis, turn on the temperature solver for each phase as required (f) Initialisation specify initial conditions for each phase (g) Monitoring and Reference Data supply a reference pressure and temperature and the cell location corresponding to the reference pressure. The values specied apply to both phases. (h) Buoyancy if buoyancy effects are important, specify a datum location and reference density. Again, these values apply to both phases.

The current version does not support the following features:

(a) Multi-component mixture problems requiring the presence of additional scalar variables in either phase. Therefore, STAR GUIde does not display the Additional Scalars sub-folder. (b) Porous media ow, therefore the Porosity sub-folder is not displayed. (c) Chemical reactions of any kind, including coal combustion and the STAR/KINetics package. Therefore, the Select Analysis Features panel does not permit the above options to be turned on. (d) Liquid lms of any kind. Again, the Select Analysis Features panel does not allow this option. Step 4 In the Eulerian Multi-Phase folder: Open the Interphase Momentum Transfer sub-folder to specify appropriate models and related parameters for this part of the analysis. The information is supplied in two separate panels: (a) Drag Forces dene a model for calculating drag forces directly or via the drag coefcient (b) Other Forces dene models for calculating other interphase forces (e.g. virtual mass and/or lift force) If heat transfer is present in the analysis, use the Interphase Heat Transfer panel to specify the method of calculating the Nusselt number (and hence the heat transfer coefcient). Specify the size of the particles making up the dispersed phase using the
Version 3.26

14-2

Chapter 14

EULERIAN MULTI-PHASE FLOW Setting up multi-phase models

Particle Size panel. At present, all particles are assumed to be of equal size. Step 5 If required by problem conditions, use the Source Terms panel in folder Sources to specify mass sources or additional source terms for the momentum, turbulence or enthalpy equations of either phase. At present, multi-phase sources may only be specified via user subroutines. Step 6 Specify boundary conditions using the Define Boundary Regions panel. The permissible range of boundary types is shown in Step 2. Note that for inlet, pressure, wall/baffle and cyclic regions, separate boundary conditions are needed for each phase. When pro-STARs boundary display facilities are used to check the various boundary region definitions (see Chapter 7, Boundary Visualisation), inlet phase velocities will be displayed according to the setting of the Phase # slider in panel Define Boundary Regions. Step 7 In the Analysis Controls folder: Select Solution Controls > Equation Behavior, open the Primary Variables panel and make any necessary adjustments to the current settings If you wish to monitor the value of any ow variable(s), as a function of iteration or time step, select Output Controls > Monitor Engineering Behavior and then open panel Monitor Boundary Behaviour and/or panel Monitor Cell Behaviour. The choice depends on whether you wish to monitor values at a boundary region or within a cell set. Note that the choice of which variables to monitor is phase-dependent. If you are running a transient problem, use the Transient tab in the Analysis Output panel to select which variables you wish to store in the transient post data le (.pstt). Note that the choice of such variables is phase-dependent. Step 8 Run STAR in double precision mode. There are two reasons for this: Solving the volume fraction equation in this manner gives rise to a smaller truncation error, especially in regions where the volume fraction is close to 1 or 0. This is sometimes essential for convergence of the solution. Double precision cases have been more extensively tested

Step 9 Post-processing the analysis results follows the same rules as single-phase problems. Note that: Analysis data are stored in the .pst le per phase. A phase slider in the Data tab of panel Load Data enables you to select the precise data required. Likewise, phase-specic data may be plotted in a graph. The types of graph available are described in topics Residual History Data, Engineering Data and Analysis History Data.
14-3

Version 3.26

EULERIAN MULTI-PHASE FLOW Setting up multi-phase models

Chapter 14

Useful points on Eulerian multi-phase ow 1. The momentum under-relaxation factors should be the same for both continuous and dispersed phases. The pressure under-relaxation factor should also be equal to the volume fraction factor. Suggested values for these parameters are 0.3 on momentum for both phases and 0.1 on pressure and volume fraction. 2. To ensure satisfactory convergence for steady and pseudo-transient cases, a maximum residual error tolerance of 1.0 10-6 is recommended. 3. As well as introducing some E2P-specic subroutines, a number of changes had to be made to the basic structure of several existing subroutines so that the latter could be used for either single- or multi-phase problems (see Chapter 18, New Coding Practices for Eulerian Multi-phase Problems for details).

14-4

Version 3.26

Chapter 15

FREE SURFACE AND CAVITATION Free Surface Flows

Chapter 15

FREE SURFACE AND CAVITATION


The theory behind flow problems of this kind is given in the Methodology volume (Chapter 14, Free Surface Flows). This section contains an outline of the process to be followed when setting up free surface flow problems. Also included are crossreferences to appropriate parts of the on-line Help system, which contains details of the user input required.

Free Surface Flows

Setting up free surface models Step 1 Switch on the free-surface facility using the Select Analysis Features panel of the STAR GUIde system: Select On from the Free Surface menu Click Apply. An additional folder called Free Surface will now appear in the NavCenter tree.

The panel also checks for invalid or unsupported combinations with other major STAR-CD modelling options and will automatically prevent you from selecting them. Such options are currently: Eulerian multi-phase Chemical reactions of any type Aeroacoustics Liquid lms

Step 2 Set up an appropriate mesh for your problem as normal. All standard STAR geometric features are supported by the free surface facility. Step 3 In the Free Surface folder, set up numerical solution control parameters using the Controls panel (see the on-line Help text for more details on how to choose these parameters). A special scalar variable, VOF, is automatically set up by pro-STAR to track the free surface position. The time step required to solve the VOF transport equation is typically smaller than that required for the other equations. STAR predicts the time step size required for VOF transport based on the free surface progress. In Figure 15-1, this time step is labelled as DTFS. In order to avoid solving all other transport equations with this very small time step, it is possible to use a form of subcycling where several VOF calculations are performed before solving the other transport equations. You may set the maximum number of subcycles via the Controls panel and DTFS will remain constant during multiple VOF calculations. For transient analyses, it is possible that the time period given by the product of DTFS and the maximum number of subcycles value to be less than the original time step specified by the user. If this happens, a substep period is introduced (as shown in Figure 15-1) which has a time period of (DTFS No. of subcycles). This substep time is used to solve all other transport equations (thus completing a PISO
Version 3.26 15-1

FREE SURFACE AND CAVITATION Free Surface Flows

Chapter 15

loop). Several substeps may be required before the original user time step is complete. The subcycling feature is also employed for pseudo-transient analyses but the substep period treatment described above is not applicable. Thus, if the maximum subcycle number is reached, STAR will automatically reduce the user-specified time step to a value corresponding to that maximum.

DTFS Substep time User time step


Figure 15-1 Illustration of time step control practices for free surface ows

Step 4 In the Free Surface folder, assign physical properties to the light and heavy fluids in your model using the corresponding tabs in the Molecular Properties panel. Step 5 In the Thermophysical Models and Properties folder: Go to the Thermal Options panel and select any features that are appropriate to your model, such as conjugate heat transfer. Note, however, that radiation modelling is not current supported. In the Liquids and Gases sub-folder, use the relevant panels to specify special ow conditions in your model, where appropriate: (a) Turbulence Models, if turbulent ow conditions prevail (b) Thermal Models, if heat transfer is involved in the analysis. Note, however, that only the Thermal option for enthalpy can be used in this case. (c) Monitoring and Reference Data specify a reference pressure and temperature and the cell location corresponding to the reference pressure (d) Buoyancy if buoyancy effects are important, specify a reference density value and datum location In specifying the above, make sure that the Material # slider at the bottom of each panels remains set to 1. If you are doing a conjugate heat transfer analysis, use the Solids sub-folder to set the solid material properties as normal

An additional scalar variable called VOF is also needed for this type of analysis. VOF represents the volume fraction of the heavy fluid and is used for visualising the free surface position. Normally, this scalar is set up automatically by pro-STAR.

15-2

Version 3.26

Chapter 15

FREE SURFACE AND CAVITATION Free Surface Flows

Step 6 Define initial conditions in your model. Two types of initialisation are required: 1. Location and ow eld values for the light and heavy uids. These will effectively dene the initial position of the free surface. This operation may be performed in two ways: (a) Using the Cell Table Editor: i) Open the Cell Table Editor dialog and dene separate cell types for the light and heavy uids in your model. Assign distinct colour indices to them so that you can tell them apart easily. ii) Make sure that both cell types are indexed to material property number 1 iii) Use the Initial Free Surface Material menu to assign an additional property (Light or Heavy) to the light and heavy uid cell types, respectively iv) Assign each cell in your model to either of the two types using the pro-STAR facilities described in Chapter 6, Cell indexing. This operation provides a complete denition of the free surface location; it also automatically initialises the VOF scalar variable. (b) Using the Initialisation panel in the Additional Scalars sub-folder: i) Choose scalar VOF from the scroll list and option User from the Values pop-up menu ii) Specify an appropriate distribution for the VOF values (0.0 in light uid cells, 1.0 in heavy uid cells) via user subroutine INITFI. 2. Specify initial conditions for all other ow variables accessible via the Initialisation panel in the Liquids and Gases sub-folder. If option User is selected, supply the required distributions in subroutine INITFI, making sure to distinguish between the two uid regions in your model. Step 7 Define boundary locations and conditions in the usual manner, using the Create Boundaries and Define Boundary Regions panels. At present, only part of the full STAR-CD boundary type set is available for this kind of analysis. The permissible options are: 1. 2. 3. 4. 5. 6. 7. 8. Inlet Outlet Pressure Wall Non-porous bafe Cyclic Symmetry Attachment

Note that appropriate boundary values for scalar VOF will also need to be set (1.0 for pure heavy fluid, 0.0 for pure light fluid) in the Scalar Boundaries panel.

Version 3.26

15-3

FREE SURFACE AND CAVITATION Free Surface Flows

Chapter 15

Step 8 In the Analysis Controls folder: Select the Solution Controls sub-folder and display the Solution Method panel to check the default settings for the solution algorithm parameters (PISO for transient, SIMPLE or SIMPISO for pseudo-transient analyses). Input your own values if necessary. Select Solution Controls > Equation Behavior > Primary Variables and make any necessary adjustments to the current or default settings

Useful points on free surface ow 1. The valid solution modes for this type of problem are transient and pseudo-transient. 2. There is only one valid uid material number for problems of this kind, material no.1. Do not attempt to dene any additional uid materials. However, there is no restriction on the number of solid materials. Note that, if present, solid materials are numbered starting at no. 3. 3. The VOF scalar variable is automatically set up by pro-STAR, if it does not already exist. In order to maintain a high resolution of the light/heavy uid interface, it is necessary to restrict the maximum mesh Courant number to a value of 0.3 or below (see also the Controls panel in the STAR GUIde system). 4. A sub-cycling option is provided to reduce the overall time required by the calculations, as explain in Step 3 above. This option operates as follows: (a) If sub-cycling is Off, the time step will vary during the analysis to suit the Courant number restriction and will be used to calculate all ow variables (b) If sub-cycling is On, the user-specied time step is employed in calculating all variables except VOF. The step size should be set so that the true nature of the ow can be adequately represented. (c) The VOF variable is calculated by sub-dividing this time step into a number of smaller steps (or sub-cycles), up to a user-specied limit (currently set at 50, see also panel Controls in STAR GUIde). (d) The number of sub-cycles performed is just sufcient to satisfy the Courant number constraint. If the limit is exceeded and the solution mode is transient, STAR will automatically use the substep time step refrerred to in Step 3 to ensure the limit still applies. If the solution mode is pseudo-transient, the same effect is achieved by reducing the user-specied time step to a value corresponding to that limit. 5. For transient analyses, the substep is essentially the true time step driving the overall solution. The .info le will show data on substeps within the normal user time step and the number of subcycles (VOF calculations) will also be shown here. The original user-specied time step is now only used to determine the points at which data should be written to the .run, .pst and .pstt les. The user time step is also taken into account when ABORTing a free surface calculation, as the code will continue running until the end of this step before it stops. 6. If surface tension effects are large, it is advisable to run your model in double precision and use a small time step size.
15-4 Version 3.26

Chapter 15

FREE SURFACE AND CAVITATION Cavitation

Cavitation
The theory behind problems of this kind is given in the Methodology volume (Chapter 14, Cavitation). This section contains an outline of the process to be followed when setting up cavitation problems. Setting up cavitation models A cavitation model is set up in a similar manner to a free surface model. The necessary steps are as follows: Step 1 Switch on the cavitation modelling facility using the Select Analysis Features panel of the STAR GUIde system: Select On from the Cavitation menu Click Apply. Note that an additional folder called Cavitation will now appear in the NavCenter tree.

The panel also checks for invalid or unsupported combinations with other major STAR-CD modelling options and will automatically prevent you from selecting them. Such options are currently: Eulerian multi-phase Chemical reactions of any type Aeroacoustics Liquid lms

Step 2 Set up an appropriate mesh for your problem as normal. All standard STAR geometric features are supported by the cavitation facility. Step 3 In the Cavitation folder: Assign physical properties to the heavy uid in your model using the Molecular Properties panel. Note that, in this case, the light uid is the vapour phase of the heavy uid, therefore there is no need for a separate property specication (the Light Fluid tab in the panel becomes inactive). The vapour phase properties are assigned to a special scalar called CAV. These can be inspected/edited in the Additional Scalars sub-folder, panel Molecular Properties (Scalar). Choose a cavitation model and specify parameters for it using the Cavitation Model panel Step 4 In the Thermophysical Models and Properties folder: Go to the Thermal Options panel and select any features that are appropriate to your model, such as conjugate heat transfer. Note, however, that radiation modelling is not current supported. In the Liquids and Gases sub-folder, use the relevant panels to specify special ow conditions in your model, where appropriate:
15-5

Version 3.26

FREE SURFACE AND CAVITATION Cavitation

Chapter 15

(a) Turbulence Models, if turbulent ow conditions prevail (b) Thermal Models, if heat transfer is involved in the analysis. Note, however, that only the Thermal option for enthalpy can be used in this case. (c) Monitoring and Reference Data specify a reference pressure and temperature and the cell location corresponding to the reference pressure (d) Buoyancy if buoyancy effects are important, specify a datum location and density In specifying the above, make sure that the Material # slider at the bottom of each panels remains set to 1. If you are doing a conjugate heat transfer analysis, use the Solids sub-folder to set the solid material properties as normal Step 5 Define initial conditions in your model. Two types of initialisation are required: 1. If the model includes a free surface as well as cavitation effects, the initial position of the free surface should be specied using the methods described under Step 6, page 15-3. For most problems only heavy fluid (i.e. no vapour) is present at the start of the analysis, in which case you only need to open the Cell Table Editor dialog and change the Initial Free Surface Material menu setting to Heavy for all uid cell types. This operation also sets the CAV and VOF scalars to their correct initial values. 2. Specify initial conditions for all ow variables accessible via the Initialisation panel in the Liquids and Gases sub-folder. If option User is selected, supply the required distributions in subroutine INITFI. Step 6 Define boundary locations and conditions in the usual manner, using the Create Boundaries and Define Boundary Regions panels. At present, only part of the full STAR-CD boundary type set is available for this kind of analysis. The permissible options are: 1. 2. 3. 4. 5. 6. 7. Inlet Pressure Wall Non-porous bafe Cyclic Symmetry Attachment

Step 7 In the Analysis Controls folder: Select the Solution Controls sub-folder and display the Solution Method panel to check the default settings for the solution algorithm parameters (PISO for transient, SIMPLE or SIMPISO for pseudo-transient analyses). Input your own values if necessary. Select Solution Controls > Equation Behavior > Primary Variables and make any necessary adjustments to the current or default settings
Version 3.26

15-6

Chapter 15

FREE SURFACE AND CAVITATION Cavitation

Useful points on cavitation 1. The valid solution modes for this type of problem are transient and pseudo-transient. 2. There is only one valid uid material number for problems of this kind, material no.1. Do not attempt to dene any additional uid materials. However, there is no restriction on the number of solid materials. 3. A special scalar variable, CAV, is automatically set up by pro-STAR, if it does not already exist. This is assigned the material properties of the vapour created by cavitation and its value represents the volume fraction of that vapour. An additional scalar called VOF will also be created automatically to track the uid /vapour interface and added to the scalars list (see also Useful points on free surface ow on page 15-4).

Version 3.26

15-7

Chapter 16

ROTATING AND MOVING MESHES Rotating Reference Frames

Chapter 16

ROTATING AND MOVING MESHES


The theory behind rotating and moving mesh problems and the manner of implementing it in STAR-CD is given in the Methodology volume, Chapter 13. The present chapter contains an outline of the process to be followed when setting up a rotating or moving mesh simulation, including details of the user input required and important points to bear in mind when setting up problems of this kind.

Rotating Reference Frames


Models for a single rotating reference frame Step 1 Go to the Select Analysis Features STAR GUIde panel and select option On from the Rotating Reference Frame Status pop-up menu. This activates an additional folder in the NavCenter tree called Rotating Reference Frames. Step 2 In the above folder, open the Rotating Reference Frames panel and select option Single Frame. This enables you to define spin parameters for the material in your model. The required parameters are angular velocity and a local coordinate system whose Z-axis defines the axis of rotation, see Figure 16-1.

= 200 rpm

Figure 16-1

Solid body rotation

Useful points on single rotating frame problems 1. The angular velocity can vary with time, with the variation specied in (a) user subroutine UOMEGA, or (b) a user-dened table, or (c) by giving it a different value at each load step of a transient run (see Chapter 8, Load-step based solution mode). 2. The boundaries of the rotating domain are also assumed to be rotating. To model stationary walls, it is necessary to specify an equal and opposite spin velocity in the Omega text box of the Boundary Region dialog for walls (see the STAR GUIde Wall Help topic). Similarly, to model axial inflow, it is necessary to specify a spin velocity in the dialog for Inlet regions. 3. When a stagnation boundary condition is used, an option is provided to specify whether the direction cosines are based on relative or absolute velocities. Stagnation quantities are also dened using either relative or
Version 3.26 16-1

ROTATING AND MOVING MESHES Rotating Reference Frames

Chapter 16

absolute velocities. 4. When turbulence is specied as an intensity (at inlet or pressure boundaries), the turbulence kinetic energy is computed on the basis of static coordinate frame velocities. For stagnation boundaries, the specied intensity uses the same velocity as the stagnation quantities. 5. Boundary velocities are computed in the local rotating coordinate system. This is important in interpreting the information passed to the user subroutines. 6. When post processing results, you may view velocities in either the relative or the absolute reference frame (see the Coord System tab, located in the Load Data STAR GUIde panel). Models for multiple rotating reference frames (implicit treatment) Step 1 Go to the Select Analysis Features STAR GUIde panel and select option On from the Rotating Reference Frame Status pop-up menu. This activates an additional folder in the NavCenter tree called Rotating Reference Frames. Step 2 Decide how many reference frames are required to model the problem adequately. For example, the two-dimensional mixer problem shown in Figure 16-2 requires two rotating frames. Generate the mesh.

Baffle r = 15 cm = 0 rpm

Block 2 Spin index = 2

r = 10 cm = 500 rpm

Block 1 Spin index = 1

r = 5 cm

Baffle

Figure 16-2

Multiple rotating frame illustration

16-2

Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Rotating Reference Frames

Step 3 Display the Cell Table Editor by clicking the CTAB button on the main pro-STAR window. Define cell index numbers to correspond to each of the rotating mesh blocks (see Cell Table on page 6-1). Assign different spin and colour table indices to each cell type, as shown below, for the two rotating blocks of Figure 16-2. Note that the table entries for both mesh blocks have the same material property reference number since the blocks belong to the same fluid stream. Mesh block 1

Mesh block 2

Version 3.26

16-3

ROTATING AND MOVING MESHES Rotating Reference Frames

Chapter 16

Step 4 Assign all cells within a block in turn to each of the cell types created above (see Cell indexing on page 6-3). Step 5 In the Rotating Reference Frames folder, open the Rotating Reference Frames panel and select option Multiple Frames - Implicit. This enables you to specify spin parameters (angular velocities and axes of rotation) for each of the spin indices already defined. In terms of the example of Figure 16-2, zero rotational speed needs to be assigned explicitly to block no. 2 since its local coordinate system is used in transforming velocities across the block interface. Useful points on multiple implicit rotating frame problems 1. When modelling multiple rotating reference frame (m.r.f.) problems, it is advisable to check the results carefully and see if they are reasonable and within the limitations of this approach. If this is not the case, one may need to resort to moving mesh methods, as follows: (a) For mixing vessel problems, the facilities discussed in Automatic Events Generation for Mixing Vessel Problems may be appropriate (b) For other types of problem, consider the facilities of Arbitrary Sliding Interfaces Note, however, that a result obtained via the m.r.f. method can always be used as an initial eld for a transient moving mesh simulation. This will reduce the time needed to reach a periodic state solution. 2. It is important to ensure that the interface between the different m.r.f. regions is a smooth surface (i.e. a constant-radius surface). This point needs particular attention in all-tetrahedral mesh cases. 3. An angular velocity can vary with time, with the variation specied in (a) user subroutine UOMEGA, or (b) a user-dened table, or (c) by giving it a different value at each load step of a transient run (see Chapter 8, Load-step based solution mode). 4. The boundaries of a rotating domain are also assumed to be rotating. To model stationary walls, it is necessary to specify an equal and opposite spin velocity in the Omega text box of the Boundary Region dialog for walls (see the STAR GUIde Wall Help topic). Similarly, to model axial inflow, it is necessary to specify a spin velocity in the dialog for inlets. 5. When a stagnation boundary condition is used, an option is provided to specify whether the direction cosines are based on relative or absolute velocities. Stagnation quantities are also dened using either relative or absolute velocities. 6. When turbulence is specied as an intensity (at inlet or pressure boundaries), the turbulence kinetic energy is computed on the basis of static coordinate frame velocities. For stagnation boundaries, the specied intensity uses the same velocity as the stagnation quantities. 7. To use the implicit method for an interface with the same domain boundary
16-4 Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Rotating Reference Frames

geometry, but different mesh structure on either side (for example, between two axial turbomachinery stages, with the blades swept in opposite directions): (a) Build each domain separately with its own best t mesh structure, and cell types with different spin indices. (b) Split the boundary cell layer on one of the domains into two cell layers. (c) Convert the split layer adjacent to the domain boundary to the cell type of the domain on the other side of the interface. Couple the two layers together using the Create Couples dialog (see Chapter 4, Couple creation). (d) The implicit interface will now be across the split line of the original boundary cell layer. 8. Boundary velocities are computed in the local rotating coordinate system. This is important in interpreting the information passed to the user subroutines. 9. When post processing results, you may view velocities in either the relative or the absolute reference frame (see the Coord System tab, located in the Load Data STAR GUIde panel). 10. The present version of STAR-CD does not support the use of rothalpy (see Rothalpy on page 1-5 of the Methodology volume) in combination with the implicit solution technique. Models for multiple rotating reference frames (explicit treatment) Step 1 Go to the Select Analysis Features STAR GUIde panel and select option On from the Rotating Reference Frame Status pop-up menu. This activates an additional folder in the NavCenter tree called Rotating Reference Frames. Step 2 Decide how many rotating frames of reference are required to model the problem adequately, and the locations of the interfaces. Generate the mesh. The interface between adjacent rotating blocks is dened by pairs of adjacent (but spatially coincident) boundaries, as shown in Figure 16-3. The coincident boundaries are rst dened as independent boundary regions using separate sets of vertices and then coupled together as described in Step 7 below. Note that the interface must be either a plane perpendicular to the axis of rotation or a conical section, i.e. a surface generated by rotating a straight line around that axis.

Version 3.26

16-5

ROTATING AND MOVING MESHES Rotating Reference Frames Boundary Regions no. 6 no. 5 no. 7 (pressure) (inlet) (pressure) 4 3 2 1 IMAT = 1 cell number = 100 rpm 36 35 34 33 40 39 38 37 IMAT = 2 boundary number = 500 rpm 64 63 62 61

Chapter 16

circumferential direction

no. 8 (inlet) 68 67 66 65 IMAT = 3 = 1000 rpm 100 99 98 97

8 12 7 11 6 10 5 9

16 20 15 19 14 18 13 17

(a)

1134 134 135 1034 34 35

1135

33

1035

37

(b)
Figure 16-3 Coupled boundary illustration

Step 3 Display the Cell Table Editor by clicking CTAB on the main pro-STAR window. Define cell index numbers to correspond to each of the rotating mesh blocks (see Cell Table on page 6-1). Assign different material property and colour table indices to each cell type but ignore the spin index. In the above example, cell and material indices 1, 2 and 3 are defined to correspond to each block. Step 4 Assign all cells within a block in turn to each of the cell types created above (see Cell indexing on page 6-3). Also ensure that separate monitoring cell and reference pressure locations are specified for each block. Step 5 Go to panel Create Boundaries in STAR GUIde, open tab Regions and use its facilities to create separate boundary regions at either side of each interface between blocks, as shown in Figure 16-3. Step 6 Specify boundary conditions for both sides of an interface using panel Define Boundary Regions (only inlet and pressure boundary types are allowed). Example dialog boxes for boundary regions 5 and 6, making up the first interface in the above example, are shown below:

16-6

Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Rotating Reference Frames

Step 7 Go back to panel Create Boundaries and use tab Couples to join the interface
Version 3.26 16-7

ROTATING AND MOVING MESHES Rotating Reference Frames

Chapter 16

boundaries together. In doing so, you also need to: 1. Specify whether to join individual boundaries from each region on a one-to-one basis, or to couple the two regions to each other as a whole. If the latter is chosen, the value to be imposed on the couples pressure boundary is found by an averaging process. For example, the average of the values assigned to boundary region no. 5 in Figure 16-3 is = p i s i s i i = 5 i = 5
8 8

P region 5

(16-1)

where p is the pressure and s the area of each boundary face. 2. If necessary, place region couples (as dened above) into separate groups. This enables you to identify boundary faces across which mass must be conserved and is only necessary in solution domains that have only inlet boundary couples. Such domains are recommended for solving closed loop problems where the ow rate needs to be determined as part of the solution. The groups to balance are specied in the Rotating Reference Frames panel (see Step 8 below). Step 8 In the Rotating Reference Frames folder, open the Rotating Reference Frames panel and select either option Multiple Frames - Explicit or option Multiple Frames - NR-Explicit. This enables you to specify: 1. Spin parameters (angular velocities and axes of rotation) for each of the mesh blocks already dened. In the above example, blocks 1, 2 and 3 have angular velocities of 100, 500 and 1000 r.p.m., respectively. The spin axis is normally common to all blocks. 2. Control parameters required by the explicit solution algorithm and, if required, the coupled region groups mentioned in Step 7 above. Useful points on multiple explicit rotating frame problems 1. When modelling multiple rotating reference frame (m.r.f.) problems, it is advisable to check the results carefully and see if they are reasonable and within the limitations of this approach. If this is not the case, one may need to resort to moving mesh methods, as follows: (a) For mixing vessel problems, the facilities discussed in Automatic Events Generation for Mixing Vessel Problems may be appropriate (b) For other types of problem, consider the facilities of Arbitrary Sliding Interfaces Note, however, that a result obtained via the m.r.f. method can always be used as an initial eld for a transient moving mesh simulation. This will reduce the time needed to reach a periodic state solution. 2. It is important to ensure that the interface between the different m.r.f. regions is a smooth surface (i.e. a constant-radius surface). This point needs particular attention in all-tetrahedral mesh cases.
16-8 Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Moving Meshes

3. An angular velocity can vary with time, with the variation specied in (a) user subroutine UOMEGA, or (b) a user-dened table, or (c) by giving it a different value at each load step of a transient run (see Chapter 8, Load-step based solution mode). 4. The boundaries of a rotating domain are also assumed to be rotating. To model stationary walls, it is necessary to specify an equal and opposite spin velocity in the Omega text box of the Boundary Region dialog for walls (see the STAR GUIde Wall Help topic). Similarly, to model axial inflow, it is necessary to specify a spin velocity in the dialog for inlets. 5. When a stagnation boundary condition is used, an option is provided to specify whether the direction cosines are based on relative or absolute velocities. Stagnation quantities are also dened using either relative or absolute velocities. 6. When turbulence is specied as an intensity (at inlet or pressure boundaries), the turbulence kinetic energy is computed on the basis of static coordinate frame velocities. For stagnation boundaries, the specied intensity uses the same velocity as the stagnation quantities. 7. Interfaces between differentially-rotating mesh blocks are best placed at positions that do not lie inside recirculating ow elds. 8. Caution should be exercised when using this approach because of the explicit coupling at the special boundaries. The method is most suitable for problems involving strong outow across the coupled interface. 9. The NR-Explicit option should be chosen over the Explicit option for congurations where the turbomachinery blades are closely packed and/or if a shock wave is expected to hit either of the two coupled boundaries at the interface. 10. Boundary velocities are computed in the local rotating coordinate system. This is important in interpreting the information passed to the user subroutines. 11. When post processing results, you may view velocities in either the relative or the absolute reference frame (see the Coord System tab, located in the Load Data STAR GUIde panel).

Moving Meshes
Basic concepts The moving mesh feature is activated by command MVGRID. Changes in mesh geometry can be specified either by pro-STAR commands (i.e. the Change Grid operation in the EVENTS command module), or by user coding included in subroutine NEWXYZ. In this subroutine, the user can vary the geometry of a model by defining vertex coordinates as a function of time. The deformed coordinates are written to the transient post data (.pstt) file and can be loaded and plotted during post-processing. As an alternative, the Change Grid (CG) operation can be used to alter the vertex positions with time. Its distinguishing features are as follows:
Version 3.26

The operation is initiated at an event step specied by the user and remains
16-9

ROTATING AND MOVING MESHES Moving Meshes

Chapter 16

active at all subsequent time steps, until the CG operation is explicitly turned off by a termination event, or a new set of CG commands are provided as part of another event step. The main body of the operation consists of a set of pro-STAR commands that are used while STAR is running (as part of a STAR/pro-STAR interaction process). The above commands utilise a set of both program-dened and user-dened parameters that can store anything that is of relevance to the problem description. The parameters used by the CG command set are: 1. Program-dened ITER current time step number TIME current solution time LSTP current load step (see Chapter 8, Load step denition) EVEX last executed event number EVNO event number to be executed next ETIM time at which the next event is scheduled YPST piston position; a special parameter for piston engine problems, calculated on the basis of other parameters supplied by command EVPARM (see Setting up models on page 16-15). 2. User-dened These are specied by the user in subroutine UPARM to provide additional parameters. They are of two kinds: (a) Integer parameters in the range 0-999 (b) Real parameters in the range 0-999 Note that pro-STAR restricts the number of active parameters to 99. The CG operation uses all the standard pro-STAR facilities and is therefore more flexible and powerful for mesh geometry changes than user coding supplied in subroutine NEWXYZ. Note that STAR-CD also provides other special operations related to moving meshes, as follows: Cell removal/addition (see Cell-layer Removal/Addition on page 16-14) Sliding mesh (see Sliding Meshes on page 16-19) Conditional cell attachment and change of uid type (see Cell Attachment and Change of Fluid Type on page 16-26) (a) (b) (c) (d) (e) (f) (g)

Setting up models The main steps for setting up a moving mesh model are outlined below. For more detailed information, refer to Tutorial 7.1, Tutorial 11.1 and Tutorial 13.1 in the Tutorials volume. Step 1 Generate the mesh at time t = 0 and issue the following command: TIME,TRANS followed by either
16-10 Version 3.26

(turn on the transient solution option)

Chapter 16

ROTATING AND MOVING MESHES Moving Meshes

MVGRID,ON or

(turn on the moving-grid option, when using subroutine NEWXYZ only)

MVGRID,ON,EVENT,PROSTAR (turn on the moving-grid option, when using the EVENTS command module) Step 2 (Skip this step only if mesh changes are input through the user subroutine NEWXYZ) Define an event step data file, e.g. EVFILE,INITIAL,case.evn (initialise the events le) EVSTEP,1,TIME,0.0 (dene an event) EGRID,READ,case.cgrd (get the description of mesh operations from le case.cgrd, in coded form) EVSAVE,1 (save this information as event no. 1) The contents of file case.cgrd mentioned above for the problem shown in Figure 16-4 are as follows: ! Comments like this are allowed by starting the line with ! VSET,NONE VSET,ADD,VRANGE,1,2,1 *SET,YBOT,TIME VMOD,VSET,F,YBOT (clear the vertex set) (add vertices 1 and 2 to the set) (set parameter YBOT equal to the current time) (change the y-coordinates of the vertex set so that they follow the bottom boundary movement) (re-position the mesh vertices between the two boundaries)

VFILL,1,11,4,3,2,2,1

Version 3.26

16-11

ROTATING AND MOVING MESHES Moving Meshes

Chapter 16

11

12

10

4 1 m/s

Figure 16-4

Moving mesh illustration

Note that: 1. An event step can be (a) deleted, if necessary, with command EVDELETE and remaining event steps re-numbered via command EVCOMPRESS; (b) modied with command EVGET; (c) listed on the screen with command EVLIST. 2. Command EVUNDELETE restores a previously deleted event step. 3. User-specied offsets can be applied to the actual event time via command EVOFFSET. Step 3 If using the method described in Chapter 8, Load-step based solution mode, dene the load step for the transient run. Check the validity of specied events and prepare the events data le for subsequent use via command EVPREP. Save the problems data les using commands GEOMWRITE, PROBLEMWRITE, etc. or their equivalent GUI operations accessible from the File menu.

Note that the events data file can be written in coded form to a (.evnc) le with command EVWRITE, typically in order to transfer data to another computer read in coded form from a (.evnc) le with command EVREAD, typically when transferring data from another computer

16-12

Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Moving Meshes

Step 4 Exit from pro-STAR and then run STAR from your sessions X-window, as described in Chapter 2, Running a CFD Analysis, Step 6. Step 5 Post-process the data. For example, the commands needed to process time step no. 10 are: SUBTITLE Results at time step 10 Velocity field EVFI CONN case.evn (connect the event le) TRLOAD case.pstt (load the transient post data le) STORE ITER 10 (the appropriate events are loaded and executed automatically) GETC ALL (get the cell data) POPT VECT PLTY NORM CSET NEWS FLUID CPLOT QUIT,NOSAVE Be very careful not to save problem information to file case.mdl as the current geometry corresponds to the state of the mesh at time step no. 10. Useful points 1. STAR can be run in mesh preview mode only, which is very useful for checking out the mesh set-up. To do this, a hidden switch has to be set up in pro-STAR as follows: RCONSTANT, 4, 1. (set constant number 4 to 1.)

The message MESH PREVIEW RUN should appear both on the screen and in the run-time output (.run) le when running STAR. Note that this facility is not available for parallel runs. 2. Moving grid events normally describe a continuous motion and will therefore remain operational throughout the run. If, however, the grid motion needs to be stopped for whatever reason, this can be done via a termination event as follows: EGRID,NONE 3. The transient post data (.pstt) le is usually very large, so care must be taken when specifying the post data output frequency. If the analysis is split into several stages, it is also advisable to give the .pstt le produced at the end of each stage a unique lename. This helps to spread the output produced amongst several les and thus ease the data management and manipulation processes. 4. Porous media should not be used in areas of the mesh where there is relative
Version 3.26 16-13

ROTATING AND MOVING MESHES Cell-layer Removal/Addition

Chapter 16

internal movement (i.e. cell expansion or contraction). 5. You are strongly advised to set the pressure correction under-relaxation factor to a value less than 1.0 (e.g. 0.8) before starting the analysis. 6. Flow boundary conditions on boundaries that have moving vertices may result in mass ux into / out of the domain, caused by the displacements of the boundaries. 7. The only valid option for restart runs is Standard Restart (see the Analysis (Re)Start panel in STAR GUIde.

Cell-layer Removal/Addition
Basic concepts A cell is removed by collapsing intervening faces between two opposite sides in a given direction. This is done by moving together the vertices making up the faces. Cells can be collapsed at the beginning of a given time step or prior to the start of the calculations. The latter case is treated as a special mesh set-up operation and does not affect the solution in any way. Normally, entire layers of cells are removed at a given event step. However, it is also possible to remove part of a layer, in which case cells at the edge of the retained section collapse into prisms. A cell layer (or partial layer) has the following properties: It is dened as a group of cells that is one cell thick in the collapsing direction. The faces which collapse must be quadrilaterals, but those forming the upper and lower surfaces of the layer may be quadrilateral or triangular. The collapsing cell faces on the outer perimeter of the group form boundaries. Either the upper or lower surface of a layer may coincide in whole or part with a boundary, but not both surfaces simultaneously. No more than one layer may be removed at each event step. The layer must not be composed of tetrahedral cells. Trimmed (polyhedral) cells can only be collapsed if they have been formed by extruding another cell in the direction of collapse.

The reverse operation, adding a cell layer, is achieved by expanding the removed layer in the direction it was collapsed. This means that layers to be added must have been removed first. Thus, all restrictions on cell removal also apply to cell addition so that: Only one entire layer (or partial layer) may be restored at each event step. When cells are restored, they reappear next to the neighbours they had at the time of their collapse. If any of their faces were boundaries, those boundaries are also restored. Cell layers must be restored in the reverse order in which they were removed.

The cells to be removed or added, and the time at which to do this (i.e. event step and event time) are specified in the EVENTS command module. A cell removal or addition event is executed when the current simulation time equals the time specified by the event step, within a given tolerance. Note that cell removal or addition changes only the cell connectivity within the
16-14 Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Cell-layer Removal/Addition

mesh. The actual change of mesh geometry has to be specified explicitly through a moving mesh operation of the kind described in Moving Meshes on page 16-9. In the event of cell removal, the user has to ensure that: The mesh geometry changes in a way that reects the fact that cells have been removed. Cells remain collapsed until they are restored. This means that vertices belonging to the removed cells must move with the moving boundary for all subsequent time steps.

Setting up models Cell Removal or Addition operations should always be combined with either Change Grid operations in the EVENTS command module, or the user subroutine NEWXYZ.

The main steps for setting up a model of this kind are outlined below. For more detailed information refer to Tutorial 11.1 in the Tutorials volume. Step 1 Generate the mesh at time t = 0. The layers to be removed can be given different cell index numbers using command CTABLE.
.

7 6 5 Cell index 4 Y (2) 3 2 1 X (1)

19 16 13 10 7 4 1

20 17 14 11 8 5 2

21 18 15 Cell number 12 9 6 3

Figure 16-5

Cell layer removal illustration

Referring to the example of Figure 16-5 the relevant commands would be: CTAB,1,Fluid RP7,1 *SET,CTY,1,1 *SET,C1,1,3 *SET,C2,3,3
Version 3.26 16-15

ROTATING AND MOVING MESHES Cell-layer Removal/Addition

Chapter 16

*DEFINE CTYPE,CTY CSET,NEWS,CRANG,C1,C2,1 CMOD,CSET *END *LOOP,1,6,1 Step 2 Issue the following commands: TIME,TRANS (turn on the transient solution option) MVGRID,ON,EVENT,PROSTAR (turn on the moving-grid option) Step 3 Dene an event step data le, e.g. EVFILE,INITIAL,case.evn (initialise the events data le) Turn on the Change Grid operation at time t = 0 EVSTEP,1,TIME,0.0 EGRID,READ,case.cgrd EVSAVE,1 (get the description of mesh operations from le case.cgrd, in coded form) (save this information as event no. 1)

Specify cell layer removal via the cell type EVSTEP,2,TIME,0.05 EDDIR,LOCAL,1,2 EDCELL,ADD,CTYPE,1 ECLIST,DEACTIVATED,ALL EVSAVE,2 (remove cells in direction no. 2 in the local coordinate system) (remove cells with index no. 1) (list removed cells)

Specify cell layer removal via a cell range EVSTEP,3,TIME,0.08 EDDIR,LOCAL,1,2 EDCELL,ADD,CRAN,4,6,1 EVSAVE,3

Specify cell layer addition, assuming the last cell layer removed had index no. 2 EVSTEP,4,TIME,0.2 EACELL,ADD,CTYPE,2 ECLIST,ACTIVATED,ALL EVSAVE,4 (add all cells with index 2) (list added cells)

16-16

Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Cell-layer Removal/Addition

Note that: 1. The event time can also be specied using global parameters. For example EVPARM PISTON 1000. piston rotating engine speed (rpm) 1 event step 0.04 crank radius 0.13 0.015 length initial of con. piston rod position COMP 0.1015 piston location at TDC 0.02 piston position

EVSTEP

PCOMP compression stage

2. An event step can be (a) deleted, if necessary, with command EVDELETE and remaining event steps re-numbered via command EVCOMPRESS; (b) modied with command EVGET; (c) listed on the screen with command EVLIST. 3. Command EVUNDELETE restores a previously deleted event step. 4. User-specied offsets can be applied to the actual event time via command EVOFFSET. Step 4 If using the method described in Chapter 8, Load-step based solution mode, dene the load step for the transient run. Check the validity of specied events and prepare the events data le for subsequent use via command EVPREP. Save the problem's data les using commands GEOMWRITE, PROBLEMWRITE, etc. or their equivalent GUI operations accessible from the File menu.

Note that the events data file can be written in coded form to a (.evnc) le with command EVWRITE, typically in order to transfer data to another computer read in coded form from a (.evnc) le with command EVREAD, typically when transferring data from another computer

Step 5 Exit from pro-STAR and then run STAR from your sessions X-window, as described in Chapter 2, Running a CFD Analysis, Step 6. Step 6 Post-process the data. For example, the commands needed to process time step no. 10 are:
Version 3.26 16-17

ROTATING AND MOVING MESHES Cell-layer Removal/Addition

Chapter 16

SUBTITLE Results at time step 10 Velocity field EVFI CONN case.evn (connect the event le) TRLOAD case.pstt (load the transient post data le) STORE ITER 10 (the appropriate events are loaded and executed automatically) GETC ALL (get the cell data) POPT VECT PLTY NORM CSET NEWS FLUID CPLOT QUIT,NOSAVE Be very careful not to save problem information to file case.mdl as the current geometry corresponds to the state of the mesh at time step no. 10. Useful points 1. You are strongly advised to identify cell layers intended for removal/addition by assigning a unique cell index to each of them. 2. Cell layers can be removed at negative event times. This is useful, for example, in reciprocating piston engine models where simulation starts with the piston at top dead centre. In such cases the previously removed cell layers can thus be added at positive event times. 3. You are advised to rst run the model in mesh preview mode in order to check whether the intended cell removal/addition and mesh movement are carried out correctly. This can be done by issuing the following command in pro-STAR: RCONSTANT, 4, 1. (set constant number 4 to 1)

4.

5.

6. 7.

The message MESH PREVIEW RUN should appear both on the screen and in the run-time output (.run) le when running STAR. It is very important to ensure that the locations chosen for reference pressure and eld variable monitoring (via commands PRESSURE and MONITOR, respectively) correspond to cells that will never be removed. If the simulation includes combustion modelling and the denition of ignition regions (see Chapter 12, Setting Up Chemical Reaction Schemes, Step 5), make sure that no cells corresponding to these regions have been removed during the time that ignition takes place. You are strongly advised to set the pressure correction under-relaxation factor to a value less than 1.0 (e.g. 0.8) before starting the analysis. For STAR-HPC runs, you need to ensure that the removed cell layers do not collapse towards the inter-processor boundaries. In another words, the removed cell layers and the inter-processor boundaries should always be perpendicular to each other. This can be achieved through manual decomposition.

16-18

Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Sliding Meshes

Sliding Meshes
Regular sliding interfaces One way of implementing sliding meshes is the regular sliding interface method. This enables the interface cells to progressively change their connectivity during the solution. The change of cell connectivity is activated through a cell attachment operation. Cell pairs to be attached and the time of attachment (i.e. event step and event time) are specified by the user in the EVENTS command module. The cell attachment event is executed when the current simulation time equals the time specified by the event step within a given tolerance. Setting up models The regular sliding interface method combines both the Cell Attachment and the Change Grid operation in the EVENTS command module. The main steps for setting up a case are outlined below. For more detailed information, refer to Tutorial 7.1 in the Tutorials volume. Step 1 Generate the mesh at time t = 0. The sliding interface is dened as two coincident boundaries, one for the stationary and one for the moving part of the mesh. Thus, two sets of coincident vertices must be dened at that location. The two coincident boundaries have to be dened as different boundary regions and declared as attachment boundaries using the RDEFINE command: RDEF,1,ATTACH (dene boundary region no.1 as an attachment boundary) 0 alternate wall system (see Cell Attachment and Change of Fluid Type on page 16-26 for an explanation of this parameter)

1 local coordinate system

RDEF,2,ATTACH 1,0 Issue the following commands: TIME,TRANS (turn on the transient solution option) MVGRID,ON,EVENT,PROSTAR (turn on the moving-grid option) Step 2
Version 3.26

Dene an event step data le.


16-19

ROTATING AND MOVING MESHES Sliding Meshes

Chapter 16

EVFILE,INITIAL,case.evn (initialise the events data le) Perform an initial attachment operation for the relevant boundary pairs (otherwise they will be treated as detached). EVSTEP,1,TIME,0.0 followed by either EAMATCH,1,2 or EATTACH,6,1 RP5,1,1 EALIST,ALL (attached boundaries 6 and 1) (attach the rest of the boundary pairs) (list out all attached boundary pairs) (match regions 1 and 2) (event step 1 occurs at time t = 0.0)

Turn on the Change Grid operation at time t = 0. EGRID,READ,case.cgrd EVSAVE,1 (get the description of mesh operations from le case.cgrd, in coded form) (save this information as event no. 1)

Specify subsequent attachment operations, e.g. EVSTEP,2,TIME,0.02 EATTACH,6,2 EAGENERATE,4,1,1,1,1 (attach boundaries 6 and 2) (EAGENERATE works similarly to CGENERATE, see Command-driven facilities on page 3-44) (attached boundaries 10 and 1) (save event no. 2)

EATTACH,10,1 EVSAVE 2 Note that:

1. The attached boundary set denitions in an event step can be (a) deleted, if necessary, with command EADELETE and remaining denitions re-numbered via command EACOMPRESS; (b) listed on the screen with command EALIST. 2. An event step can be (a) deleted, if necessary, with command EVDELETE and the remaining event steps renumbered via command EVCOMPRESS; (b) modied with command EVGET; (c) listed on the screen with command EVLIST. 3. Command EVUNDELETE restores a previously deleted event step. 4. User-specied offsets can be applied to the actual event time via command EVOFFSET.
16-20 Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Sliding Meshes

Step 3 If using the method described in Chapter 8, Load-step based solution mode, dene the load step for the transient run. Check the validity of specied events and prepare the events data le for subsequent use via command EVPREP. Save the problems data les using commands GEOMWRITE, PROBLEMWRITE, etc. or their equivalent GUI operations accessible from the File menu.

Note that the events data file can be written in coded form to a (.evnc) le with command EVWRITE, typically in order to transfer data to another computer read in coded form from a (.evnc) le with command EVREAD, typically when transferring data from another computer

Step 4 Exit from pro-STAR and then run STAR from your sessions X-window, as described in Chapter 2, Running a CFD Analysis, Step 6. Step 5 Post-processing the data. For example, the commands needed to process time step no. 10 are: SUBTITLE Results at time step 10 Velocity field EVFI CONN case.evn (connect the event le) TRLOAD case.pstt (load the transient post data le) STORE ITER 10 (the appropriate events are loaded and executed automatically) GETC ALL (get the cell data) POPT VECT PLTY NORM CSET NEWS FLUID CPLOT QUIT,NOSAVE Be very careful not to save problem information to file case.mdl as the current geometry corresponds to the state of the mesh at time step no. 10. Useful points 1. At time t = 0, cell pairs are detached. They become attached only when an event containing EATTACH or EAMATCH commands is executed. Once attached in this way, they remain attached until another EATTACH or EDETACH command references them, or they are deactivated. 2. When the models mesh is being created, it is very useful to set up a regular boundary numbering scheme at the interface, because this simplies the specication of cell attachment.
Version 3.26 16-21

ROTATING AND MOVING MESHES Sliding Meshes

Chapter 16

3. At the initial stages of the analysis, the solution can be accelerated by using pure sliding only (i.e. without shearing), which in turn allows larger time steps. In terms of Figure 15-1 in Chapter 15 of the Methodology volume, this is equivalent to going from Stage 1 to Stage 4 in a single time step. If this is the case, the time step dt should be made equal to dtsl, where, for cylindrical systems dtsl = cell face angle at interface / rotating speed (16-2)

In general, the time step dt should equal dtsl divided by an integer. If accuracy is not at a premium, one may also slide the mesh by more than one cell width (e.g. two cell widths) in a single time step. 4. In cylindrical systems, periodic results are usually reached after about seven revolutions. 5. The transient post data (.pstt) le is usually very large, so care must be taken when dening the output frequency of post-processing data. If the analysis is split into several stages, it is also advisable to give the .pstt le produced at the end of each stage a unique lename. This helps to spread the output produced amongst several les and thus ease the data management and manipulation processes. 6. It is advisable to rst run the model in mesh preview mode in order to check whether the intended cell sliding and mesh movement are carried out correctly. This can be done by issuing the following command in pro-STAR: RCONSTANT,4,1. (set constant number 4 to 1.)

7. 8. 9. 10.

The message MESH PREVIEW RUN should appear both on the screen and in the run-time output (.run) le when running STAR. EATTACH commands are allowed only between active cells. If one cell of an attached pair is deactivated, the other side reverts to the alternate wall region. If both cells of an attached pair are deactivated simultaneously and then reactivated, the EATTACH command must be re-issued. For STAR-HPC runs, you need to ensure that the sliding mesh region resides completely on one processor. This can also be achieved through manual decomposition.

Arbitrary Sliding Interfaces Basic concepts The basic techniques used in this approach are as follows: 1. Cell faces to be connected with an ASI are declared as attachment boundaries (boundary type ATTACH). 2. A special event type, called a sliding event, is dened using command EVSLIDE. This is accompanied by commands that declare: (a) The boundaries on one side of the ASI as master faces command EMSLIDE. (b) The boundaries on the other side of the ASI as slave faces command
16-22 Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Sliding Meshes

ESSLIDE. (c) A set of offsets needed to match the two sliding regions command EOSLIDE. The concept of master and slave faces here is identical to that used in static problems when joining cell blocks of differing mesh structure (see Chapter 4, Integral and arbitrary connectivity). The faces are matched up using the offsets supplied when the sliding event is saved with the EVSAVE command. Any number of sliding events may be dened in a model. A sliding event does not have a time associated with it. Therefore, it is necessary to activate it by enabling it in an actual event using the EASI command (option ENABLE). Once enabled, it remains active until it is disabled in another, later event using EASI with option DISABLE. During a STAR run, the enabled sliding events are processed using the latest vertex coordinates at each time step. User subroutine UASI is called to set up a primary and a secondary offset in the local coordinate system. The default offsets are both zero, which is suitable for most problems where the faces are physically coincident. UASI needs to be supplied only in problems where the faces are physically offset and need to be matched in a cyclic sense for example, when simulating a mixer by 90 segments with cyclic boundary conditions. The program attempts to match all the active faces with the rst offset, and the remaining faces with the second offset. In some problems, cell faces on one side of the interface may slide past their opposite numbers on the other side in such a way that they can no longer be matched to any interior cell face. Such faces then effectively become partial or full wall boundaries to the solution domain. A particular feature of these boundaries is that their effective shape and position may change dynamically. Such situations are signalled to STAR-CD by using command EPSLIDE which forms part of the sliding event specication. Thus, during the run, STAR rst tries to match all cell faces at the interface using the method described under item 5. above. All unmatched surfaces with normalised area greater than the tolerance given by EPSLIDE become walls and are automatically assigned to the alternate wall region supplied as part of the attachment boundary specication (see Attachment Boundaries on page 7-38). Note that specifying a tolerance equal to 1.0 effectively disables this feature.

3. 4.

5.

6.

In all other respects, the treatment (and constraints) of ASI problems is similar to those using the regular sliding interface with ATTACH events. For more details on setting up and post-processing ASI models, consult an example given in the Tutorials volume. Useful points 1. The ASI approach involves re-computing boundary face matches at each time step, and may thus be slightly slower than using ATTACH events. However, the matching is done automatically so users do not need to specify ATTACH events. 2. STAR-CD tolerates an area mismatch of 2% by default. Such mismatches occur if part of a cell face on one side of the sliding interface cannot be
Version 3.26 16-23

ROTATING AND MOVING MESHES Sliding Meshes

Chapter 16

matched to any face on the other side. If face areas greater than the default value are left unmatched, the run stops with an error message. This may happen if the faces are severely warped, or the relative sizes of master and slave faces are very different, or as a result of errors in the mesh motion. After ruling out this last possibility, the matching tolerance may be relaxed by setting it to the value recommended by STAR in its last error message. This can be done by using command RCON,12,<value> 3. Contour plots of vertex data may show small discontinuities across ASI (or even arbitrary stationary) interfaces. This is normal, and is not an error. It is caused by the linear interpolation of vertex values during plotting. 4. pro-STAR treats the ASI attachment boundaries as internal, hidden surfaces even when, as a result of sliding, the mesh moves so as to expose them. To make such cell faces visible, it is necessary to issue command ABSURFACE before producing any geometry plots of the sliding mesh. 5. For STAR-HPC runs, you need to ensure that the sliding mesh region resides completely on one processor. This can also be achieved through manual decomposition. Automatic Events Generation for Mixing Vessel Problems pro-STAR provides a simplified procedure for generating a transient moving mesh model for mixing-vessel type problems, starting from a stationary mesh built at a given position of the impeller paddle. A single command generates the events, the moving grid commands, the ATTACH boundaries and any required user subroutines. Advanced users may then add to or modify these events to allow for other motions in the system. The two relevant pro-STAR commands are MIXVESSEL and MIXASI. The MIXVESSEL command generates ATTACH events, while the MIXASI command generates arbitrary sliding interface (ASI) events. MIXASI is recommended for general use. MIXVESSEL may result in slightly shorter run times for large models, at the cost of using a distorted mesh at the interface (or a limitation on the time step to achieve pure sliding motion). Setting up models Step 1 Create a stationary mesh for the minimum repeatable segment of the mixer. For example, if the mixer has 4 paddles and 8 baffles on the tank, a 90 segment would give a repeatable unit. If there are 6 baffles, a 180 segment would have to be modelled. The relative position of the baffles and the paddle in the model are unimportant, as the mesh will be moved during the solution. Step 2 Determine the portion of the mesh surrounding the paddles that will be modelled with a moving mesh. Change this region to cell types with group index 1. Change the stationary region to cell types with group index 2 (any other convenient group index may be used). Following this operation, it is necessary to check that the resulting interface between the rotating and stationary cell groups
16-24 Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Sliding Meshes

does not coincide with a coupled cell interface is composed solely of cell faces (i.e. no cells must have edges or corners lying on this interface) Step 3 In cases where a segment of the full circle is being modelled, create cyclic boundary conditions on the exposed faces as usual. Also define any other boundary regions required (e.g. any inlets/outlets into the mixer). Step 4 Include a MIXVESSEL or MIXASI command, as appropriate (see above). MIXVESSEL command This command does the following: 1. Splits the model along the interface between rotating and stationary parts, by assigning new vertex numbers to cell faces on both sides of the interface. 2. Numbers these new vertices sequentially starting from the next available vertex number, with the ordering based on the I,J distance from a specied corner cell. 3. Creates ATTACH boundaries that are numbered sequentially. Again, the ordering is based on distance from the corner cell. 4. Opens an events le and creates attachment events at the appropriate times (based on the specied rotating speed) between the predetermined boundary numbers. Events are generated so as to run the model for the specied number of revolutions. 5. Creates EGRID commands that will cause the inner vertices to spin, and adjust the position of the interface vertices on the stationary side (based on the known ordering of the vertices). MIXASI command The numbering requirements are much less severe for the ASI event. This command does the following: 1. Splits the model along the interface between the rotating and stationary groups, by assigning new vertex numbers to cell faces on one of the sides of the interface. 2. Creates ATTACH boundaries numbered sequentially, again ordered from the corner cell. 3. Opens an events le, and creates a sliding event between the master and slave boundaries, plus an actual event to enable this sliding event. 4. Creates EGRID commands to spin the inner vertices. 5. Creates user subroutine UASI, if necessary (i.e. if the angular extent is less than 360). Step 5 If using the method described in Chapter 8, Load-step based solution mode, dene the load step for the transient run. Then write the problem and geometry files and run STAR as usual.

Version 3.26

16-25

ROTATING AND MOVING MESHES Cell Attachment and Change of Fluid Type

Chapter 16

Useful points 1. The stationary model can be run using implicit multiple reference frames to generate an initial guess for the full transient solution. This will cut down the time required to achieve a periodically repeating state. This can be done easily, by assigning spin index 1 to all the cells in group 1, etc. and then setting the appropriate rotating speed. 2. When using command MIXVESSEL, the maximum number of revolutions must be determined ahead of time. This value is required for writing the events (.evn) le. 3. The group number used for the rotating cells must not be used for any other cells (even non-uid cells like shells, lines, etc.), as the number is used by the EGRID commands to move all vertices attached to this group. 4. When post processing results obtained for segments of circles, the solution may be easier to visualise if command DGENERATE is previously used to generate data (by repetition) for the complete circle (see also Mapping and Copying Post Data on page 9-27). This allows display of the solution in an easily recognisable physical domain.

Cell Attachment and Change of Fluid Type


Basic concepts Cell attachment permits the following situations to be modelled: 1. The connection of unconnected neighbouring cells in different uid blocks, say on the basis of local ow conditions. This can be used, for example, to model leaf valves which pop open when the pressure difference across them exceeds a given value. 2. The complete disconnection of neighbouring cells. This situation necessitates two kinds of operation: (a) A Cell Attachment/Detachment operation. (b) A Change Fluid Type operation. The latter enables a block of fluid to become completely cut off from the rest of the flow field. Once cut off, the flow solution in such a block can have its own reference pressure and temperature. A special type of boundary (Attachment type) must also be declared at the interface where cell attachment and detachment is to take place. STAR performs a cell detachment by connecting the detached cells to an appropriate wall or inlet region. Cell attachment/detachment operations are specified in the EVENTS command module. The connection/disconnection event is initiated when the current simulation time equals the time specified by the event step within a given tolerance. The same also applies to the Change Fluid Type operation. However, when the designated time for connecting cells is reached, the operation may not necessarily be carried out immediately. Instead, the precise connection/disconnection time is determined by the flow solution and any conditions specified in user subroutine CONATT. All conditions defined for a particular event are maintained in the next event unless disabled explicitly. Thus, once a boundary pair is attached, it remains attached until it is explicitly detached.
16-26 Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Cell Attachment and Change of Fluid Type

Setting up models The main steps for setting up a cell attachment and change of fluid type case are outlined below. For more detailed information, refer to Tutorial 13.1 in the Tutorials volume. Step 1 Generate the mesh at time t = 0. This requires a boundary interface to be set up separating the (presently or potentially) different ow blocks. The interface is dened as two coincident boundaries made up of two sets of coincident vertices. The two boundaries must be rst specied as different boundary regions and then declared as attachment boundaries (see Figure 16-6) using command RDEFINE: RDEF,1,ATTACH (dene boundary region no. 1 as an attachment boundary) 8 alternate wall or inlet region (could also be of type wall) (boundary region no. 8 is a dummy region)

1 local coordinate system

RDEF,8,inlet

The alternate wall or inlet region is specied in order to enable the code to assign appropriate (wall or inlet) properties to the attachment boundaries, if they happen to be detached. RDEF,2,ATTACH 1,8 RDEF,3,ATTACH 1,8 RDEF,4,ATTACH 1,8 Issue the following commands: TIME,TRANS (turn on the transient solution option) MVGRID,ON,EVENT,PROSTAR (turn on the moving-grid option)

Version 3.26

16-27

ROTATING AND MOVING MESHES Cell Attachment and Change of Fluid Type

Chapter 16

IMAT = 2

IMAT = 3

1, 2, 3, 4, Boundary 5, 6, 7, 8 numbers

2 1

3 1

4 2

4 3

7 5

8 6

Cell numbers 151, 152 96, 97

1, 2, 3, 4

Boundary region numbers

Y (2)

IMAT = 1

Cell numbers IMAT = 1: cells 1-100 IMAT = 2: cells 101-150 IMAT = 3: cells 151-200

X (1)

Figure 16-6

Outline of conditional cell attachment operation

Step 2 Assign a material property reference no. to each mesh block using command CTABLE. For the model shown in Figure 16-6: For mesh block no. 1 (IMAT = 1) CTAB 1 cell index FLUID cell type 3 colour index 0 porosity reference number 1 material property reference number 1 group number

CSET,NEWS,CRAN,1,100 CTYPE,1 CMOD,CSET For mesh block no. 2 (IMAT = 2) CTAB,10,FLUID,4,0,2,2 CSET,NEWS,CRAN,101,150 CTYPE,10 CMOD,CSET For mesh block no. 3 (IMAT = 3)
16-28

(collect together all cells with property ref. no. 1) (change the currently active cell type to 1)

(collect together all cells with property ref. no. 2)

Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Cell Attachment and Change of Fluid Type

CTAB,20,FLUID,5,0,3,3 CSET,NEWS,CRAN,151,200 CTYPE,20 CMOD,CSET

(collect together all cells with property ref. no. 3)

Dene the monitoring cell and pressure reference for each material type using the MONITOR and PRESSURE commands: For mesh block no. 1 PMAT 1 MONI,20 PRES,1.0E05,10 STATUS For mesh block no. 2 PMAT 2 MONI,120 PRES,1.0E05,110 STATUS For mesh block no. 3 PMAT 3 MONI,170 PRES,1.0E05,180 STATUS (dene the monitoring cell) (dene the reference cell and reference pressure)

Step 3 Dene an event step data le using the EVFILE command (see Figure 16-6): EVFILE,INITIAL,case.evn (initialise the event data le) Perform an initial Attachment and Change Fluid operation for relevant boundary pairs (otherwise they will be treated as detached and the attachment boundary type will become equivalent to a wall). For example, to connect region nos. 1 and 2: EVSTEP,1,TIME,0.0 EAMATCH,1,2 (event step no. 1 occurs at time t = 0) (connect regions 1 and 2)

Change the uid material property reference number in region 2 to that in region 1 EFLUID,1,ADD,CRANGE,101,150 (or EFLUID,1,ADD,CTYPE,10) (or EFLUID,1,ADD,GROUP,2)

Version 3.26

16-29

ROTATING AND MOVING MESHES Cell Attachment and Change of Fluid Type

Chapter 16

List the latest denitions and save the information supplied ECLIST,CFLUID,ALL EVSAVE,1 (list all cells of type Change Fluid) (save this information as event no. 1)

If, at time t = 1., region no. 2 is to be cut off from the rest of the ow, issue the following commands: EVSTEP,2,TIME,1. EDETACH,ADD,REGION,1 (add region no. 1 to the detach set) (or EDETACH,ADD,BRAN,1,2) EDLIST,ALL (list all detached boundary pairs) EFLUID,2,ADD,CTYPE,10 EVSAVE,2 Note that the detached boundary set denitions in an event step can be deleted, if necessary, with command EDDELETE and remaining denitions re-numbered via command EDCOMPRESS.

Step 4 If it is to be assumed that the valve between boundary regions 3 and 4 opens when the average pressure in region 4 is greater than that in region 3, set up a conditional event as follows: EVCND,3 EAMATCH,3,4 EFLUID,1,ADD,CTYPE,20 EVSAVE,3 Enable conditional attachment in an actual event EVSTEP,4,TIME,2. ECONDITIONAL,3,ENABLE EVSAVE,4 (enable conditional event no. 3) (attach region nos. 3 and 4) (change all cells with cell id. 20 to uid no. 1)

While the conditional event is enabled, user subroutine CONATT may be called at each time step to check if the conditional event is to be performed. In such a case, CONATT will contain FORTRAN statements of the following kind: IMAT1 = KEY(96) IMAT2 = KEY(151) P1 = (P(96)+P(97))/2. + PREFM(IMAT1) P2 = (P(151)+P(152))/2. + PREFM(IMAT2) IF (P2.GT.P1) THEN CAFLAG =.TRUE. ELSE

16-30

Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Cell Attachment and Change of Fluid Type

CAFLAG =.FALSE. UB = 0. VB = 0. WB = 0. ENDIF Step 5

velocities at regions 4 and 3 are set to zero

Dene all other events required. Note that: 1. An event step can be (a) deleted, if necessary, with command EVDELETE; (b) modied with command EVGET; (c) listed on the screen with command EVLIST. 2. Command EVUNDELETE restores a previously deleted event step. 3. User-specied offsets can be applied to the actual event time via command EVOFFSET.

Step 6 If using the method described in Chapter 8, Load-step based solution mode, dene the load step for the transient run. Check the validity of specied events and prepare the events data le for subsequent use via command EVPREP. Save the problems data les using commands GEOMWRITE, PROBLEMWRITE, etc. or their equivalent GUI operations accessible from the File menu.

Note that the events data file can be written in coded form to a (.evnc) le with command EVWRITE, typically in order to transfer data to another computer read in coded form from a (.evnc) le with command EVREAD, typically when transferring data from another computer

Step 7 Exit from pro-STAR and then run STAR from your sessions X-window, as described in Chapter 2, Running a CFD Analysis, Step 6. Step 8 Post-processing the data. For example, the commands needed to process time step no. 10 are: SUBTITLE Results at time step 10 Velocity field EVFI CONN case.evn (connect the event le) TRLOAD case.pstt (load the transient post data le)

Version 3.26

16-31

ROTATING AND MOVING MESHES Mesh Region Inclusion/Exclusion

Chapter 16

STORE ITER 10 GETC ALL POPT VECT PLTY NORM CSET NEWS FLUID CPLOT QUIT,NOSAVE

(the appropriate events are loaded and executed automatically) (get the cell data)

Be very careful not to save problem information to file case.mdl as the current geometry corresponds to the state of the mesh at time step no. 10. Useful points 1. At time t = 0, cell pairs are detached. They become attached only when an event containing EATTACH or EAMATCH commands is executed. Once attached in this way, they remain attached until another EATTACH or EDETACH command references them, or they are deactivated. 2. When the models mesh is being created, it is very useful to set up a regular boundary numbering scheme at the interface as this simplies the specication of cell attachment.

Mesh Region Inclusion/Exclusion


Basic concepts A group of cells can be excluded from the solution domain by defining an exclude event and issuing command EECELL. Note that: This is possible only if the cells in the group are not connected to any other cells in the model. Thus, the group must rst be detached from the rest of the model using a cell detachment event, as described in the section on Cell Attachment and Change of Fluid Type. Only active cells can be excluded. There are no other restrictions on the cells that may be excluded (e.g. more than one adjacent layers may be removed at a time).

An important difference with respect to cell deactivation, discussed in the section on Cell-layer Removal/Addition, must also be noted. The mass contained in excluded cells is removed from the solution; by contrast, the mass in the deactivated cells is squeezed out into the neighbouring cells. To restore cells that were excluded, it is necessary to define an include event and to issue command EICELL. It is also necessary to specify the initial flow conditions applicable to the newly included cells via command EICOND. There are three options available for these, as follows: 1. Values specied in pro-STARs INITIAL command. 2. Values in existence at the time of the exclude event. 3. Values calculated in user subroutine UBINIT.

16-32

Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Moving Mesh Pre- and Post-processing

Useful points 1. The EICELL event (to include cell blocks) may destabilize the solution in a large problem. This is because the ow eld solution in the cells introduced instantaneously within the solution domain may not match the solution in the rest of the domain. Smaller time steps may be necessary at this point. 2. The solution variables in the cells that are excluded using EECELL are frozen for possible reuse. These values may be examined in pro-STAR if necessary, by turning off event processing via command EVLOAD,RESET

Moving Mesh Pre- and Post-processing


Introduction The various mesh motions and connectivity changes caused by the execution of event-type commands can be visualised and verified using special pro-STAR facilities. These help both in setting up the events (pre-processing) and in examining the results of the analysis (post-processing). The same facilities can also be used during the actual solution run, in combination with mesh changes caused by event execution. Note that mesh changes can be classified into geometry changes connectivity changes

Geometry changes should occur only as a result of the EGRID event. All other events can only cause connectivity changes. Event processing is useful at three different stages of flow modelling and serves the following requirements: 1. Pre-processing Here the emphasis is on: (a) (b) (c) (d) (e) Testing out different event combinations. Checking out commands read in by EGRID. Making corrections as needed and re-executing the events. Working with incomplete events. Testing out parts of events, e.g. to see if cells to be attached are adjacent to each other. (f) Using events to generate future events, e.g. use EGRID commands to move the mesh and then EAMATCH to dene the attach pairs. 2. Solution run Here, STAR-CD calls up pro-STAR to alter the grid in some way. 3. Post Processing By this stage, the mesh geometry applicable to any given point in time is available from the actual solution. Therefore, the goal here is to generate vertex data for various ow variables (via command CAVERAGE), display them using the correct surface and edge plotting options and create particle tracks. Some error checking capabilities are also needed to detect event errors which may have previously gone unnoticed. These detected errors are
Version 3.26 16-33

ROTATING AND MOVING MESHES Moving Mesh Pre- and Post-processing

Chapter 16

highlighted in the plots. Action commands Commands EVLOAD and EVEXECUTE belong to this category. EVLOAD is used to load all events up to a specified point in time. There are two basic components involved in this operation: Creation of internal tables dening the current status of each cell. These tables can then be used by command CSET via keywords ACTIVE, DEACTIVE or ATTACHED. For example, CSET,NEWSET,ACTIVE creates a cell set of the currently active cells. Execution of any grid-changing commands read in by EGRID.

Note that, in general, application of EVLOAD results only in changes to the mesh geometry and not to the mesh connectivity. The various options of the EVLOAD command deal with different ways of specifying the current time. There is also a reset option which restores the geometry to the original state, as defined below. The first time EVLOAD is called, the original state, i.e. the vertex, cell and boundary definitions of the model, are saved. Command EVLOAD,RESET restores the model to this original state. If the model is changed at this point, the next EVLOAD command will create fresh original state files that correspond to the changes. Command EVEXECUTE should be used only after a successful EVLOAD operation. This command applies the current status, stored in the internal tables mentioned above, to the mesh. Thus: Cells marked as deactivated are deleted (equivalent to command CDELETE) and vertex numbers on adjacent cells are changed to reect their new connectivity. Cells marked as having changed material type are changed to a different cell type. Vertices on the common face between two cells marked as attached will be merged.

The end result of the above is changes to cell connectivity due to cell removal. Using option OFF with command EVEXECUTE restores the model connectivity to the original state defined by EVLOAD. The internal status tables also retain their original setting. A succeeding EVLOAD command also implicitly performs an EVEXECUTE,OFF operation. Status setting commands Commands EVFLAG, EVCHECK and PLATTACH belong to this category. EVFLAG and EVCHECK modify the behaviour of EVLOAD. Any subsequent plotting is controlled by the PLATTACH options. Command EVFLAG can be used to selectively turn on or off different types of events loaded by EVLOAD. It contains two groups of parameters that can be set independently, one for pre-processing and the other for post-processing. The option specified with command EVCHECK (PREP or POST) determines which of the two groups is to be set. The EVLOAD components that can be selectively turned on or off are:
16-34 Version 3.26

Chapter 16

ROTATING AND MOVING MESHES Moving Mesh Pre- and Post-processing

1. COND executes enabled conditional events 2. UPARM calls user subroutine UPARM 3. GRID processes grid change commands This option is essential if EVLOAD is to be used for changing the mesh geometry when pro-STAR is called by STAR-CD. For example, suppose the following commands are read in by EGRID: ..... EVFLAG,PRE,OFF,GRID (if the GRID ag is not set to OFF, the EVLOAD command that follows will cause EGRID commands to be executed repeatedly and ad innitum) (Note the use of the predened parameter TIME)

EVLOAD,UPTO,TIME,TIME CSET NEWS ACTIVE VSET NEWS SURFACE VSMOOTH .....

4. NEWXYZ calls user subroutine NEWXYZ 5. DEACTIVE checks that deactivated cells have zero volume. If they do not, the error is reported and EVLOAD is stopped. 6. ACTIVE checks that active cells have non-zero volume. If they do not, the error is reported and EVLOAD is stopped. 7. ATTACH checks that cell faces to be attached have coincident vertices. If they do not, the error is reported and EVEXECUTE is stopped. Note that this particular option only applies to EVEXECUTE. 8. NEWSET creates a set of cells which fail any tests during EVLOAD. 9. SCDEF creates scratch les containing the initial mesh state. This option may be turned off whenever there is no need to backtrack in time, for example when EVLOAD is called from STAR-CD. This saves CPU time and disk space, which may be considerable for large models. Finally, command PLATTACH controls the plotting of attached faces. When it is set to ON, attached faces are treated like internal faces and thus are not displayed on any surface plots.

Version 3.26

16-35

Chapter 17

OTHER TYPES OF FLOW Multi-component Mixing

Chapter 17

OTHER TYPES OF FLOW


The theory behind flow problems of this kind and the manner of implementing it in STAR-CD is given in the Methodology volume (Chapter 16, Multi-component Mixing). The present chapter contains an outline of the process to be followed when setting up problems involving multiple species and includes cross-references to appropriate parts of the on-line Help system. The latter contains details of the user input required and important points to bear in mind when setting up problems of this kind.

Multi-component Mixing

Setting up multi-component models Step 1 Go to the Thermophysical Models and Properties folder in the STAR-GUIde system and open the Additional Scalars sub-folder. Set up a scalar variable for each species participating in the fluid mixture. The properties of each scalar are specied in the Molecular Properties (Scalar) panel, in two ways: 1. By choosing option Define scalar material and then typing in values yourself. Clicking Defaults instructs pro-STAR to ll the remaining boxes with default values (those of air). 2. By choosing option Select scalar from database (see topic Fluid Property Database). pro-STAR then lls in all the required values using data stored in le props.dbs. It is important that definition of all material (stream) properties via panel Molecular Properties has already been completed before any scalar properties are defined. Step 2 Once all scalars are defined, scroll through them one by one via the Scalar # scroll bar at the bottom of the panel to check all property values in the Molecular Properties (Scalar) panel modify a current value by overtyping in the relevant text box; the change is made permanent by clicking Apply delete an unwanted scalar by clicking Delete Scalar.

Step 3 Specify the stream-dependent (or material-dependent) scalar properties using the Binary Properties panel. Once the settings for all scalars in a given stream are complete, click Apply and then move on to the next stream in your model. Step 4 Specify values for the initial mass fraction of each scalar in each stream using the Initialisation panel. Step 5 If the stream incorporates porous media regions (see Chapter 10 in this volume), specify the effective mass diffusivity and turbulent Schmidt number for each
Version 3.26 17-1

OTHER TYPES OF FLOW Multi-component Mixing

Chapter 17

additional scalar present in your model using the Additional Scalar Properties panel (Porosity sub-folder). Step 6 Specify scalar boundary conditions using the Scalar Boundaries panel (Dene Boundary Conditions folder). Step 7 Go to the Analysis Controls folder and specify solution control parameters for all currently defined scalars using the Additional Scalars panel (Equation Behaviour sub-folder). In multi-stream problems where each stream has a different scalar composition, this panel enables you, in effect, to select which scalars exist in what stream. Step 8 If a transient analysis is to be performed, use the Analysis Output panel (Transient tab) to specify whether cell and/or wall data for selected scalars need to be printed or written to the transient post file. For transient problems defined in terms of load steps, go instead to the Advanced Transients dialog (see Chapter 8, Load step controls) and click one of the Scalars Select buttons. The button to click depends on whether cell or wall data are needed and whether these are to be printed or written to the transient post file. The scalars to be printed or post-processed are selected in the Transient Scalar Selection dialog shown below, by clicking the option button corresponding to the desired scalar number.

Command:

SCTRANS

Note that this process should be repeated for every load step in the transient setup. Step 9 If the stream incorporates additional sources for any of the scalars, specify the source strength and distribution using the Scalar tab in the Source Terms panel (sub-folder Sources). Useful points on multi-component mixing 1. The under-relaxation factors for all scalar transport equations should be set to
17-2 Version 3.26

Chapter 17

OTHER TYPES OF FLOW Aeroacoustic Analysis

2.

3. 4.

5. 6.

7.

the same value. Note that this factor has no effect for scalars calculated by an internal method or by user coding. For thermal problems, the scalar under-relaxation factors should equal that for the energy equation. For combusting or reacting ows, the recommended range is 0.3 to 0.7. For efcient utilisation of computer memory, it is recommended that scalar variable numbers are continuous and start at 1. For problems involving large changes in temperature, it is recommended that the specic heat of both background uid and active species is dened as a polynomial function of temperature (see reference [1]). For scalars, this can be done in the Polynomial Function Denition (Viscosity and Conductivity) dialog that opens from the Molecular Properties (Scalar) panel. A polynomial variation for molecular viscosity and thermal conductivity can be specied in the same way. An ideal-gas variation for the density is also recommended, if necessary with a compressible setting. pro-STAR allows new scalar species to be added to its built-in property database (see topic Fluid Property Database in the on-line Help system). Details of existing scalar denitions can be saved to a le of form case.scl for use in other problems. To do this, issue command CDSCALAR from pro-STARs I/O window. Note that the scalar data are written in the form of appropriate pro-STAR commands (SC, SCPROPERTIES, SCCONTROL, etc.). Thus, it is possible to read them back into a model by executing an IFILE command (see File manipulation on page 21-9). STAR uses default wall functions for calculating heat and mass transfer at wall boundaries. Users can supply alternative expressions for heat and mass transfer coefcients in subroutine MODSWF, activated via the Miscellaneous Controls STAR-GUIde panel.

Aeroacoustic Analysis
The theory behind aeroacoustic analysis and the manner of its implementation in STAR-CD is given in the Methodology volume (Chapter 16, Aeroacoustic Analysis). The present section contains an outline of the process to be followed when setting up a problem of this type. Also included are cross- references to appropriate parts of the on-line Help system, containing details of the user input required. Setting up aeroacoustic models Step 1 Switch on the aeroacoustic modelling facility using STAR GUIdes Select Analysis Features panel: Select On from the Aeroacoustic Analysis menu If a transient analysis mode has already been selected, a pop-up panel will appear, warning you that the model must be run in steady-state mode. Click Yes to conrm your choice and proceed with the analysis. Note that the displayed option in the Time Domain menu will automatically change to Steady State. Click Apply. Note that an additional folder called Aeroacoustic Analysis will
17-3

Version 3.26

OTHER TYPES OF FLOW Liquid Films

Chapter 17

now appear in the NavCenter tree. Step 2 Open the Aeroacoustic Analysis panel. By default, the Aeroacoustic Equation Sources switch is turned On. The default control parameters required for the numerical solution algorithms are also set and are explained by the on-line Help text. If you wish to make any changes, enter the required values in the panel and then click Apply. Step 3 Perform the usual model setup in the Thermophysical Models and Properties folder: In particular, make sure that: A density option appropriate to incompressible ow is selected in the Molecular Properties panel A two-equation, k- type turbulence model has been selected in the Turbulence Models panel Step 4 Specify initial conditions, boundary conditions and control parameters and then run STAR as normal, making sure that the analysis has converged. The aeroacoustic results will be automatically stored in the solution (.pst) file as an extra scalar variable called AALS (Aeroacoustic Lilley Source). If the maximum number of iterations is reached without convergence, it is important to restart the analysis and run it to convergence. Step 5 Use the facilities of the Post-Processing folder to load and display the distribution of the AALS variable, using only cell-based or vertex-based values Useful points on aeroacoustic analyses 1. If you require an initial solution without the overheads of calculating aeroacoustic source terms at the last iteration, simply turn the Aeroacoustic Equation Sources switch Off, click Apply, and then perform the analysis as usual. You will then need to restart the analysis, turn the switch On and perform one iteration to obtain the aeroacoustic results. 2. Note that STAR-CD returns the logarithmic values of the aeroacoustic sources. If you want to display the actual values, you will first need to calculate the antilogarithm of the stored scalar using the facilities of the Post Register Operations dialog (see Chapter 9, The OPERATE utility).

Liquid Films
The theory behind liquid film modelling and the manner of implementing it in STAR-CD is given in the Methodology volume, Chapter 16. This section contains an outline of the steps to be followed when setting up a simulation involving films, including details of the user input required and important points to bear in mind. Setting up liquid lm models Simulations using this feature typically involve droplet deposition on wall boundaries, formation of liquid films and their interaction with the surrounding
17-4 Version 3.26

Chapter 17

OTHER TYPES OF FLOW Liquid Films

fluid and walls. Some important points to note are as follows: Film models can only be used in transient cases, with or without a simultaneous Lagrangian two-phase analysis set-up to model droplet behaviour Film initialization is possible, where a specic amount of lm is applied to a wall boundary as part of the user input for the simulation

The conditions associated with the presence or absence of an initial film are as follows: No initialization In a simulation without an initial lm specication, lms will form whenever droplets are deposited on suitable wall boundaries, i.e. boundaries that have been dened as capable of supporting them. The appropriate wall impingement model (Bai or Stick) must also be selected for this to happen. Film properties are associated with specic lm types in the same way as droplets. STAR will create lm types to correspond with droplet types at the start of a wall lm simulation. The equivalent lm type will have the same physical properties as the droplet type, and will access user coding when required. Although droplets of different type may impact a wall boundary, STAR does not take the type difference into account when determining the lms physical properties. Therefore, if different droplet types are likely to mix in a lm they should share identical physical properties. STAR does not keep any record of which droplet types are present in a liquid lm. Only one lm type is stored per boundary region. Film initialization (Beta feature) If no Lagrangian two-phase analysis is required, lm types can be specied in the same manner as droplet types. If a simultaneous Lagrangian analysis is required, care should be taken to ensure that the lm physical properties and models for each type correspond to the droplet physical properties and models. If a simultaneous Lagrangian analysis is selected, droplet deposition is possible in the same manner as described above for No initialization. Note that this feature is provided in beta form, and you should exercise caution in using it. It is also recommended that you avoid setting up initial lms on bafe boundaries at present, although pro-STAR will accept the inputs.

The basic steps for setting up a film model are as follows: Step 1 Open the Select Analysis Features panel in the STAR GUIde system and select an option appropriate to the problem conditions from the Liquid Films menu: No Initialization no lms are present initially, although they may form later as a result of droplet-wall collisions Film Initialization lms are present initially on at least some walls (or bafes). Droplet deposition will add to existing lm or become a new lm.
17-5

Version 3.26

OTHER TYPES OF FLOW Liquid Films

Chapter 17

For either choice, a pop-up panel will appear, warning you that the model must be run in transient mode. Click Yes to conrm your choice and proceed with the analysis. Note that the displayed option in the Time Domain menu will automatically change to Transient. Click Apply. The Liquid Films folder will appear in the NavCenter tree, containing the appropriate panels for this type of analysis. Step 2 If necessary, allow for the presence of droplets by selecting option Lagrangian Multi-Phase from the Multi-Phase Treatment menu and clicking Apply. The Lagrangian Multi-Phase folder will then appear in the NavCenter tree, containing panels used for specifying droplet parameters (see Chapter 13, Setting Up Lagrangian Multi-Phase Models). This set-up is required if either droplets are injected into the solution domain and their behaviour needs to be modelled as part of the analysis, and/or droplets are generated by the lm itself through a stripping process Step 3 Open the Liquid Films folder: If option No Initialization was selected in Step 1, this will contain just one panel, Film Controls, where the basic lm modelling settings should be dened. If option Film Initialization was selected, an additional panel titled Film Physical Models and Properties will also be present. This is used to define heat, mass and momentum transport mechanisms and physical properties for the films that are already present in the solution domain at the start of the analysis. Step 4 Define boundary locations and conditions in the usual manner. However, note that: For each solid boundary (i.e. region type Wall or Bafe) in your model, you will need to specify whether that boundary is capable of supporting a lm or not. Note that for cases with conjugate heat transfer, a conducting wall region must be assigned to the solid-uid interface if it is to support a lm. If option Film Initialization was selected in Step 1 then, for those boundaries that are able to support a lm, you also need to specify the following initial conditions: (a) Film velocity, thickness and temperature values are entered in the Liquid Films pop-up window that opens from the Dene Boundary Regions panel (b) For multi-component lms, the initial mass fraction of each component is specied in the Film Physical Models and Properties panel (tab Film Properties). Note that if different boundary regions support lms with different initial mass fractions, these lms must be dened as different lm types in the Film Physical Models and Properties panel.

17-6

Version 3.26

Chapter 17

OTHER TYPES OF FLOW Liquid Films

Step 5 Analysis results relevant to films are treated by pro-STAR as wall data. Such data items appear in the scroll lists of panel Analysis Output, for both the Post tab and the Transient tab, so that you may select what is to be included in the .pst and .pstt files, respectively. Film stripping This process can be modelled only via user subroutine FDBRK at present. If active, the subroutine will be called at all wall faces containing films, at a point just before the first droplet tracking stage in a new time step. The user code must provide all necessary information regarding the new (stripped) droplets leaving the film, including initial injection velocity and global position coordinates. If droplets are generated solely by the stripping process, it is still necessary to define droplet properties in advance, as for normal injected droplets. The new (stripped) droplets must have a type associated with them, which has previously been defined in pro-STAR. Obviously, droplet properties should be consistent with those of the parent film. Useful points on liquid lm analyses 1. If lm is not initially present, but subsequently formed on solid boundaries by droplet impingement, it will automatically acquire the physical properties of the parent droplets. Therefore, if user coding has been activated for droplet properties, no user coding for liquid lm properties is needed. 2. Multiple lm types are allowed in lm initialisation, but STAR may produce non-physical results if lms with different physical properties subsequently merge. Note that this problem does not arise if each lm type appears in a separate stream. 3. If lm is to form on alternative wall regions of ATTACH boundaries, the alternative region denition must also support liquid lms. In moving mesh cases where a lm velocity is applied to wall boundaries, care should be taken to ensure the alternative wall region has the correct velocity. 4. It is recommended that the near-wall cell layer be constructed of regularly connected hexahedral cells. If trimmed or tetrahedral cells are to be used, then extrusion layers should be formed on the wall surface. Unsupported features Not all STAR modelling capabilities can be used in conjunction with liquid films. Specifically: 1. Coupled cell interfaces with arbitrary connectivity (see Chapter 4, Mesh Structure) and arbitrary sliding interfaces (see Chapter 16, Arbitrary Sliding Interfaces) should not be present in a model requiring liquid lms 2. Following on from 1, one-to-one (integral) connections should exist between all cells at all times. Mesh motion must take this into account. 3. Liquid lms should not be present in moving mesh problems involving cell inclusion/exclusion (see Chapter 16, Mesh Region Inclusion/Exclusion) 4. Liquid lms are not supported in rotating reference frame cases, with or without rotating boundaries.
Version 3.26 17-7

OTHER TYPES OF FLOW Liquid Films

Chapter 17

5. In conjugate heat transfer cases, lm will not ow over corners dened by a solid region, as shown in Figure 17-1
Conducting wall on interface ! Film will not ow over this corner !

Solid region

Figure 17-1

Liquid lm ow restriction over a corner dened by a solid region

6. Cyclic boundaries should not be specied in cases requiring liquid lms 7. In a mesh containing ATTACH boundaries, there are potential problems in cells containing both an ATTACH boundary and multiple wall boundaries, as illustrated in Figure 17-2. Therefore, cells with such a boundary should not have more than one wall boundary.
ATTACH boundary

Wall boundary

(a) Acceptable condition

ATTACH boundary Wall boundary

(b) Not acceptable Figure 17-2 Supported and unsupported conditions for ATTACH/wall boundaries and liquid lm modelling.

8. For simulations running in parallel, avoid placing inter-processor boundaries on corners of the mesh, as shown in Figure 17-3
17-8 Version 3.26

Chapter 17

OTHER TYPES OF FLOW Liquid Films

Inter processor boundary ! Avoid placing here !

Wall boundary Figure 17-3 Condition to avoid in parallel simulations

Version 3.26

17-9

Chapter 18

USER PROGRAMMING Introduction

Chapter 18

USER PROGRAMMING
This chapter describes how the user can modify or supplement some of the standard features and operations of STAR, such as thermophysical properties, boundary conditions, additional sources of momentum, energy, etc. via user-supplied FORTRAN subroutines. The latter are collectively referred to as UFILE routines. The full set of currently available user programming inputs comprises: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. Boundary conditions Density (equation of state) Molecular viscosity (including non-Newtonian ow) Specic heat Temperature to enthalpy conversion and vice versa Thermal conductivity Molecular diffusivity for chemical species Properties of distributed resistance Thermal and mass diffusion within distributed resistance regions Effective viscosity and turbulence length scale Turbulence model parameters (including two-layer models) Turbulence characteristics within distributed resistance regions Local injection or removal of uid Momentum, enthalpy and turbulence sources Solar and gaseous radiation properties Free surface and cavitation models and properties Heat, mass and momentum transfer in two-phase Lagrangian ow Droplet initial conditions and physical properties Droplet behaviour near walls Inter-droplet collision modelling Eulerian multi-phase drag, turbulence and heat transfer Chemical reaction rates and chemical species mass fractions Chemical species and thermal NOx sources Parameters for sliding mesh and rotating reference frame problems Moving mesh coordinates Cell layer removal or attachment Initial conditions Formation and behaviour of liquid lms forming on walls Wall functions for momentum, heat and mass transfer Time-step size for transient problems Special post-processing Variation of blending factor for higher-order discretisation schemes

Introduction

Subroutine Usage
To use UFILE routines you must execute the following steps: Step 1 Create a subdirectory called ufile under your present working directory as
Version 3.26 18-1

USER PROGRAMMING Subroutine Usage

Chapter 18

follows: Choose File > System Command from the menu bar to display the System Command dialog Type ufiles in the command text box Click Apply and then Close

Step 2 Select the User option in the appropriate STAR GUIde panel or pro-STAR command, depending on the special feature that needs to be modelled, as discussed in Description of UFILE Routines on page 18-5. Step 3 Before a user routine can be used, it must be copied into its own individual file within the ufile directory created earlier. If you are doing this from scratch, it is convenient to start by copying a skeleton (dummy) version of the relevant subroutine into ufile. If you want to do this immediately, click Define user coding in your current panel. A le of the right name containing the right dummy subroutine will be created automatically. If you want to inspect the dummy subroutine listing before proceeding further, go to the main pro-STAR window and select Utility > User Subroutines from the menu bar. This activates the User Subroutines dialog shown below. The dialog box is made up of two sub-windows. The lower one lists all subroutine names, their description and the pro-STAR command that activates them. Selecting any line with the mouse displays the default (dummy) code for that subroutine in the upper part of the box. The relative size of the two sub-windows can be adjusted by dragging the control sash (the small square on the right-hand side) up and down.

18-2

Version 3.26

Chapter 18

USER PROGRAMMING Subroutine Usage

Command:

USUBROUTINE

The required subroutine(s) may be copied into the ufile directory in one of the following ways: 1. Automatically click the Write Auto button. This copies all subroutines already selected implicitly via the User option in the various STAR GUIde panels (or via the corresponding pro-STAR commands). Such subroutines are also marked in the above list with an asterisk. Note that if more selections are made after the above dialog box has been opened, it is necessary to update the display of selected routines by clicking the Update List button. 2. Explicitly click the Write File button. This copies the subroutine that is currently on view. In Unix systems, the subroutine file names are of the form Usubname.f. If a file of the same name already exists in the ufile subdirectory, a new file will be created called Usubname.f.new. Note that generating a subroutine file in this way is necessary only if
Version 3.26

the subroutine is to be set up for the rst time, or an existing subroutine is to be replaced, or you are updating user code from an earlier version of STAR-CD.
18-3

USER PROGRAMMING Subroutine Usage

Chapter 18

Step 4 Edit the existing or newly-created subroutine file as required, for example by using pro-STARs built-in file editor (see the section on File manipulation on page 21-9). This is necessary in order to either utilise some or all of the existing example coding (by removing the comment character, C, from the beginning of the line), or add other coding, as appropriate.

Step 5 The version of a subroutine that is to be used in the current run should always be located in a file called Usubname.f within the ufile subdirectory. Older files bearing the same name should either be overwritten or renamed. Once the above process is complete, the required user routines are automatically passed on to the STAR-CD system in source form. They are then compiled and linked to the main program modules (see Chapter 21, pro-STAR environment variables). Note that STAR will issue a warning message if it does not find any of the required subroutines but will carry on with the run all the same. Useful points As a general rule, user routines should be written with due care. You should ensure that results produced by user code are reasonable and physically meaningful, by implementing suitable checks and by printing appropriate diagnostic messages whenever necessary. Default user routines for all modelling functions listed in the Introduction are supplied, containing sample coding. It should be noted that: 1. Most routines are called for every cell, boundary, or droplet (as appropriate for the routine and model in hand), so a penalty is paid in terms of execution time when they are active. However, the increase in CPU time may be minimised through efcient programming, while keeping the source coding as brief and simple as possible. 2. Each routine has appropriate input data, described in a nomenclature text stored in le nom.inc in the ufile directory. 3. Each routine includes a le called comdb.inc, designed to ensure that the routine uses the same precision as STAR itself. This is done by exploiting the IMPLICIT typing construct present in FORTRAN. According to this, a variable is given a type based upon its initial letter, those beginning with the letters A through H and O through Z being REAL variables, while those beginning with I through N are INTEGER variables. Thus, TIME, ANGLE and SPEED are real but NUMI, IVAL and JUNK are integer. The IMPLICIT typing above can be overruled by an explicit declaration of type, e.g. REAL ITIME makes ITIME real and INTEGER ZVAL will make ZVAL an integer. It is also possible to change the scope of the IMPLICIT typing. This is in fact what comdb.inc does: (a) When STAR is used in single-precision runs, the le contains a single line C IMPLICIT DOUBLE PRECISION (A-H,O-Z)

18-4

Version 3.26

Chapter 18

USER PROGRAMMING Description of UFILE Routines

which is just a comment, thus preserving the standard implicit typing of real and integer variables. (b) When STAR is used in double-precision runs, the le reads IMPLICIT DOUBLE PRECISION (A-H,O-Z) This means that the IMPLICT typing has been overruled to use double-precision real variables. The implication for users is that to make sure a routine works correctly, variables should be named according to the IMPLICT typing shown above. That way the routine will be compiled with the correct precision. Typical input data for a subroutine includes the following: Cell number Global Cartesian or user-dened local coordinates of the cell centroid Cell table numbers as dened in pro-STAR Material numbers Porous media region numbers Iteration number Time Nodal values of the eld variables

For more information on input data for the UFILE routines, see the nomenclature file (nom.inc). The variables in the argument list are never passed uninitialised: they always have a sensible value, which is usually the value from the previous iteration/time step, if applicable, or more generally the default value from the pro-STAR panel. A brief description of each subroutine and how it is activated from pro-STAR is given in the next section.

Description of UFILE Routines


Boundary condition subroutines The first ten of the subroutines listed below (all those with names starting with BCD) are activated from the Options menu in the Dene Boundary Regions panel, or by command RDEFINE. They specify spatial variations of the boundary conditions at various boundary types. In order to use them, the boundaries comprising the region are first defined in the usual way, including the local coordinate system for the velocity components, the rotational speed of the coordinate frame and any default boundary values that become input values for the subroutines. The coordinates passed to the subroutine are defined in the local coordinate system of the boundary and u, v, w are the corresponding velocities. The latter will be in a rotating frame if this was originally specified. The transformation to the global Cartesian coordinate system is done by STAR. BCDEFI Species distributions for all dependent variables that vary spatially over an inlet boundary.

Version 3.26

18-5

USER PROGRAMMING Description of UFILE Routines

Chapter 18

BCDEFO

Can be used to specify variations in ow split or mass outow at outlet boundaries (e.g. in a transient run). Species boundary conditions at pressure boundaries, i.e. pressure, turbulence intensity, length scale, temperature and species mass fractions. Species boundary conditions at non-reective pressure boundaries Species boundary conditions at stagnation boundaries Species boundary conditions at non-reective stagnation boundaries Species variations in wall boundary conditions, including moving wall velocities in local coordinates and in a rotating reference frame. In addition, wall temperature, chemical species mass fraction and heat and mass fluxes, can all be varied over the specified region. Species non-uniform boundary conditions at free-stream transmissive boundaries, e.g. velocity components, pressure and temperature. Species boundary conditions at transient wave transmissive boundaries, e.g. velocity components, pressure and temperature. Species boundary conditions at Riemann invariant boundaries, e.g. velocity components, pressure and temperature. Activated from the Roughness menu in the Dene Boundary Regions panel for walls and bafes, or by command RDEFINE. It species a user-supplied wall roughness model, in problems where wall functions are used for modelling ow near the wall. STAR will default to the smooth-wall behaviour should you activate this subroutine but provide no code for it.

BCDEFP

BCDNRP

BCDEFS BCDNRS

BCDEFW

BCDEFF

BCDEFT

BCDEFR

ROUGHW

Material property subroutines CONDUC Activated from the Conductivity menu in the Molecular Properties (Liquids and Gases) panel or Material Properties (Solids) panel, or by command CONDUCTIVITY. It species the thermal conductivity within a material in heat transfer problems. The thermal conductivity can vary both spatially and with temperature.

18-6

Version 3.26

Chapter 18

USER PROGRAMMING Description of UFILE Routines

CONVET

Activated from the Specic Heat menu in the Molecular Properties (Liquids and Gases) panel or by command SPECIFICHEAT. The activation works in an exclusive manner, i.e. choosing this option excludes use of subroutines CONVTE, COTEET and SPECHT. It supplies the variation of temperature T with enthalpy h and any other scalar variable, i.e. T ( h , m 1 , m 2 , ) , in any way chosen by the user (e.g. analytically or by means of a table). The returned values are valid over a specied temperature range. If the relationship involves other scalar variables, it is necessary to supply values for the partial derivatives T h and T m k . STAR also requires the inverse relationship, h ( T , m 1 , m 2 , ) , for internal calculation purposes and inverts T automatically, using an efcient iterative technique. Activated from the Specic Heat menu in the Molecular Properties (Liquids and Gases) panel or by command SPECIFICHEAT. The activation works in an exclusive manner, i.e. choosing this option excludes use of subroutines CONVET, COTEET and SPECHT. It supplies the variation of enthalpy h with temperature T and any other scalar variable, i.e. h ( T , m 1 , m 2 , ) , in any way chosen by the user (e.g. analytically or by means of a table). The range of validity of the relationship should be specied in terms of a corresponding range in the values of T. If enthalpy is dependent on a scalar variable, it is also necessary to supply the relevant partial derivatives h m k . STAR needs the inverse relationship, T ( h , m 1 , m 2 , ) , for internal calculation purposes and inverts h automatically using an efcient iterative technique. It is helpful (but not essential) to assist the iteration process by supplying h T . Activated from the Specic Heat menu in the Molecular Properties (Liquids and Gases) panel or by command SPECIFICHEAT. The activation works in an exclusive manner, i.e. choosing this option excludes use of subroutines CONVET, CONVTE and SPECHT. It supplies two relationships: (a) The variation of enthalpy h with temperature T and any other scalar variable, i.e. h ( T , m 1 , m 2 , ) , and (b) the variation of temperature T with enthalpy h and any other scalar variable, i.e. T ( h , m 1 , m 2 , ) . These should be valid over a given temperature range. Obviously, the two relationships must be consistent. If additional scalar variables are involved, it is also necessary to supply the relevant partial derivatives h m k . The COTEET option should be used if the user wants to bypass STARs internal calculation procedure for the inverse temperature/enthalpy relationship (see the CONVET, CONVTE description above) in favour of a supplied relationship.

CONVTE

COTEET

Version 3.26

18-7

USER PROGRAMMING Description of UFILE Routines

Chapter 18

DENSIT

Activated from the Density menu in the Molecular Properties (Liquids and Gases) panel or by command DENSITY. It supplies equations of state for density calculations that are not included in the standard options. For compressible ow cases where density is a function of pressure, the routine must also specify the partial derivative p and return it in parameter DENDP. Activated from the Material Mass Diffusivity menu in the Binary Properties (Additional Scalars) panel or by command DIFFUSIVITY. It supplies the molecular diffusivity of the background material in multi-component mixing problems. Activated from a menu in the Thermal Properties (Porosity) panel or by command POREFF. It supplies functions for the calculation of effective thermal conductivity and turbulent Prandtl number within a region of distributed resistance. Activated from a menu in the Additional Scalar Properties (Porosity) panel or by command SCPOROUS. It supplies functions for the calculation of effective mass diffusivity and turbulent Schmidt number within a region of distributed resistance. Activated from a menu in the Turbulence Properties (Porosity) panel or by command PORTURBULENCE. It species non-uniform distributions of turbulence intensity and dissipation length scale within a region of distributed resistance. Activated from the Resistance Coefcients menu in the Resistance and Porosity Factor panel or by command POROSITY. It denes spatially varying coefcients and within a region of distributed resistance. The user can also specify them in terms of a local coordinate system. Activated from the Resistance Coefcients menu in the Resistance and Porosity Factor panel or by command POROSITY. It denes the resistance components ( k 1 , k 2 , k 3 ) directly instead of via the resistance coefcients and . This facility is a useful alternative way of specifying a non-linear variation of porous resistance with velocity. For this purpose, the global Cartesian velocity components are supplied to the subroutine.

DIFFUS

PORCON

PORDIF

PORKEP

POROS1

POROS2

18-8

Version 3.26

Chapter 18

USER PROGRAMMING Description of UFILE Routines

SPECHT

Activated from the Specic Heat menu in the Molecular Properties (Liquids and Gases) panel or Material Properties (Solids) panel, or by command SPECIFICHEAT. The activation works in an exclusive manner, i.e. choosing this facility excludes use of subroutines CONVTE, CONVET and COTEET. The subroutine supplies the variation of uid or solid mean specic heat with temperature and other quantities, at constant pressure. It is particularly useful in modelling combusting or reacting ows exhibiting substantial variation in the value of this property. STAR calculates the temperature T from the iterative expression T
(n)

h = --------------------(n 1) (cp)

(18-1)

where n is the iteration number and c p is the mean specic heat. VISMOL This subroutine is activated from the Molecular Viscosity menu in the Molecular Properties (Liquids and Gases) panel or by command LVISCOSITY. It can specify an arbitrary distribution of molecular viscosity, but its principal use is for supplying functions that describe non-Newtonian viscous behaviour.

Turbulence modelling subroutines LSCALE Activated automatically when the k-l model is selected via menu option k-l in panel Turbulence Models (Turbulence tab). It can also be activated by command TURBULENCE. The subroutine supplies the spatial variation of dissipation length scale (l) required by the k-l model. Activated from the Two-Layer Model menu in the Turbulence Models panel (Near-Wall Treatment tab) or by command TLMODEL. It denes the users own formulation of turbulent behaviour in problems using a two-layer model. This subroutine is activated from panel Turbulence Models (Turbulence tab) or by command TURBULENCE. The subroutine species the turbulent viscosity distribution for a turbulent ow calculation.

TWLUSR

VISTUR

Version 3.26

18-9

USER PROGRAMMING Description of UFILE Routines

Chapter 18

Source subroutines FLUINJ Activated from the Dene Source menu in the Source Terms panel (Mass tab). Alternatively, use command RSOURCE. The subroutine initiates uid injection or removal at specied cells and at a prescribed rate (in units of kg/s/m3). In the case of injection, the properties of the injected uid, i.e. velocity components, turbulence parameters, temperature, etc. must also be prescribed. This is not required when uid is removed. Activated from the Dene Source menu in the Source Terms panel (Enthalpy tab) or by command RSOURCE. It species additional enthalpy sources or sinks due, for example, to electric or magnetic elds, chemical or nuclear reaction and thermal radiation. It can also x the temperature value within a cell by making S1P=GREAT* T fix and S2P=GREAT, where T fix is the desired xed temperature value and GREAT is a large number used internally by pro-STAR. Activated from the Dene Source menu in the Source Terms panel (Turbulence tab) or by command RSOURCE. It allows the user to redene the source term components for the k and equations, e.g. to account for special effects due to streamline curvature, magnetic elds, etc. The subroutine can also be used to x the value of k. Note that the quantities S1P and S2P in the example code are the standard source and sink terms given in the Methodology volume. Thus the user, in modifying or supplementing the standard expressions, effectively replaces the built-in source terms. Activated from the Dene Source menu in the Source Terms panel (Momentum tab) or by command RSOURCE. It enables the modelling of additional momentum source terms, for example due to magnetic or electric elds. The source terms must be specied per unit volume and linearised as S1P-S2P* P , where P is the value of the velocity component in question at node P (see the Methodology volume for details). The two components S1P and S2P must be separately specied for the U, V and W momentum equations. The cells in which to insert these sources can be selected by their indices IP, global Cartesian coordinates XP, YP, ZP or the cell table number ICTID.

SORENT

SORKEP

SORMOM

18-10

Version 3.26

Chapter 18

USER PROGRAMMING Description of UFILE Routines

SORSCA

Species additional source terms for the scalar variable equations and is activated from one of the following locations: (a) The Dene Source menu in the Source Terms panel (Scalar tab) or by command SCSOURCE. The source terms might consist of, for example, the chemical kinetics and rate expressions of a combustion process. (b) The Model Selection menu in panel Cavitation Model or by command CAVITATION. In this case the source terms are used to specify a special cavitation model. The mass fraction value at selected cells can also be xed via the source terms, in the same manner as that described above for enthalpy.

Radiation modelling subroutines RADPRO Activated from the Radiative Properties menu in panel Thermal Models (Liquids and Gases) when radiation with participating media is turned on. May also be activated from the Radiative Properties (Solids) panel if conjugate heat transfer is turned on. Alternatively, use command RADPROPERTIES. It species non-uniform distributions of absorptivity and scattering coefcients within the medium lling the space between radiating boundaries. Activated from the Dene Parameters menu in the Thermal Options panel (Solar Radiation section) or by command SOLAR. In transient problems, it enables specication of solar angle and intensity at every time step of the analysis.

USOLAR

Free surface / cavitation subroutines CAVNUC This subroutine is required only in cavitation problems using the bubble two-phase model. It is activated from the Parameters for BTF Model menu in panel Cavitation Model or by command CAVNUCLEI. It species the number of bubble nuclei per cubic metre and a functional relationship between equilibrium radius and cell pressure.

Version 3.26

18-11

USER PROGRAMMING Description of UFILE Routines

Chapter 18

CAVPRO

This subroutine is needed in cavitation or free surface problems requiring variable properties. It is activated from one of the following locations: (a) The Saturation Pressure menu in panel Cavitation Model or by command CAVPROPERTY. It then species the speed of sound in the current material (for both the liquid and vapour phases) and the saturation vapour pressure. (b) The Saturation Property Variation menu in panel Mass Transfer (Free Surface folder) or by command VAPORIZATION. It then species the vaporisation properties of the current material (saturation temperature and vapour pressure plus latent heat of vaporisation).

FSEVAP

Activated from the Vaporization Rate menu in the Mass Transfer panel (Free Surface folder). Alternatively, use command VAPORIZATION. It calculates the vaporization rate in problems involving mass transfer by evaporation across a free surface. Activated from the Additional Properties menu in the Heavy Fluid Molecular Properties panel (Free Surface or Cavitation folders). Alternatively, use command STENSION. It calculates values for surface tension coefcient and contact angle in free surface and cavitation problems.

FSTEN

Lagrangian multi-phase subroutines COLLDT Activated from the Collision Model menu in panel Droplet Physical Models and Properties (tab Global Physical Models) or by command DCOLLISION. It species the method of detecting inter-droplet collisions in transient Lagrangian ow problems. Activated from the Collision Model menu in panel Droplet Physical Models and Properties (tab Global Physical Models) or by command DCOLLISION. It species the method of calculating the droplet number density used for collision modelling in transient Lagrangian ow problems. Activated from the Droplet Averaging menu in the Droplet Controls panel or by command DRAVERAGE. It supplies information about average droplet properties calculated while tracking a droplet parcel through the solution domain. Activated from the Heat Transfer menu in panel Droplet Physical Models and Properties (tab Droplet Physical Models) or by command DRHEAT. It enables the user to dene the heat transfer process between droplets and the surrounding carrier uid in two-phase Lagrangian ow problems.

COLLND

DRAVRG

DRHEAT

18-12

Version 3.26

Chapter 18

USER PROGRAMMING Description of UFILE Routines

DRMAST

Activated from the Mass Transfer menu in panel Droplet Physical Models and Properties (tab Droplet Physical Models) or by command DRMASS. It enables the user to dene the mass transfer process between droplets and the surrounding carrier uid in two-phase Lagrangian ow problems. This subroutine can also be used for specifying mass transfer between a droplet component and multiple scalars in the surrounding medium. This is done by rst selecting the component in the scroll list of the Droplet Properties tab and then typing the keyword User in the Evaporates to Scalar box. Alternatively, use command DRCMPONENT. Activated from the Droplet User Subroutine (Lagrangian Multi-Phase) or by command DRUSER. The subroutine enables the user to specify droplet initial conditions for two-phase, Lagrangian ow problems. In transient problems, the subroutine sets the initial conditions for any calculation time step at which parcels are released. Activated from the Momentum Transfer menu in panel Droplet Physical Models and Properties (tab Droplet Physical Models) or by command DRMOMENTUM. It enables the user to calculate momentum transfer between droplets and the surrounding carrier uid in two-phase Lagrangian ow problems. Enables the user to specify any physical property appearing in panel Droplet Physical Models and Properties (tab Droplet Properties). It is activated by selecting the Subroutine Usage button next to any of the properties displayed on the tab, or by command DRPROPERTIES. Activated from the Droplet-Wall Interaction menu in panel Droplet Physical Models and Properties (tab Droplet Physical Models) or by command DRWALL. It enables the user to calculate momentum, heat, and mass exchange between droplets and wall boundaries.

DROICO

DROMOM

DROPRO

DROWBC

Eulerian multi-phase subroutines UEDRAG This subroutine is used in Eulerian multi-phase problems to calculate the total drag force, per unit volume of the computational cell. It is activated from the main menu in the Drag Forces panel (Eulerian Multi-Phase folder) or by command EDRAG.

Version 3.26

18-13

USER PROGRAMMING Description of UFILE Routines

Chapter 18

UETURB

This subroutine is employed in Eulerian multi-phase problems to calculate the response coefcient C t . The latter is used to derive the dispersed phase turbulence characteristics from those of the continuous phase. It is activated from the Ct Model menu in the Turbulence Models panel (Multiphase Options tab) or by command ETURB. Note that the drag force per unit volume referred to above is supplied as an input variable since it is often a parameter in C t formulations. This subroutine is employed in Eulerian multi-phase problems to calculate the Nusselt number. The latter is then used in the calculation of the mean interface heat transfer coefcient, which in turn is used to compute the interphase heat transfer when solving for energy for either phase. The subroutine is activated from the Interphase Heat Transfer panel (Eulerian Multi-Phase folder) or by command EHTRANSFER.

UEHEAT

Chemical reaction subroutines FULPRO Species user-dened fuel physical properties and chemical reaction parameters for use with the Shell ignition and knock models. It can be activated in two ways: (a) From the Ignition Reaction Based On menu in panel Ignition (folder Chemical Reactions). Alternatively, type command IGNMODEL. (b) From the Knock Reaction Based On menu in panel Knock (folder Chemical Reactions). Alternatively, type command KNOCK. NOXUSR Activated by the Thermal NOx, Prompt NOx, or Fuel NOx menus in panel Emissions (Chemical Reactions folder), or by command NOX. It contains user coding for the calculation of thermal, prompt or fuel NOx sources. Activated from the Rate Model menu in the Reaction System (Chemical Reactions) panel when option Combined/User is chosen as the current reaction model. Alternatively, type command RRATE. It species a user-supplied reaction rate for chemical reactions of any type. Species a user-supplied reaction rate for the Coupled Complex Chemistry model. It is activated from panel Reaction System, having previously selected option User from the Reaction Rate Calculated by menu in panel Scheme Denition (folder Chemical Reactions). Alternatively, type command CRMODEL.

REACFN

REACUL

18-14

Version 3.26

Chapter 18

USER PROGRAMMING Description of UFILE Routines

SCALFN

In some circumstances, chemical species mass fractions can be calculated from user-prescribed algebraic relationships, e.g. stoichiometric relationships, rather than from nite-volume transport equations. These algebraic relationships can be specied in this routine, activated from the Solution Method menu in panel Additional Scalars (Solution Controls > Equation Behavior sub-folder). Alternatively, use command SCPROPERTIES.

Rotating reference frame subroutines UOMEGA Calculates values of angular velocity (omega) for problems involving rotating reference frames. It is activated by the User Option menu in the Rotating Reference Frames panel or by command SPIN. Generates post-processing data at coupled boundaries. It is used in problems with multiple rotating frames of reference that are solved explicitly. The subroutine is called automatically in the Rotating Reference Frames panel if option Multiple Frames - Explicit is selected from the Reference Frame Treatment menu. Alternatively, use command MFRAME.

UPOSTM

Moving mesh subroutines CONATT Used for conditional cell layer attachment/detachment or change of uid type. It is called automatically if a model employing these features is dened using EVENTS module commands. Activated by selecting Modules > Transient from the main pro-STAR menu to open the Advanced Transients dialog, and then selecting On in the Moving Grid Option menu. Alternatively, use command MVGRID. The subroutine species the cell vertex coordinates at a new time. The old time level coordinates are available in the VCORN array and must be overwritten with new coordinates. The sample coding supplied describes a moving mesh that is linearly expanding and contracting between a reciprocating piston and a xed cylinder head; the piston is driven by a rotating crank mechanism. Species the time-varying offsets used in matching arbitrary sliding interface (ASI) boundaries. It is called automatically if a model employing sliding events is dened using command EVSLIDE.

NEWXYZ

UASI

Version 3.26

18-15

USER PROGRAMMING Description of UFILE Routines

Chapter 18

UBINIT

Species initial conditions for cells that are re-incorporated into the solution domain via an INCLUDE event. It is called automatically if command EICOND is issued in a model employing such cells. Generates parameters required for moving meshes. It is called automatically if a moving mesh model is dened using commands in the EVENTS module; i.e. if command MVGRID,ON,EVENT,PROSTAR is issued.

UPARM

Miscellaneous ow characterisation subroutines FDBRK Species the method of calculating liquid lm stripping by the carrier uid. Activated from the Stripping and Re-entrainment menu in panel Controls (Liquid Films) or by command LFSTRIP Activated from the Values menu in the Initialization panel (Liquids and Gases or Solids folders). Alternatively, use command INITIAL. It initialises ow eld variables to user-specied values. These values override any constant values also appearing in those panels. During an initial eld restart, the subroutine can also be used to selectively reset some of the variable values in the eld. Note that the subroutine returns velocities in a local coordinate system. STAR transforms them to a stationary global Cartesian system. Velocities in this system will differ from the velocities produced by the subroutine because of this transformation and, when that feature is active, the transformation from a rotating reference frame. Enables the user to specify any physical property appearing in panel Film Physical Models and Properties (tab Film Properties). It is activated by selecting the Subroutine Usage button next to any of the properties displayed on the tab, or by command LFPROPERTY. Activated by a button labelled Heat and Mass Transfer in the Miscellaneous Controls (Other Controls) panel, or by command HCOEFF. It modies or supplies new wall functions for heat and mass transfer. This is useful, for example, in problems involving strong natural convection where the standard formulae for the transfer coefcients might be inaccurate. One such example is included in the sample coding. Mean temperatures and mass fractions for all fluid materials are made available through the parameter list.

INITFI

LFPROP

MODSWF

18-16

Version 3.26

Chapter 18

USER PROGRAMMING Description of UFILE Routines

VARPRT

Enables specication of either a variable Prandtl number for enthalpy or a variable Schmidt number. It can be activated in two ways: (a) From the Prandtl(Enth). menu in panel Turbulence Models (Turbulence tab). Alternatively, type command COKE. (b) Via the Schmidt Number pop-up menu in the Binary Properties (Additional Scalars) panel, or by typing command SCPROPERTIES. In this case, the subroutine should supply special functions for calculating the turbulent Schmidt number of chemical species in multi-component mixing problems.

Solution control subroutines DTSTEP Enables the user to specify a variable time step for transient, single-transient or pseudo-transient simulations. It can be activated in three ways: (a) For single-transient cases, select option User in the Time Step Method menu of the Set Run Time Controls panel (Analysis Preparation/Running folder). Alternatively, use command DELTIME (b) For pseudo-transient cases, select option User in the Time Step Option menu of the Set Run Time Controls panel (Analysis Preparation/Running folder). Alternatively, use command TIME. (c) For transient cases, open the Advanced Transients dialog, select the appropriate load step, and then click the User Flag button in front of the time step (Delta Time) box. Alternatively, use command LSTEP. The subroutine can be used, for example, in re and smoke movement simulations that involve a large, concentrated heat source. The time step can be adjusted in terms of the number of PISO correctors and maximum Courant number. Note that STAR does not alter the number of time steps in a load step, so your code must ensure that the time step lengths are such that the length of the load step is correct.

Version 3.26

18-17

USER PROGRAMMING Sample Listing

Chapter 18

POSDAT

Activated by the User subroutine button in the Analysis Output (Output Controls) panel or by command PRFIELD. It performs special post-processing operations. For example: (a) Variable values at several monitoring locations can be written to user-designated output les for subsequent processing. (b) A bulk averaging scheme can be prescribed for selected ow variables and printed at specied intervals. (c) Calculation of lift and drag coefcients. This subroutine may be called both at the beginning and at the end of every time step or iteration. The place from which it is called is distinguished by the value of parameter LEVEL (=1 beginning, =2 end)

VARBLN

Activated by the Blending Method pop-up menus in the Primary Variables panel (Differencing Schemes tab). It can be used to vary the blending factor for higher-order discretisation schemes over the computational domain. Alternatively, use command DSCHEME.

Sample Listing
The listing for subroutine CONDUC is given below as an example of the default source code available in STAR-CD. Users wishing to inspect the contents of any other subroutine should start a pro-STAR session and then activate the User Subroutines dialog, as explained in Subroutine Usage on page 18-1.
C************************************************************************* SUBROUTINE CONDUC(CON) C Conductivity C************************************************************************* C--------------------------------------------------------------------------* C STAR RELEASE 3.26 INCLUDE 'comdb.inc' COMMON/USR001/INTFLG(100) INCLUDE 'usrdat.inc' DIMENSION SCALAR(50) EQUIVALENCE( UDAT12(001), ICTID ) EQUIVALENCE( UDAT11(001), CP ) EQUIVALENCE( UDAT11(002), DEN ) EQUIVALENCE( UDAT11(003), ED ) EQUIVALENCE( UDAT11(006), P ) EQUIVALENCE( UDAT11(007), T ) EQUIVALENCE( UDAT11(008), TE ) EQUIVALENCE( UDAT11(009), SCALAR(01) ) EQUIVALENCE( UDAT11(059), U ) EQUIVALENCE( UDAT11(060), V ) EQUIVALENCE( UDAT11(061), W ) EQUIVALENCE( UDAT11(062), VISM ) EQUIVALENCE( UDAT11(063), VIST ) EQUIVALENCE( UDAT11(067), X ) EQUIVALENCE( UDAT11(068), Y ) 18-18 Version 3.26

Chapter 18

USER PROGRAMMING New Coding Practices for Dynamic Memory

EQUIVALENCE( UDAT11(069), Z ) C----------------------------------------------------------------------C C This subroutine enables the user to specify thermal conductivity C (CON). C STAR calls this subroutine for cells and boundaries. C ** Parameter to be returned to STAR: CON C----------------------------------------------------------------------C Sample coding: To specify thermal conductivity for a group of C cells with cell table numbers 2 and 11 as a function C of temperature C C IF(ICTID.EQ.2.OR.ICTID.EQ.11) CON=4.3+0.001*T C-------------------------------------------------------------------------C RETURN END C

New Coding Practices for Dynamic Memory


STAR-CD Release 3.2 marks the change to dynamic memory, meaning that the size parameters written by pro-STAR to file parm.inc are no longer hard-coded into a STAR executable. The parameters are now read and used dynamically at run-time. On the whole this has no implications for user subroutines; subroutines which worked in Release 3.15 will continue to work in Release 3.2, except for the specific changes listed in the Release Notes. The specific area in which dynamic memory affects user subroutines is where those subroutines need to access parameters from parm.inc and possibly declare local storage sized using these parameters. In Release 3.2, it is no longer necessary to include the parm.inc file in a subroutine in order to access the parameters defined in it. These parameters are now passed to subroutines automatically via usrdat.inc. User dened arrays Regarding the declaration and use of arrays, no action is necessary when the arrays have a fixed size, e.g. DIMENSION AUXVEL(3) Some action is necessary for variable-sized arrays, for example those whose size depends on model parameters such as the number of cells. The following example shows the dynamic memory allocation of a user-defined array UARRAY, dimensioned to cover the entire range of cells in the computational model (1:NCMAX). Prior to V3.20 this would have been achieved by: INCLUDE ../parm.inc DIMENSION UARRAY(1:NCMAX) COMMON /UCOMM1/ UARRAY In V3.20 this is achieved by: DIMENSION UARRAY(1:NCMAX) POINTER(P_UARRAY,UARRAY)
Version 3.26 18-19

USER PROGRAMMING New Coding Practices for Dynamic Memory

Chapter 18

COMMON /UCOMM1/ P_UARRAY "P_UARRAY" is a Fortran pointer. It is no longer necessary to include parm.inc as size parameters are now automatically included via usrdat.inc. Space for this array must be allocated via CALL CDMALLOC(P_UARRAY, <TypeSize>*NCMAX) where <TypeSize> represents the size in bytes of the data type of UARRAY. STAR provides parameters for the size of the various data types. Examples of these for different data types are: 1. Integer CALL CDMALLOC(P_IARRAY, INTSIZ*NCMAX) 2. Character CALL CDMALLOC(P_CARRAY, ICHRSIZ*NCMAX) 3. Logical CALL CDMALLOC(P_LARRAY, ILOGSIZ*NCMAX) 4. Implicit-precision real CALL CDMALLOC(P_FARRAY, IFLSIZ*NCMAX) 5. Double precision real CALL CDMALLOC(P_DARRAY, IDBLSIZ*NCMAX) An array such as UARRAY is referenced exactly as it would have been in previous versions of STAR, for example: DO LIP=1,NCELL UARRAY(LIP)=UARRAY(LIP)+... ENDDO To free the space that has been allocated for the pointer, use CALL CDFREE(P_UARRAY) Please note the following: The geometrical quantities needed to dimension variable-sized arrays are already accessible via le usrdat.inc; please check with User Support about their meaning if in doubt. Previously these quantities would have been accessed by inclusion of le parm.inc. Generally, if a variable-sized array is not kept in a common block, space for it should be allocated upon each entry into the subroutine and de-allocated on exit. If a variable-sized array is kept in a common block, it will be sufcient to allocate its memory the rst time the subroutine is visited, e.g. IF (INTFLG(1).EQ.0) THEN CDMALLOC(P_UARRAY, <TypeSize>*NCMAX) ...
18-20 Version 3.26

Chapter 18

USER PROGRAMMING New Coding Practices for Dynamic Memory

INTFLG(1)=1 ENDIF If variable-sized arrays are kept in common blocks, there can only be one array per common block.

Two illustrative examples are given below. User coding examples User arrays not kept in COMMON block
C---------------------------------------------------------C C Declare an array of NCMAX implicit-precision REALs DIMENSION UARRAY(NCMAX) POINTER(P_UARRAY,UARRAY) C Declare an array of NCMAX INTEGERs INTEGER IARRAY(NCMAX) POINTER(P_IARRAY,IARRAY) C---------------------------------------------------------C C Allocate storage for these arrays CALL CDMALLOC(P_UARRAY,IFLSIZ*NCMAX) CALL CDMALLOC(P_IARRAY,INTSIZ*NCMAX) C---------------------------------------------------------C C Arrays now available for use ... ... C---------------------------------------------------------C C Deallocate storage before exit CALL CDFREE(P_UARRAY) CALL CDFREE(P_IARRAY) C---------------------------------------------------------C RETURN

User arrays kept in COMMON block


C---------------------------------------------------------C C Declare an array of NCMAX implicit-precision REALs DIMENSION UARRAY(NCMAX) POINTER(P_UARRAY,UARRAY) COMMON/UCOMM1/P_UARRAY C Declare an array of NCMAX LOGICALs LOGICAL LARRAY(NCMAX) POINTER(P_LARRAY,LARRAY) COMMON/UCOMM2/P_LARRAY C---------------------------------------------------------C C Allocate storage for these arrays the first time only IF (INTFLG(32).EQ.0) THEN CALL CDMALLOC(P_UARRAY,IFLSIZ*NCMAX) CALL CDMALLOC(P_LARRAY,ILOGSIZ*NCMAX) INTFLG(32)=1 END IF C---------------------------------------------------------C Version 3.26 18-21

USER PROGRAMMING New Coding Practices for Eulerian Multi-phase Problems C Arrays now available for use ... ... C---------------------------------------------------------C C No need to deallocate storage before exit RETURN END

Chapter 18

New Coding Practices for Eulerian Multi-phase Problems


General principle For STAR-CD Release 3.2, in addition to introducing new subroutines specific to Eulerian multi-phase (E2P) applications, we have also modified existing, single-phase ones for use with two phase cases. The guiding principle has been to cause as little disruption as possible so as not to interfere with existing, single-phase practices. This has been achieved by making the subroutines of interest generic and, therefore, re-usable for each phase. By cycling through and calling user subroutines twice, once per phase, as opposed to visiting them once for both phases, phasedependent arguments and variables were eliminated. The only exception to this is E2P-specific variables such as volume fraction. To make the existing user subroutines useable in two-phase problems without altering their argument list, a new phase index parameter, IPHA, was introduced. Unlike the variable NIPHASE, which was previously passed as argument to some subroutines and which it replaces, IPHA is passed in common block /USRD22/, stored in file usrdat.inc. In addition, we have also expanded the list of cell, boundary and generic user data for phase no.2 to match that of the first, or single, phase. Since Release 3.2 is currently limited to two phases only, we only have one volume fraction variable and it always applies to phase 2. In a user subroutine, VFCEL2 stores cell values of this variable while VF2BND2 stores boundary values. The complete list of variables is given in file nom.inc. Example of implementation As an example of the above, consider a user-coded molecular viscosity calculation for a gas-liquid system, where the first phase is air and the second phase liquid water. The relevant code should be:
C************************************************************************* SUBROUTINE VISMOL(VISM) C Viscosity (molecular) C************************************************************************* IF(IPHA.EQ.1) THEN VISM=1.855e05 ELSE IF(IPHA.EQ.2) THEN VISM=0.0008887 ENDIF C RETURN END

18-22

Version 3.26

Chapter 18

USER PROGRAMMING User Coding in parallel runs

E2P-supported subroutines In addition to the E2P-specific subroutines (see Eulerian multi-phase subroutines on page 18-13), the E2P feature will support subroutines FLUINJ, INITFI, POSDAT, SORENT, SORMOM, SORKEP, VISMOL, CONDUC and VISTUR. Of these, the first three have been changed according to the rules described above, as follows: FLUINJ Old: FLUINJ(FLXI,UI,VI,WI,TEI,EDI,TI,SCINJ,FLXI2,NIPHASE,IPMASS) New: FLUINJ(FLXI,UI,VI,WI,TEI,EDI,TI,SCINJ,IPMASS) The specific mass flux variable FLXI2 for phase 2 has been eliminated and NIPHASE has been removed. INITFI Old (post August 2002): INITFI(U,V,W,PR,TE,ED,T,XVF2,SCALAR,NIPHASE) New: INITFI(U,V,W,PR,TE,ED,T,SCALAR,XVF2) Again, NIPHASE has been removed. XVF2 has been moved back after SCALAR, to the end of the argument list, where it was until August 2002 and in all of Release 3.15 POSDAT To preserve the argument list, a common block is introduced for the volume fraction. Inside STAR, this subroutine is now called twice, once per phase, with the appropriate phase variables.

User Coding in parallel runs


If user coding is present in a parallel run, it is possible that some of the required operations need access to flow field values that are distributed throughout the various computational domains. In such cases, it is necessary to collect such values prior to manipulation and to do this, the supplied coding needs to use special message passing routines. The example shown below is an extract from user subroutine NEWXYZ and it employs a parallel function called IGSUM to find the global number of active cell layers in an engine simulation problem.
NLIVE=0 ICELL1=15904 ICELLEND=62209 NCOF=1029 DO I=ICELL1,ICELLEND,NCOF CALL LIVCLL(I,ISTAT) IF (ISTAT.EQ.1) NLIVE=NLIVE+1 ENDDO c. NHPC > 1 if parallel run IF(NHPC.GT.1) NLIVE=IGSUM(NLIVE) Version 3.26 18-23

USER PROGRAMMING User Coding in parallel runs

Chapter 18

A synopsis of the available message passing-routines is given in Appendix G. These routines should only be called if required; they are not necessary for sequential runs. To aid diagnostics, four variables are provided via file usrdat.inc to user subroutines: IHPC this is the local process number ( 1 IHPC NHPC) IHPC = 1 for a sequential analysis IHPC = 1 for the master process in STAR HPC IHPC > 1 for the slave process in STAR HPC Number of processes (NHPC = 1 for a sequential analysis) Number of uid halo cells on the local process Total number of halo cells on the local process (uid plus solid)

NHPC NHHPC

NTHHPC

18-24

Version 3.26

Chapter 19

PROGRAM OUTPUT Introduction

Chapter 19

PROGRAM OUTPUT
Run-time screen output from STAR provides a summary of the input specification for the problem being solved and also allows monitoring of the calculation progress. It is therefore important for users to understand this information and examine it regularly to ensure that the problem has been correctly set up; the calculations are proceeding satisfactorily.

Introduction

The amount of information displayed is largely up to the user, apart from a core of information that is always produced. The various checks and outputs which are specially activated from pro-STARs STAR GUIde environment (Output Controls folder) are described below, along with the permanent output.

Permanent Output
The core-level screen information from STAR can be divided into two sections: 1. An echo of the input data provided by the user 2. A display of analysis results and information on the progress of STAR calculations Input-data summary As can be seen in Table 19-1 on page 19-7, the input summary begins with the STAR code version and the date and time of the run. This is followed by a table that provides essential data for checking that all important user-defined inputs are correct. All listed data reflect the values stored in the problem data (.prob) file. The table is divided into distinct sections, as follows: General Data This section provides general information on the problem at hand, including: Number of cells Number of boundaries specied Computer memory requirements The models overall physical dimensions The frequency and extent of restart, post-processing and screen output

This section of the table also summarises: The character of the ow (i.e. steady or transient) The solution procedure selected The maximum number of iterations or time steps specied The starting iteration number for the calculations The residual tolerance used for convergence tests The number of uid streams and solid regions present

A sample output can be seen in Section A of Table 19-1.

Version 3.26

19-1

PROGRAM OUTPUT Permanent Output

Chapter 19

Fluid Properties This section comprises one or more tables containing the properties of all fluid streams included in the model. For each stream, the information supplied includes: The variables calculated, including the turbulence model selected and the appropriate characteristic length The thermophysical properties specied, such as density, viscosity, specic heat, and conductivity The solution monitoring and pressure/temperature reference locations for the stream The reference pressure and temperature Any xed boundary uxes included in the model

An example of the output for a multi-stream case appears in Table 19-1, Section B. This shows data for two fluid regions with different fluid properties. Solid Properties The fluid region tables are followed, in the case of conjugate heat transfer applications, by tables of properties for solid regions such as density, specific heat and conductivity. This can be seen in Table 19-1, Section C. The solution monitoring location and reference temperature are also included here. Body Forces The fluid and solid region properties are followed by data specifications for the two standard body force options, namely: Gravitational acceleration (whose components are specied in the global Cartesian coordinate directions). Rotation about a user-dened axis.

Both the above are shown on a stream-wise basis. The sample case presented in Table 19-1 does not use this option. Additional Features In this part of the table, information is provided on any additional features that are active in the model, such as: Radiation, Conjugate heat transfer Distributed resistances

The sample output of Table 19-1, Section D, indicates use of the conjugate heat transfer option. User FORTRAN Coding This section of the table only appears when user-defined FORTRAN coding is active during the calculations. If so, it provides a list of the user routines that have been invoked. The sample case presented in Table 19-1 does not use this option. Boundary Types This section of the table provides a list of boundary types used in the model, an example of which can be seen in Table 19-1, Section E.

19-2

Version 3.26

Chapter 19

PROGRAM OUTPUT Permanent Output

Solution Parameters This last section of the table deals with the settings for the control parameters used by the numerical algorithm, such as relaxation factors, type of differencing scheme used, the corresponding blending factors, residual normalising factors for each uid stream and solid region, solver tolerances, sweep limits.

For transient runs the printout of relaxation factors is suppressed as irrelevant, except for the pressure correction relaxation factor. A typical printout of the above parameters can be seen in Table 19-1, Section F. In circumstances when normalisation factors are dynamically updated during the course of the calculations, a message to that effect will appear immediately below the input data table. This is the case in the example shown in Table 19-1. Similar messages appear for cases with no inflow boundaries and for porous media calculations. Run-time output The run-time output that provides information on the progress of the calculations at each iteration or time step can be seen in Table 19-2 on page 19-9 and is arranged in two sections: 1. The left-hand section contains the global absolute residual histories for each transport equation solved. Alternatively, for time-marching calculations, the user may opt to display the global rates of change. 2. The right-hand section contains values of the dependent variables at a pre-dened monitoring location. In steady-state runs, satisfactory progress of the calculations should show a steady reduction in the global absolute residuals from iteration to iteration; stabilisation of the values of ow eld variables at the monitoring location.

However, residuals do not always decrease from iteration to iteration and, in some cases, oscillations can be observed. These can be ignored as long as the overall residual levels are reduced over a reasonable number of iterations. In transient runs, the global rates of change indicate the changes in the flow field and the success of the calculation has to be judged by the user from the output values of the field variables. Information on total CPU and elapsed times is also given. This output appears on the screen during an interactive session and is also saved in the run-time output (.run) file. Any warning messages generated during the course of the calculations are stored in the run-time optional output (.info) file and should be inspected by the user separately. The .run file also contains a reminder to the effect that warning messages have been produced.

Version 3.26

19-3

PROGRAM OUTPUT Printout of Field Values

Chapter 19

Printout of Field Values


The printout of field values for the solution variables is optional and, if present, follows the analysis history output. The output quantity and frequency is left up to the user and may be set using various options in the Analysis Output STAR GUIde panel see the Print Cell Range section for steady-state problems. There is also a similar Print Cell Range section in the transient-problem version of this panel (Post tab). An example of such a printout can be seen in Table 19-3 on page 19-10.

Optional Output
All additional outputs are optional and, if requested, will appear in the .info file by default. Output of additional data is activated by various options in the Monitor Numeric Behaviour STAR GUIde panel. Thus: 1. The Echo Input Data option generates additional information on input data, as shown in Table 19-4 on page 19-11, Section 1. This includes (a) information concerning the number of cyclic boundary pairs (b) turbulence model coefcients (c) initial conditions for different uid and solid regions 2. The Print Boundary and Body Force Information option activates a printout of boundary types, conditions and locations, shown in Table 19-4, Section 2. 3. The Print Iteration Residuals and Conservation Checks option controls the printing of additional information concerning the solution progress. This is shown in Table 19-5 on page 19-12, Section 3 and includes (a) mass/heat balance data (b) mass ux / heat ux printed for each boundary region and for each material (c) maximum, minimum, volume-averaged and mass-averaged values of all solved variables printed for each material (d) heat transfer between different materials 4. The Print Radiation Heat Transfer Boundary Data option controls the printing of radiation heat exchanges between physical boundary regions (i.e. excluding cyclic and symmetry regions). The information appears in a list showing the radiative heat ux received by a given region from every other region in the solution domain. 5. The Print Boundary Patch Analysis option provides an analysis of the incident radiative heat ux on a given patch. This consists of a list of patches contributing a stated amount of heat ux to that patch. The different quantities printed have the following meaning: Mass balance checks FVIN total ow in through inlet boundaries, kg/s FVOUT total ow out through outow (negative inlet) boundaries, kg/s FPIN total ow in through pressure, stagnation pressure, free-stream and transient-wave transmissive boundaries, kg/s
19-4 Version 3.26

Chapter 19

PROGRAM OUTPUT Optional Output

FPOUT FCYIN FCYOT FLOUT SDRDT SDVDT FLINJ MSDRO FDIFF SUM RESP RES0

total ow out through pressure, stagnation pressure, free-stream and transient-wave transmissive boundaries, kg/s total ow in through partial cyclic boundaries, kg/s total ow out through partial cyclic boundaries, kg/s total ow out through outlet boundaries, kg/s mass accumulation by density change in time, kg/s mass accumulation by volume change in time, kg/s mass injection, kg/s mass transfer from the dispersed phase (droplets) to the continuous phase, kg/s mass balance kg/s sum of mass sources sum of absolute mass sources starting residual in the solver

Heat balance checks ENIN sum of enthalpy transported in through all open boundaries, W ENOUT sum of enthalpy transported out through all open boundaries, W HTIN heat transfer into uid or solid materials at walls, bafes or solid/uid interfaces, W HTOUT heat transfer out of uid or solid materials at walls, bafes or solid/uid interfaces, W QUDP pressure work term, W QMDIS heat generation due to molecular dissipation, W QTRDS heat generation due to turbulence dissipation, W QSOR sum of user-dened heat sources, W QTRAN change in enthalpy within the solution domain over one time step, W QDPDT transient pressure term, W QEXT total heat transported from the interior to ambient through the wall boundaries, W QDROP enthalpy transfer from the dispersed phase (droplets) to the continuous phase, W QCYC enthalpy change from an inow to an outow partial cyclic boundary, W QRIN radiation ux from the walls to the uid, W QROUT radiation ux from the uid to the walls, W QRLOS thermal radiation lost through xed velocity, pressure and outow boundaries, W QRSO net radiation energy transfer into the participating media, W QSOLS sum of the solar radiation sources specied at all wall patches, W QSOL net solar radiation transfer from the walls to uid, W QSLOS solar radiation lost through xed velocity, pressure and outow boundaries, W SHWRK work done at moving boundaries (appropriate only when total enthalpy or rothalpy is being solved) QBODY work done by body forces, W HDIFF enthalpy balance material-wise, W. This is calculated as
Version 3.26 19-5

PROGRAM OUTPUT Optional Output

Chapter 19

HDIFF = (ENOUT + HTOUT + QTRAN) (ENIN + HTIN + QDPDT + QUDP + QMDIS + QTRDS + QSOR + QDROP + SHWRK + QBODY + QRSO + QCYC) HDIFB enthalpy balance at the wall boundaries for a particular material, W. This is calculated as HDIFB = (HTIN + QRIN + QEXT + QSOL) (HTOUT + QROUT) HDIFT total enthalpy balance for all materials, W

Both HDIFF and HDIFT should reduce to a small number for a converged solution. Species conservation checks SCIN total species mass in through xed velocity and pressure boundaries, kg/s SCOUT total species mass out through xed velocity, pressure and outow boundaries, kg/s MTRAN net transfer of species at the walls, kg/s MSOR species mass source (creation or destruction), kg/s MDROP species mass transfer from the dispersed phase (droplets) to the continuous phase, kg/s MDIFF species balance which must reduce to a small number as the solution converges, kg/s MTRNS transient accumulation of species mass, kg/s All warning messages are sent to the .info file during the iteration or time step in which they occur. The user should not need to interpret or take action on the data sent to this file except in circumstances where problems are encountered in obtaining a solution. In such a case the additional data and warning messages can help in tracing the source of the problem.

19-6

Version 3.26

Chapter 19

PROGRAM OUTPUT Example Output

Example Output
Table 19-1:
*** GEOMETRICAL CALCULATIONS STARTED *** GEOMETRICAL CALCULATIONS COMPLETED

|-------------------------------------------| | STAR VERSION 3.200 | | THERMOFLUIDS ANALYSIS CODE | | Operating System: SunOS | | Stardate: 3-FEB-2004 Startime: 11:59:20 | |-------------------------------------------| |-----------------------------------------------------------| | STAR Copyright (C) 1988-2003, Computational Dynamics Ltd. | | Proprietary data --- Unauthorized use, distribution, | | or duplication is prohibited. All rights reserved. | |-----------------------------------------------------------|

|-------------------------------------------------------------------------------------------| | ---------------------------- PROBLEM SPECIFICATION SUMMARY ---------------------------- | |-------------------------------------------------------------------------------------------| | CASE TITLE .................. => | | NUMBER OF CELLS ............. => 192 | | NUMBER OF BOUNDARY FACES .... => 440 | | MESH DIMENSIONS XMIN XMAX YMIN YMAX ZMIN ZMAX | | (IN METRES) ............ => 0.0E+00 6.0E-01 0.0E+00 8.0E-01 0.0E+00 5.0E-02 | | RESTART DATA ................ => WILL BE SAVED ON FILE.pst | | SURFACE DATA ................ => WILL BE SAVED ON FILE.pst | | BOUNDARY DATA ............... => WILL BE PRINTED ON FILE.info | | CONVERGENCE DATA ............ => WILL BE PRINTED ON FILE.info | | FIELD DATA .................. => WILL BE PRINTED | | STEADY FLOW ................. => START FROM ITERATION = 0 | | INITIALISATION .............. => WILL BE EMPLOYED | | DATA DUMP (FILE.pst)......... => EVERY 10 ITERATIONS | | SOLUTION PROCEDURE .......... => SIMPLE | | RESIDUAL TOLERANCE .......... => 1.00E-03 | | MAX. NO. OF ITERATIONS ...... => 100 | | NO. OF FLUID MATERIALS ...... => 2 | | NO. OF SOLID MATERIALS ...... => 1 | |-------------------------------------------------------------------------------------------| |-> FLUID 1 -------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | SOLVE ....................... => U, V, P, TE, ED,VIS,DEN, | | FLUID FLOW .................. => TURBULENT INCOMPRESSIBLE HIGH RE K-EPS MODEL | | CHARACTERISTIC LENGTH ....... => 1.000E+00 m | | MONITORING LOCATION ......... => 63 | | REFERENCE PRESSURE .......... => PREF = 1.000E+05 Pa | | DENSITY ..................... => IDEAL GAS: MOLW = 2.891E+01 | | MOLECULAR VISCOSITY ......... => CONSTANT MU = 1.810E-05 Pas | | FIXED FLOW BOUNDARY FLUXES... => FVIN = 5.934E-01 kg/s FVOUT = 0.000E+00 kg/s | | => FLOUT = 0.000E+00 kg/s | | ACCELERATION ................ => GRAVX= 0.00E+00 GRAVY=-9.81E+00 GRAVZ= 0.00E+00 | | => REF.DEN.=1.205E+00 AT ( 0.00E+00, 0.00E+00, 0.00E+00) | |-------------------------------------------------------------------------------------------| |-> FLUID 2 -------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | SOLVE ....................... => U, V, P, | | FLUID FLOW .................. => LAMINAR INCOMPRESSIBLE | | MONITORING LOCATION ......... => 143 | | PRESSURE REF. CELL .......... => 145 | | REFERENCE PRESSURE .......... => PREF = 1.000E+05 Pa | | DENSITY ..................... => CONSTANT RHO = 1.000E+03 kg/m3 | | MOLECULAR VISCOSITY ......... => CONSTANT MU = 1.000E-03 Pas | | FIXED FLOW BOUNDARY FLUXES... => FVIN = 1.000E+00 kg/s FVOUT = 0.000E+00 kg/s | | => FLOUT = 0.000E+00 kg/s | |-------------------------------------------------------------------------------------------| |-> SOLID 3 -------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | SOLVE ....................... => T | | MONITORING LOCATION ......... => 94 |

C
19-7

Version 3.26

PROGRAM OUTPUT Example Output

Chapter 19

| REFERENCE TEMPERATURE ....... => TREF = 2.730E+02 K | | DENSITY ..................... => CONSTANT RHO = 9.000E+03 kg/m3 | | SPECIFIC HEAT ............... => CONSTANT C = 3.800E+02 J/kgK | | CONDUCTIVITY ................ => CONSTANT K = 3.800E+02 W/(mK) | |-------------------------------------------------------------------------------------------| |-> ADDITIONAL FEATURES USED --------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | PLUG AND PLAY | | RAMFILES OPTION ENABLED | | TURBO OPTION ENABLED | | CONJUGATE HEAT TRANSFER (RELA. FAC. IN SOLID = 1.00) | |-------------------------------------------------------------------------------------------| |-> BOUNDARY TYPES USED -------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | INLET, OUTLET, SYM. PL., WALL, PRESSURE, | | Turbulence intensity and Mixing length specified at inlet reg.no. 1 | | Turbulence intensity and Mixing length specified at pressure boundary reg.no. 2 | | Turbulence intensity and Mixing length specified at inlet reg.no. 3 | |-------------------------------------------------------------------------------------------| |-> SOLUTION PARAMETERS -------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | VARIABLE | U V W P TE ED | |-------------------------------------------------------------------------------------------| | RELA. FAC. | 7.000E-01 7.000E-01 7.000E-01 2.000E-01 7.000E-01 7.000E-01 | | DIFF. SCH. | SFCD SFCD SFCD SFCD SFCD | | DSCH. FAC. | 5.000E-01 5.000E-01 5.000E-01 5.000E-01 5.000E-01 | | SOLV. TOL. | 1.000E-01 1.000E-01 1.000E-01 5.000E-02 1.000E-01 1.000E-01 | | SWEEP LIM. | 100 100 100 1000 100 100 | |-------------------------------------------------------------------------------------------| | VARIABLE | T DENS TVIS MVIS CP COND | |-------------------------------------------------------------------------------------------| | RELA. FAC. | 9.500E-01 1.000E+00 1.000E+00 1.000E+00 1.000E+00 1.000E+00 | | DIFF. SCH. | UD CD | | DSCH. FAC. | 0.000E+00 1.000E+00 | | SOLV. TOL. | 1.000E-01 | | SWEEP LIM. | 100 | |-------------------------------------------------------------------------------------------| | * RESIDUAL NORMALISATION PRACTICE REPRESENTATIVE OF VARIABLE FLUX USED | | * NORMALISATION FACTORS WILL BE DYNAMICALLY UPDATED AS THE FLOW DEVELOPS | |-------------------------------------------------------------------------------------------|

19-8

Version 3.26

Chapter 19

PROGRAM OUTPUT Example Output

Table 19-2:
|------------------------------------| I---------------------------------------------| CALCULATION MONITORING INFORMATION |---------------------------------------------I |------------------------------------|

MAT. I---------------- GLOBAL ABSOLUTE RESIDUAL ----------------I I----------- FIELD VALUES AT MONITORING LOCATION -------I NO UMOM VMOM WMOM MASS T EN DISS ENTH U V W P TE ED T ---- ------------------------------------------------------- ITER. NO 1 ------------------------------------------------------1 3.58E-06 4.42E-02 0.00E+00 1.00E+00 5.57E-03 8.79E+00 0.00E+00 1.95E-03 5.00E+01 0.00E+00 5.17E+00 4.91E+00 1.71E+02 2.00E+01 2 1.24E-05 4.98E-02 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 -5.28E-05 9.98E-02 0.00E+00-9.91E-01 0.00E+00 0.00E+00 2.00E+01 3 0.00E+00 2.00E+01 FINISH ITERATION NO. 1 CPU TIME IS 0.20 ELAPSED TIME IS 0.64 ---- ------------------------------------------------------- ITER. NO 2 ------------------------------------------------------1 4.59E-05 6.36E-03 0.00E+00 1.00E+00 4.76E-03 3.04E-01 0.00E+00 2.66E-03 4.98E+01 0.00E+00 7.88E-01 7.24E+00 3.05E+02 2.00E+01 2 1.03E-04 7.25E-03 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 -1.12E-05 9.98E-02 0.00E+00 6.24E-02 0.00E+00 0.00E+00 2.00E+01 3 0.00E+00 2.00E+01 FINISH ITERATION NO. 2 CPU TIME IS 0.24 ELAPSED TIME IS 0.64 ---- ------------------------------------------------------- ITER. NO 3 ------------------------------------------------------1 5.55E-05 3.68E-03 0.00E+00 1.00E+00 3.52E-03 1.53E-01 0.00E+00 9.44E-04 4.97E+01 0.00E+00 5.35E+00 9.02E+00 4.25E+02 2.00E+01 2 5.04E-05 4.07E-03 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 7.42E-06 9.98E-02 0.00E+00 1.81E-02 0.00E+00 0.00E+00 2.00E+01 3 0.00E+00 2.00E+01 FINISH ITERATION NO. 3 CPU TIME IS 0.27 ELAPSED TIME IS 0.64 ---- ------------------------------------------------------- ITER. NO 4 ------------------------------------------------------1 6.09E-05 2.66E-03 0.00E+00 1.00E+00 2.46E-03 8.40E-02 0.00E+00 -1.60E-03 4.96E+01 0.00E+00 3.54E+00 1.03E+01 5.15E+02 2.00E+01 2 3.67E-05 2.73E-03 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 1.42E-06 9.97E-02 0.00E+00 1.22E-02 0.00E+00 0.00E+00 2.00E+01 3 0.00E+00 2.00E+01 FINISH ITERATION NO. 4 CPU TIME IS 0.31 ELAPSED TIME IS 0.64 ---- ------------------------------------------------------- ITER. NO 5 ------------------------------------------------------1 5.35E-05 2.05E-03 0.00E+00 1.00E+00 1.61E-03 5.50E-02 0.00E+00 -6.38E-03 4.95E+01 0.00E+00 9.51E-01 1.11E+01 5.77E+02 2.00E+01 2 1.98E-05 2.08E-03 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 1.86E-06 9.97E-02 0.00E+00 2.85E-02 0.00E+00 0.00E+00 2.00E+01 3 0.00E+00 2.00E+01 FINISH ITERATION NO. 5 CPU TIME IS 0.34 ELAPSED TIME IS 0.96 ---- ------------------------------------------------------- ITER. NO 6 ------------------------------------------------------1 4.47E-05 1.46E-03 0.00E+00 1.00E+00 1.04E-03 3.51E-02 0.00E+00 -1.37E-02 4.95E+01 0.00E+00 8.78E-01 1.16E+01 6.16E+02 2.00E+01 2 2.41E-05 1.45E-03 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 7.95E-06 9.96E-02 0.00E+00 5.23E-03 0.00E+00 0.00E+00 2.00E+01 3 0.00E+00 2.00E+01 FINISH ITERATION NO. 6 CPU TIME IS 0.38 ELAPSED TIME IS 0.96 ---- ------------------------------------------------------- ITER. NO 7 ------------------------------------------------------1 4.03E-05 1.06E-03 0.00E+00 1.00E+00 6.45E-04 2.23E-02 0.00E+00 -2.11E-02 4.94E+01 0.00E+00 1.09E+00 1.18E+01 6.40E+02 2.00E+01 2 1.88E-05 1.05E-03 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 1.55E-05 9.96E-02 0.00E+00-2.74E-02 0.00E+00 0.00E+00 2.00E+01 3 0.00E+00 2.00E+01 FINISH ITERATION NO. 7 CPU TIME IS 0.41 ELAPSED TIME IS 0.96 ---- ------------------------------------------------------- ITER. NO 8 ------------------------------------------------------1 3.49E-05 7.94E-04 0.00E+00 1.00E+00 3.91E-04 1.40E-02 0.00E+00 -2.86E-02 4.93E+01 0.00E+00 1.87E+00 1.20E+01 6.54E+02 2.00E+01 2 1.81E-05 7.76E-04 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 1.68E-05 9.96E-02 0.00E+00-1.51E-02 0.00E+00 0.00E+00 2.00E+01 3 0.00E+00 2.00E+01 FINISH ITERATION NO. 8 CPU TIME IS 0.44 ELAPSED TIME IS 0.96 ---- ------------------------------------------------------- ITER. NO 9 ------------------------------------------------------1 2.75E-05 5.93E-04 0.00E+00 1.00E+00 2.26E-04 8.65E-03 0.00E+00 -3.55E-02 4.93E+01 0.00E+00 2.22E+00 1.21E+01 6.61E+02 2.00E+01 2 1.04E-05 6.00E-04 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 1.80E-05 9.96E-02 0.00E+00-2.75E-03 0.00E+00 0.00E+00 2.00E+01 3 0.00E+00 2.00E+01 FINISH ITERATION NO. 9 CPU TIME IS 0.47 ELAPSED TIME IS 0.96 ---- ------------------------------------------------------- ITER. NO 10 ------------------------------------------------------1 2.29E-05 4.32E-04 0.00E+00 1.00E+00 1.24E-04 5.18E-03 0.00E+00 -4.12E-02 4.93E+01 0.00E+00 2.36E+00 1.22E+01 6.65E+02 2.00E+01 2 6.21E-06 4.51E-04 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 2.12E-05 9.96E-02 0.00E+00-9.36E-04 0.00E+00 0.00E+00 2.00E+01 3 0.00E+00 2.00E+01 FINISH ITERATION NO. 10 CPU TIME IS 0.51 ELAPSED TIME IS 0.96

Version 3.26

19-9

PROGRAM OUTPUT Example Output

Chapter 19

Table 19-3:
STAR-CD Version 3.200 Computational Dynamics, Ltd.

|------------------------------------| I-------------------------------------------| FIELD VALUES AT ITERATION NO 17 |-------------------------------------------I |------------------------------------| CELL NO 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 1 STAR-CD Version 3.200 Computational Dynamics, Ltd. U VEL -3.729E-03 -6.469E-03 -8.121E-03 -9.057E-03 -9.642E-03 -1.006E-02 -1.032E-02 -1.042E-02 -1.041E-02 -1.034E-02 -1.024E-02 -1.010E-02 -9.875E-03 -9.544E-03 -9.108E-03 -8.703E-03 -1.265E-02 -1.972E-02 -2.317E-02 -2.520E-02 -2.660E-02 -2.761E-02 -2.829E-02 -2.871E-02 -2.897E-02 -2.915E-02 -2.926E-02 -2.927E-02 -2.906E-02 -2.851E-02 -2.747E-02 -2.602E-02 -2.962E-02 -4.068E-02 -4.427E-02 -4.621E-02 -4.755E-02 -4.830E-02 -4.858E-02 -4.858E-02 -4.846E-02 -4.827E-02 -4.802E-02 -4.766E-02 -4.705E-02 -4.595E-02 -4.377E-02 -3.912E-02 -4.128E-02 -5.490E-02 V VEL 5.000E+01 5.001E+01 5.003E+01 5.004E+01 5.006E+01 5.008E+01 5.010E+01 5.012E+01 5.014E+01 5.016E+01 5.018E+01 5.020E+01 5.022E+01 5.024E+01 5.026E+01 5.028E+01 5.001E+01 5.002E+01 5.003E+01 5.005E+01 5.007E+01 5.009E+01 5.011E+01 5.013E+01 5.015E+01 5.017E+01 5.019E+01 5.021E+01 5.023E+01 5.025E+01 5.026E+01 5.029E+01 5.002E+01 5.003E+01 5.005E+01 5.007E+01 5.009E+01 5.010E+01 5.012E+01 5.014E+01 5.015E+01 5.017E+01 5.018E+01 5.020E+01 5.021E+01 5.022E+01 5.024E+01 5.025E+01 4.997E+01 4.994E+01 PRESS 1.599E+01 1.566E+01 1.521E+01 1.417E+01 1.274E+01 1.153E+01 1.067E+01 9.867E+00 8.828E+00 7.534E+00 6.154E+00 4.855E+00 3.705E+00 2.677E+00 1.705E+00 7.344E-01 1.643E+01 1.599E+01 1.540E+01 1.428E+01 1.282E+01 1.158E+01 1.070E+01 9.880E+00 8.829E+00 7.527E+00 6.140E+00 4.836E+00 3.679E+00 2.641E+00 1.659E+00 6.926E-01 1.750E+01 1.650E+01 1.561E+01 1.440E+01 1.292E+01 1.165E+01 1.075E+01 9.911E+00 8.854E+00 7.551E+00 6.163E+00 4.854E+00 3.684E+00 2.620E+00 1.593E+00 5.735E-01 1.998E+01 1.730E+01 TUR EN 8.864E+00 8.140E+00 7.516E+00 6.973E+00 6.498E+00 6.078E+00 5.705E+00 5.372E+00 5.073E+00 4.803E+00 4.559E+00 4.336E+00 4.134E+00 3.948E+00 3.777E+00 3.621E+00 8.864E+00 8.140E+00 7.516E+00 6.974E+00 6.499E+00 6.080E+00 5.707E+00 5.375E+00 5.077E+00 4.808E+00 4.565E+00 4.344E+00 4.142E+00 3.958E+00 3.789E+00 3.633E+00 8.866E+00 8.161E+00 7.562E+00 7.049E+00 6.606E+00 6.221E+00 5.885E+00 5.588E+00 5.326E+00 5.093E+00 4.885E+00 4.699E+00 4.531E+00 4.380E+00 4.243E+00 4.117E+00 1.013E+01 1.081E+01 DISSI 8.476E+02 7.240E+02 6.245E+02 5.433E+02 4.764E+02 4.206E+02 3.737E+02 3.339E+02 3.000E+02 2.708E+02 2.455E+02 2.235E+02 2.042E+02 1.873E+02 1.723E+02 1.590E+02 8.476E+02 7.240E+02 6.245E+02 5.434E+02 4.764E+02 4.207E+02 3.738E+02 3.341E+02 3.001E+02 2.710E+02 2.457E+02 2.237E+02 2.045E+02 1.876E+02 1.726E+02 1.594E+02 8.465E+02 7.228E+02 6.240E+02 5.439E+02 4.785E+02 4.243E+02 3.792E+02 3.411E+02 3.089E+02 2.814E+02 2.577E+02 2.373E+02 2.195E+02 2.039E+02 1.903E+02 1.782E+02 5.056E+02 5.577E+02 VISCO 9.900E-03 9.774E-03 9.661E-03 9.559E-03 9.466E-03 9.381E-03 9.302E-03 9.230E-03 9.162E-03 9.100E-03 9.041E-03 8.987E-03 8.936E-03 8.889E-03 8.846E-03 8.808E-03 9.900E-03 9.774E-03 9.662E-03 9.560E-03 9.468E-03 9.385E-03 9.308E-03 9.237E-03 9.172E-03 9.112E-03 9.057E-03 9.007E-03 8.960E-03 8.918E-03 8.880E-03 8.847E-03 9.917E-03 9.840E-03 9.788E-03 9.756E-03 9.742E-03 9.742E-03 9.755E-03 9.777E-03 9.808E-03 9.846E-03 9.890E-03 9.938E-03 9.991E-03 1.005E-02 1.010E-02 1.016E-02 2.167E-02 2.239E-02 DENSI 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00

|------------------------------------| I-------------------------------------------| FIELD VALUES AT ITERATION NO 17 |-------------------------------------------I |------------------------------------| CELL NO 51 52 53 54 55 56 U VEL -5.872E-02 -6.068E-02 -6.194E-02 -6.249E-02 -6.246E-02 -6.207E-02 V VEL 4.989E+01 4.983E+01 4.978E+01 4.972E+01 4.967E+01 4.961E+01 PRESS 1.581E+01 1.450E+01 1.299E+01 1.167E+01 1.073E+01 9.866E+00 TUR EN 1.128E+01 1.163E+01 1.188E+01 1.203E+01 1.213E+01 1.219E+01 DISSI 5.944E+02 6.219E+02 6.420E+02 6.548E+02 6.626E+02 6.675E+02 VISCO 2.287E-02 2.322E-02 2.346E-02 2.362E-02 2.371E-02 2.377E-02 DENSI 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00 1.187E+00

19-10

Version 3.26

Chapter 19

PROGRAM OUTPUT Example Output

Table 19-4:
|-------------------------------------------| | STAR VERSION 3.200 | | THERMOFLUIDS ANALYSIS CODE | | Operating System: SunOS | | Stardate: 3-FEB-2004 Startime: 11:59:20 | |-------------------------------------------|

CASE NAME : out

|-------------------------| -----------------------------------------------| SECTION 1 => INPUT DATA |----------------------------------------------|-------------------------| TURBULENCE MODEL COEFFICENTS FOR MATERIAL 1: CMU = 0.900000E-01 C1 = 1.44000 C2 = 1.92000 C3 = 1.44000 C4 = -0.330000 CAPPA = 0.419000 SIGMAK = 1.00000 SIGEPS = 1.21917 AMU = 50.5100 CEPS = 5.30000 TURBULENCE MODEL COEFFICENTS FOR MATERIAL 2: CMU = 0.900000E-01 C1 = 1.44000 C2 = 1.92000 C3 = 1.44000 C4 = -0.330000 CAPPA = 0.419000 SIGMAK = 1.00000 SIGEPS = 1.21917 AMU = 50.5100 CEPS = 5.30000 INITIAL CONDITIONS FOR MATERIAL U = 0.00000 V = 0.00000 W = 0.00000 P = 0.00000 TE = 0.258200E-01 ED = 0.100000 T = 293.000 INITIAL CONDITIONS FOR MATERIAL U = 0.00000 V = 0.00000 W = 0.00000 P = 0.00000 TE = 0.258200E-01 ED = 0.100000 T = 293.000 INITIAL CONDITIONS FOR MATERIAL T = 293.000 *** No Tables in problem file 1:

2:

3:

|----------------------------| ---------------------------------------------| SECTION 2 => BOUNDARY DATA |--------------------------------------------|----------------------------| CELL FACE ORIENTATION 1: CELL NO. 1 2 3 REGI. TYPE 5 SYMMETRY PLANE 5 SYMMETRY PLANE 5 SYMMETRY PLANE BOUNDARY CONDITIONS

Version 3.26

19-11

PROGRAM OUTPUT Example Output

Chapter 19

Table 19-5:
|----------------------------| ---------------------------------------------| SECTION 3 => SOLUTION DATA |--------------------------------------------|----------------------------| ITERATION NUMBER = 0 -------------------------SUM = 5.93369E-01 RESP = 2.59337E+00 10 SUM =-4.89229E-06 RESP = 1.65293E-03 RESCR= 0.00000E+00 11 NSP = 16 CPU TIME IS 0.73 ELAPSED TIME IS 0.82 MEMORY (DYNAMIC) USED IS ITERATION NUMBER = 1 -------------------------______________________________BALANCE DATA________________________________________________ MATERIALWISE MASS BALANCE (kg/s) MAT. NO. FDIFF TOTAL_FLOW_IN TOTAL_FLOW_OUT MSDRO (FVIN) 1 -3.0160E-05 5.9337E-01 5.9340E-01 0.0000E+00 5.9337E-01 2 1.1921E-07 1.0000E+00 1.0000E+00 0.0000E+00 1.0000E+00 HEAT BALANCE IN SOLIDS (watts) MAT. NO. HDIFF HTIN HTOUT QTRAN QSOR 3 1.0000E+00 0.0000E+00 0.0000E+00 2.9300E+02 -1.0000E+00 TOTAL HEAT BALANCE = 1.0000E+00 WATTS ------------ BOUNDARY REGIONWISE -----------REGION NO. TYPE FLOW-IN(kg/s) FLOW-OUT(kg/s) 1 INLET 5.9337E-01 0.0000E+00 2 PRESSURE 0.0000E+00 5.9340E-01 3 INLET 1.0000E+00 0.0000E+00 4 OUTLET 0.0000E+00 1.0000E+00 ______________________________FIELD DATA_________________________________________________ *** FOR FLUID STREAM *** 1 Field Extrema: Umax Vmax 3.0077E-03 5.0109E+01 Umin Vmin -3.5403E-02 4.9425E+01 Field Volume-Averages: Pvav RHOvav 4.3461E+02 1.1867E+00 Field Mass-Averages: Pmav RHOmav 4.3461E+02 1.1867E+00 Field Totals: Mass Volume 9.4939E-03 8.0000E-03 *** FOR FLUID STREAM *** Field Extrema: Umax Vmax 4.1347E-05 1.0020E-01 Umin Vmin -5.7719E-05 9.8765E-02 Field Volume-Averages: Pvav RHOvav -1.7811E+00 1.0000E+03 Field Mass-Averages: Pmav RHOmav -1.7811E+00 1.0000E+03 Field Totals: Mass Volume 8.0000E+00 8.0000E-03 *** FOR SOLID STREAM *** 3 2

1 MBYTES

(FPIN ) 0.0000E+00 0.0000E+00

(FLOUT) 0.0000E+00 1.0000E+00

(FVOUT) 0.0000E+00 0.0000E+00

(FPOUT) 5.9340E-01 0.0000E+00

Wmax 0.0000E+00 Wmin 0.0000E+00

VMAGmax 5.0109E+01 VMAGmin 4.9425E+01

Pmax 9.5026E+02 Pmin 2.6202E+01

TKEmax 7.6659E+00 TKEmin 2.5003E+00

EPSmax 6.3961E+02 EPSmin 8.2445E+00

Tmax 2.9300E+02 Tmin 2.9300E+02

RHOmax 1.1867E+00 RHOmin 1.1867E+00

Tvav 2.9300E+02

TKEvav 3.9029E+00

EPSvav 1.4506E+02

Tmav 2.9300E+02

TKEmav 3.9029E+00

EPSmav 1.4506E+02

TKE 3.7053E-02

EPS 1.3772E+00

Wmax 0.0000E+00 Wmin 0.0000E+00

VMAGmax Pmax 1.0020E-01 3.6534E-04 VMAGmin Pmin 9.8765E-02 -3.1572E+00

TKEmax 0.0000E+00 TKEmin 0.0000E+00

EPSmax 0.0000E+00 EPSmin 0.0000E+00

Tmax 2.9300E+02 Tmin 2.9300E+02

RHOmax 1.0000E+03 RHOmin 1.0000E+03

Tvav 2.9300E+02

TKEvav 0.0000E+00

EPSvav 0.0000E+00

Tmav 2.9300E+02

TKEmav 0.0000E+00

EPSmav 0.0000E+00

TKE 0.0000E+00

EPS 0.0000E+00

19-12

Version 3.26

Chapter 20

PRO-STAR CUSTOMISATION Set-up Files

Chapter 20

pro-STAR CUSTOMISATION
pro-STAR provides four means by which users can customise the way they work with the program: Set-up les Panels Macros Function keys

All are geared towards making problem data input faster and more flexible and can be used in combination with each other. The choice of which ones to use is largely a matter of user preference and the requirements of the model being built.

Set-up Files
These files are read automatically as part of the pro-STAR start-up process and are used in creating a suitable pro-STAR environment for the problem in hand. The files have standard names, given below, and are located in a directory chosen by the user. On Unix systems, the path to this directory is stored in an environment variable (STARUSR) specified outside pro-STAR using the appropriate Unix environment setup command (see Chapter 21, pro-STAR environment variables). The available set-up files are as follows: 1. PROINIT contains pro-STAR commands that are read and executed as the rst action in the current session. This provides a convenient way of setting up (initialising) pro-STAR in a standard way (regarding, for example, plot type, viewing angle, etc.) every time a session begins. Some pro-STAR commands are in fact best used from within the PROINIT le. For example: (a) Command OPANEL typically used to open a set of tools (standard pro-STAR GUI dialogs or user-defined panels) that the user wants on screen at the start of every new session. (b) Command SETFEATURE reports or changes the byte ordering format of binary les to suit machines such as the Compaq Alpha range. This facility replaces settings previously made through environmental variables. 2. PRODEFS this le is created automatically if the *ABBREVIATE command is used during the session. *ABBREVIATE enables one or more frequently used commands and their parameters to be joined together and executed in sequence, simply by associating them with an abbreviation name. The command group comes into action every time an existing abbreviation is typed in the I/O window. File PRODEFS stores all current abbreviation denitions and, once created, may be used in all subsequent pro-STAR sessions. The le itself may be edited with any suitable text editor to add/modify/delete any particular abbreviation, as needed. 3. .Prostar.Defaults a hidden system le containing denitions of function keys (see Function Keys on page 20-9), panel size and location (see Panel denition les on page 20-5) and favourite panels (see Panel
Version 3.26 20-1

PRO-STAR CUSTOMISATION Panels

Chapter 20

navigation system on page 2-41). If the set-up file directory is not defined through STARUSR, pro-STAR creates default set-up files automatically in your current working directory.

Panels
Panels are user-definable tools capable of simplifying the use of pro-STAR operations that are either not available in the existing GUI menus and dialog boxes or require additional functionality. Panels are often employed to facilitate the use of Macros, which are groups of commands that are saved in a separate file (see Macros on page 20-6). Macros can be assigned to Panel buttons so that a large number of commands can be executed simply by clicking such a button. Panel creation Panels can be created or modified by choosing Panels > Define Panel from the main menu bar to display the Dene Panel dialog box shown below.

New panels are created by entering a name in the text box of the Dene Panel dialog box and then clicking on the New action button. This results in the panel name being added to the list above the text box. Once this is done, the panel itself can be opened by double-clicking on its name in the list, or selecting the name in the list and then clicking on the Open action button, or clicking on Panels in the main menu bar and selecting the panel name from the drop-down list.

Any of the above actions will display a panel such as the one shown below.

20-2

Version 3.26

Chapter 20

PRO-STAR CUSTOMISATION Panels

Once the new panel has been opened, the user can specify its layout and define its buttons and menu items. The Panel Layout dialog box can be opened by selecting File > Layout from the panels menu bar.

The above dialog box allows definition of the number and layout of the panel buttons (a maximum of 100). Users may also specify menus for panels by selecting File > Menus from the panels menu bar. This opens the Dene User Menus dialog box, shown below, where one can define up to six menus, their names and the pro-STAR commands that will be executed upon selecting a particular menu item. By default, a single menu called User 1 is defined containing a single menu item called Replot which executes command REPLOT.

Version 3.26

20-3

PRO-STAR CUSTOMISATION Panels

Chapter 20

Panel button names and definitions are assigned by first selecting a button, and then entering a new name or definition into the appropriate text box. A buttons definition is the pro-STAR command(s) that will be executed when the button is pushed. The following three examples illustrate the way in which frequently repeated operations may be simplified by assigning them to panel buttons: Example 1 Select a number of cells with the screen cursor and then refine them by a factor of 2 in all directions. Assign to option button CCREF.

Example 2 Select a range of fluid cells by drawing a polygon around them, change them to solid cells and then plot the mesh. Assign to option button CZMOD.

20-4

Version 3.26

Chapter 20

PRO-STAR CUSTOMISATION Panels

Example 3 Display vertex coordinates in local coordinate system 2 by pointing at the required vertex with the cursor. Assign to option button VCOOR2.

To select a button without executing the corresponding button definition, move the mouse pointer to the button and press (but do nor release!) the mouse button. Next, move the mouse pointer clear of the button and then release the mouse button. This sequence will set the newly selected panel button as the active button, but will not execute the button function. Note that selecting File > Reload from the panels menu bar will cancel out any changes made to the panel definition since it was last saved. Panel denition les A panels button and menu settings as well as its size and location are saved in a panel definition file when File > Save is selected from the panels menu bar. This file is created using the panel name specified by the user in the Dene Panel dialog box and the suffix .PNL. The file location depends on its name. If the name entered was prefixed with the letter L or G (note that a space must be typed after each letter), the file will be placed in directory PANEL_LOCAL or PANEL_GLOBAL, otherwise it will be put in your current working directory. On Unix systems, the local and global directory names are stored in environment variables that can be set outside pro-STAR using the appropriate Unix environment setup command (see Chapter 21, pro-STAR environment variables). The environment variables can also be set within pro-STAR by selecting Panels > Environment from the main menu bar. This displays the Set Environment dialog box shown below, which allows entry of local and global directory names in the corresponding text boxes.
Version 3.26 20-5

PRO-STAR CUSTOMISATION Macros

Chapter 20

Command:

SETENV

Note that a list of available panels can be viewed by opening the Dene Panel dialog box. Panels found in your current working directory are shown in the list with a . before the panel name. Any panel definitions found in the directories specified by the PANEL_LOCAL and PANEL_GLOBAL variables are shown in the list with an L or G prefix before the panel name, respectively. Once added to the list, a panel can be opened in a number of ways, as described in Panel creation on page 20-2. Note that panels can also be opened from the pro-STAR input/output window by typing OPANEL, PANEL but this command is more typically issued from within the PROINIT set-up file (see Set-up Files on page 20-1). In addition to the panel definition file, a panels size and location are also saved in a hidden system file called .Prostar.Defaults (see Set-up Files on page 20-1). Definitions stored there have priority over the size and location information stored in the panel definition file. This enables you to override such information if the panels are located in a directory for which you do not have write permission. Panel manipulation The Dene Panel dialog box provides additional facilities for manipulating panels, as follows: The Re-Scan button recreates the list of available panels. Those that were removed from the list will re-appear, while those created via the New button but never saved will disappear. The Copy button creates new panels by copying an existing panel denition le to another le whose name must be typed in the text box. The Rename button changes the name of a panel denition le to another name typed in the text box. The Delete button allows you to remove panels from the list but does not delete the corresponding denition les. The latter can only be deleted outside pro-STAR by using the appropriate operating system command.

Macros
A macro is a set of user-defined commands that can be executed at any stage of the pro-STAR session. The constituent commands must be stored in a special file, identified by a .MAC extension and included within
20-6 Version 3.26

Chapter 20

PRO-STAR CUSTOMISATION Macros

the current working directory, or a pre-dened local macro directory, or a pre-dened global macro directory.

As with panel directories, the local and global directory names are stored in environment variables MACRO_LOCAL and MACRO_GLOBAL that can be set outside pro-STAR using the appropriate Unix environment setup command (see Chapter 21, pro-STAR environment variables). The environment variables can also be set within pro-STAR by selecting Panels > Environment from the main menu bar. This displays the Set Environment dialog box which allows entry of local and global macro directory names in the corresponding text boxes. Macros can be created, renamed, copied, and deleted in the Dene Macro dialog box in the same way that panels are in the Dene Panel dialog box. The Dene Macro box, shown below, is opened by choosing Panels > Define Macro from the main menu bar. The name of a new macro must be typed in the text box. An existing macro can be selected and displayed, by double-clicking its name in the macro list. Several macros can be displayed simultaneously in multiple windows, by highlighting them in the list with the mouse and then clicking the Open button. pro-STAR looks for macro files in three places. Macros found in the users current working directory are shown in the list with a . in front of the macro name. Those found in the directories specified by the MACRO_LOCAL and MACRO_GLOBAL environment variables are shown with an L or G prefix before the macro name, respectively.

Clicking the Open or New button in the Dene Macro box opens a macro editor to display the macro file(s) that has been selected in the macro list (or a blank sheet for new macros), as shown below. The user can then type in the required pro-STAR commands or amend existing ones. Command PROMPT, which displays messages in the area underneath the plotting window (see Main window on page 2-15) is particularly useful inside a macro as it can prompt the user to, say, supply required data or to click an appropriate menu item with the mouse.

Version 3.26

20-7

PRO-STAR CUSTOMISATION Macros

Chapter 20

The macro editor facilities are arranged under three menus in the editors menu bar: 1. File (a) (b) (c) (d) (e) Open open another macro Save save the current changes Save As save the current changes to a different macro le Clear All clear the editor window Quit terminate the editing session

2. Edit (a) Find nd a character string typed in the dialog box shown below:

(b) (c) (d) (e)

Mark Selection mark the selected characters for subsequent searches Find Selection nd the selected characters in the macro body Find Again repeatedly nd the selected characters Replace nd a character string and replace it with another string. Both strings are typed in the dialog box shown below:

20-8

Version 3.26

Chapter 20

PRO-STAR CUSTOMISATION Function Keys

3. Execute (a) Execute Macro execute the whole macro (b) Execute Selection execute only the highlighted lines in the editor window As with panels, the Dene Macro dialog box provides additional facilities for manipulating macros, as follows: The Execute button executes the selected macro. The Re-Scan button recreates the list of available macros. Those that were removed from the list will re-appear, while those created via the New action button but never saved will disappear. The Copy button creates new macros by copying an existing macro le to another le whose name must be typed in the text box. The Rename button changes the name of a macro le to another name typed in the text box. The Delete button allows users to remove macros from the list of available macros but does not delete the corresponding les. The latter can only be deleted outside pro-STAR by using the appropriate operating system command.

Note that panel buttons are often used to execute macros, by setting the button definition to issue command *macro,exec This assignment can be made as follows: Open the Dene Macro dialog box and highlight a macro in the list. Open the Dene Panel dialog box, select a panel from the list and display it by double-clicking it. Click on a free button in the panel. Select Assign from the panels Macro menu. This assigns the macro name to the button and generates the appropriate *MACRO command. If necessary, select Edit from the panels Macro menu to open the macro text editor discussed above and type in any further changes Save all changes by selecting Save from the File menus of both macro and panel editors before closing their corresponding dialog boxes

Function Keys
Users can program the keyboard function keys (F2 - F12) to execute pro-STAR
Version 3.26 20-9

PRO-STAR CUSTOMISATION Function Keys

Chapter 20

commands or macros. This is done by choosing Utility > Function Keys from the menu bar to display the Edit Function Keys dialog box shown below.

Any valid pro-STAR command (or set of commands if a $ character is used to separate them) can be mapped to individual function keys by typing it in the appropriate text box. Command parameters such as VX or CX may be used and will be interpreted in the normal way. Command strings are limited to 80 characters in length. In addition to standard pro-STAR commands, the function keys can also be used to repeat the last executed command and to open dialog boxes. Thus: Command repeat will literally repeat the last command executed, including parameters such as VX or CX. Command string open dialog1,dialog2,... will open the dialog boxes or tools specied. Available items are:

20-10

Version 3.26

Chapter 20

PRO-STAR CUSTOMISATION Function Keys

Name ANIM BLIS BLLI BLOC CELL CHEC CHEM CLIS COLO CONT COUP CSYS DROP FORE GENE GRAP GRDI GRLO GRRE POST PROP SPLI SPLL STAR TRAN VERT VLIS

Description Animation Module Boundary List Block List Block Tool Cell Tool Check Tool Chemical Module Cell List Colour Tool Control Module (unsupported panel) Couple Tool Coordinate Systems panel Droplets panel Convert Foreign Formats panel Convert Generic panel Graph Tool Graph Module Load Graph Registers panel Graph Registers panel Post Register Data List Property Module (unsupported panel) Spline Tool Spline List Convert STAR panel Transient Module Vertex Tool Vertex List

The default function key definitions are: F5 repeat F6 replot F7 cplot F8 zoom,off $replot Note that the F1 key is reserved for displaying context-sensitive, on-line Help information on pro-STAR commands (see Getting On-line Help on page 2-36) Any changes to the function key definitions are saved in a file called .Prostar.Defaults (see Set-up Files on page 20-1) at the location specified by environment variable STARUSR (or in your current directory, see page 20-1). This file can be modified either through the Function Keys dialog box within pro-STAR or outside it via any suitable editor. Users may find it useful to keep a single .Prostar.Defaults file in the STARUSR location so that the particular setup that they define is available for any pro-STAR session.

Version 3.26

20-11

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS Introduction

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS


This chapter describes some of the less commonly used features and controls in STAR-CD and covers the following topics: File organisation, naming conventions and general utilisation Special pro-STAR and STAR features and settings The StarWatch utility Hard copy production

Introduction

File Handling
Naming conventions At every session, pro-STAR creates a set of files whose names are based on a user-supplied model name or case name. Each file name is of the form case.xxxx, where xxxx is a three- or four-character filename extension. Thus, if the case in question is called test, then all its associated files will be called test.geom, test.mdl, etc. and will be used for the appropriate input/output operation during the model building and CFD analysis processes. You should always supply a case name at the beginning of a pro-STAR session (see pro-STAR Initialisation on page 2-12). A case name may be overridden at any time during a pro-STAR session by choosing File > Case Name from the menu bar. This displays the Change Case Name dialog shown below:

Command:

CASENAME

Supply a new case name (up to 70 characters long) in the text box provided. This changes the default file name but does not affect any files that are already open. It also determines which files will be used during subsequent file operations. Note that the names of the input and output restart (.pst) files will be reset by this operation. Commonly used les A few key files are always read and/or written to by pro-STAR, whereas the majority are opened and accessed only in response to a command or a GUI operation. These key files are described below:

Version 3.26

21-1

OTHER STAR-CD FEATURES AND CONTROLS File Handling

Chapter 21

pro-STAR echo le (.echo) Used exclusively by pro-STAR and is always opened. It holds a copy of every command typed by the user or, for GUI operations, their command equivalents, as generated automatically by pro-STAR during the session. The file can be: Reviewed Used for recovery purposes (see Error messages on page 2-20) Copied to a temporary le which can be subsequently edited to make changes to the recorded commands (see item 12 on page 21-11). Once the editing process is complete, the modied command le can be replayed into pro-STAR using the editors le execution facilities (or by typing command IFILE). pro-STAR model le (.mdl) Used exclusively by pro-STAR. Choosing option File > Save Model from the menu bar instructs pro-STAR to write a full description of your model to this file, using the specified case name as the file name. It is advisable to save data regularly during a session so as to minimise the chance of losing large amounts of information due to user error or system failure. Note that every time you save the model file, its previous version (i.e. the model you started out with before making any changes) is also automatically stored as a backup, in a file of form case.bak If you need to save the .mdl file under a name other than the case name, choose option File > Save As from the menu bar. This displays the Save As dialog, shown below, which allows the name to be typed exactly as required. Alternatively, an existing file may be selected by utilising pro-STARs built-in file browser facilities (see page 21-10).

Command:

SAVE

Option File > Resume Model performs the reverse operation, i.e. it instructs pro-STAR to read a model description from an existing .mdl file. If you need to resume from a .mdl file that does not have the same name as the case name, choose option File > Resume From from the menu bar. This displays the Resume From dialog shown below, which allows the name to be typed exactly as required. Alternatively, the file may be selected by clicking the browser button provided and utilising pro-STARs built-in file browser facilities (see page 21-10).

21-2

Version 3.26

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS File Handling

Command:

RESUME

pro-STAR command le (.inp) Although the model file is normally saved in binary form, there may be occasions when you need to write the model data in text (coded) form. Examples of such instances are: To allow you to quickly produce a set of coded pro-STAR input les that will re-create the case as dened in the model le. This is especially useful if you want to set up several runs with parametric changes and then submit the job in batch. To enable you to nd out which commands would activate certain features present in your model. To facilitate testing of models that were created with a previous version of pro-STAR.

To write model data in text form, choose File > Save As Coded from the menu bar to display the CDSave dialog shown below:

Command:

CDSAVE

The dialog uses default file names with extensions .inp, .cel, .vrt, and .bnd for four files that will contain problem setup, cell, vertex and boundary information, respectively. Alternative names for any of these files may be entered in the boxes provided. For moving mesh cases, event definitions (see Moving Meshes on page 16-9) can also be written to file .evnc. For cases containing droplets, an additional droplet data file (.drpc) will be created. Once the files have been copied to a suitable directory, the model may be re-activated by chossing File > Read File from the menu bar. This will display the
Version 3.26 21-3

OTHER STAR-CD FEATURES AND CONTROLS File Handling

Chapter 21

Input Coded File dialog shown below:

Command:

IFILE

Check that the file shown in the File Name window is correct and then click Apply. All data in files .cel, .vrt, .bnd, .drpc (if present) and, for moving mesh cases, .evnc will be read in automatically. pro-STAR transient history le (.trns) This is used exclusively by pro-STAR for transient problems specified by means of load steps (see Load-step based solution mode on page 8-6) and contains all additional information (changes to boundary conditions, number and length of time steps, etc.) needed for such problems. You must make this file available to your current session before changing or adding data concerning the analysis. This is done via the Advanced Transients dialog (see Load step controls on page 8-10), or by typing command TRFILE. The file is normally written in binary form but a facility also exists for writing it instead in text (coded) format and to a file with extension .trnc. This is done by selecting Modules > Transient from the menu bar to display the Advanced Transients dialog, specifying the file name in the box provided at the bottom of the dialog and then clicking Apply. Alternatively, use command CDTRANS. If an existing file needs to be used, pro-STARs built-in file browser can help locate it. pro-STAR plot le (.plot) This is always open to receive neutral plot information, i.e. machine-independent representations of a set of plots. The file may be written in either binary or text (coded) format. CD adapco supply source code for several decoding programs that drive hard-copy devices in a variety of formats (e.g. Postscript), or screen output devices (e.g. X-window workstations). These programs can also serve as templates for constructing plot drivers for other, unsupported devices. To make use of the neutral plot facility: Specify the plot le name (if other than case.plot) and type (if not CODED) using command NFILE. Switch the plot output from the terminal or workstation to the plot le by choosing item Plot > Plot To File from the menu bar (or use command TERMINAL in the form TERMINAL,,FILE
21-4

Perform the plotting operations required, as normal. Graphical output is now


Version 3.26

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS File Handling

diverted to the le instead of being displayed on the screen. To restore normal operation, choose option Plot To Screen from the Plot menu.

Details of data representation in the neutral plot file can be found in Appendix B. STAR geometry le (.geom) This is written by pro-STAR and used by STAR. The file contains all cell topology and model geometry information, e.g. cell definitions and connectivities, boundary definitions, vertex locations, local coordinate system definitions, etc. It must be rewritten whenever the mesh geometry is modied; boundaries are added, subtracted, or assigned to different boundary regions; the material or porous properties of a cell are changed.

The file is created by selecting File > Write Geometry File from the menu bar to display the Geometry File Write dialog shown below:

Command:

GEOMWRITE

The input required is: 1. File Name enter a name in the text box provided or click the adjacent button to select an existing le using pro-STARs built-in le browser (see page 21-10) 2. File Type either Binary or Coded (text). The binary option must always be used for moving mesh cases involving events (see Chapter 16, Moving Meshes). 3. Check Option specify whether pro-STAR should check the mesh for double vertices, negative volumes, etc. (see Microscopic checking on page 4-27). Any unused or improper boundary denitions are automatically placed into the current boundary set (see Set Manipulation on page 2-21) so that they can be easily inspected. 4. Geometry Scale Factor an optional scale factor applied to all dimensions of the problem geometry While the geometry file is being written, an auxiliary file called parm.inc is
Version 3.26 21-5

OTHER STAR-CD FEATURES AND CONTROLS File Handling

Chapter 21

created automatically. This file is used to dimension data arrays in STAR to the size required for the analysis. STAR control le (.prob) This is written by pro-STAR as a companion to the geometry file and is also read by STAR. It contains information on what kind of analysis is to be performed and what data are to be printed or saved for post processing. It also contains all material property values, boundary conditions and initial conditions. The file is created by selecting File > Write Problem File from the menu bar to display the dialog shown below:

Command: Note that

PROBLEMWRITE

An alternative le name may be entered, if necessary There is an option for specifying how the geometry le was written (i.e. whether as a coded or binary le)

The control file should be rewritten every time the model description is modified. Depending on the information written, some updating of file parm.inc may occur. STAR solution le (.pst) This is both written and read by STAR and contains all the calculated values needed to restart a partially converged or interrupted analysis. It is also used by pro-STAR for post-processing, i.e. to make contour, vector or graph plots of any variable calculated by STAR. Since the file is originally written in binary format, pro-STAR provides a facility to convert it to text (coded) plus other binary formats and vice-versa, by choosing Tools > Convert > Star from the main window menu bar. This activates the Star Convert dialog shown below:

21-6

Version 3.26

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS File Handling

Command:

PSTAR

If, for example, you wish to convert the solution file from binary to text format, select option Post Data and then enter the name of the le containing data to be converted (Input File with extension .pst) or select it using PROSTARs built-in le browser (see page 21-10) choose its le type (Binary in this case) from the adjacent menu enter the name of the le that will store the converted data (Output File with extension .pstc) choose the desired le type (Coded in this case) from the adjacent menu

STAR transient post data le (.pstt) This is written by STAR and contains selected transient analysis data at pre-defined points in time (see Output controls on page 8-12). It is used by a subsequent pro-STAR post-processing run to make contour or vector plots based on the selected data. Note that the file holds only part of the available information on the model, so it cannot be used for restarting the analysis; that function can be performed only by using the solution (.pst) file. Since the file is originally written in binary format, pro-STAR provides a facility to convert it to text (coded) plus other binary formats and vice-versa. It is also possible to reduce the size of a previously generated transient post file by limiting the number of time step data stored in it. To do this, choose Tools > Convert > Star from the main window menu bar to activate the Star Convert dialog and then select option button Transient as shown below:

Command:

TSTAR

Version 3.26

21-7

OTHER STAR-CD FEATURES AND CONTROLS File Handling

Chapter 21

You may then enter the name of the le containing the original data (Input File with extension .pstt) or select it using PROSTARs built-in le browser (see page 21-10) choose its le type (Binary in this case) from the adjacent menu enter the name of the le that will store the truncated data (Output File with a different name and extension .pstt) choose the appropriate le type (Binary in this case) from the adjacent menu specify the time step range to be transferred to the output le by entering the rst and last time step numbers and the time step increment in the boxes provided if the output le already exists, choose whether the transferred data will Replace the current contents or will be Appended at the end of the le

File relationships The use and relationship between files in the STAR-CD environment is illustrated by Figure 21-1. Appendix C contains a complete list of all files that can be written or read by either pro-STAR or STAR. The same information may also be displayed on-line in the Help dialog (choose Help > pro-STAR Help from the menu bar, select Misc. from the Module pop-up menu, and then highlighting item FILE). For the great majority of problems, however, only the files shown below are ever needed.
case.trns Transient history data

case.mdl Model data case.echo Command echo case.plot Neutral plot

PROSTAR

case.prob Boundary conds. Solution params.

case.geom Geometry

parm.inc Dimensioning case.pstt Transient output data

STAR case.pst Binary output data Figure 21-1 STAR-CD le use

In addition to solution and transient post data files, pro-STAR provides a utility for converting solution monitoring and droplet track data files to coded (text) format and vice versa. This is useful, for example, in manipulating and displaying the data
21-8 Version 3.26

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS File Handling

outside the pro-STAR environment or for checking the validity of the file contents. The utility allows conversions between a variety of different formats and is accessed by selecting Tools > Convert > Star from the menu bar. This activates the Star Convert dialog shown below:

Commands: You may then

SMCONVERT

PTCONVERT

select option Solution Monitoring or Particle/Droplet Track depending on the le type you wish to convert. The rst option deals with residual or solution monitoring data conversion (see Chapter 8, Output controls), the second with droplet track data conversion (see Trajectory displays on page 13-8) or particle track data conversion (see Particle Tracking on page 9-28) enter the name of the le containing the data to be converted (Input File with extension .rsi or .trk) or select it using pro-STARs built-in le browser (see page 21-10) choose the le type (normally Binary) from the available options in the adjacent pop-up menu enter the name of the le that will store the converted data (Output File with extension .rsic or .trkc) choose the le type (normally Coded) from the available options in the adjacent pop-up menu

The above operation may also be performed in reverse, i.e. converting the text file back to binary format, using the same dialog but with Input now being Coded and Output being Binary, plus a reversal of the file name extensions. In the course of a session pro-STAR also opens several scratch files. These are opened automatically and deleted at the end of the session. Their use is normally transparent except when their size exceeds the amount of free space on your disk. While some scratch space is used for hidden-line plotting, the largest amount is needed while the geometry (.geom) file is being written. The space used varies linearly with the number of vertices present and the maximum number of cells connected to any single vertex. File manipulation The file-manipulation related capabilities of pro-STAR are as follows: 1. Finding les If you are not sure of the exact location or name of an existing le, use pro-STARs le browser facility. This is activated by clicking the
Version 3.26 21-9

OTHER STAR-CD FEATURES AND CONTROLS File Handling

Chapter 21

browser button

included in numerous GUI dialogs. The button displays the File Selection dialog shown below:

2.

3.

4. 5. 6.

7.
21-10

The scroll lists and lters included in the above dialog allow easy navigation through various levels of sub-directories until the required le is located. Switching program input from a terminal (or standard input) to any disk le (of form case.inp) containing pro-STAR commands, and vice versa. This can be done at any time during a session, using either the pro-STAR editors Execute menu options (see item 12 below) or by typing command IFILE. In the latter case, input switches back to the terminal automatically at the end of the specied le. The command also supports a nesting capability, i.e. the new input stream can itself contain IFILE commands that will direct input to yet another source le and so on. Switching output from a terminal screen (or standard output) to a disk le (of form case.out), and vice versa. This can be done at any time during a session using command OFILE. Using parameter NONE with this command turns the output off completely. The facility enables you to save lists of various pro-STAR items, for use in other programs or for later review. Writing the geometry le (see STAR geometry le (.geom) above) by choosing File > Write Geometry File from the menu bar. Writing the problem data le (see STAR control le (.prob) above) by choosing File > Write Problem File from the menu bar. Restoring a previously created model from a saved model le (see pro-STAR model le (.mdl) above) by choosing File > Resume from the menu bar. When used for the rst time in a pro-STAR session, RESUME will also automatically read and execute commands stored in a special le called PROINIT (see Set-up Files on page 20-1). This provides a very convenient way of setting up pro-STAR in a standard way (regarding, for example, plot type, viewing angle, etc.) every time a session starts. Saving the current model description in binary format to le .mdl, as
Version 3.26

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS File Handling

8. 9. 10. 11. 12.

described above, by choosing File > Save Model from the menu bar. Saving the model description in text (coded) format, as described above, by choosing File > Save As Coded from the menu bar. Repositioning a previously used le (including a pro-STAR macro le) to its starting point by typing command REWIND. Closing a previously used le by typing command CLOSE. The command may also close all currently open les. Printing a summary of all currently open les by typing command FSTAT. File editing via pro-STARs built-in editor This is activated by choosing File > Edit File from the menu bar to display the panel shown below. Files that may be conveniently manipulated using this editor are: (a) Command les these allow execution of a set of pre-recorded pro-STAR commands. As noted in the section on Commonly used les on page 21-1, a common source for them are echo les from previous pro-STAR sessions. To avoid problems, however, an echo le should be copied and renamed before using it as a command le. (b) User subroutine les these contain special user-supplied FORTRAN code and are discussed in detail in Chapter 18.

The available facilities are arranged under three menus in the editors own menu bar, as follows: File (a) Open open a specied le. This activates the File Selection dialog shown on page 21-9, enabling the required le to be located. (b) Save save the current changes. (c) Save As save the current changes to a different le. The dialog box above re-appears to aid specication of the destination le location. (d) Clear All clear the editor window. (e) Quit terminate the editing session. Edit (a) Find nd a character string, typed in the dialog box shown below.

Version 3.26

21-11

OTHER STAR-CD FEATURES AND CONTROLS Special pro-STAR Features

Chapter 21

(b) (c) (d) (e)

Mark Selection mark the selected characters for subsequent searches. Find Selection nd the selected characters in the le body. Find Again repeatedly nd the selected characters. Replace nd a character string and replace it with another string. Both strings are typed in the dialog box shown below.

Execute (Command les only) (a) Execute All execute all commands in the le. This is equivalent to typing command IFILE in pro-STARs Input window. (b) Execute Selection execute only the highlighted lines in the editor window. In addition, the usual keyboard- or mouse-driven cut, copy and paste functionality is also available with the editor window.

Special pro-STAR Features


pro-STAR environment variables pro-STAR uses the values of several environment variables. Some specify the path to various system directories while others control the operation of the system. You should ensure that these values are correctly set before using STAR-CD. The syntax for setting environment variables depends on the shell program you are using (if in doubt type the command echo $SHELL). The current list of such variables is as follows: MACRO_LOCAL and MACRO_GLOBAL Paths to the local and global pro-STAR macro directories, respectively (see Macros on page 20-6) PANEL_LOCAL and PANEL_GLOBAL Paths to the local and global pro-STAR panel directories, respectively (see Panel definition files on page 20-5)

21-12

Version 3.26

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS Special pro-STAR Features

STARBROWSER (not needed for Windows ports) Path to the users choice of Internet browser (Netscape or IE) that will be launched from the pro-STAR Help menu (see page 2-38). The users search path must be amended to include the directory defined by this variable. The default is to run Mozilla from your current working directory.

STARFONT0 / starfont0 Font name and size to use for plot title, plot legend, graph title and main axes label (see the description of command TSCALE in the Commands volume) STARFONT1 / starfont1 Font name and size to use for the contour and vector scales (see the description of command TSCALE in the Commands volume) STARFONT2 / starfont2 Font name and size to use for the secondary contour and vector scales (for droplets and particle ribbons; see the description of command TSCALE in the Commands volume) STARFONT3 / starfont3 Font name and size to use for entity numbers (NUMBER command), x and y tick labels on graphs and local coordinate system axes (see the description of command TSCALE in the Commands volume) Note: Variables STARFONT 0-3 described above apply only to X-window plotting. They have no effect on OpenGL based plotting as the fonts system there is entirely different. STAR_TCL_SCRIPT Path to the location of file STARTkGUI.tcl, containing a user-supplied Tcl/Tk script (see The Users Tool on page 2-36) STARUSR Path to pro-STAR files PRODEFS (abbreviations), PROINIT (initial set up) and .Prostar.Defaults (see Set-up Files on page 20-1) Resizing pro-STAR pro-STAR is a dynamic-memory executable code and requires a file called param.prp to be present in your current working directory. The file contains a list of parameters that determine the data size of the executable on start-up. If this file is missing, incomplete, or out-of-date, pro-STAR will automatically write a new local param.prp based on the values in the model (.mdl) file being read, and also on any values that could be read from an existing param.prp. This happens the first time pro-STAR is run using the prostar script described in Chapter 2, Running a CFD Analysis. It is almost always necessary to resize the pro-STAR executable to cater for special problems (such as moving mesh problems) or to accommodate cases with a larger number of cells, vertices, etc. (or a smaller number, if you are having problems with available memory in your machine).
Version 3.26 21-13

OTHER STAR-CD FEATURES AND CONTROLS Special pro-STAR Features

Chapter 21

In any of the above situations, file param.prp should be modified but this should never be done using a text editor. Rather, a new version of the file containing parameters of the right magnitude must be created in one of the following ways: 1. By running the prosize script. This is accessed by typing prosize The script rst asks whether you want to modify some of the parameters in the current le or create a brand new param.prp. You may also exit here without modifying or creating any les. If continuing, prosize asks: Is your mesh primarily hex or tet? (Answer H or T) (The T option should be chosen for wholly or predominantly tetrahedral meshes; H is appropriate for all others, including meshes containing trimmed cells) After this, the script prompts you to specify the values of the parameters to be stored in param.prp. A carriage return instructs the script to use the indicated default value, while entering -1 will terminate the script and use the remaining defaults to write param.prp. The most usual variation from the default values is in the maximum number of cells (MAXCEL) and vertices (MAXVRT). Otherwise, the default values suggested by prosize should be sufcient for most cases. 2. By issuing command MEMORY from within the pro-STAR session. This command can be used only to increase the parameter sizes. If during the session it is found that the value of any sizing parameter(s) is insufcient, a warning message will appear in the I/O window. pro-STAR will sometimes be able to adjust the parameter value(s) automatically and then continue. However, in most cases you will be prompted to enter an appropriate new value for the indicated parameter(s) using MEMORY, after which you may continue as normal. Either way, the parameter values are changed internally without changing the param.prp le. To use the new values in future pro-STAR sessions, you will need to save them explicitly via a MEMORY,WRITE instruction. This will rename the existing param.prp le as param.bak and write the new parameters into a new param.prp le. Note that, after running pro-STAR with a given model, it is possible to clear all model parameters (i.e. delete all cells, vertices, boundaries, etc.) but leave the current memory size intact. This is done using command WIPEOUT and is useful if you want to abandon the current model and start a new one from scratch without exiting from pro-STAR. Furthermore, option MEMORY of this command will also reset the pro-STAR executable back to the size given in the param.prp file. Special pro-STAR executables On occasion, you may need to use a user-defined subroutine file, user1.f. This option refers to subroutines that work in conjunction with pro-STAR, not STAR, and is not supported in Windows ports at present. In such a case, the required special pro-STAR executable may be created using script prolinkl. This is accessed by typing
21-14 Version 3.26

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS The StarWatch Utility

prolinkl The script looks for a file named user1.f in the current directory. That file will be compiled into object code (user1.o) and converted into a dynamically-loaded shared object (.so or .sl or .dll depending on the operating system). The directory with the shared object must be added to the shared object library path (usually LD_LIBRARY_PATH) in order to be found and used by any subsequent pro-STAR runs. prolinkl will advise the user on how to create this path for the given operating system. Use of temporary les by pro-STAR Choosing the location of temporary les You can control the location of most pro-STAR temporary files for POSIXcompliant computers. You should ensure temporary files reside where there is sufficient capacity and where they can be accessed quickly. In practice, this means on a fast hard disk on the same computer as that doing the calculations (rather than on a remote disk accessed through a local area network). Note that the usual location for Unix temporary files, a directory called /tmp, often has insufficient capacity for pro-STARs temporary files. You select the location of temporary files by setting an environment variable, named TMPDIR, to the path name of the directory where pro-STAR should write the temporary files. Deleting temporary les Take care not to delete pro-STARs temporary files during a calculation; it will crash if you do. pro-STAR may leave temporary files behind if it crashes or you halt its execution. For POSIX-compliant systems, the operating system automatically deletes most temporary files if pro-STAR halts or crashes. For other systems, you might have to manually delete abandoned temporary files after a crash or halt.

The StarWatch Utility


This is a free-standing utility that enables you to monitor the progress of a selected STAR job running anywhere in your computer network. The monitoring is done from a special window opened by StarWatch, as shown below.

Version 3.26

21-15

OTHER STAR-CD FEATURES AND CONTROLS The StarWatch Utility

Chapter 21

Specific advantages of StarWatch are: You can monitor progress of a number of separate STAR jobs The jobs may be running on any machine in your network, including your own You may select the variables whose solution progress you wish to monitor You may adjust the display characteristics (e.g. scaling) of the monitored variables

Running StarWatch By default, StarWatch uses ports 6200 to 6206 to establish communication between the STAR executable, the StarWatch daemon (a communication program) and StarWatch, the display program that runs on your screen. If ports 6200 6206 are acceptable, then no further setup is required. If they are not, perhaps because they conflict with other programs using those ports, they can be set to any ports that the user (or more likely) system administrator wants to use. The only proviso is that if the ports are changed on one system, the same change must be made for all systems for which StarWatch communication is required. If the defaults are not acceptable, then an administrator must edit the /etc/services file and add the following lines:
star-chartd star-chart1 star-chart2 star-chart3 star-chart4 star-chart5 21-16 6200/tcp 6201/tcp 6202/tcp 6203/tcp 6204/tcp 6205/tcp # # # # # # Star/Stripchart client/server daemon Local Stripchart 1 Local Stripchart 2 Local Stripchart 3 Local Stripchart 4 Local Stripchart 5 Version 3.26

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS The StarWatch Utility star-chart6 6206/tcp # Local Stripchart 6

where port numbers 6200 6206 can be replaced by any set of port numbers. Step 1 If using the STAR GUIde environment to run a CFD analysis interactively, StarWatch will start automatically as soon as STAR itself begins execution and will open a monitoring window like the one shown above (see Chapter 2, Running a CFD Analysis, Step 6). If you are not using STAR GUIde, or if you want to monitor the progress of another currently active job, you may open the StarWatch window explicitly by following the steps below: Open a new window on your computer or go to an existing one Type starwatch, then send this application to the background also. The StarWatch application panel should appear on your screen. Start your STAR job in the same window using the -watch option.

Note that you may also start STAR first and then StarWatch. Step 2 Go to the StarWatch panel and select option Host from the Connect menu. Choose the name of the machine running your job in the Select Host dialog shown below and click OK.

Note that: Only STAR jobs owned by you and only those that have registered with the StarWatch daemon can be selected Registration usually takes place roughly at the end of the first iteration If STAR cannot nd the daemon, it will keep trying for a small amount of time and then continue without trying further contact.

Now choose the PID of the STAR job you wish to monitor from the list displayed in the Select STAR Job dialog and click OK.

StarWatch should now start displaying the monitored flow variables against iteration number or time step.
Version 3.26 21-17

OTHER STAR-CD FEATURES AND CONTROLS The StarWatch Utility

Chapter 21

Choosing the monitored values The following choices are available: 1. Material (stream) number In multi-stream applications, select the stream you wish to monitor using the Material Number slider control. 2. Field or residual values Select the type of variable to be displayed by clicking the toggle button at the bottom of the Legend section. The button label changes from Plot Field Values to Plot Residual Values and vice versa, depending on your choice. The labelling and scale of the adjacent graph also changes accordingly. 3. Monitored variable Choose the ow variables to be monitored, in terms of either eld or residual values, by clicking the option buttons next to the variable names. The latter appear in the Legend section under the Property column and comprise the three velocity components, turbulence kinetic energy and dissipation rate, pressure and temperature. The colour used to display each variable is shown next to the name. It is also possible to monitor changes in scalar variables, if present in your model, by selecting View > Selected Data > Scalar Variables from the menu bar. The contents of the Legend section and the graph labelling will change accordingly. The method of selecting scalars is the same as for the main (global) variables. Note that since only seven quantities can be monitored, option View > Select Scalars lets you decide which scalars you want to look at; by opening a secondary (Select Scalars) dialog in which the required scalars and the order in which they appear in the StarWatch display may be determined. Controlling STAR At the beginning of a CFD analysis, STAR reads all files prepared for it by pro-STAR. Many of the parameters set in pro-STAR can be viewed and altered dynamically while the solution is in progress by selecting Settings > STAR Control Variables from the StarWatch menu bar. This brings up the Star Control Variables dialog shown below:

21-18

Version 3.26

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS The StarWatch Utility

The dialogs purpose is to allow the user to interactively change the values of several STAR solution and output control parameters. These are grouped into six tabs according to function, as shown above, and all act in the same way. The meaning of the available parameters is listed in the table below: Parameter Meaning

General Settings DT Time step size MAXCOR Maximum number of correctors for the PISO algorithm RESOC Residual tolerance for the PISO algorithm SORMAX Overall convergence criterion IJKMON Monitoring cell number for uid regions File Output ECHO =.T. Control information will be written to le .info BOECHO =.T. Boundary data will be written to le .info ITEST =.T. Write all conservation balance information to le .info IRESI =.T. Write all solver convergence information to le .info NDUMP Frequency of writing data to le .pst NFSAVE Backup frequency (frequency of saving le .pst_iternum) NCRPR Number of cell Courant numbers (starting from the largest) to be printed out NFRRE Iteration frequency for dumping residuals to le .rpo
Version 3.26 21-19

OTHER STAR-CD FEATURES AND CONTROLS The StarWatch Utility

Chapter 21

Parameter

Meaning

Under-Relaxation Factors FPCR Under-relaxation factor for pressure correction (PISO) FUVW Under-relaxation factors for velocities FP Under-relaxation factor for pressure FTE Under-relaxation factors for k and FT Under-relaxation factor for temperature FTVS Under-relaxation factor for turbulent viscosity FDEN Under-relaxation factor for density FLVS Under-relaxation factor for laminar viscosity FCON Under-relaxation factor for heat conductivity FR Under-relaxation factor for radiation Blending Factors GGUVW Blending factor for velocities GGKE Blending factor for k and GGT Blending factor for temperature GGDEN Blending factor for density GGSCA Blending factor for scalars Residual Tolerances SORU Solver residual for U velocity SORV Solver residual for V velocity SORW Solver residual for W velocity SORP Solver residual for pressure SORK Solver residual for k SORE Solver residual for SORT Solver residual for temperature Number of Sweeps NSWPU Total number of solver sweeps for U in one run NSWPV Total number of solver sweeps for V in one run NSWPW Total number of solver sweeps for W in one run NSWPP Total number of solver sweeps for P in one run NSWPK Total number of solver sweeps for k in one run NSWPE Total number of solver sweeps for in one run NSWPT Total number of solver sweeps for T in one run Solution control can then be exercised as follows: 1. During execution, monitor the behaviour of normalised residual sums (or global rates of change) for each variable being solved for, by looking at the
21-20 Version 3.26

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS The StarWatch Utility

displayed values at the end of each iteration or time step. In addition, look at the ow variable values at the monitoring location, as specied in the Monitoring and Reference Data STAR GUIde panel. 2. While monitoring this display, you may decide to alter the course of the calculations by altering a model parameter, e.g. by (a) re-specifying an under-relaxation factor in order to speed up solution convergence (b) increasing the value of parameter SORMAX to stop the run at an earlier stage The values currently in use are shown on the dialog. If you want to change one or more of them, enter the new value in the appropriate box(es) and click Apply. This change is treated as pending. You can now either Cancel the change and then make others, or click Send to confirm it. 3. In the latter case, the parameter(s) will change inside STAR from the beginning of the next iteration (or time step) following the Send operation and a marker will be placed on the graph indicating the point at which something was changed. Note also the following points: The colour of marker matches the colour of the tab in which the alteration was made and STAR itself will print a message indicating the change If you make multiple changes, you can highlight any one line and use the dialogs Edit menu to copy/paste that line into other boxes and then edit any of the numbers. If you do not copy a line in, the code assumes that you are making changes to the last line. StarWatch also keeps a control history le called casename.ctrl.hist recording the changes made during a run. If you re-run a job without removing the control history le, STAR will make the same changes to the job that you made during the original run (so you can duplicate and repeat your changes to, say, under-relaxation factors). You do not have to have StarWatch running for the above changes to take place at various iterations. STAR will read the casename.ctrl le and make the changes to the run at the appropriate iteration. If you do not want the run changed the same way, delete casename.ctrl.hist before re-running a job.

Manipulating the StarWatch display The monitored variables chosen in the previous section are continuously displayed in the StarWatch panel as the calculation progresses, in two ways: As numerical values in the Iteration / Time Step Data section. The maximum and minimum values reached so far and the change since the previous iteration are also shown. As a graph of variable value versus iteration number/time step.

The detailed appearance of this graph may be adjusted as follows:

Version 3.26

21-21

OTHER STAR-CD FEATURES AND CONTROLS Hard Copy Production

Chapter 21

1. Horizontal scale Use the H: slider to achieve a reasonable scale, depending on the number of iterations 2. Vertical scale Use the V: slider to achieve a reasonable scale, depending on the variable being monitored. Note that this scale changes automatically as you switch from residual to eld values. 3. Horizontal range Use the Iteration Number / Time Step slider to move the graph window to the required iteration range, after the job has nished executing. 4. Vertical range Use the vertical slider to move the graph window to the desired variable value range. Whether you need to do this or not depends on the vertical scale chosen. 5. Display size Select View > Partial View from the menu bar to reduce the extent of the StarWatch display, which now only shows the graph and associated legend. Selecting View > Full View restores the original display. Monitoring another job If you have several STAR jobs running simultaneously and you want to switch your monitoring to a different job, follow the procedure below: Step 1 Select Connect > Disconnect from the menu bar to terminate monitoring of the current job. Step 2 Select Connect > Host, enter the name of the machine running the job you wish to monitor in the Select Host dialog and click OK. Step 3 Choose the jobs PID from the list displayed in the Select STAR Job dialog and click OK. StarWatch should now start displaying the monitored variables for the new job. Alternatively, you may simply open another window and load another StarWatch panel, as described in Running StarWatch. Note that the number of panels that may be open simultaneously will depend on the setting specified in file /etc/services.

Hard Copy Production


Neutral plot le production and use To obtain hard copy of a screen plot, switch the graphical output temporarily to the neutral plot file (see pro-STAR plot file (.plot) on page 21-4). Once the required plot is on-screen, type TERMINAL,,FILE,RAST (switches to the neutral plot le in raster, i.e. colour-ll, mode)
21-22 Version 3.26

Chapter 21

OTHER STAR-CD FEATURES AND CONTROLS Hard Copy Production

or TERMINAL,,FILE,VECT (switches to the neutral plot le in vector, i.e. line-contour mode) followed by REPLOT (sends the picture to this le) TERMINAL,, (switch output back to the screen) The above process can be repeated as often as is necessary to write all required plot data to file case.plot. It is recommended that colour plots destined for a black-and-white printer should be converted to the grey-scale shading scheme (see Colour settings on page 5-9) before sending them to the neutral plot file. This can be done either by selecting the Post - Gray option in the Color Tool or by typing command CLRTABLE,GRAY To produce the hard copy, process the pictures stored in the neutral plot file outside the pro-STAR environment using one of the supplied programs in the PLOT suite. The latter are special graphics post-processors that either generate les suitable for plotting on a given type of hard-copy device, or display the contents of the neutral plot le on your screen (see Appendix B for more details).

The PLOT programs available on your particular installation are normally accessed by opening a window and typing plot This produces a response of the form: Please enter the required plot driver: Available drivers are: ai fr gif hp ps pst su x xm [xm] where ai Adobe Illustrator le output fr Adobe Freehand le output gif GIF le output hp HP Graphics Language le output ps PostScript le output pst utility for adding an extra title to an existing PostScript le su utility for reducing the size of an existing neutral plot le by removing hidden polygons x X-windows terminal display xm X Motif graphics display
Version 3.26 21-23

OTHER STAR-CD FEATURES AND CONTROLS Hard Copy Production

Chapter 21

Type the desired option and then follow the instructions on your screen, supplying additional information as required. Note that options such as xm are suitable for screen displays while options such as ps are for hard copy production. Note also that extended mode features such as translucency, layers, and smooth-shaded contour plots cannot be represented in the neutral plot format. To produce high-resolution hard copies in extended mode, use the high-resolution screen capture technique described in Chapter 2, Screen capture. Scene le production and use STAR-CD scene files provide a convenient way to store a fully post-processed model in a format that can be subsequently viewed with the lightweight and quick STAR-View viewer program. A STAR-CD scene file (extension .scn) stores the current state of the extended-mode graphics window, including the current plot and any labels, legends, and other screen information. However, unlike conventional hard copies produced using pro-STARs neutral plot facilities, STAR-CD scene files store a full 3-D representation of the current model so the view can be rotated, translated, and zoomed interactively in the STAR-View program. To produce such a file, first generate the desired plot in extended (glm) mode (see Chapter 2, Plotting Functions). This can include any effects available in extended mode, including multiple layers, translucency, and smooth-shaded contours. Once the desired plot is achieved, select Utility > Write STAR-CD Scene File from the main pro-STAR menu. Select or type the desired scene file name into the File Selection dialog box which appears and press OK to write the file. Alternatively, pro-STAR command SCENE can be used to record the file. Once this file is written, simply run the STAR-View program by typing starview filename.scn in an X-window, where filename.scn is the file name containing the desired scene. Once the latter is loaded, the view in the model can be manipulated via the mouse in exactly the same way as in pro-STAR.

21-24

Version 3.26

APPENDICES

APPENDICES

STAR-CD VERSION 3.26

CONFIDENTIAL FOR AUTHORISED USERS ONLY

2005 CD-adapco

Appendix A

pro-STAR CONVENTIONS Command Input Conventions

Appendix A pro-STAR CONVENTIONS


Command Input Conventions
1. A single command line may not be longer than 320 characters 2. Input is mostly case-insensitive; both capital and small letters are accepted (arguments such as le names, titles and screen labels are case-sensitive) 3. Command names may be abbreviated by the rst four letters (with one exception: *ENDIF). Argument keywords may also be abbreviated by the rst four letters (with one exception: parameter arguments for the MEMORY command) 4. Fields in a command string must be separated by a comma or by any number of spaces. 5. Multiple commands may be stacked on a single line, separated by a dollar sign ($). 6. Any command string with an exclamation mark (!) in column 1 is interpreted as a comment (and therefore not executed). 7. Double plus signs (++) at the end of a line indicates that the next line is a continuation of the current line. Individual arguments are not continued on a new line; the new line will begin a new argument. Any number of lines may be continued in this manner to form a single command line; however, the total number of characters in a command line formed in this manner may still not exceed 320 characters. 8. Any command may be entered from any module 9. In NOVICE mode (see command EXPERT), the program will prompt for arguments needed to execute the command. Command ABORT may be used at this prompt to abort the current command without performing any action. 10. Basic arithmetic is allowed on all command lines. Each operator must be separated by blanks or a comma from the numbers or parameters on either side. For example, the following command VLIST 10 * 10, A + 7 1000 / B is interpreted as VLIST 100 to (A+7) by (1000/B), where A and B are numeric parameters dened by the *ASK, *SET or *GET commands. All terms are evaluated strictly from left to right. 11. The keyword ALL may be used in lieu of any vertex, cell, boundary, etc. range to denote that all items are to be used for the range. (Examples: CLIST,ALL and CTMOD,ALL,,,FLUID) 12. The appropriate item set keyword may be used in lieu of most item ranges to denote that all items in the set are to be used for the range. (Examples: CPDEL,CPSET and VLIS,VSET,,,1)
Version 3.26 A-1

pro-STAR CONVENTIONS Command Input Conventions

Appendix A

Keyword VSET CSET BSET SPLSET BLKSET CPSET DSET

Item Set Current vertex set Current cell set Current boundary set Current spline set Current block set Current couple set Current droplet set

13. The following keywords may be used in lieu of many item ranges to display the crosshair cursor in the plot window so the user may select a set to be used as the range. (Example: CLIST,CCRS). Keyword VCRS CCRS BCRS SCRS BLKCRS DCRS Select Vertex set Cell set Boundary set Spline set Block set Droplet set

14. The following keywords may be used in lieu of entity numbers. (Example: V,MXV,1.0,2.0,3.0) Keyword MXV MXC MXB MXS MXK ICUR Interpreted As Highest numbered vertex + 1 Highest numbered cell + 1 Highest numbered boundary + 1 Highest numbered spline + 1 Highest numbered block + 1 Currently active coordinate system

15. Certain keywords (which may also be used in lieu of entity numbers) will cause pro-STAR to display the crosshair cursor in the plot window and expect
A-2 Version 3.26

Appendix A

pro-STAR CONVENTIONS Help Text / Prompt Conventions

the user to select an item, as specied by the following description: (Example: STLIST,SXT) Keyword BLKX BX BXP BXR CX CXC CXG CXM CXP CXS CXT DRX DRXT SX SXC SXG SXT VX Select Block Boundary Boundary Boundary Cell Cell Cell Cell Cell Cell Cell Droplet Droplet Spline Spline Spline Spline Vertex Interpreted As Block number Boundary number Boundary patch number Boundary region number Cell number Cell colour index Cell group number Cell material number Cell porous number Cell spin index Cell type number Droplet number Droplet type number Spline number Spline colour index Spline group number Spline type number Vertex number

Help Text / Prompt Conventions


1. Words between slashes (e.g. /ANY/ALL/) represent legal alternatives for the eld. 2. Numbers in parentheses represent defaults for the immediately preceding variable. 3. Variables beginning with NV refer to vertices Variables beginning with NC refer to cells Variables beginning with NB refer to boundaries Variables beginning with NSPL refer to splines Variables beginning with NBLK refer to blocks Variables beginning with NCP refer to couples Variables beginning with NDR refer to droplets
Version 3.26 A-3

pro-STAR CONVENTIONS Control and Function Key Conventions

Appendix A

Control and Function Key Conventions


1. The following short-cuts using the Ctrl key are available: Control Key Ctrl-a Ctrl-e Ctrl-h Ctrl-o Ctrl-q Ctrl-r Ctrl-s Ctrl-w Ctrl-z Command CSET,ALL ZOOM,OFF $REPLOT Query for help ZOOM,OFF $REPLOT QUIT REPLOT SAVE,, Zoom out (by a factor of 2) Zoom in (by a factor of 2)

2. Function key short-cuts can be dened or changed using the Function Keys option in the Utility menu. The default function key short-cuts are: Function Key F5 F6 F7 F8 Default Command Repeat last command REPLOT CPLOT ZOOM,OFF $REPLOT

File Name Conventions


The default name for any file read or written by the program is casename.ext, where casename is defined by the user and ext is the file name extension. If you enclose the file name in quotes, the extension default will be overridden and the exact name within the quotes will be used.

A-4

Version 3.26

Appendix B

pro-STAR NEUTRAL PLOT FILE

Appendix B pro-STAR NEUTRAL PLOT FILE


The pro-STAR neutral plot (.plot) file is a machine/device- independent representation of a plot. As such, it can be easily transferred to any other computer and, with the appropriate PLOT program, plotted on any device. The only restriction is that the device must support raster type operations if the RASTER option is used in the TERM command. For example, a raster style plot could not be plotted on a pen plotter. The file is written any time a user performs a plotting operation after first using the TERM,,FILE,/RASTER/VECTOR/ command. The file is written using free-format integers, real numbers and characters and has an absolute maximum length per record of 80 characters. Each plot command in the file is represented by an integer followed by an appropriate set of alphanumeric parameters. Table B-1 describes the neutral file plot commands and their parameters. Table B-2 and Table B-3 describe the default colour schemes to be used for devices for which colours can be specified. All neutral plots are plotted in a single independent coordinate system called the screen system. In this system, the origin is located at the lower left hand corner of the plot, as shown in the figure below. The X axis points to the right and may have values between 0 and 13. The Y axis points up and may have values between 0 and 10. All necessary three-dimensional rotations and window clipping are done before the neutral file is written. It is up to the user to ensure that the appropriate mapping between the screen system and his plotting device takes place.
(SX=10,SY=10) (SX=13,SY=10)

Label

Plot Information

Triad (SX=0,SY=1) SY SX

Plot title

Default window

Version 3.26

B-1

pro-STAR NEUTRAL PLOT FILE

Appendix B

CD adapco provide a suite of several different PLOT programs, to be used in conjunction with various plot drivers (HP-GL, Postscript, etc.). These programs should be used as a guide for developing additional versions capable of operating with devices not supported by CD adapco. Below is a small sample of a .plot file and a description of its purpose: 1, 6, 1, 2, 10.5000, 9.5000, 5, 12, PROSTAR 3.0, 2, 10.1000, 9.0000, 6, 2, 7, 2, 10, -2, 4, 0, 10.1000, 6.9300, 10.4000, 6.9300, 10.4000, 7.0400, 10.1000, 7.0400, 7, 3, ... Initialise plotter and set the colour map 1 Change text size to 1 (largest) 10.5, 9.5 Move to location 10.5, 9.5 12, PROSTAR 2.0 Write 12 text characters (PROSTAR 3.0) 10.1, 9 Move to location 10.1, 9. 2 Change text to size 2 2 Change pen colour (lines and text) to index 2 10,-2, 4, 0, 10.1, 6.93, Plot a polygon using index no. 2 for the 10.4, 6.93, 10.4,7.04, ll colour. The polygon has four vertices 10.1, 7.04 and the edges are not drawn. The four corners are (10.1,6.93), (10.4,6.93), 7, 3 Change pen to index 3 1 6, 2, 5, 2, 6, 7,

B-2

Version 3.26

Appendix B

pro-STAR NEUTRAL PLOT FILE

Table B-1: List of Neutral File Plot Commands Command 1 2 3 4 5 None X,Y X,Y X,Y NCH,TEXT(1:NCH) Parameters Description Change the colour map Move (pen up) to location X,Y Draw (pen down) to location X,Y Draw (pen down) to location X,Y using variable value Place NCH text characters starting at the most current location. The array of characters follows parameter NCH. Change the character size. ISIZE can be between 1 (largest) and 4 (smallest). Change line and text colour to index number IPEN. Change line style Draw a point at location X,Y Draw and ll a polygon. The interior of the polygon is determined by the index of the absolute value of NCOL. If IBOUND = 1, then the polygon edges are drawn in the index dened by the latest IPEN (command number 7); otherwise, the edges are not drawn. NENT represents the number of corners in the polygon and it is followed by NENT pairs of X,Y giving the screen location of each corner.

ISIZE

7 8 9 10

IPEN ISTYLE X,Y NCOL,NENT,IBOUND [X(I),Y(I),I=1,NENT]

Version 3.26

B-3

pro-STAR NEUTRAL PLOT FILE

Appendix B

Table B-1: List of Neutral File Plot Commands Command 11 Parameters X,Y,RADIUS,SANGLE, ANGLE Description Draw an arc boundary using X,Y as the coordinates of the upper left corner of the rectangle that contains the arc. RADIUS is the parameter which scales the width and height of the major and minor axes of the arc. SANGLE indicates the start of the arc relative to the three-oclock position from the centre. ANGLE species the path and extent of the arc relative to its start. Angles are specied in 64ths of a degree, i.e. 360 x 64 is a complete circle. Draw a lled arc. In addition to using the parameters for command number 11, if IFILL=1 the lling would be as in a pie slice; otherwise the lling would be an arc chord (i.e. an area between the arc and a line segment joining the end points of the arc). IBOUND denes the foreground colours. Draw a sphere using the parameters of command number 11 with SANGLE=0.0 and ANGLE=360.0 Set the clip plane using XMIN/XMAX and YMIN/YMAX as the clip limits Set the line width to INDEX

12

X,Y,RADIUS,SANGLE, ANGLE,IBOUND, IFILL

13

X,Y,RADIUS,SANGLE, ANGLE XMIN,XMAX,YMIN, YMAX INDEX

14

15

B-4

Version 3.26

Appendix B

pro-STAR NEUTRAL PLOT FILE

Table B-2: Default Colour Table for Geometry Only Plots Index 0 1 2 3 4 5 6 7 8-20 21-39 41-59 Black White Red Green Blue Cyan Magenta Yellow Not used Shades of red varying in intensity (HLS model) from 0.95 (almost white) to 0.05 (almost black), and used for light shaded images. Shades of green varying in intensity (HLS model) from 0.95 (almost white) to 0.05 (almost black), and used for light shaded images. Shades of cyan varying in intensity (HLS model) from 0.95 (almost white) to 0.05 (almost black), and used for light shaded images. Shades of gold varying in intensity (HLS model) from 0.95 (almost white) to 0.05 (almost black), and used for light shaded images. Colour

61-79

81-99

Table B-3: Default Colour Table for Post-processing Plots Index 0 1 2-14 21-99 Black White Smooth variation in hues from red to violet. The user can extend this table, if desired, to use up to index 20. Varied intensities for light shaded images, as dened in Table B-2. Colour

Version 3.26

B-5

Appendix C

FILE USAGE

Appendix C FILE USAGE


From Version 3.1 onwards, file names in STAR-CD changed from being I/O-unit-number based to file-extension based. For the users convenience, both the old and the new naming conventions are given in the table below. Note, however, that you may still use a file conforming to the old convention in any command or GUI text box, provided you enclose the name in single or double quotes. File Extension .ani .anim .bak .bdf .bnd .bshl .btr .ccd .cel .cel .cgns .cgrd .chm .cpfz .cpl .ctrl .dat .div .domain .drp .drpc .ecd .ecd2 23 63 14 17 25 23 Old Unit Number 22 25 Usage Default input/output for recording animation commands Default save le for animation options Backup (i.e. previous version) of the current pro-STAR model le (binary) STAR le used for storing body forces Default input/output for boundary denitions Auxiliary le generated by the domain decomposition tool in STAR-HPC and used by STAR produce the .ndt le for parallel runs STAr le used for storing beam tracking data STAR le used for storing coal combustion data Default input/output for cell denitions Default output for surface cell denitions Default input/output for CGNS data les Default input le containing grid change commands Default output le for chemical scheme denitions (coded) Default temporary storage of frozen vertex data used with the SAVE and MAP options of command CPFREEZE Default input/output for coupled cell denitions Editable le for interactive solution control Tecplot post data output le Post data le created when the solution diverges ICEM CFD post data output le Default output for droplet denitions (written with command PROBLEMWRITE) Default input/output for droplet data (coded) File for storing engineering data for cell monitoring File for storing dispersed-phase engineering data for cell monitoring
C-1

34 32 35 95

37 36

Version 3.26

FILE USAGE

Appendix C

File Extension .echo .elem .erd .erd2 .err .evn .evnc .evt .fac .g3d .gen .geom .grf .grf .iges .info .inp .inp .lct .lfb .loop .mdl .mdl .msh .nas .ndt

Old Unit Number 1 14

Usage Echo of all input typed by the user Default input/output for ANSYS element denitions File for storing engineering data for boundary region monitoring File for storing dispersed-phase engineering data for boundary region monitoring STAR le used for storing error estimates. Mutually exclusive with the .rpo le. Default transient event save le (binary/direct access) used by pro-STAR Default input/output for ASCII event data les Default transient event data le (binary) used by STAR File containing cell face denitions Default input for GRID3D data les Default output for GENERIC data Default output for STAR geometry le (coded or binary) Default graph register data save le Default graph register GET le Default input for IGES data les Run-time optional output le Any le containing pro-STAR commands Default input/output for miscellaneous problem data denitions STAR le used for storing cell types for the two-layer turbulence model File containing group and colour information for particles Default save le of current loop information Default pro-STAR model le (binary) Default input for SMAP-type data TGRID data output le Default input/output for NASTRAN data les STAR le containing normal distances from wall boundaries, used in various turbulence model implementations (e.g. low Reynolds number models, two-layer models, etc)
Version 3.26

28 19 32

14 23 8 12 13 13 61 5 24 49

23 16 26 14 21

C-2

Appendix C

FILE USAGE

File Extension .neu .node .out .pat .pdft .pgr .plot .prob .proc .prs .pst .pstc .pstt .pttc .refi .reu .rpo .rsi .rsic .run .scl .set .smap .spd .spl
Version 3.26

Old Unit Number 15 6 14

Usage Gambit data output le Default input/output for ANSYS node denitions Default output le Default input/output for PATRAN data les Look-up table le created when using PPDF chemical reaction models File containing participating media radiation data (binary) Neutral plot le Default output for STAR control le (coded or binary) File containing cell-to-processor mapping information used in STAR-HPC runs STAR le containing particle radiation sources for use in restart runs Default STAR solution le (binary/direct access) Default input/output of coded STAR solution les for BINARY-CODED-BINARY le conversions Default transient solution le (binary/direct access) Default input/output of coded transient solution les for BINARY-CODED-BINARY conversions Renement data le used by the adaptive renement commands (CMREFINE / CMUNREFINE) Residual history le for phase no. 2 (used in Eulerian two-phase problems) Default output le for solution variable residuals in a steady-state run (turned on by command RESDAT). Mutually exclusive with the .err le. Default residual history le (binary/direct access) Default input/output of residual histories for BINARY-CODED-BINARY le conversions Standard run-time output le Default output for scalar variable denitions (coded) Default output for set denitions (written with the SETWRITE command) Default output of the SMAP operation, used for STAR restart runs with a changed mesh File for storing engine data (coded) Default input/output for spline denitions
C-3

90 2 10 23 64 9 7 29 27

27 39 62 34 60 35 31 38 12 22

FILE USAGE

Appendix C

File Extension .srf .stl .tabl .tbl .terr .trk .trkc .trnc .trns .unv .uns .usr .vda .vfs .vrml .vrt .vrt

Old Unit Number 30 14 18

Usage Default output for plotting-surface database (used to skip surface creation step in future plots) Default input for STL data les Default input le for droplet spray tables Default le for storing general table data STAR le used for storing estimates of total error in transient analyses Default input/output for particle/droplet tracks Default input/output of particle/droplet track data for BINARY-CODED-BINARY le conversions Default input for transient load data (coded) Default transient history save le (binary/direct access Default input/output for IDEAS (SDRC) universal le Fieldview data output le Default input/output for ASCII post data Default input for VDA data les STAR le used for storing view factors Virtual reality data output le Default input/output for vertex denitions Default output for surface vertex denitions

50 33 34 24 26 14

23 13 20 14 15 18

The format for cell definitions is: (file case.cel) Cell number, eight vertices, cell type number, cell key (I9, 6X, 9I9, 1X, I4) The format for vertex definitions is: (file case.vrt) Vertex number, X, Y, Z (global coordinates) (I9, 6X, 3G16.9) The format for boundary definitions is: (file case.bnd) Boundary number, four vertices, region number, patch number, region type (characters) (I8, 6X, 4I9, 2I7, A) The format for spline definitions is: (file case.spl) Spline number, number of vertices, spline type (3I9) Up to 100 vertex numbers dening the spline (8I9) The format for couple definitions is: (file case.cpl) Couple number, number of cells (I8, 1X, I5) Up to MAXNCP cell number/face number combinations 7(I9,I2) The format for ASCII input to be used as post-processing data is: (file case.usr)
C-4 Version 3.26

Appendix C

FILE USAGE

Vertex and/or cell number (as appropriate), scalar value (I9, 6X, 6G16.9).

Version 3.26

C-5

Appendix D

PROGRAM UNITS

Appendix D PROGRAM UNITS


Property AREA CONDUCTIVITY DENSITY DIFFUSIVITY DYNAMIC VISCOSITY FORCE HEAT FLUX HEAT OF FORMATION HEAT OF VAPOURIZATION LENGTH MASS MASS FLOW RATE MOLECULAR WEIGHT PRESSURE SPECIFIC HEAT SPEED OF SOUND SURFACE TENSION COEFFICIENT TEMPERATURE TIME TURBULENCE KINETIC ENERGY k TURBULENCE DISSIPATION RATE VELOCITY VOLUME VOLUMETRIC EXPANSION COEFF. Units (SI) m2 W/mK kg/m3 m2/s Pa s N W/m2 J/kg J/kg m kg kg/s kg/kmol Pa (N/m2) J/(kg K) m/s N/m K ( Kelvin) s m2/s2 m2/s3 m/s m3 1/K Units (English) ft2 Btu/(hr ft F) lbm/ft3 ft2/s psi s lb Btu/(hr ft2) Btu/lbm Btu/lbm ft lbm lbm/hour lbm/kmol psi Btu/(lbm F) ft/s lb/ft R ( Rankine) s ft2/s2 ft2/s3 ft/s ft3 1/R

Version 3.26

D-1

Appendix E

VALID PLOT COMBINATIONS

Appendix E VALID PLOT COMBINATIONS


Table E-1: Terminal Type = Vector
POPTION GEOMETRY VECTORS (CELL DATA) CONTOUR (CELL DATA) VECTORS (VERTEX DATA) CONTOUR (VERTEX DATA) ISOSURFACE (VERTEX DATA) FACE COLOUR CODE CONTOUR (FLUX DATA) (NOTE: CONTOURS IN VECTOR MODE ARE DRAWN AS FRINGE [LINE] CONTOURS) X X X X X X X X X PLTYPE NORMAL X X SECTION QHIDDEN EHIDDEN X X X X X X MISC. OPTIONS EDGES X X LIGHTED

Table E-2: Terminal Type = Raster


POPTION GEOMETRY VECTORS (CELL DATA) CONTOUR (CELL DATA) VECTORS (VERTEX DATA) CONTOUR (VERTEX DATA) ISOSURFACE (VERTEX DATA) FACE COLOUR CODE CONTOUR (FLUX DATA) X PLTYPE NORMAL X X SECTION X X X X X X QHIDDEN EHIDDEN X X X X X X X X X X X MISC. OPTIONS EDGES X X X X X X X LIGHTED X X

(NOTE: CONTOURS IN RASTER MODE ARE DRAWN AS FILLED COLOUR CONTOURS)

Version 3.26

E-1

VALID PLOT COMBINATIONS

Appendix E

Table E-3: Terminal Type = Extended (Raster + 24-bit Colour + Zbuffer)


POPTION GEOMETRY VECTORS (CELL DATA) CONTOUR (CELL DATA) VECTORS (VERTEX DATA) CONTOUR (VERTEX DATA) ISOSURFACE (VERTEX DATA) FACE COLOUR CODE CONTOUR (FLUX DATA) TRANSLUCENT PLOTS ARE AVAILABLE IN ALL RASTER AND EXTENDED MODES ON MACHINES USING GL GRAPHICS WITH APPROPRIATE HARDWARE X PLTYPE NORMAL X X SECTION X X X X X QHIDDEN EHIDDEN X X X X X X X MISC. OPTIONS EDGES X X X X X X LIGHTED X X X X X X

E-2

Version 3.26

Appendix F

pro-STAR X-RESOURCES

Appendix F pro-STAR X-RESOURCES


The Motif version of pro-STAR utilises standard X resources for defining the layout and look of its windows. While default values for these resources are built into the program, you can override the defaults in two different ways: 1. The easiest method is to put resource denitions in your .Xdefaults le. This le is read by the Motif window manager when you log in or restart the window manager. Any changes made to this le do not take effect until either you log in again or you issue an xrdb command to re-read the X resource data base. Typically, you will issue the command as follows: xrdb -merge .Xdefaults include the full path to the .Xdefaults le if you are not in your home directory

2. Any le can be used to set X resources. The only signicance of the .Xdefaults le is that it is read automatically on start-up. You could, for example, create a le called PROSTAR.resources and put the resource denitions in that le. In this case, you would have to issue the command: xrdb -merge PROSTAR.resources before running pro-STAR in order to activate those denitions The following describes some useful resource definition commands: Prostar*background: The default background colour for all pro-STAR applications The default foreground colour for all pro-STAR applications The size and position of the pro-STAR graphics window The font used for the pro-STAR graphics window menus The size and position of the pro-STAR output window The height of the output history portion of the pro-STAR output window The height of the input portion of the pro-STAR output text window The font used in the pro-STAR output window

Prostar*foreground:

Prostar.geometry:

Prostar.defaultFontList:

Prostar.OutputWindow.geometry:

Prostar*cmdForm1Widget.height:

Prostar*cmdForm2Widget.height:

Prostar*Prostar_Output_Text.fontList:

Version 3.26

F-1

pro-STAR X-RESOURCES

Appendix F

Prostar*Prostar_Output_Text.foreground:

The foreground colour used in the pro-STAR output window

Prostar*Prostar_Output_Text.background: The background colour used in the pro-STAR output window Prostar*panel_name_B1.background: The background colour of button 1 in the user panel named panel_name. Buttons in panels are numbered starting from zero and are incremented by 1 from top to bottom and from left to right. Any panel button can be dened using the proper panel name and button number. The foreground colour of button 1 in the user panel named panel_name. The font used for button 1 in the user panel named panel_name. The font used for the text section of the macro edit dialog The text foreground colour used in the macro edit dialog The text background colour used in the macro edit dialog

Prostar*panel_name_B1.foreground:

Prostar*panel_name_B1.fontList:

Prostar*macro_editor_text.fontList:

Prostar*macro_editor_text.foreground:

Prostar*macro_editor_text.background:

Prostar*GUIde_INDEXCARD.background: The default background colour for all index cards (tabs) inside a STAR GUIde panel Prostar*GUIde_TABS.background: The default background colour for all sub-index cards (sub-tabs) inside a STAR GUIde panel

X colour names are usually (but not always) defined in the file: /usr/lib/X11/rgb.txt Geometry definitions are in the form of W H + X + Y where W is the width (in pixels), H the height, X the distance (in pixels) from the left of the screen to the left side of the window, and Y the distance from the top of the screen to the top of the window. Heights are also defined in pixels. Available font list names can usually be found by issuing the command: xlsfonts
F-2 Version 3.26

Appendix F

pro-STAR X-RESOURCES

The following shows a sample of resource definitions that could be used with pro-STAR: Prostar*background: Prostar*foreground: paleturquoise3 black

Prostar.geometry: 800x800+480+0 Prostar.defaultFontList: -adobe-helvetica-bold-r-normal--14-140-75-75-p-82iso8859-1 Prostar.OutputWindow.geometry: 1000x870+0+0 Prostar*cmdForm1Widget.height: 700 Prostar*cmdForm2Widget.height: 70 Prostar*Prostar_Output_Text.fontList: -adobe-courier-bold-r-normal--18-180-75-75-m-110iso8859-1 Prostar*Prostar_Output_Text.foreground: blue Prostar*Prostar_Output_Text.background: gray85 Prostar*new_panel_B1.background: Red Prostar*new_panel_B1.fontList: -adobe-courier-medium-r-normal--12-120-75-75-m-70iso8859-1 Prostar*new_panel_B2.background: Green Prostar*new_panel_B2.fontList: -b&h-lucida-medium-r-normal-sans-24-*-*-*-*-*iso8859-1 Prostar*macro_editor_text.fontList: -adobe-courier-bold-r-normal--18-180-75-75-m-110iso8859-1 Prostar*macro_editor_text.foreground: blue Prostar*macro_editor_text.background: skyblue To customise the opening locations of Tools, Lists, etc. in pro-STAR If you run the XMotif version of pro-STAR, it is possible to arrange for tools to open in repeatable locations. This is especially useful if you have a number of favourite tools that you open each time and can make pro-STAR open them every time via the PROINIT file. There are two steps in doing this. The first is finding out where you want the tool to be. To this end, run pro-STAR and then place (and optionally resize) the tool to get the desired effect. Follow this by issuing the xwininfo command from an X-window to get the necessary numbers. For example: ibm3<68>xwininfo

Version 3.26

F-3

pro-STAR X-RESOURCES

Appendix F

xwininfo: Please select the window about which you would like information by clicking the mouse in that window. xwininfo: Window id: 0x54007c2 "Check Tool" Absolute upper-left X: 587 Absolute upper-left Y: 374 Relative upper-left X: 0 Relative upper-left Y: 0 Width: 630 Height: 590 Depth: 8 Visual Class: PseudoColor Border width: 0 Class: InputOutput Colormap: 0x3d (installed) Bit Gravity State: ForgetGravity Window Gravity State: NorthWestGravity Backing Store State: NotUseful Save Under State: no Map State: IsViewable Override Redirect State: no Corners: +587+374 -63+374 -63-60 +587-60 -geometry 630x590-55-52 This gives us two pieces of information, the name and the location. The name is enclosed in quotes in the first line of output, for this case it is Check Tool. The location is given in the last line, -geometry 630x590-55-52. This gives the width and height as well as the location. The second step is to feed this information to pro-STAR via Xresources. The usual way is to edit file .Xdefaults in your home directory. In this case, add the following line: Prostar*CheckTool*Geometry: 630x590-55-52 This line is made up as follows: Prostar*NAME*Geometry: GEOMETRY where: NAME is the name of the window stripped of all spaces; capitalisation must be kept. GEOMETRY is the location of the window as found from the previous command. Once this line has been added to the file, pro-STAR should respond correctly. On some systems, restarting pro-STAR will suffice. Others may require you to log out and log in again or issue some variant of the xrdb command. The above has been tested and works so far on SGI and IBM machines. Other
F-4 Version 3.26

Appendix F

pro-STAR X-RESOURCES

machines may work with minor variations. A suitable PROINIT file will be: opanel tool$check Make sure that the PROINIT file is in your current directory or that it is pointed to by the STARUSR environment variable.

Version 3.26

F-5

Appendix G

USER INTERFACE TO MESSAGE PASSING ROUTINES

Appendix G USER INTERFACE TO MESSAGE PASSING ROUTINES


Some user coding might need access to message passing routines when used in a parallel run. This appendix lists the parallel message passing calls that may be used within the user coding. IGSUM Global Integer Summation Synopsis INTEGER FUNCTION IGSUM (LOCSUM) Parameters INTEGER LOCSUM local value Returns integer sum of LOCSUM GSUM Global Floating Point Summation Synopsis REAL1 FUNCTION GSUM (LOCSUM) Parameters REAL1 LOCSUM local value Returns floating point sum of LOCSUM DGSUM Global Double Precision Summation Synopsis DOUBLE PRECISION FUNCTION DGSUM (LOCSUM) Parameters DOUBLE PRECISION LOCSUM local value Returns double precision sum of LOCSUM LGLOR Global OR operation Synopsis SUBROUTINE LGLOR (LOC,GLO) Parameters LOGICAL LOC local value (input parameter) LOGICAL GLO global value (output parameter) LGLAND Global AND operation Synopsis SUBROUTINE LGLAND (LOC,GLO) Parameters LOGICAL LOC local value (input parameter) LOGICAL GLO global value (output parameter)

1. Type REAL becomes DOUBLE PRECISION in double precision runs.


Version 3.26 G-1

USER INTERFACE TO MESSAGE PASSING ROUTINES

Appendix G

GMAX Global MAX operation Synopsis REAL1 FUNCTION GMAX (LMAX) Parameters REAL1 LMAX local value Returns global MAX of LMAX GMIN Global MIN operation Synopsis REAL1 FUNCTION GMIN (LMIN) Parameters REAL1 LMIN local value Returns global MIN of LMIN IGMAX Global MAX operation Synopsis INTEGER IGMAX (ILMAX) Parameters INTEGER FUNCTION IGMAX local value Returns global MAX of ILMAX IGMIN Global MIN operation Synopsis INTEGER FUNCTION IGMIN (ILMIN) Parameters INTEGER IGMIN local value Returns global MIN of ILMIN

1. Type REAL becomes DOUBLE PRECISION in double precision runs.


G-2 Version 3.26

Appendix H

STAR RUN OPTIONS Usage

Appendix H STAR RUN OPTIONS


Usage
star [-version] [-abort] [-batch] [-case=casename] [-chktime=minutes] \ [-chkdir=directory] [-chkpnt] [-collect] [-dp] \ [-devtool="program"] [-g] [-fork] [-kill] [-nolookahead] \ [-noramfiles] [-norecalc] [-norestart] [-nosave] [-noskip] \ [-noturbo] [-noufile] [-restart] [-save="file1[ file2 ...]"] \ [-setvariable="value"] [-toolchest] [-timer] [-ufile] \ [-uflags="flags"] [-ulib="library1[ library2 ...]"] [-watch] \ [-copy="file1[ file2 ...]"] [-decomp] [-decomphost=hostlist] \ [-decompmeth=method] [-decompflags="flags"] [-distribute] \ [-loadbalance] [-mergehost=hostlist] [-mpi=vendor] \ [-mppflags="flags"] [-mpphosts] [-nocollect] [-nocopy] \ [-nodecomp] [-noshmem] [-swap121] \ [-mvmeshhost=host] [-nodefile=file] [-nooverload] \ [node1 [node2 [node3 [...]]]]

Options
-version -abort -batch

-case=casename -chktime=minutes -chkdir=directory -chkpnt

-collect -dp

Show STAR version information, which includes patch number. Send SIGABRT to stop STAR after the current iteration or time step. Generate script for running batch job. Useful if run is to be submitted via a batch-queuing system like IBM Loadleveler, LSF, OpenPBS, PBSPro, Sun Grid Engine or Torque. This requires STAR-NET 3.0.3 or later to be installed. Select the case name manually. This option is not needed in general. Enable STAR controlled check-pointing at a regular interval in minutes for fault tolerance. The default is off. Select directory for storing the check-pointed data. The default is to use a CHECK sub-directory. Perform manual check-pointing of STAR results now. This option may be useful for visualising elds while STAR is still executing in parallel, since it will merge the cases results. Collect and save data from previous crashed run only. Make STAR-CD run in double precision arithmetic. Current default is single precision, with the exception of combustion problems which use either STAR/KINetics or the Complex Chemistry model, in which case STAR-CD will execute in double precision.

Version 3.26

H-1

STAR RUN OPTIONS Options -devtool="program"

Appendix H

-fork -g

-kill -nolookahead -noramfiles -norecalc -norestart -nosave -noskip

-noturbo -noufile

-restart -save="filelist"

Attach a development tool like a debugger to a STAR-CD run. The use of this option is advised on sequential runs only. For parallel runs only LAM MPI and MPICH are fully supported with Totalview. Enable the use of fork() for starting local external moving mesh codes and NFS-based communications. Compile ule source code, so that the user may employ a debugger to perform a step-by-step analysis of the coding in the user subroutines. See also option "-devtool". Send SIGKILL to terminate STAR immediately. Disable look ahead for socket-based external moving mesh code communications. Disable memory based scratch les. Disable the recalculation of near-wall distances and radiation view factors. Disable restart if selected in the problem le. Disable saving of results by using an empty save list. The "-save=" option can be used to make a new save list. Forces geometry decomposition (if applicable), events preparation (if applicable), user coding compilation and copying of input les (if applicable) before STAR-CD starts to execute. Disable platform specic solver optimizations. Ignore user coding in the "ufile" directory, i.e. the runs results will not be inuenced by the actual user coding. Enable restart if post data le exist. Specify additional output les for treatment as results. On a parallel run, these les will be merged into a single le. Ideally, these les should be formatted into two columns: the rst column containing an index numeral that can be ordered (i.e., pro-STAR cell number), and the second column containing the physical quantity of interest. Files that should not be merged should be left out from this option. Wildcards * and ? are accepted. Example:
-save="file1.dat file2.dat" or -save="file1.dat" -save="file2.dat"

H-2

Version 3.26

Appendix H

STAR RUN OPTIONS Parallel Options -set variable="value" Set

environmental variable to a value, especially on a parallel run, where the variable will be set on all processes. Example:
star -set MYVAR="on"

-timer

-toolchest -ufile

-uflags="flags"

-ulib="librarylist"

-watch

Enable printing of detailed timing data. Use this option to extract execution time information from the run. Please note that the use of this option entails a performance penalty. Build new STAR toolchest from plug-in tools. Compile user coding and build new plugable object only. Useful to verify if user coding compiles, i.e., if it contains any syntax mistakes. Select additional ags for compiling user coding. This option gives the user added exibility in using other compiler options that may not be listed in installation scripts. Specify precompiled user coding libraries and/or some additional dynamic shared objects required by user coding. Enable connection to the STAR watch daemon. The daemon itself and the StarWatch GUI still need to be run separately

Parallel Options
-copy="filelist"

Specify additional input les for copying to domains on a parallel run. Example:
-copy="file1.dat file2.dat" or -copy="file1.dat" -copy="file2.dat"

Run geometry decomposer only. Useful to check the outcome of the decomposition if it has to satisfy certain criteria. -decomphost=hostlist Selects host for running decomposer (i.e. host1:host2:).
-decomp

Version 3.26

H-3

STAR RUN OPTIONS Parallel Options -decompmeth=method

Appendix H

Select decomposition method (i.e. optimised, automatic, manual, sets, metis, ometis). The abbreviations o, a, m, s, x and y, respectively, can be used instead. Their individual meanings are: o : The decomposition will be read from le <casename>.proc, composed of two columns: rst column contains cell numbers, second column contains process number to which the cell is going to be assigned. a : The decomposition will uniformly divide the number of cells between the intended number of processes. m : The decomposition is done per cell types, as they may have been dened in pro-STAR. s : The decomposition is read from a .sets le, as it may have been dened in pro-STAR. x : The mesh will be partitioned with the METIS, a built-in graph handling library. y : Same as above, but with a lower memory footprint/higher execution time. The default is metis decomposition, except when the model contains events, in which case the default becomes sets. Example: -decompmeth=x

H-4

Version 3.26

Appendix H

STAR RUN OPTIONS Parallel Options -decompflags="flags"

Special options for Domain Decomposition step: vopt,n : This options controls which vertices are written into each of the different geometry les being created in the subdomain directories; n can be equal to: 1 : All vertices are written on all geometry les; 2 : All vertices on the master process geometry le but only local vertices on others; 3 : Only local vertices on each geometry le; Local vertices are the ones that dene the cells belonging to a certain subdomain; this option has a particular impact on moving mesh cases, whereby the strategy chosen to move the mesh (i.e. the vertices) will dictate which option to choose. Whenever the moving mesh operations are centralised on the master process (which is the default behaviour, altered only for cases without events by activating logical switch 110) then either values 1 or 2 must be chosen. Value 3 can only be used when the mesh motion operation is performed by all processes, in parallel (i.e. logical switch 110 has been activated for a moving mesh case without events). For the majority of cases, the vertices will be correctly distributed across processes, which means that one does not need to specify any option explicitly. vcom(/novc) : Compress(/do not compress) vertex numbers on each geometry le; if compressed, the vertices on each geometry le will be numbered from 1 to the local maximum number; if not compressed, the vertices will retain their original numbering from the un-decomposed mesh. This option is coupled to the previous one, whereby the vertex numbering may be important for the mesh motion operation (e.g. the vertex movement may be specied relative to a xed vertex). The default is that if any process geometry le contains all vertices, then no vertex set is compressed. Again, for the majority of cases, the default behaviour will lead to correct vertex numbering.

Version 3.26

H-5

STAR RUN OPTIONS Parallel Options

Appendix H

outproc : if chosen, this option will trigger the creation of a cell assignment le in the cases directory; this le (<casename>.proc), can be loaded into pro-STAR for the user to visualise the decomposition (with command RDPROC). outsets : this option will trigger the creation of a sets le in the cases directory. In this le (<casename>.sets), each set will contain the cells that belong to a certain subdomain; this le can be manipulated from within pro-STAR in the usual manner. mles,n : reads n les for partition (les called <casename>.proc, <casename>.proc.1, <casename>.proc.2, etc.); for large models which cannot be decomposed by METIS, this allows METIS to be run on pieces of the model, generate the .proc les for each piece, and then use them on the large model with a manual partitioning. These les should contain two columns of integers: the rst column with pro-STAR cell numbers and the second with the corresponding process number to which that cell will be assigned. nolem : only use this option if the default fails whenever using QUICK or LUD schemes, in particular if you are trying to use these schemes in mostly tetrahedral meshes. mhal : only use this option if the default fails; if used, this option allows a bigger addressing space to be used by the star executable; it is rarely necessary. Example: -decompflags=vopt,1 outproc mhal
-distribute

-loadbalance

-mergehost=hostlist

Select distributed data parallel runs using local scratch disks, as set up at the time when STAR-CD was initialised. Please see your Systems Administrator for details. Select load balancing taking into account the relative speeds of the hosts, as set up at the time when STAR-CD was initialised. Please see your Systems Administrator for details. Selects host for merging results (i.e. host1:host2:).

H-6

Version 3.26

Appendix H

STAR RUN OPTIONS Parallel Options -mpi=auto

-mpi=os -mpi=gm -mpi=hp -mpi=intel -mpi=ra -mpi=scampi -mpi=score -mpi=sgi -mpi=lam -mpi=mpich -mppflags="flags"

-mpphosts

-nocollect

-nocopy

-nodecomp

-noshmem -swap121

Automatic selection of the MPI implementation using the vendor order shown below. This is the default behaviour which can be changed by supplying one of the ags below: Select Operating System Vendors MPI Select MPICH-GM (Myricom GM MPI) Select HP MPI Select Intel MPI Select RA-MPICH (Rapid Array MPI) Select ScaMPI (Scali MPI) Select SCore MPI Select SGI Itanium MPI Select LAM MPI Select MPICH (ANL/MSU MPI) Select additional ags for message passing protocol. Use this option to supply additional ags as expected by the MPI implementation. In general, the user should not need to use it. Select non-default network for message passing protocol using alternative host names, as set up at the time when STAR-CD was initialised. Please see your Systems Administrator for details. Disable data collection at the end of a distributed data parallel run. This also disables saving of results. It is possible to restart using the data already distributed to the local scratch disks. Please note that any updates to these les must be performed manually and the data can be manually collected using the "-collect" option at the end of the runs. Disable copying of input les by using an empty copy list. The "-copy=" option can be used to make a new copy list. Do not decompose the computation mesh on a parallel run and use the last decomposition instead. The user should not need to use this option in general. Disable shared memory communications for parallel runs on a single node. Enables faster one-to-one algorithm for domain data swaps by the message passing protocol on some hardware platforms. However, this option may reduce the run-time robustness of STAR-CD, so it should be used with caution.

Version 3.26

H-7

STAR RUN OPTIONS Resource Allocation

Appendix H

Resource Allocation
The user does not select sequential or parallel STAR runs directly. Instead this is automatically determined from the resources assigned by the user or the resource manager. If STAR options are required they need to be specified before the nodes list. -mvmeshhost=host Select additional resource for running external moving mesh code. The default is to overload the STAR master CPU with the external moving mesh code, when one is being used. -nodefile=file Select nodes to use for running STAR in a le. This can be specied on a single line or multiple lines. -nooverload Disable overloading of the STAR master processor with the external moving mesh code. The number of STAR domains plus one extra process is needed in the resource line. node1 node2 node3 The nodes to use for running STAR. The node is specied in the format hostname,np, where np is the number of processes to use. The local host will be assumed if the hostname is not specied and a single process will be used if the ,np parameter is not supplied.

Default Options
The environment variable STARFLAGS can be set to include some default STAR options that will be processed before any command line options. Its value is normally set in the software initialization file (software.ini) to cater for site-specific STAR solver options that are always used. Examples are: STARFLAGS=-dp STARFLAGS=-set VARIABLE="Some Value" STARFLAGS=-mpi=mpich -noshmem -distribute -timer The user can reset STARFLAGS manually or use a different .ini file to change its value. The options defined in STARFLAGS are always processed first and can be over-written by additional command-line options, but only if an alternative option exists. Thus, if STARFLAGS=-mpi=mpich the user can still use LAM MPI as follows: star -mpi=lam However, if STARFLAGS=-dp
H-8 Version 3.26

Appendix H

STAR RUN OPTIONS Cluster Computing

this setting cannot be modified because a single-precision option is not available at the command line. Another example is:
STARFLAGS=-set GTIHOME=/users/netapps/gt GTISOFT_LICENSE_FILE=27005@heraclitus

Using STARFLAGS, the software administrator can set things up so that ordinary users need to do less work. Other examples are to make everybody run in double precision, to always use the -distribute option, etc.

Cluster Computing
Cluster computing is widely adopted by STAR-CD users and typically consists of computing nodes connected by network interconnect devices such as Gigabit Ethernet, Myrinet and InfiniBand. CD-adapco have been actively working with computer hardware and software vendors to ensure that STAR-CD takes full advantage of progress in cluster technology. An important aspect of this work is STAR-CDs integration with MPIs that support various network interconnect devices. Users can type star -h to check the available MPI options for the port they are using prior to issuing one of the "star -mpi=" commands in their session window. By checking which network interconnect devices are supported by each MPI, users can determine whether STAR-CD works with a particular MPI/interconnect combination. STAR-CDs performance on a cluster is influenced by numerious factors, such as MPI performance, interconnect latency, interconnect bandwidth and file system performance. We have been working with our hardware and software partners to provide benchmark data on various clusters and such data are available on CD-adapcos web site. Due to the extensive range of cluster configurations and the rapid developments in cluster technology, it is not possible to test all MPI/interconnect combinations and to measure their performance. Users are advised to contact the relevant system vendors to check whether a particular combination of MPI implementation and network interconnects works with STAR-CD.

Batch Runs Using STAR-NET


STAR-NET 3.x is a new, lightweight tool for running applications in sequential and parallel modes under a batch environment using a resource manager. It is a completely new design, not compatible with the previous STAR-NET 2.0.x versions (which only work with STAR-CD in parallel mode). Currently, the IBM Loadleveler, LSF, OpenPBS, PBSPro, Sun Grid Engine and Torque resource managers are supported through STAR-NET 3.x compliant plug-ins. Therefore, you must install STAR-NET 3.x in order to run in batch mode or to use any of the above resource mangers. Note also that the PBSPro and Torque are only supported in OpenPBS compatibility mode. Concise guidelines for running under each system are given below, assuming prior configuration as detailed in the Installation and Systems Guide.

Version 3.26

H-9

STAR RUN OPTIONS Batch Runs Using STAR-NET

Appendix H

Running under IBM Loadleveler using STAR-NET To run STAR-PNP under Loadleveler: 1. Create a batch.sh script by specifying the -batch option: star -batch <options> where <options> represents all the normal STAR-PNP ags for your job, as described in the sections above. Note that you cannot assign a node list for resource allocation in batch mode as this will be performed automatically by Loadleveler. 2. Submit your job using the llsubmit command. For example: star -batch <options> -chktime=60 llsubmit batch.sh The llsubmit command does not allow any resource selection and so this must be specied correctly in the batch.sh script. The following shows the most useful settings: # # # # @ @ @ @ node_usage class node total_tasks = shared = = 3 = 8

The above requests 3 nodes and a total of 8 CPUs for running the batch job. 3. The llsubmit command does not support automatic restarts and checkpointing, so you will need to enable application-level check-pointing by STAR-PNP as follows: star -batch <options> -chktime=60 llsubmit batch.sh Other useful Loadleveler commands: Show all my Loadleveler jobs llq -u username Continuously monitor the output of job number 123 tail -f batch.o123 Terminate job number 123 under Loadleveler llcancel 123 Use the built-in GUI interface for submitting and monitoring jobs xloadl Running under LSF using STAR-NET To run STAR-PNP under LSF:
H-10 Version 3.26

Appendix H

STAR RUN OPTIONS Batch Runs Using STAR-NET

1. Create a batch.sh script by specifying the -batch option: star -batch <options> where <options> represents all the normal STAR-PNP ags for your job, as described in the sections above. Note that you cannot assign a node list for resource allocation in batch mode as this will be performed automatically by LSF. 2. Submit your job to the queue using the bsub command. For example: (a) To submit to queue starnet requesting 2 to 4 processors: bsub -q starnet -n 2,4 batch.sh (b) To submit to queue starnet requesting 2 to 4 processors with LSF-controlled automatic restarts and enabling check-pointing every 60 minutes: bsub -q starnet -n 2,4 -r -k "CHECK 60" batch.sh It is recommended that you always enable check-pointing and automatic restarts to allow time-windowing/high-load-enforced job migration to work. (c) To submit to a subset of hosts:
bsub -q starnet -m "host1 host2 host3" -n 2,4 -r -k "CHECK 60" batch.sh

Other useful LSF commands: Show all my LSF jobs bjobs Continuously monitor the output of job number 123 peek -f 123 Terminate job number 123 under LSF bkill 123 Use the built-in GUI interface for submitting and monitoring jobs xlsbatch Alternatively, command starnet can be used to display a brief summary of the current LSF status. Running under OpenPBS using STAR-NET To run STAR-PNP under OpenPBS: 1. Create a batch.sh script by specifying the -batch option: star -batch <options>
Version 3.26 H-11

STAR RUN OPTIONS Batch Runs Using STAR-NET

Appendix H

where <options> represents all the normal STAR-PNP ags for your job, as described in the sections above. Note that you cannot assign a node list for resource allocation in batch mode as this will be performed automatically by OpenPBS. 2. Submit your job to the queue using the qsub command. For example, to submit to queue starnet requesting 3 nodes with 2 processors each: qsub -q starnet -l nodes=3:ppn=2 batch.sh 3. OpenPBS does not support automatic restarts and check-pointing, so you will need to enable application-level check-pointing by STAR-PNP as follows: star -batch <options> -chktime=60 qsub -q starnet -l nodes=3:ppn=2 batch.sh Other useful OpenPBS commands: Show all my OpenPBS jobs qstat -u username Continuously monitor the output of job number 123 tail -f batch.sh.o123 Terminate job number 123 under OpenPBS qdel 123 Use the built-in GUI interface for submitting and monitoring jobs xpbs Please note that only the OpenPBS features of PBSPro and Torque are supported. Running under PBSPro using STAR-NET PBSPro is supported in OpenPBS compatibility mode. This means that only OpenPBS features are supported (see the description above). Running under SGE using STAR-NET To run STAR-PNP under Sun Grid Engine: 1. Create a batch.sh script by specifying the -batch option: star -batch <options> where <options> represents all the normal STAR-PNP ags for your job, as described in the sections above. Note that you cannot assign a node list for resource allocation in batch mode as this will be performed automatically by Sun Grid Engine. 2. Submit your job to a queue using the qsub command. For example:
H-12 Version 3.26

Appendix H

STAR RUN OPTIONS Batch Runs Using STAR-NET

(a) To submit to parallel environment starnet requesting 2 to 4 processors: qsub -pe starnet 2-4 batch.sh (b) To submit to a subset of queues:
qsub -pe starnet 2,4 -q queue1,queue2,queue3 -ckpt starnet batch.sh

3. Sun Grid Engine supports automatic restarts but not check-pointing, so you will need to enable application-level check-pointing by STAR-PNP as follows: star -batch <options> -chktime=60 qsub -pe starnet 2-4 -ckpt starnet batch.sh Please note that Sun Grid Engine versions earlier than 5.3 do not support automatic restarts when the master host fails. Other useful SGE commands: Show all my Sun Grid Engine jobs qstat -u username Continuously monitor the output of job number 123 tail -f batch.sh.o123 Terminate job number 123 under Sun Grid Engine qdel 123 Use the built-in GUI interface for submitting and monitoring jobs qmon Alternatively, command starnet can be used to display a brief summary of the current SGE status. Running under Torque using STAR-NET Torque is supported in OpenPBS compatibility mode. This means that only OpenPBS features are supported (see the description above).

Version 3.26

H-13

Appendix I

BIBLIOGRAPHY

Appendix I

BIBLIOGRAPHY
[1] [2] [3] [4] [5] Kee R.J., Rupley F.M. and Miller J.A. 1990. The Chemkin Thermodynamic Data Base, Sandia Report No. SAND87-8215B. CET89 Chemical Equilibrium with Transport Properties. 1989. NASA Lewis Research Center. Liepman H.W. and Roshko A. 1957. Elements of Gas Dynamics. John Wiley & Sons, New York. Shapiro A.H. 1953. The Dynamics and Thermodynamics of Compressible Fluid Flow Vol. 1 and Vol. 2. Ronald, New York. Gordon S. and McBride B. J. 1994. Computer Program for Calculation of Complex Chemical Equilibrium Compositions and Applications, Part I. Analysis, NASA Ref. Publ. 1311, NASA Lewis Research Center. McBride B. J. and Gordon S. 1996. Computer Program for Calculation of Complex Chemical Equilibrium Compositions and Applications, Part II. Users Manual and Program Description, NASA Ref. Publ. 1311, NASA Lewis Research Center. Harten, A., Lax, P.D. and Van Leer, B. 1983. On upstream differencing and Godunov-type schemes for hyperbolic conservation Laws, SIAM Rev., 25, pp. 35-61.

[6]

[7]

Version 3.26

I-1

INDEX

INDEX
Commands are listed at the end of each section

A
absorptivity 18-11 accuracy numerical 1-5, 4-7 temporal 1-16 view factor 11-6 adaptive mesh refinement. See mesh, adaptive refinement aeroacoustics 17-3 angular velocity 16-1, 16-8, 18-15 animation 2-33, 9-32 to 9-49 area cell face 4-11, 16-24 surface 4-26 aspect ratio cell 1-6 to 1-7 check 4-29 patch 11-6 atomisation models 13-1 axis coordinate 3-8 to 3-11 of rotation 3-39, 16-4 plot 5-5 axisymmetric flow 1-14 ABBREVIATE 20-1 ABSURFACE 16-24 ACOEFF 9-26 ACROSS 4-26 ANGLE 5-6 ANORM 8-2 AOPTION 9-38 to 9-39 AREA 4-26 AXISUP 5-3 AZONE 4-26

B
background fluid 17-3 baffle cells 3-38, 3-47 to 3-49, 4-23, 8-19 conducting 6-18 porous 7-24, 10-5 shapes 3-43 transparent 7-26 boundary condition attachment 7-38 baffle 7-23 to 7-27 check 1-21 cyclic 1-3, 1-14, 7-27 to 7-32 degassing 7-39 free-stream 1-14, 7-27, 7-32 to 7-33, 18-6 inlet 7-10 to 7-11, 18-5 non-reflective 1-14, 7-17, 18-6 outlet 1-13, 7-12 to 7-13, 18-6 prescribed flow 1-13 Version 3.26

pressure 1-14, 7-13 to 7-15, 18-6 radial equilibrium 7-13, 7-15 radiation 7-39 Riemann 1-14, 7-36, 18-6 stagnation 1-14, 7-15, 16-1, 16-4, 16-9, 18-6 subroutines 18-5 symmetry plane 7-27 table input 2-25 to 2-32 transient wave transmissive 1-14, 7-34 to 7-36, 18-6 wall 7-20 to 7-23, 18-6, 18-13 no-slip 6-12, 7-20 layer 6-14 turbulent 1-7, 1-9 location 7-1 to 7-2 value display 9-7 in load steps 8-6 to 8-8 visualisation 7-41 partial boundaries 4-20 buoyancy driven flow 1-15 to 1-17, 6-20, 7-14, 8-4 byte ordering 20-1 BATCH 2-18 BCROSS 7-3, 11-6 BDEFINE 7-2, 11-2 BDELETE 7-5 BDISPLAY 7-41, 11-2 BDX 7-2, 11-2 BGENERATE 7-2 BLIST 7-5 BLK 3-57 BLKCELL 3-57 BLKDELETE 3-58, 3-59 BLKEXECUTE 3-59 BLKFACTORS 3-59 BLKGENERATE 3-57 BLKLIST 3-59 BLKMODIFY 3-59 BLKPLOT 3-58, 5-16 BLKSET 2-25, 3-57, 3-59 BLKTRACE 3-64 BLKWALL 3-59 BMODIFY 7-3, 7-5, 11-6 BSET 2-25, 7-4, 7-5 BSHELL 7-3, 11-2 BWRITE 11-6

C
cavitation 15-5 to 15-7 cell attachment 16-19, 16-26 connectivity check 4-29 integral 4-5 regular 4-4 1

Index couples creation 4-11 to 4-13 indexing 4-11 manipulation 4-15 to 4-22 table 4-9 data 21-3 definition 3-1, 3-37 detachment 16-26, 16-32 distribution 3-56 face area 4-26 boundary 7-1, 7-2 master 4-5 matching 4-11, 7-29, 16-22 plotting 5-5 slave 4-5 index 6-3, 10-1 layer 10-5 addition 16-14 removal 8-19, 16-14 master 4-5 near-wall 6-12, 6-13, 6-14 orientation 3-45 to 3-46 plot 5-16 post data 9-7 set 2-21 to 2-25, 3-46 to 3-47, 5-2 shape 1-8, 3-40 to 3-43 size 1-7, 4-22 slave 4-5 surface 6-4 table 6-1 to 6-3, 10-1 trimmed 3-41, 3-44, 3-47, 3-51, 4-23, 4-30 near boundaries 6-10, 7-11, 7-14, 7-16, 7-22, 7-33, 7-35, 7-37, 7-39 type 3-37 type. See cell shape volume 4-27, 6-22 characteristic diffusivity 1-16 length 1-12, 19-2 time 1-16 velocity 1-16, 8-9 chemical reaction complex chemistry 12-6 conventions 12-12 local source 12-2, 12-10 PPDF multi-fuel 12-4, 12-13 PPDF single-fuel 12-3, 12-13 PPDF with dilutants 12-4 rate 18-14 regress variable 12-5, 12-10 source term 18-11 species 12-2, 12-5, 12-9 coal combustion 12-17 to 12-20 combustion EGR systems 12-11 partially premixed 12-1 2 compressibility 6-9 compressible flow Courant number 8-9 model setup 6-9 to 6-11 outlets 1-13 to 1-14 transient 7-34 concentration boundary values baffle 7-26 wall 7-21 conductivity 1-11, 12-11, 17-3, 18-6, 18-8, 21-20 conjugate heat transfer 1-3, 3-38, 6-16 to 6-19, 19-2 convergence 6-14, 19-1, 21-19 to 21-21 coordinate frame velocity 16-2, 16-4, 16-9 coordinate system Cartesian 3-8, 5-8 cell 3-46 cylindrical 3-9, 5-6 in attachment boundaries 7-38, 16-19, 16-27 in porous media 10-2 to 10-3 local 3-10 to 3-13, 5-8, 21-5 rotation 3-11 spherical 3-10 toroidal 3-10 Courant number 8-9, 15-4 CPU time 19-3 customisation of PROSTAR 2-18, 20-1 cyclic boundary pair. See boundary, condition, cyclic C 3-44 CASENAME 21-1 CAVERAGE 9-5, 9-24, 16-33 CAVITATION 18-11 CAVNUCLEI 18-11 CAVPROPERTY 18-12 CBEXTRUDE 3-7, 6-18, 6-19 CCOMPRESS 3-48 CCROSS 3-48, 6-4 CDELETE 3-48, 3-52, 16-34 CDIRECTION 3-19, 4-24 CDISPLAY 5-3, 7-41, 11-2, 13-5 CDIVIDE 4-24 CDSAVE 21-3, 21-4 CDSCALAR 17-3 CDTRANS 8-11, 21-4 CDX 3-44, 7-2 CENTER 3-21, 5-5 CFIND 3-48, 6-4 CFIX 4-29 CFLIP 4-28 CGENERATE 3-44, 16-20 CGGCELL 9-8 CGGVERTEX 9-8 CHANGE 9-24, 9-25 CHECK 4-28 CJOIN 4-24, 8-21 Version 3.26

Index CLEAR 5-3 CLIST 3-52 CLOCAL 3-11 CLOSE 21-11 CLRFILL 5-9 CLRLIST 5-9 CLRMODE 2-33 CLRPENS 5-9 CLRTABLE 5-9, 9-43 CMODIFY 3-45, 6-5 CMREFINE 4-25, 4-26 CMROPTION 4-26 CMUNREFINE 4-26 COKE 18-17 CONDUCTIVITY 18-6 CONJUGATEHEAT 6-19 COUNT 3-19, 3-29, 3-45, 3-57, 4-22, 7-3 CP 4-12 CPCELL 4-20 CPCHECK 4-19 CPCOMPRESS 4-9 CPCREATE 4-12 CPDELETE 4-9, 4-17 CPDISPLAY 4-9 CPFACE 4-22 CPFLAG 4-23 CPFREEZE 4-21 CPGENERATE 4-22 CPLIST 4-17 CPLOT 3-48, 5-16, 9-10, 9-38 CPMERGE 4-9 CPMODIFY 4-9, 4-17, 4-22 CPOST 8-11 CPRANGE 4-22, 8-11 CPREAD 4-15 CPRINT 8-11 CPSET 2-25, 4-15 to 4-17 CPTABLE 4-10 CPTDELETE 4-10 CPTLIST 4-10 CPTMODIFY 4-10 CPTNAME 4-10 CPTOLERANCE 4-13 CPTYPE 4-9, 4-12 CPWRITE 4-16 CREAD 3-50 CREFINE 4-23 to 4-24 CREORDER 3-53 CRMODEL 18-14 CRSE 4-24 CSCALE 5-10, 9-46 CSDEL 3-11 CSDIR 3-15 CSET 2-25, 3-47, 3-52, 4-17, 4-22, 5-16, 9-26, 9-28, 16-34 CSHELL 4-13 CSLIST 3-11 Version 3.26 CSPLINE 3-45 CSYS 3-11 CTABLE 6-2, 16-15, 16-28 CTCOMPRESS 3-48, 6-2, 6-4 CTDELETE 6-2 CTLIST 6-2 CTMODIFY 6-2 CTNAME 6-2 CTRIM 3-44 CTYPE 6-4 CUNDELETE 3-52 CURSORMODE 2-19 CVERTEX 4-28 CVREFLECT 3-45 CWRITE 3-51 CYCLIC 7-30 CYCOMPRESS 7-31 CYDELETE 7-31 CYGENERATE 7-30 CYLIST 7-31 CZONE 3-48, 6-4

D
data export 4-2 import 4-1 density PPDF scheme 12-4 reference 7-14 under-relaxation 1-17, 21-20 user subroutine 18-8 dependent variable initialisation 1-11, 7-41 monitoring 1-19 printout 19-3 differencing scheme 8-4 diffusion reaction system 12-1 diffusivity mass 18-8 molecular 18-8 porous 10-4 discretisation error 1-7, 1-22 higher-order 18-18 time 8-11 volume 1-3 dissipation length scale 18-9 distance normal 6-13, 6-14 normal dimensionless 1-9 vector 4-27 distributed resistance 10-1, 18-8, 19-2 drag coefficient 18-18 droplet 3

Index collision models 13-1, 18-12 plots 9-29 user subroutines 18-12 to 18-13 volume 13-10 DAGE 13-7, 13-8 DCOLLISION 18-12 DELTIME 18-17 DENSITY 18-8 DGENERATE 9-27, 16-26 DIFFUSIVITY 18-8 DISTANCE 5-5 DLIST 13-8 DPLOT 9-45 DRAVERAGE 18-12 DRCMPONENT 18-13 DRHEAT 18-12 DRMASS 18-13 DRMOMENTUM 18-13 DRPROPERTIES 18-13 DRPROPERTY 18-16 DRUSER 18-13 DRWALL 18-13 DSCHEME 18-18 DSET 2-25, 13-6, 13-8 DTIME 13-5, 13-7 regular sliding 16-19 expansion wave 7-32 EACOMPRESS 16-20 EADELETE 16-20 EAGENERATE 16-20 EALIST 16-20 EAMATCH 16-21, 16-32, 16-33 EASI 16-23 EATTACH 16-21, 16-32 ECHOINPUT 2-19 EDATA 8-3 EDCOMPRESS 16-30 EDDELETE 16-30 EDETACH 16-21, 16-32 EDGE 5-3 EDRAG 18-13 EECELL 16-32 to 16-33 EGRID 16-25, 16-26, 16-33 to 16-35 EHTRANSFER 18-14 EICELL 16-33, 16-32 EICOND 16-32, 18-16 EMSLIDE 16-22 ENSIGHT 4-1 EOSLIDE 16-23 EPSLIDE 16-23 ESSLIDE 16-23 ETURB 18-14 EVCHECK 16-34 EVCOMPRESS 16-12, 16-17, 16-20 EVDELETE 16-12, 16-17, 16-20, 16-31 EVEXECUTE 16-34 to 16-35 EVFILE 16-29 EVFLAG 16-34 EVGET 16-12, 16-17, 16-20, 16-31 EVLIST 16-12, 16-17, 16-20, 16-31 EVLOAD 16-34 to 16-35 EVOFFSET 16-12, 16-17, 16-20, 16-31 EVPARM 16-10 EVPREP 16-12, 16-17, 16-21, 16-31 EVREAD 16-12, 16-17, 16-21, 16-31 EVSAVE 16-23 EVSLIDE 16-22, 18-15 EVUNDELETE 16-12, 16-17, 16-20, 16-31 EVWRITE 16-12, 16-17, 16-21, 16-31

E
elapsed time 2-7, 19-3 emissivity 11-1, 11-4 escape boundaries 7-39 wall 7-21, 7-25 energy equation 6-19 source 1-10 to 1-11 engine data 13-9 enthalpy balance 19-5, 19-6 source 18-10 stagnation 6-11 temperature dependence 12-4, 18-7 transport 19-5 error estimation 8-15 to 8-17 numerical discretisation 1-7, 1-22 splitting 1-15 Eulerian multi-phase flow model setup 14-1 subroutine coding practices 18-22 user subroutines 18-13 Event steps arbitrary sliding 16-22 cell attachment 16-26 cell inclusion/exclusion 16-32 cell removal/addition 16-14 mixing vessels 16-24 moving mesh 16-9 4

F
flow axisymmetric 1-14 buoyancy driven 1-15, 6-20, 7-14, 8-4 compressible 1-17, 6-9 to 6-11, 7-15, 8-1 free surface 15-1 to 15-4 incompressible 7-15 inviscid 6-10, 7-20 non-Newtonian 6-11 prescribed 1-13 steady 1-12, 1-20, 6-9, 8-1 to 8-3 Version 3.26

Index subsonic 6-9, 6-10 supersonic 1-13, 6-9 transient 1-10, 8-4 to 8-15 compressible 1-14, 6-9, 7-34 transonic 1-13, 6-10 turbulent 1-17, 6-12 fluid background 17-3 injection 6-21 to 6-22, 18-10 mixture 17-1 non-Newtonian 6-11 properties 19-2 stream 12-2, 19-2 multiple 6-5, 7-12 flux heat 8-13, 18-6 mass 6-22, 8-13, 9-26, 18-6 radiation 19-5 solar 11-3 force body 1-11, 6-21 centrifugal 1-10 shear 8-13 total 9-26 free surface flow. See flow, free surface free-stream boundary 1-14, 7-8, 7-32 to 7-33 FLIST 3-45 FLUXSUM 9-5 FSTAT 2-24, 5-18, 21-11 FWRITE 3-45 GRAY 9-38 GZOOM 9-32

H
heat conductivity 12-11, 17-3, 21-20 generation 19-5 transfer check 19-5 coefficient 1-21, 6-17 conjugate. See conjugate heat transfer wall function 18-16 HCOEF 18-16 HEADING 9-16 HISTORY 2-19 to 2-21 HRSDUMP 2-34

I
ideal gas law 6-20, 12-4 ignition 12-10, 16-18, 18-14 initial conditions 1-11 to 1-12, 1-21, 19-4, 21-6 initialisation procedure built-in 8-1 in Lagrangian flow user coding 18-13 in moving meshes 18-16 steady-state run 7-41 transient run 7-42 injection fluid 6-22, 18-10 inlet boundary 6-9, 6-10, 7-8, 7-10 to 7-11 interface cell 4-3, 16-19 solid/fluid 6-18, 7-1 iterative calculation 1-20 steady-state solution procedure 1-10 IFILE 17-3, 21-2, 21-4, 21-10, 21-12 IGNMODEL 18-14 INITIALIZE 16-32, 18-16 INTEGRATE 9-26

G
gas ideal 6-9 law. See ideal gas law global rate of change. See rate of change, global gradient pressure 10-5 graphs creation 9-31 customization 9-31 data loading 9-30 gravity 1-10 GAMBIT 4-1 GENERIC 4-2 GEOMWRITE 16-12, 16-17, 16-21, 16-31, 21-5 GETBOUNDARY 9-21 GETCELL 9-21 GETUSERDATA 9-7 to 9-8, 9-22 GETVERT 9-21 GETWALL 9-22 GMAP 9-31 GPAN 9-32 GPARAM 9-31 GPICK 9-31 GPUT 9-31 Version 3.26

K
k- model low Reynolds number 1-9, 6-12 k-l model 1-9, 18-9 KNOCK 18-14

L
Lagrangian multi-phase flow model setup 13-1 static displays steady-state 13-5

Index transient 13-8 trajectory displays 13-8 user subroutines 18-12 with liquid films 17-6 liquid films gravitational effect 6-21 model setup no initialization 17-5 with initialization 17-5 to 17-7 stripping 17-7 user subroutines 18-16 load steps 8-6 to 8-9 local source scheme 12-1 LAYER 5-13 LFPROPERTY 18-16 LFSTRIP 18-16 LIGHT 5-11 LIVE 3-6, 4-21, 9-27 LMATERIAL 5-12 LOCAL 3-11 LSCOMPRESS 8-11 LSDELETE 8-11 LSGET 8-11 LSLIST 8-11 LSRANGE 8-11 LSSAVE 8-11 LSTEP 8-11, 18-17 LSWITCH 5-3, 5-11 LVISCOSITY 18-9 layered boundary-fitting 6-10, 7-11, 7-16, 7-22, 7-33, 7-35, 7-37, 7-39 moving 7-20, 10-5, 11-3, 11-5, 11-6, 16-9 to 16-14, 18-16 display 5-16 quality 4-29 to 4-31 refinement 3-53, 4-23 to 4-25, 8-17 to 8-19 sliding 16-19 to 16-26, 18-15 structured 4-24 tetrahedral 3-46, 4-25 unstructured 1-4, 1-7 visualisation colour setting 4-10, 5-9, 6-1 lighting effect 5-10, 6-1 mixing length model 6-14 mixing vessels 16-24 to 16-26 mixture fluid 17-1 fraction 12-2, 12-5, 12-11 momentum 6-10, 13-10, 18-13 equation 6-21 source 18-10 monitoring engineering data 7-40, 8-2 to 8-3, 8-14 field variables 2-7, 8-14, 8-20, 14-2, 15-2, 15-6, 16-6, 16-18, 16-29, 18-18, 19-2 to 19-4, 21-19 numerical solution 8-2, 8-5, 8-10, 21-9, 21-20 to 21-22 MACRO 20-9 MEMORY 21-14 MESH 3-5 MFRAME 18-15 MIXASI 16-24, 16-25 MIXVESSEL 16-24 to 16-26 MLIST 6-9 MONITOR 16-18, 16-29 MORTHO 4-22, 4-30 MULTISECTION 5-3 MVGRID 8-11, 16-9, 18-15, 18-16

M
Mach number 1-16, 6-9 to 6-10 mapping solution 8-17 mass conservation 12-3, 12-5 diffusivity 18-8 flow rate 7-30, 18-10 flux. See flux, mass in excluded cells 16-32 source 19-5 transfer coefficient 1-21, 18-16 droplet 18-13 memory allocation dynamic 21-13 mesh adaptive refinement 8-19 to 8-21 block 2-22, 3-53, 3-54, 4-3 checking macroscopic 4-26 microscopic 4-27 to 4-29 continuity 3-60 distortion 1-6 to 1-7 embedded 4-7 to 4-8 generation 3-3 to 3-8, 3-54, 3-60 6

N
near-wall cell 6-13, 6-14 layer (NWL) 1-9, 6-12, 6-14 NOx formation 12-16 NOx modelling 12-16 nozzle models 13-1 numerical discretisation error 1-7, 1-22, 8-15 to 8-17 instability 1-11 to 1-12, 1-16, 7-14 NFILE 9-36, 21-4 NOX 18-14 NPLOT 9-36 NUMBER 5-3

Version 3.26

Index

O
outflow boundary 1-13, 19-5 to 19-6 condition 7-10, 7-13 supersonic 6-10 outlet boundary 1-13, 6-9, 7-8, 7-12 to 7-13 OFILE 21-10 OPANEL 20-1, 20-6 OPERATE 9-21 to 9-22, 9-25 OVERLAY 5-3, 5-12, 9-34

P
particle tracking 9-28 to 9-29 patch radiation 11-2 to 11-3, 11-6, 19-5 surface 3-2, 3-27, 11-7 permeability function 1-11 PISO algorithm 1-15 to 1-17, 8-4, 8-9, 21-19, 21-20 plotting hard copy 21-22 mesh 5-3 to 5-16 mouse-controlled 5-15 results 9-9 to 9-13 speedup 5-16 to 5-17 view attributes 5-18 to 5-19 porous baffle 10-5 medium 3-38, 7-24, 16-13, 17-1 region 10-5 region modelling 7-23, 10-1 to 10-4 PPDF (presumed-pdf) scheme 12-1, 12-3 to 12-13 Prandtl number 12-11, 18-8, 18-17 pressure 1-11, 1-17, 6-9, 6-10, 7-6, 7-8, 9-28 boundary 7-8, 7-12, 7-13 to 7-15, 7-16, 16-2, 16-4, 16-9 correction 1-15 to 1-16, 1-18 drop 7-24, 7-31, 10-5 field 9-23 gradient 10-5 piezometric 7-13 prescribed 1-14 static 7-13 pseudo-transient calculation 1-12, 8-1 PAGE 2-19 PAN 5-3 PATCH 3-6, 11-7 PCROSS 9-5 PLARROW 5-8, 9-16 PLATTACH 16-34 to 16-35 PLAYBACK 9-36 PLDISPLAY 5-3, 5-7 PLFACE 5-3 PLFIX 5-6 PLIST 9-5 Version 3.26

PLLABEL 5-8, 9-16, 9-40 PLLOCALCOOR 3-11, 5-8 PLMESH 5-3, 5-5 PLRECALL 5-19 PLSAVE 5-19 PLTBACK 2-34 PLTYPE 5-3, 9-10 PMAP 9-27 to 9-28 POPTION 9-10, 9-16 POREFF 18-8 POROSITY 18-8 PORTURBULENCE 18-8 PRESSURE 16-18, 16-29 PRFIELD 18-18 PRINT 9-25 PROBLEMWRITE 16-12, 16-17, 16-21, 16-31, 21-6 PROMPT 20-7 PRTEMP 6-18 PSCREATE 5-7, 9-10, 9-27, 9-44 PSDELETE 5-7, 9-10, 9-44 PSTAR 21-7 PTCONV 21-9 PTOPTION 9-30 PTPRINT 9-29, 13-7, 13-8 PTREAD 9-29, 9-41, 9-45, 13-7 PTVERTS 9-29

Q
QUIT 2-21 QDRAW 5-17

R
radiation ?? to 11-8, 19-2, 21-20 analysis methods discrete ordinates 11-3 discrete transfer 11-1 coal particles 11-5, 12-19, C-3 flux 19-5 patch 11-2 to 11-3, 11-4, 11-7 property 7-21, 7-25, 18-11 solar 7-21, 7-26, 11-1, 19-5 sub-domains 11-8 thermal 7-21, 7-25, 7-26, 11-1, 18-10, 19-5 transparent baffles 7-26 solids 3-39, 11-4 walls 7-21 rate of strain tensor 6-11 rate of change global 1-20, 8-5, 8-10, 19-3, 21-20 reference density 6-21 temperature 8-19, 16-26, 19-2 reflectivity 7-21, 11-1, 11-2, 11-4 7

Index regress variable models 12-5 regress variable scheme 12-1 residual sum normalised 2-6, 21-20 resistance distributed 10-1, 18-8, 19-2 restart aeroacoustic analysis 17-4 coal combustion 12-20 data 8-3, 8-5, 8-13 files 2-7, 21-6 flamelet calculations 12-14 in error estimates 8-15 in mesh changes 8-17, 8-20 mode 2-13 moving mesh 16-14 multiple runs 8-15 NR boundaries 7-19 run options H-2 steady-state runs 7-42, 8-3 transient runs 7-42, 8-6, 8-10, 8-14 turbulence models 6-15 view factors 11-3, 11-5 with INITFI 18-16 rotating reference frames multiple explicit method 16-5 to 16-9 implicit method 16-2 to 16-5 single 16-1 RADPROPERTIES 18-11 RANGE 4-27 RCALCULATE 9-31 RDEFINE 16-19, 16-27, 18-5, 18-6 RECALL 2-21 RECOVER 2-21, 4-15 RECRD 9-36 REEXTRUDE 3-7 RENDEROPT 5-15 REPLOT 5-16, 9-38, 20-3 REPROJECT 3-18 RESET 2-33 RESTRUCTURE 3-19, 3-53 RESUME 21-3, 21-10 REWIND 21-11 RGENERATE 7-8 ROTATE 5-6, 9-43 RRATE 18-14 RSOURCE 18-10 RSTATUS 12-11 Schmidt number 10-4, 12-11, 17-1, 18-8, 18-17 sensor point 3-16, 9-26 shear force. See force, shear shell 3-2, 3-5, 3-38, 3-47 to 3-48, 9-27 in block meshing 3-60 to 3-64 shock wave 7-32 SIMPISO algorithm 1-18 SIMPLE algorithm 1-17 to 1-18 sliding interface 16-22 mesh 16-19 solar radiation. See radiation, solar solid region 19-2 solution domain 1-2 to 1-4, 1-9 solver conjugate gradient 1-19 soot modelling 12-17 source enthalpy 6-9, 18-10 heat 19-5 mass 6-8, 18-10, 19-5 momentum 6-8, 18-10 scalar 17-2, 18-11 turbulence 6-9, 18-10 species mass fraction 12-4, 18-15 specific heat 12-11, 12-13, 18-9, 19-2 spin index 3-47, 6-1, 16-3, 16-26 parameters 16-1, 16-4 to 16-8 spline 3-2, 3-27 to 3-37 display 5-16 in block meshing 3-64 set 2-22, 3-20, 5-2 stability numerical 1-5, 1-12 stagnation boundary 1-14, 7-8, 7-15 to 7-16 STAR-Launch utility 2-8 to 2-12 StarWatch utility 21-15 to 21-22 strain rate tensor 6-11 surface cell 3-50, 6-4 data 3-60, 4-1 free 7-8, 9-11 plot data 5-17 radiation properties 7-21 symmetry axis 3-16, 9-27 plane 1-14, 7-27, 9-27 SAFETY 2-21, 3-22 SAVE 5-16, 21-2 SAVUSERDATA 9-9 SC 17-3 SCCONTROL 17-3 SCDUMP 2-34, 9-34 SCENEE 21-24 SCLOCATE 5-8 Version 3.26

S
scalar plotting 9-7, 9-10 to 9-11 printing 8-13, 17-2 transport equation 12-2, 12-5 variable 12-4, 12-11, 17-3 8

Index SCPOROUS 18-8 SCPROPERTIES 17-3, 18-15, 18-17 SCRDELETE 2-33, 9-47 SCRIN 2-33, 9-36 to 9-37, 9-47 SCROUT 2-33, 9-36, 9-47 SCSOURCE 18-11 SCTRANS 8-11, 17-2 SECSCALE 5-7 SENSOR 9-26 SETADD 2-24 SETDELETE 2-23 SETENV 20-6 SETFEATURE 20-1 SETREAD 2-24 SETWRITE 2-23 SHREFINE 4-26 SHRINK 5-3 SIZE 2-19 SMAP 8-17 to 8-18 SMCONV 21-9 SNORM 9-44 SNORMAL 5-4, 5-6 SOLAR 18-11 SORT 4-28 SPCHECK 3-31, 3-35 SPCOMPRESS 3-31 SPECIFICHEAT 18-7, 18-9 SPIN 18-15 SPL 3-28, 3-64 SPLCROSS 3-31 SPLDELETE 3-31, 3-34 SPLGENERATE 3-29 SPLLIST 3-34 SPLMODIFY 3-31, 3-34 SPLOT 3-31, 5-16 SPLREAD 3-33 SPLSET 2-25, 3-30 to 3-34 SPLUNDELETE 3-34 SPLWRITE 3-33 SPOINT 5-6, 5-7, 9-44 SPRINT 9-26 SPVCOMPRESS 3-35 SRFDELETE 5-17 SRFREAD 5-18 SRFWRITE 5-17 STABLE 3-28 STDELETE 3-28 STENSION 18-12 STLIST 3-28 STYPE 3-28 SUBTITLE 9-16 SUMMARIZE 9-26 SURFACE 5-3 SYSTEM 2-19

T
tables editor 2-27 to 2-32 usage in boundary conditions 2-25, 7-8 initial conditions 2-25 injectors and sprays 2-27 rotational speeds 2-26 run-time controls 2-26 source terms 2-25 temperature boundary 7-35, 7-37 bulk mean 7-30 display 9-11 distribution 6-18 functional dependence 18-7, 18-9 radiation 11-2, 11-4 reference 8-19, 19-2 stagnation 6-11 under-relaxation 12-11, 21-20 thermal resistance 6-17, 7-21 runaway 1-11 time scale 8-9 heat/mass transfer 12-20 step 1-12, 1-16, 8-6, 19-1 specification 8-12 varying 18-17, 21-19 tool block 3-57 cell 3-47 check 4-28 colour table 5-9 couple 4-8 mesh 3-60 to 3-64 spline 3-28, 3-30 vertex 3-20 transient calculation 1-15 to 1-16, 2-7, 6-11 full 8-6 to 8-14 single 8-4 to 8-6 transient wave boundary 1-14, 7-8, 7-34 to 7-36 transmissivity 7-21, 11-1, 11-2 turbulence boundary conditions 16-2, 16-4, 16-9 dissipation 19-5 length scale 18-9 models 1-9, 6-8, 6-12, 19-2 two-dimensional flow axisymmetric 1-14 two-layer model 6-12 to 6-14, 18-9 two-phase flow Lagrangian 13-1 TBDEFINE 2-29 TBGRAPH 2-29 TBLIST 2-31 9

Version 3.26

Index TBMODIFY 2-31 TBREAD 2-27, 2-31 TBSCAN 2-32 TBWRITE 2-29 TDSCHEME 8-11 TERMINAL 2-32, 9-16, 9-35, 9-36, 21-4 TETALIGN 3-46 TETREFINE 4-25 TEXT 2-19 TGRID 4-1 TICMARK 5-8 TIME 18-17 TITLE 2-20 TLMODEL 18-9 TMSTAMP 9-39 TPLOT 5-16 TPRINT 2-19 TRFILE 8-11, 8-14, 21-4 TRINTERPOLATE 9-5, 9-46 TRUNCATE 9-5 TSCALE 2-33, 5-5, 5-8 TSMAP 8-18 TSTAR 21-7 TURBULENCE 18-9 coordinate 3-1, 3-26, 20-5 in moving mesh 8-15, 16-9, 16-23 data 21-3, 21-9 set 2-22 view factor 11-3, 11-5, 11-6 viscosity effective 1-17 molecular 18-9 turbulent 18-9, 21-20 volume droplet 13-10 mesh 4-27 V 3-14, 3-24 VADJANGLE 4-30 VAPORIZATION 18-12 VAVERAGE 9-5 VC3DGEN 3-13 VCELL 3-16 VCENTER 3-16 VCEXTRUDE 3-6 VCOMPRESS 3-21, 3-26 VCROSS 3-21 VDELETE 3-21, 3-24 VDISTANCE 4-27 VELLIPTIC 4-30 VEQUAL 3-17 VESCALE 9-46 VFILL 3-15, 3-26 VGAP 3-19 VGENERATE 3-14, 3-26, 3-44 VIEW 5-6 VINTERSECT 3-16, 3-29, 3-45 VLIST 3-21, 3-24 VLOCAL 3-11 VMAP 3-21 VMERGE 3-25, 3-60 VMODIFY 3-24 VMOVE 3-17 VOLUME 4-27, 6-22 VPLOT 3-21, 5-16, 9-10 VPROJECT 3-18 VREAD 3-23 VREFLECT 3-16, 3-44, 3-45 VRENUMBER 3-19 VREPLACE 3-19 VRML 4-2 VSCALE 3-18, 3-27 VSECTION 3-16, 3-29, 3-45, 5-7, 9-10 VSET 2-25, 3-20, 3-24 VSMOOTH 4-30 VSPCROSS 3-31, 3-36 VSPDEFINE 3-36 VSPFILL 3-36 VSPGENERATE 3-36 VSPLIST 3-37 VSPMOVE 3-36 VSPPROJECT 3-37 Version 3.26

U
under-relaxation 1-12, 1-17, 2-8, 6-20, 6-21 concentration 17-2 mesh smoothing 4-31 varying 21-20 unsteady calculation 1-15 ULOAD 9-7 UNITS 9-24 UNSKEW 4-30 UNWARP 4-30 to 4-31 UPDATE 9-25 USER 2-19 USUBROUTINE 18-3

V
variable field 8-14, 18-5 velocity angular 18-15 boundary values 7-28 characteristic 1-16, 8-9 component 10-5 initial 1-12, 7-16 injection 6-22, 18-10 interpolation 9-26 magnitude 9-23, 10-5 solver residual 21-20 vector display 9-12, 9-23 vertex cell 18-15 10

Index VSTYLE 5-3 VTRANS 3-18 VUNDO 3-21 VVERTEX 3-16 VWRITE 3-23

W
wall boundary 7-8, 7-20 to 7-23 boundary layer 1-7 functions 1-9, 6-12, 18-6 heat flux 8-5, 8-13, 18-16 patch 11-2 to 11-3 permeable 3-38 wave shock 7-32 theory 7-33, 7-34 WHOLE 2-33 WINDOW 5-3 WIPEOUT 21-14 WPLOT 5-16, 9-10, 9-38 WPOST 8-11 WPRINT 8-11

Z
ZOOM 5-3, 5-16

Version 3.26

11

Index

12

Version 3.26

Você também pode gostar