asdf

download asdf

If you can't read please download the document

description

asdf

Transcript of asdf

CCM USER GUIDESTAR-CD VERSION 4.02

CONFIDENTIAL FOR AUTHORISED USERS ONLY

2006 CD-adapco

TABLE OF CONTENTSOVERVIEW 1 COMPUTATIONAL ANALYSIS 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-5 Mesh distribution and density ......................................................................... 1-6 Mesh distribution near walls ........................................................................... 1-7 Moving mesh features ..................................................................................... 1-8 Problem characterisation and material property definition ....................................... 1-8 Nature of the flow ............................................................................................ 1-9 Physical properties ........................................................................................... 1-9 Force fields and energy sources ...................................................................... 1-9 Initial conditions ............................................................................................ 1-10 Boundary description .............................................................................................. 1-10 Boundary location ......................................................................................... 1-11 Boundary conditions ...................................................................................... 1-11 Numerical solution control ..................................................................................... 1-13 Selection of solution procedure ..................................................................... 1-13 Transient flow calculations with PISO .......................................................... 1-13 Steady-state flow calculations with PISO ..................................................... 1-15 Steady-state flow calculations with SIMPLE ................................................ 1-16 Transient flow calculations with SIMPLE .................................................... 1-17 Effect of round-off errors .............................................................................. 1-18 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 STAR-CD 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-15i

2

Version 4.02

3

The menu bar .................................................................................................2-16 General Housekeeping and Session Control ...........................................................2-18 Basic set-up ....................................................................................................2-18 Screen display control ....................................................................................2-18 Error messages ...............................................................................................2-19 Error recovery ................................................................................................2-20 Session termination ........................................................................................2-21 Set Manipulation .....................................................................................................2-21 Table Manipulation .................................................................................................2-24 Basic functionality .........................................................................................2-24 The table editor ..............................................................................................2-26 Useful points ..................................................................................................2-31 Plotting Functions ....................................................................................................2-31 Basic set-up ....................................................................................................2-31 Advanced screen control ................................................................................2-32 Screen capture ................................................................................................2-33 The Users Tool ........................................................................................................2-35 Getting On-line Help ...............................................................................................2-35 The STAR GUIde Environment ..............................................................................2-38 Panel navigation system .................................................................................2-40 STAR GUIde usage .......................................................................................2-41 General Guidelines ..................................................................................................2-41 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION Introduction ...............................................................................................................3-1 The Cell Table ...........................................................................................................3-1 Cell indexing ....................................................................................................3-3 Multi-Domain Property Setting .................................................................................3-5 Setting up models .............................................................................................3-6 Compressible Flow ....................................................................................................3-9 Setting up compressible flow models ..............................................................3-9 Useful points on compressible flow ...............................................................3-10 Non-Newtonian Flow ..............................................................................................3-11 Setting up non-Newtonian models .................................................................3-11 Useful points on non-Newtonian flow ...........................................................3-11 Turbulence Modelling .............................................................................................3-12 Wall functions ................................................................................................3-13 Two-layer models ..........................................................................................3-13 Low Re models ..............................................................................................3-14 Hybrid wall boundary condition ....................................................................3-14

ii

Version 4.02

4

Reynolds Stress models ................................................................................. 3-15 DES models ................................................................................................... 3-15 LES models ................................................................................................... 3-15 Changing the turbulence model in use .......................................................... 3-16 Heat Transfer In Solid-Fluid Systems ..................................................................... 3-16 Setting up solid-fluid heat transfer models .................................................... 3-17 Heat transfer in baffles .................................................................................. 3-18 Useful points on solid-fluid heat transfer ...................................................... 3-19 Buoyancy-driven Flows and Natural Convection ................................................... 3-20 Setting up buoyancy-driven models .............................................................. 3-20 Useful points on buoyancy-driven flow ........................................................ 3-20 Fluid Injection ......................................................................................................... 3-21 Setting up fluid injection models ................................................................... 3-22 BOUNDARY AND INITIAL CONDITIONS Introduction ............................................................................................................... 4-1 Boundary Location .................................................................................................... 4-1 Command-driven facilities .............................................................................. 4-2 Boundary set selection facilities ...................................................................... 4-3 Boundary listing .............................................................................................. 4-3 Boundary Region Definition ..................................................................................... 4-5 Inlet Boundaries ........................................................................................................ 4-9 Introduction ..................................................................................................... 4-9 Useful points .................................................................................................. 4-10 Outlet Boundaries ................................................................................................... 4-11 Introduction ................................................................................................... 4-11 Useful points .................................................................................................. 4-12 Pressure Boundaries ................................................................................................ 4-12 Introduction ................................................................................................... 4-12 Useful points .................................................................................................. 4-13 Stagnation Boundaries ............................................................................................ 4-14 Introduction ................................................................................................... 4-14 Useful points .................................................................................................. 4-15 Non-reflective Pressure and Stagnation Boundaries ............................................... 4-16 Introduction ................................................................................................... 4-16 Useful points .................................................................................................. 4-18 Wall Boundaries ...................................................................................................... 4-19 Introduction ................................................................................................... 4-19 Thermal radiation properties ......................................................................... 4-20 Solar radiation properties .............................................................................. 4-20iii

Version 4.02

5

Other radiation modelling considerations ......................................................4-21 Useful points ..................................................................................................4-22 Baffle Boundaries ....................................................................................................4-23 Introduction ....................................................................................................4-23 Setting up models ...........................................................................................4-24 Thermal radiation properties ..........................................................................4-25 Solar radiation properties ...............................................................................4-26 Other radiation modelling considerations ......................................................4-26 Useful points ..................................................................................................4-27 Symmetry Plane Boundaries ...................................................................................4-27 Cyclic Boundaries ...................................................................................................4-27 Introduction ....................................................................................................4-27 Setting up models ...........................................................................................4-28 Useful points ..................................................................................................4-30 Cyclic set manipulation ..................................................................................4-31 Free-stream Transmissive Boundaries ....................................................................4-32 Introduction ....................................................................................................4-32 Useful points ..................................................................................................4-33 Transient-wave Transmissive Boundaries ...............................................................4-34 Introduction ....................................................................................................4-34 Useful points ..................................................................................................4-35 Riemann Boundaries ...............................................................................................4-36 Introduction ....................................................................................................4-36 Useful points ..................................................................................................4-37 Attachment Boundaries ...........................................................................................4-38 Useful points ..................................................................................................4-39 Radiation Boundaries ..............................................................................................4-39 Useful points ..................................................................................................4-40 Phase-Escape (Degassing) Boundaries ...................................................................4-40 Monitoring Regions .................................................................................................4-40 Boundary Visualisation ...........................................................................................4-41 Solution Domain Initialisation ................................................................................4-42 Steady-state problems ....................................................................................4-42 Transient problems .........................................................................................4-42 CONTROL FUNCTIONS Introduction ...............................................................................................................5-1 Analysis Controls for Steady-State Problems ...........................................................5-1 Analysis Controls for Transient Problems ................................................................5-4 Default (single-transient) solution mode .........................................................5-4Version 4.02

iv

6

7

8

Load-step based solution mode ....................................................................... 5-6 Load step characteristics .................................................................................. 5-6 Load step definition ......................................................................................... 5-8 Solution procedure outline .............................................................................. 5-9 Other transient functions ............................................................................... 5-14 Solution Control with Mesh Changes ..................................................................... 5-15 Mesh-changing procedure ............................................................................. 5-15 Solution-Adapted Mesh Changes ........................................................................... 5-17 POROUS MEDIA FLOW Setting Up Porous Media Models ............................................................................. 6-1 Useful Points ............................................................................................................. 6-4 THERMAL AND SOLAR RADIATION Radiation Modelling for Surface Exchanges ............................................................ 7-1 Radiation Modelling for Participating Media ........................................................... 7-3 Capabilities and Limitations of the DTRM Method ................................................. 7-5 Capabilities and Limitations of the DORM Method ................................................. 7-7 Radiation Sub-domains ............................................................................................. 7-8 CHEMICAL REACTION AND COMBUSTION Introduction ............................................................................................................... 8-1 Local Source Models ................................................................................................ 8-2 Presumed Probability Density Function (PPDF) Models ......................................... 8-3 Single-fuel PPDF ............................................................................................. 8-3 Multiple-fuel PPDF ......................................................................................... 8-9 Regress Variable Models ........................................................................................ 8-10 Complex Chemistry Models ................................................................................... 8-11 Setting Up Chemical Reaction Schemes ................................................................. 8-14 Useful general points for local source and regress variable schemes ........... 8-16 Chemical Reaction Conventions ................................................................... 8-18 Useful points for PPDF schemes ................................................................... 8-18 Useful points for complex chemistry models ................................................ 8-21 Useful points for ignition models .................................................................. 8-21 Setting Up Advanced I.C. Engine Models .............................................................. 8-22 Coherent Flame model (CFM) ...................................................................... 8-24 Extended Coherent Flame model (ECFM) .................................................... 8-26 Extended Coherent Flame model 3Z (ECFM-3Z) spark ignition ............ 8-28 Extended Coherent Flame model 3Z (ECFM-3Z) compression ignition . 8-29 Useful points for ECFM models .................................................................... 8-30 Level Set model ............................................................................................. 8-31 Write Data sub-panel ..................................................................................... 8-32v

Version 4.02

9

The Arc and Kernel Tracking ignition model (AKTIM) ...............................8-33 Useful points for the AKTIM model .............................................................8-35 The Double-Delay autoignition model ..........................................................8-37 NOx Modelling ........................................................................................................8-39 Soot Modelling ........................................................................................................8-39 Coal Combustion Modelling ...................................................................................8-41 Stage 1 ............................................................................................................8-41 Stage 2 ............................................................................................................8-42 Useful notes ...................................................................................................8-44 Switches and constants for coal modelling ....................................................8-45 Special settings for the Mixed-is-Burnt and Eddy Break-Up models ............8-46 LAGRANGIAN MULTI-PHASE FLOW

Setting Up Lagrangian Multi-Phase Models .............................................................9-1 Data Post-Processing .................................................................................................9-4 Static displays ..................................................................................................9-5 Trajectory displays ...........................................................................................9-8 Engine Combustion Data Files ..................................................................................9-9 Useful Points ...........................................................................................................9-10 10 EULERIAN MULTI-PHASE FLOW Introduction .............................................................................................................10-1 Setting up multi-phase models ................................................................................10-1 Useful points on Eulerian multi-phase flow ..................................................10-4 11 FREE SURFACE AND CAVITATION Free Surface Flows ..................................................................................................11-1 Setting up free surface cases ..........................................................................11-1 Cavitating Flows ......................................................................................................11-5 Setting up cavitation cases .............................................................................11-5 12 ROTATING AND MOVING MESHES Rotating Reference Frames .....................................................................................12-1 Models for a single rotating reference frame .................................................12-1 Useful points on single rotating frame problems ...........................................12-1 Models for multiple rotating reference frames (implicit treatment) ..............12-2 Useful points on multiple implicit rotating frame problems ..........................12-4 Models for multiple rotating reference frames (explicit treatment) ...............12-5 Useful points on multiple explicit rotating frame problems ..........................12-8 Moving Meshes .......................................................................................................12-9 Basic concepts ................................................................................................12-9 Setting up models .........................................................................................12-10 Useful points ................................................................................................12-13vi Version 4.02

Automatic Event Generation for Moving Piston Problems ......................... 12-13 Cell-layer Removal/Addition ................................................................................ 12-14 Basic concepts ............................................................................................. 12-14 Setting up models ........................................................................................ 12-15 Useful points ................................................................................................ 12-18 Sliding Meshes ...................................................................................................... 12-18 Regular sliding interfaces ............................................................................ 12-18 Cell Attachment and Change of Fluid Type ......................................................... 12-22 Basic concepts ............................................................................................. 12-22 Setting up models ........................................................................................ 12-23 Useful points ................................................................................................ 12-27 Mesh Region Exclusion ........................................................................................ 12-28 Basic concepts ............................................................................................. 12-28 Moving Mesh Pre- and Post-processing ............................................................... 12-28 Introduction ................................................................................................. 12-28 Action commands ........................................................................................ 12-29 Status setting commands ............................................................................. 12-30 13 OTHER PROBLEM TYPES Multi-component Mixing ........................................................................................ 13-1 Setting up multi-component models .............................................................. 13-1 Useful points on multi-component mixing .................................................... 13-3 Aeroacoustic Analysis ............................................................................................ 13-3 Setting up aeroacoustic models ..................................................................... 13-3 Useful points on aeroacoustic analyses ......................................................... 13-4 Liquid Films ............................................................................................................ 13-5 Setting up liquid film models ........................................................................ 13-5 Film stripping ................................................................................................ 13-7 14 USER PROGRAMMING Introduction ............................................................................................................. 14-1 Subroutine Usage .................................................................................................... 14-1 Useful points .................................................................................................. 14-4 Description of UFILE Routines .............................................................................. 14-5 Boundary condition subroutines .................................................................... 14-5 Material property subroutines ........................................................................ 14-6 Turbulence modelling subroutines ................................................................ 14-9 Source subroutines ....................................................................................... 14-10 Radiation modelling subroutines ................................................................. 14-11 Free surface / cavitation subroutines ........................................................... 14-11 Lagrangian multi-phase subroutines ............................................................ 14-12Version 4.02 vii

Liquid film subroutines ................................................................................14-14 Eulerian multi-phase subroutines .................................................................14-14 Chemical reaction subroutines .....................................................................14-15 Rotating reference frame subroutines ..........................................................14-16 Moving mesh subroutines ............................................................................14-16 Miscellaneous flow characterisation subroutines ........................................14-17 Solution control subroutines ........................................................................14-18 Sample Listing .......................................................................................................14-19 New Coding Practices ...........................................................................................14-20 User Coding in parallel runs ..................................................................................14-22 15 PROGRAM OUTPUT Introduction .............................................................................................................15-1 Permanent Output ....................................................................................................15-1 Input-data summary .......................................................................................15-1 Run-time output .............................................................................................15-3 Printout of Field Values ..........................................................................................15-3 Optional Output .......................................................................................................15-3 Example Output .......................................................................................................15-4 16 pro-STAR CUSTOMISATION Set-up Files ..............................................................................................................16-1 Panels .......................................................................................................................16-2 Panel creation .................................................................................................16-2 Panel definition files ......................................................................................16-5 Panel manipulation .........................................................................................16-6 Macros .....................................................................................................................16-6 Function Keys ..........................................................................................................16-9 17 OTHER STAR-CD FEATURES AND CONTROLS Introduction .............................................................................................................17-1 File Handling ...........................................................................................................17-1 Naming conventions ......................................................................................17-1 Commonly used files .....................................................................................17-1 File relationships ............................................................................................17-7 File manipulation ...........................................................................................17-9 Special pro-STAR Features ...................................................................................17-12 pro-STAR environment variables ................................................................17-12 Resizing pro-STAR ......................................................................................17-13 Special pro-STAR executables ....................................................................17-14 Use of temporary files by pro-STAR ...........................................................17-14 The StarWatch Utility ...........................................................................................17-15viii Version 4.02

Running StarWatch ..................................................................................... 17-15 Choosing the monitored values ................................................................... 17-17 Controlling STAR ....................................................................................... 17-17 Manipulating the StarWatch display ........................................................... 17-20 Monitoring another job ................................................................................ 17-21 Hard Copy Production .......................................................................................... 17-21 Neutral plot file production and use ............................................................ 17-21 Scene file production and use ...................................................................... 17-23

APPENDICESA 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 FILE TYPES AND THEIR USAGE C PROGRAM UNITS D pro-STAR X-RESOURCES E USER INTERFACE TO MESSAGE PASSING ROUTINES F STAR RUN OPTIONS Usage .........................................................................................................................F-1 Options ......................................................................................................................F-1 Parallel Options .........................................................................................................F-3 Resource Allocation ..................................................................................................F-6 Default Options .........................................................................................................F-7 Cluster Computing ....................................................................................................F-8 Batch Runs Using STAR-NET .................................................................................F-8 Running under IBM Loadleveler using STAR-NET .......................................F-8 Running under LSF using STAR-NET ...........................................................F-9 Running under OpenPBS using STAR-NET ................................................F-10 Running under PBSPro using STAR-NET ....................................................F-11 Running under SGE using STAR-NET .........................................................F-11 Running under Torque using STAR-NET .....................................................F-12 G BIBLIOGRAPHY

INDEX INDEX OF COMMANDS

Version 4.02

ix

OVERVIEWPurposeThe Methodology volume presents the mathematical modelling practices embodied in the STAR-CD system 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.

ContentsChapter 1 introduces some of the fundamental principles of computational continuum mechanics, 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 5 provide the reader with detailed instructions on how to use some of the basic code facilities, e.g. boundary condition specification, material property definition, etc., and an overview of the GUI panels appropriate to each of them. The description covers all facilities (other than mesh generation) that might be employed for modelling most common continuum mechanics problems. Mesh generation itself is covered in a separate volume, the Meshing User Guide. Chapters 2 to 5 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 6 to 13 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 14 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 15 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 16 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 17 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 4.02 1

Chapter 1

COMPUTATIONAL ANALYSIS PRINCIPLES Introduction

Chapter 1

COMPUTATIONAL ANALYSIS PRINCIPLESThe aim of this section is to introduce the most important issues involved in setting up and solving a continuum mechanics problem using a computational continuum mechanics 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 mechanics simulation does not usually start with the direct use of such a 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 continuum mechanics simulation depends not only on the code capabilities, but also upon the input data, such as: Geometry of the solution domain Continuum 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 computational continuum mechanics (CCM) modelling are as follows: Pose the problem in physical terms. Establish the amount of information available and its sufciency and validity. Assess the capabilities and features of the STAR-CD 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 ProcessThe 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/deformation 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.).1-1

Version 4.02

COMPUTATIONAL ANALYSIS 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 model using pro-STAR The main tasks involved at this phase are: Creating a computational mesh to represent the solution domain (i.e. the model geometry). Specifying the physical 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 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 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 discretisationOne of the basic steps in preparing a STAR-CD 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 solution domain. The subdivision of the solution domain into a mesh of discrete, nite, contiguous volume elements or cells, as shown in Figure 1-1.

1-2

Version 4.02

Chapter 1

COMPUTATIONAL ANALYSIS PRINCIPLES Spatial description and volume discretisation

Figure 1-1

Example of solution 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 A solid undergoing mechanical deformation

Arbitrary combinations of the above conditions can also be specified within the same model, as in problems involving fluid-solid heat transfer. 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 physically conne a uid ow 2. Symmetry boundaries axes or planes beyond which the problem solution becomes a mirror image of itself 3. Cyclic boundaries surfaces beyond which the problem solution 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 problem in greater detail than would have been the case otherwise.Version 4.02 1-3

COMPUTATIONAL ANALYSIS PRINCIPLES Spatial description and volume discretisation

Chapter 1

4. Notional boundaries these are non-physical surfaces that serve to 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/deformation conditions are known (b) Flow/deformation conditions can be guessed reasonably well (c) The boundary is far enough away from the region of interest 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-10. 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 STAR-CD model. This process is greatly facilitated by STAR-CD because of its ability to generate cells of an arbitrary, polyhedral shape. 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-2. These errors diminish as the mesh is rened.

triangular facet

Figure 1-2

Boundary representation by triangular facets

2. The internal characteristics of the ow/deformation regime. This is achieved by careful control of mesh spacing within the solution domain interior so that1-4 Version 4.02

Chapter 1

COMPUTATIONAL ANALYSIS PRINCIPLES Spatial description and volume discretisation

the mesh is nest where the problem characteristics change most rapidly. 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-7. 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-5). 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 employs the minimum number of cells, exhibits the least amount of distortion, is consistent with the accuracy requirements.

Chapter 2 of the Meshing User Guide 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 computational fluid and solid mechanics 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-3.

b

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

Figure 1-3

Cell shape characteristics

When setting up the mesh, the user should try to observe the following guidelines: Version 4.02

Aspect Ratio values close to unity are preferable, but departures from this1-5

COMPUTATIONAL ANALYSIS PRINCIPLES Spatial description and volume discretisation

Chapter 1

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 values, as discussed in Chapter 3, Mesh and Geometry Checking of the Meshing User Guide. 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 STAR-CDs unstructured polyhedral meshes facilitates such selective refinement. An illustration of some of the numerous cell shapes that may be employed is given in Figure 2-43 and Figure 2-44 of the Meshing User Guide.1-6 Version 4.02

Chapter 1

COMPUTATIONAL ANALYSIS PRINCIPLES Spatial description and volume discretisation

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

Mesh distribution near walls As discussed in Chapter 6, Wall Boundary Conditions 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-4(a).

Outer region

y (a) Wall function model

Inner region

(b) Two-layer or Low Re models

Figure 1-4

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. Note that the above considerations apply to Reynolds Stress models as well as several classes of eddy viscosity model (see Chapter 3, Turbulence Modelling). Alternative treatments that do not require the use of wall functions are also available. These are:Version 4.02 1-7

COMPUTATIONAL ANALYSIS PRINCIPLES Problem characterisation and material property denition

Chapter 1

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 (including the V2F model), 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-4(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. 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 12-14 and Sliding Meshes on page 12-18; hence they are not repeated here.

Problem characterisation and material property denitionCorrect definition of the physical 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: 1-8

The nature of the uid ow (e.g. steady/unsteady, laminar/turbulent, incompressible/compressible) Physical properties (e.g. density, viscosity, specic heat) External force elds (e.g. gravity, centrifugal forces) and energy sources, when present Initial conditions for transient owsVersion 4.02

Chapter 1

COMPUTATIONAL ANALYSIS PRINCIPLES Problem characterisation and material property denition

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.

Physical properties The specification of physical 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 toVersion 4.02 1-9

COMPUTATIONAL ANALYSIS PRINCIPLES Boundary description

Chapter 1

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 type of problem being considered: In unsteady 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 state problems 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-13. In either case, increased computing times can be an undesirable side effect.

Boundary descriptionAs 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: Identifying the correct type of condition Specifying an acceptable mix of boundary types Ascribing appropriate boundary values

The above are in turn linked to the decisions on where to place the boundaries in the1-10 Version 4.02

Chapter 1

COMPUTATIONAL ANALYSIS PRINCIPLES Boundary description

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 Chapter 5 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 domain. (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 leads to erroneous results and, 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: (a) The need to specify the boundary, where possible, at locations where the ow is everywhere outwardly directed; also to recognise that, if inowVersion 4.02 1-11

COMPUTATIONAL ANALYSIS PRINCIPLES Boundary description

Chapter 1

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 Used only for modelling supersonic free streams 9. Transient wave transmissive boundaries 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-12

Version 4.02

Chapter 1

COMPUTATIONAL ANALYSIS PRINCIPLES Numerical solution control

Numerical solution controlProper control of the numerical solution process applied to the transport 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 problem 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/deformation pattern under a given set of boundary conditions is arrived at through a number of numerical iterations.

PISO and SIMPLE are the two alternative solution procedures available in STAR-CD. PISO is the default for unsteady calculations and is sometimes 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. SIMPLE is also used for transient calculations in the case of free surface and cavitating flows, where it is the only option. In most other transient flow problems, PISO is likely to be more efficient due to the fact that PISO correctors are usually cheaper than outer iterations on all variables within a time step of the transient SIMPLE algorithm. However, there are situations in which PISO would require many correctors or even fail to converge unless the time step is reduced, whereas SIMPLE may allow larger time steps with a moderate number of outer iterations per time step. This is the case when the flow changes very little but certain slow transients are present in the behaviour of scalar variables (e.g. slow heating up of solid structures in the case of solid-fluid heat transfer problems, deposition of chemical species on walls in after-treatment of exhaust gases, etc.). In such cases, transient SIMPLE can be used to save on computing time. 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 ow 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 andVersion 4.02 1-13

COMPUTATIONAL ANALYSIS PRINCIPLES Numerical solution control

Chapter 1

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

Pressure under-relaxation factor = 1.0 Corrector limit = 20 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 t c = min L, ----------- ----- - 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 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 consultVersion 4.02

1-14

Chapter 1

COMPUTATIONAL ANALYSIS PRINCIPLES Numerical solution control

CD adapco rst. Steady-state ow calculations with PISO 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 Steady 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 Corrector step tolerance = 0.25 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.1-15

Version 4.02

COMPUTATIONAL ANALYSIS PRINCIPLES Numerical solution control

Chapter 1

Steady-state ow calculations with SIMPLE As noted previously, the control parameters available for SIMPLE are similar to 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 Steady 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 of the pressure relaxation factor is an additional device for overcoming convergence problems. The problems usually arise either from a highly distorted mesh, or from highly complex physics (many variables affecting each other). If the grid is distorted, one should reduce the relaxation factor for pressure from the beginning of the run (e.g. to 0.1). If convergence problems are still encountered, a substantial reduction of the under-relaxation factor for velocities and turbulence model variables should be tried (e.g. to 0.5). If this does not help, the problem may lie in severe mesh defects or errors in the set-up. Further reduction of under-relaxation factors may be tried if the grid is severely distorted and cannot be improved; otherwise, improving the mesh quality can be of much greater help. Note that the pressure under-relaxation factor needs to be adjusted within the limits of some range to make the iteration process converge, where the number of iterations required to reach such convergence is mainly dictated by the corresponding factors for velocities (and for scalar variables when strongly coupled to the flow). In the case of well-behaved flows and reasonable meshes, the relaxation factor for pressure can be selected as (1.0 - relaxation factor for velocities), e.g. 0.2 for pressure and 0.8 for velocities. Usually, for a given velocity relaxation factor, the one for pressure can be varied within some range without affecting the total number of iterations and computing time, but outside this range the iterative process would diverge. The lower the relaxation factor for velocities, the wider the range of pressure relaxation factors that can be used (e.g. between 0.05 and 0.8 if the velocity factor is low, say around 0.5). On the other hand, this range becomes narrower when the mesh is distorted. The limit to which the velocity relaxation factor can be increased is both problem- and mesh-dependent. When many similar problems need to be solved, it is worth trying to work near the optimum as this may save a lot of computing time.1-16 Version 4.02

Chapter 1

COMPUTATIONAL ANALYSIS PRINCIPLES Numerical solution control

On the other hand, for an one-off analysis, it may be more efficient to use a conservative setting. Note that under some conditions, such as those in Tutorial 13.1, a steady-state solution cannot be achieved due to the inherent unsteady character of the flow. This is often the case when the problem geometry possesses some form of symmetry but the Reynolds (or another equivalent) number is high and recirculation zones are present. In this case the residuals stop falling at some level and then continue to oscillate. The solution at that stage may be far from a valid solution of the governing equations and should not be interpreted as such unless the residual level is sufficiently small. An eddy-viscosity turbulence model (such as the standard k-e) combined with a first-order upwind scheme for convective fluxes may produce a steady-state solution, while a less diffusive turbulence model (such as Reynolds Stress and non-linear eddy-viscosity models) combined with a higher-order differencing scheme (such as central differencing) may not. In such cases, a transient simulation should be performed; the unsteady solution may oscillate around a mean steady state, in which case the quantities of interest (drag, lift, heat transfer coefficient, pressure drop, etc.) can be averaged over several oscillation periods. Transient ow calculations with SIMPLE The use of this algorithm in transient calculations essentially consists of repeating the steady-state SIMPLE calculations for each prescribed time step. The default control parameter settings are therefore as summarised in Table 1-4..

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

Outer iteration limit = 5 The main difference compared to the PISO algorithm lies in the fact that all linearizations and deferred correctors are updated within the outer iterations, by recalculating the coefficient matrix and source term. For this reason, solver tolerances do not need to be as tight as for PISO; they are actually identical to those used for steady-state computations. However, since the discretization of the transient term enlarges the central coefficient of the matrix in the same way as under-relaxation does, the relaxation factors for velocities and scalar variables can be increased (the smaller the time step, the larger the values that can be used for relaxation factors 0.95 or even more). The convergence criterion for outer iterations within each time step is by defaultVersion 4.02 1-17

COMPUTATIONAL ANALYSIS PRINCIPLES Numerical solution control

Chapter 1

the same as for steady-state flows. However, the number of outer iterations is also set to a default limit of 10; if substantially more iterations are needed to satisfy the convergence criterion, this is a sign that the time step is too large. In such a case, it is better to reduce the time step rather than allow more outer iterations for a larger time step, because this would lead to a more accurate solution at a comparable cost. On the other hand, if residuals drop below the limit after only a few iterations, one may increase the time step; experience shows that optimum efficiency and accuracy are achieved if 5 to 10 outer iterations per time step are performed. Note also that the reported mass residuals are computed before solving the pressure-correction equation; after this equation is solved and mass fluxes are corrected, the mass residuals are more than an order of magnitude lower. For this reason, one can accept mass residuals being somewhat higher than the convergence criterion when the limiting number of outer iterations is reached, provided that the residuals of all other equations have satisfied the criterion. In some cases, an increase in the under-relaxation factor for pressure (up to 0.8) can lead to a faster reduction of mass residuals. All these considerations are of course problemdependent and if several simulations over a longer period need to be performed, it may prove useful to invest some time in optimizing the relaxation parameters. Sometimes, it is necessary to select smaller time steps in the initial phase of a transient simulation than those at later stages. This is the case, for example, when starting with a fluid at rest and imposing a full-flow rate at the inlet, or full speed of rotation (in the absence of a better initial condition). This is equivalent to a sudden change of boundary conditions at a later time, which would also require that the time step be reduced. Another possibility of avoiding problems with abrupt starts from rest is to ramp the boundary conditions (e.g. a linear increase of velocity from zero to full speed over some period of time). The transient SIMPLE algorithm allows you to select either the default fully-implicit Euler scheme or the three-time-level scheme for temporal discretisation, described in Chapter 4, Temporal Discretisation of the Methodology volume. The latter scheme is second-order accurate but is currently applied only to the momentum and continuity equations. It should be chosen when temporal variation of the velocity field is essential, e.g. in the case of a DES/LES type of analysis. While PISO would normally be the preferred choice for the latter, under some circumstances (e.g. the existence of very small cells, poor mesh quality etc.), transient SIMPLE may allow the use of larger time steps than PISO without loss of accuracy. 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 your1-18 Version 4.02

Chapter 1

COMPUTATIONAL ANALYSIS PRINCIPLES Monitoring the calculations

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 (such as Fujitsu and Hitachi computers), and the second one (called scalar solver) is recommended if the code is run on scalar machines (such as workstations).

Monitoring the calculationsChapter 5 and the section on Permanent Output on page 15-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 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.

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 (see Chapter 7, Completion tests in 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.

Version 4.02

1-19

COMPUTATIONAL ANALYSIS PRINCIPLES Model evaluation

Chapter 1

Model evaluationChecking 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 (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 the STAR-CD solver for zero iterations/time steps and plotting the relevant eld variables. Checking the calculations Having completed the model preparati