Star CCM+ User Guide

Embed Size (px)

DESCRIPTION

CFD software's user guide

Citation preview

  • CCM USER GUIDE

    STAR-CD VERSION 4.02

    CONFIDENTIAL FOR AUTHORISED USERS ONLY

    2006 CD-adapco

  • Version 4.02 i

    TABLE OF CONTENTS

    OVERVIEW

    1 COMPUTATIONAL ANALYSIS PRINCIPLESIntroduction ............................................................................................................... 1-1The Basic Modelling Process .................................................................................... 1-1Spatial description and volume discretisation ........................................................... 1-2

    Solution domain definition .............................................................................. 1-3Mesh definition ................................................................................................ 1-4Mesh distortion ................................................................................................ 1-5Mesh distribution and density ......................................................................... 1-6Mesh distribution near walls ........................................................................... 1-7Moving mesh features ..................................................................................... 1-8

    Problem characterisation and material property definition ....................................... 1-8Nature of the flow ............................................................................................ 1-9Physical properties ........................................................................................... 1-9Force fields and energy sources ...................................................................... 1-9Initial conditions ............................................................................................ 1-10

    Boundary description .............................................................................................. 1-10Boundary location ......................................................................................... 1-11Boundary conditions ...................................................................................... 1-11

    Numerical solution control ..................................................................................... 1-13Selection of solution procedure ..................................................................... 1-13Transient flow calculations with PISO .......................................................... 1-13Steady-state flow calculations with PISO ..................................................... 1-15Steady-state flow calculations with SIMPLE ................................................ 1-16Transient flow calculations with SIMPLE .................................................... 1-17Effect of round-off errors .............................................................................. 1-18Choice of the linear equation solver .............................................................. 1-19

    Monitoring the calculations .................................................................................... 1-19Model evaluation .................................................................................................... 1-20

    2 BASIC STAR-CD FEATURESIntroduction ............................................................................................................... 2-1Running a STAR-CD Analysis ................................................................................. 2-2

    Using the script-based procedure .................................................................... 2-3Using STAR-Launch ....................................................................................... 2-8

    pro-STAR Initialisation .......................................................................................... 2-12Input/output window ..................................................................................... 2-13Main window ................................................................................................. 2-15

  • ii Version 4.02

    The menu bar .................................................................................................2-16General Housekeeping and Session Control ...........................................................2-18

    Basic set-up ....................................................................................................2-18Screen display control ....................................................................................2-18Error messages ...............................................................................................2-19Error recovery ................................................................................................2-20Session termination ........................................................................................2-21

    Set Manipulation .....................................................................................................2-21Table Manipulation .................................................................................................2-24

    Basic functionality .........................................................................................2-24The table editor ..............................................................................................2-26Useful points ..................................................................................................2-31

    Plotting Functions ....................................................................................................2-31Basic set-up ....................................................................................................2-31Advanced screen control ................................................................................2-32Screen capture ................................................................................................2-33

    The Users Tool ........................................................................................................2-35Getting On-line Help ...............................................................................................2-35The STAR GUIde Environment ..............................................................................2-38

    Panel navigation system .................................................................................2-40STAR GUIde usage .......................................................................................2-41

    General Guidelines ..................................................................................................2-413 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION

    Introduction ...............................................................................................................3-1The Cell Table ...........................................................................................................3-1

    Cell indexing ....................................................................................................3-3Multi-Domain Property Setting .................................................................................3-5

    Setting up models .............................................................................................3-6Compressible Flow ....................................................................................................3-9

    Setting up compressible flow models ..............................................................3-9Useful points on compressible flow ...............................................................3-10

    Non-Newtonian Flow ..............................................................................................3-11Setting up non-Newtonian models .................................................................3-11Useful points on non-Newtonian flow ...........................................................3-11

    Turbulence Modelling .............................................................................................3-12Wall functions ................................................................................................3-13Two-layer models ..........................................................................................3-13Low Re models ..............................................................................................3-14Hybrid wall boundary condition ....................................................................3-14

  • Version 4.02 iii

    Reynolds Stress models ................................................................................. 3-15DES models ................................................................................................... 3-15LES models ................................................................................................... 3-15Changing the turbulence model in use .......................................................... 3-16

    Heat Transfer In Solid-Fluid Systems ..................................................................... 3-16Setting up solid-fluid heat transfer models .................................................... 3-17Heat transfer in baffles .................................................................................. 3-18Useful points on solid-fluid heat transfer ...................................................... 3-19

    Buoyancy-driven Flows and Natural Convection ................................................... 3-20Setting up buoyancy-driven models .............................................................. 3-20Useful points on buoyancy-driven flow ........................................................ 3-20

    Fluid Injection ......................................................................................................... 3-21Setting up fluid injection models ................................................................... 3-22

    4 BOUNDARY AND INITIAL CONDITIONSIntroduction ............................................................................................................... 4-1Boundary Location .................................................................................................... 4-1

    Command-driven facilities .............................................................................. 4-2Boundary set selection facilities ...................................................................... 4-3Boundary listing .............................................................................................. 4-3

    Boundary Region Definition ..................................................................................... 4-5Inlet Boundaries ........................................................................................................ 4-9

    Introduction ..................................................................................................... 4-9Useful points .................................................................................................. 4-10

    Outlet Boundaries ................................................................................................... 4-11Introduction ................................................................................................... 4-11Useful points .................................................................................................. 4-12

    Pressure Boundaries ................................................................................................ 4-12Introduction ................................................................................................... 4-12Useful points .................................................................................................. 4-13

    Stagnation Boundaries ............................................................................................ 4-14Introduction ................................................................................................... 4-14Useful points .................................................................................................. 4-15

    Non-reflective Pressure and Stagnation Boundaries ............................................... 4-16Introduction ................................................................................................... 4-16Useful points .................................................................................................. 4-18

    Wall Boundaries ...................................................................................................... 4-19Introduction ................................................................................................... 4-19Thermal radiation properties ......................................................................... 4-20Solar radiation properties .............................................................................. 4-20

  • iv Version 4.02

    Other radiation modelling considerations ......................................................4-21Useful points ..................................................................................................4-22

    Baffle Boundaries ....................................................................................................4-23Introduction ....................................................................................................4-23Setting up models ...........................................................................................4-24Thermal radiation properties ..........................................................................4-25Solar radiation properties ...............................................................................4-26Other radiation modelling considerations ......................................................4-26Useful points ..................................................................................................4-27

    Symmetry Plane Boundaries ...................................................................................4-27Cyclic Boundaries ...................................................................................................4-27

    Introduction ....................................................................................................4-27Setting up models ...........................................................................................4-28Useful points ..................................................................................................4-30Cyclic set manipulation ..................................................................................4-31

    Free-stream Transmissive Boundaries ....................................................................4-32Introduction ....................................................................................................4-32Useful points ..................................................................................................4-33

    Transient-wave Transmissive Boundaries ...............................................................4-34Introduction ....................................................................................................4-34Useful points ..................................................................................................4-35

    Riemann Boundaries ...............................................................................................4-36Introduction ....................................................................................................4-36Useful points ..................................................................................................4-37

    Attachment Boundaries ...........................................................................................4-38Useful points ..................................................................................................4-39

    Radiation Boundaries ..............................................................................................4-39Useful points ..................................................................................................4-40

    Phase-Escape (Degassing) Boundaries ...................................................................4-40Monitoring Regions .................................................................................................4-40Boundary Visualisation ...........................................................................................4-41Solution Domain Initialisation ................................................................................4-42

    Steady-state problems ....................................................................................4-42Transient problems .........................................................................................4-42

    5 CONTROL FUNCTIONSIntroduction ...............................................................................................................5-1Analysis Controls for Steady-State Problems ...........................................................5-1Analysis Controls for Transient Problems ................................................................5-4

    Default (single-transient) solution mode .........................................................5-4

  • Version 4.02 v

    Load-step based solution mode ....................................................................... 5-6Load step characteristics .................................................................................. 5-6Load step definition ......................................................................................... 5-8Solution procedure outline .............................................................................. 5-9Other transient functions ............................................................................... 5-14

    Solution Control with Mesh Changes ..................................................................... 5-15Mesh-changing procedure ............................................................................. 5-15

    Solution-Adapted Mesh Changes ........................................................................... 5-176 POROUS MEDIA FLOW

    Setting Up Porous Media Models ............................................................................. 6-1Useful Points ............................................................................................................. 6-4

    7 THERMAL AND SOLAR RADIATIONRadiation Modelling for Surface Exchanges ............................................................ 7-1Radiation Modelling for Participating Media ........................................................... 7-3Capabilities and Limitations of the DTRM Method ................................................. 7-5Capabilities and Limitations of the DORM Method ................................................. 7-7Radiation Sub-domains ............................................................................................. 7-8

    8 CHEMICAL REACTION AND COMBUSTIONIntroduction ............................................................................................................... 8-1Local Source Models ................................................................................................ 8-2Presumed Probability Density Function (PPDF) Models ......................................... 8-3

    Single-fuel PPDF ............................................................................................. 8-3Multiple-fuel PPDF ......................................................................................... 8-9

    Regress Variable Models ........................................................................................ 8-10Complex Chemistry Models ................................................................................... 8-11Setting Up Chemical Reaction Schemes ................................................................. 8-14

    Useful general points for local source and regress variable schemes ........... 8-16Chemical Reaction Conventions ................................................................... 8-18Useful points for PPDF schemes ................................................................... 8-18Useful points for complex chemistry models ................................................ 8-21Useful points for ignition models .................................................................. 8-21

    Setting Up Advanced I.C. Engine Models .............................................................. 8-22Coherent Flame model (CFM) ...................................................................... 8-24Extended Coherent Flame model (ECFM) .................................................... 8-26Extended Coherent Flame model 3Z (ECFM-3Z) spark ignition ............ 8-28Extended Coherent Flame model 3Z (ECFM-3Z) compression ignition .8-29Useful points for ECFM models .................................................................... 8-30Level Set model ............................................................................................. 8-31Write Data sub-panel ..................................................................................... 8-32

  • vi Version 4.02

    The Arc and Kernel Tracking ignition model (AKTIM) ...............................8-33Useful points for the AKTIM model .............................................................8-35The Double-Delay autoignition model ..........................................................8-37

    NOx Modelling ........................................................................................................8-39Soot Modelling ........................................................................................................8-39Coal Combustion Modelling ...................................................................................8-41

    Stage 1 ............................................................................................................8-41Stage 2 ............................................................................................................8-42Useful notes ...................................................................................................8-44Switches and constants for coal modelling ....................................................8-45Special settings for the Mixed-is-Burnt and Eddy Break-Up models ............8-46

    9 LAGRANGIAN MULTI-PHASE FLOWSetting Up Lagrangian Multi-Phase Models .............................................................9-1Data Post-Processing .................................................................................................9-4

    Static displays ..................................................................................................9-5Trajectory displays ...........................................................................................9-8

    Engine Combustion Data Files ..................................................................................9-9Useful Points ...........................................................................................................9-10

    10 EULERIAN MULTI-PHASE FLOWIntroduction .............................................................................................................10-1Setting up multi-phase models ................................................................................10-1

    Useful points on Eulerian multi-phase flow ..................................................10-411 FREE SURFACE AND CAVITATION

    Free Surface Flows ..................................................................................................11-1Setting up free surface cases ..........................................................................11-1

    Cavitating Flows ......................................................................................................11-5Setting up cavitation cases .............................................................................11-5

    12 ROTATING AND MOVING MESHESRotating Reference Frames .....................................................................................12-1

    Models for a single rotating reference frame .................................................12-1Useful points on single rotating frame problems ...........................................12-1Models for multiple rotating reference frames (implicit treatment) ..............12-2Useful points on multiple implicit rotating frame problems ..........................12-4Models for multiple rotating reference frames (explicit treatment) ...............12-5Useful points on multiple explicit rotating frame problems ..........................12-8

    Moving Meshes .......................................................................................................12-9Basic concepts ................................................................................................12-9Setting up models .........................................................................................12-10Useful points ................................................................................................12-13

  • Version 4.02 vii

    Automatic Event Generation for Moving Piston Problems ......................... 12-13Cell-layer Removal/Addition ................................................................................ 12-14

    Basic concepts ............................................................................................. 12-14Setting up models ........................................................................................ 12-15Useful points ................................................................................................ 12-18

    Sliding Meshes ...................................................................................................... 12-18Regular sliding interfaces ............................................................................ 12-18

    Cell Attachment and Change of Fluid Type ......................................................... 12-22Basic concepts ............................................................................................. 12-22Setting up models ........................................................................................ 12-23Useful points ................................................................................................ 12-27

    Mesh Region Exclusion ........................................................................................ 12-28Basic concepts ............................................................................................. 12-28

    Moving Mesh Pre- and Post-processing ............................................................... 12-28Introduction ................................................................................................. 12-28Action commands ........................................................................................ 12-29Status setting commands ............................................................................. 12-30

    13 OTHER PROBLEM TYPESMulti-component Mixing ........................................................................................ 13-1

    Setting up multi-component models .............................................................. 13-1Useful points on multi-component mixing .................................................... 13-3

    Aeroacoustic Analysis ............................................................................................ 13-3Setting up aeroacoustic models ..................................................................... 13-3Useful points on aeroacoustic analyses ......................................................... 13-4

    Liquid Films ............................................................................................................ 13-5Setting up liquid film models ........................................................................ 13-5Film stripping ................................................................................................ 13-7

    14 USER PROGRAMMINGIntroduction ............................................................................................................. 14-1Subroutine Usage .................................................................................................... 14-1

    Useful points .................................................................................................. 14-4Description of UFILE Routines .............................................................................. 14-5

    Boundary condition subroutines .................................................................... 14-5Material property subroutines ........................................................................ 14-6Turbulence modelling subroutines ................................................................ 14-9Source subroutines ....................................................................................... 14-10Radiation modelling subroutines ................................................................. 14-11Free surface / cavitation subroutines ........................................................... 14-11Lagrangian multi-phase subroutines ............................................................ 14-12

  • viii Version 4.02

    Liquid film subroutines ................................................................................14-14Eulerian multi-phase subroutines .................................................................14-14Chemical reaction subroutines .....................................................................14-15Rotating reference frame subroutines ..........................................................14-16Moving mesh subroutines ............................................................................14-16Miscellaneous flow characterisation subroutines ........................................14-17Solution control subroutines ........................................................................14-18

    Sample Listing .......................................................................................................14-19New Coding Practices ...........................................................................................14-20User Coding in parallel runs ..................................................................................14-22

    15 PROGRAM OUTPUTIntroduction .............................................................................................................15-1Permanent Output ....................................................................................................15-1

    Input-data summary .......................................................................................15-1Run-time output .............................................................................................15-3

    Printout of Field Values ..........................................................................................15-3Optional Output .......................................................................................................15-3Example Output .......................................................................................................15-4

    16 pro-STAR CUSTOMISATIONSet-up Files ..............................................................................................................16-1Panels .......................................................................................................................16-2

    Panel creation .................................................................................................16-2Panel definition files ......................................................................................16-5Panel manipulation .........................................................................................16-6

    Macros .....................................................................................................................16-6Function Keys ..........................................................................................................16-9

    17 OTHER STAR-CD FEATURES AND CONTROLSIntroduction .............................................................................................................17-1File Handling ...........................................................................................................17-1

    Naming conventions ......................................................................................17-1Commonly used files .....................................................................................17-1File relationships ............................................................................................17-7File manipulation ...........................................................................................17-9

    Special pro-STAR Features ...................................................................................17-12pro-STAR environment variables ................................................................17-12Resizing pro-STAR ......................................................................................17-13Special pro-STAR executables ....................................................................17-14Use of temporary files by pro-STAR ...........................................................17-14

    The StarWatch Utility ...........................................................................................17-15

  • Version 4.02 ix

    Running StarWatch ..................................................................................... 17-15Choosing the monitored values ................................................................... 17-17Controlling STAR ....................................................................................... 17-17Manipulating the StarWatch display ........................................................... 17-20Monitoring another job ................................................................................ 17-21

    Hard Copy Production .......................................................................................... 17-21Neutral plot file production and use ............................................................ 17-21Scene file production and use ...................................................................... 17-23

    APPENDICESA pro-STAR CONVENTIONS

    Command Input Conventions .................................................................................. A-1Help Text / Prompt Conventions ............................................................................. A-3Control and Function Key Conventions .................................................................. A-4File Name Conventions ............................................................................................ A-4

    B FILE TYPES AND THEIR USAGEC PROGRAM UNITSD pro-STAR X-RESOURCESE USER INTERFACE TO MESSAGE PASSING ROUTINESF STAR RUN OPTIONS

    Usage .........................................................................................................................F-1Options ......................................................................................................................F-1Parallel Options .........................................................................................................F-3Resource Allocation ..................................................................................................F-6Default Options .........................................................................................................F-7Cluster Computing ....................................................................................................F-8Batch Runs Using STAR-NET .................................................................................F-8

    Running under IBM Loadleveler using STAR-NET .......................................F-8Running under LSF using STAR-NET ...........................................................F-9Running under OpenPBS using STAR-NET ................................................F-10Running under PBSPro using STAR-NET ....................................................F-11Running under SGE using STAR-NET .........................................................F-11Running under Torque using STAR-NET .....................................................F-12

    G BIBLIOGRAPHY

    INDEX

    INDEX OF COMMANDS

  • Version 4.02 1

    OVERVIEWPurpose

    The Methodology volume presents the mathematical modelling practices embodiedin the STAR-CD system and the numerical solution procedures employed. In thisvolume, the focus is on the structure of the system itself and how to use it. Thispresentation assumes that the reader is familiar with the background informationprovided in the Methodology volume.

    ContentsChapter 1 introduces some of the fundamental principles of computationalcontinuum mechanics, including an outline of the basic steps involved in setting upand using a successful computer model. The important factors to consider at eachstep are mostly explained independently of the computer system used to perform theanalysis. However, reference is also made to the particular capabilities of theSTAR-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 detailedinstructions on how to use some of the basic code facilities, e.g. boundary conditionspecification, material property definition, etc., and an overview of the GUI panelsappropriate to each of them. The description covers all facilities (other than meshgeneration) that might be employed for modelling most common continuummechanics problems. Mesh generation itself is covered in a separate volume, theMeshing User Guide.

    Chapters 2 to 5 should be read at least once to gain an understanding of thegeneral housekeeping principles of pro-STAR and to help with any problemsarising from routine operations. It is recommended that users refer to theappropriate chapter repeatedly when setting up a model for general guidance and anoverview of the relevant GUI panels.

    Chapters 6 to 13 describe additional STAR-CD capabilities relevant to modelsof a more specialised nature, i.e. rotating systems, combustion processes,buoyancy-driven flows, etc. Users interested in a particular topic should consult theappropriate section for a summary of commands or options specially designed forthat purpose, plus hints and tips on performing a successful simulation.

    Chapter 14 outlines the user programmability features available and provides anexample FORTRAN subroutine listing implementing these features. All suchsubroutines are readily available for use and can be easily adapted to suit themodel's requirements.

    Chapter 15 presents the printable output produced by the code which provides,among other things, a summary of the problem specification and monitoringinformation generated during the calculation.

    Chapter 16 explains how pro-STAR can be customised, in terms of user-definedpanels, macros and keyboard function keys, to meet a users individualrequirements.

    Finally, Chapter 17 covers some of the less commonly used features ofSTAR-CD, including the interaction between STAR and pro-STAR and howvarious system files are used.

  • Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

    Introduction

    Version 4.02 1-1

    Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLESIntroduction

    The aim of this section is to introduce the most important issues involved in settingup and solving a continuum mechanics problem using a computational continuummechanics code. Although the discussion applies in principle to any such code,reference is made where appropriate to the particular capabilities of the STAR-CDsystem. It is also assumed that the reader is familiar with the material presented inthe Methodology volume.

    The process of computational mechanics simulation does not usually start withthe direct use of such a code. It is indeed important to recognise that STAR-CD, orany other CFD, CAD or CAE system, should be treated as a tool to assist theengineer in understanding physical phenomena.

    The success or failure of a continuum mechanics simulation depends not only onthe code capabilities, but also upon the input data, such as:

    Geometry of the solution domain Continuum properties Boundary conditions Solution control parameters

    For a simulation to have any chance of success, such information should bephysically 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 sufficiency 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

    final solution.

    Users should turn to STAR-CD and proceed with the actual modelling only after theabove 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 strategyThis requires a precise definition of the physical systems geometry, materialproperties and flow/deformation conditions based on the best availableunderstanding of the relevant physics. The necessary tasks include:

    Planning the computational mesh (e.g. number of cells, size and distributionof cell dimensions, etc.).

    Looking up numerical values for appropriate physical parameters(e.g. density, viscosity, specific heat, etc.).

    Choosing the most suitable modelling option from what is available(e.g. turbulence model, combustion option, etc.).

  • COMPUTATIONAL ANALYSIS PRINCIPLES Chapter 1

    Spatial description and volume discretisation

    1-2 Version 4.02

    The user also has to balance the requirement of physical fidelity and numericalaccuracy against the simulation cost and computational capabilities of his system.His modelling strategy will therefore incorporate some trade-off between these twofactors.

    This initial phase of modelling is particularly important for the smooth andefficient progress of the computational simulation.Phase 2 Setting up the model using pro-STARThe main tasks involved at this phase are:

    Creating a computational mesh to represent the solution domain (i.e. themodel geometry).

    Specifying the physical properties of the fluids and/or solids present in thesimulation and, where relevant, the turbulence model(s), body forces, etc.

    Setting the solution parameters (e.g. solution variable selection, relaxationcoefficients, etc.) and output data formats.

    Specifying the location and definition of boundaries and, for unsteadyproblems, further definition of transient boundary conditions and time steps.

    Writing appropriate data files as input to the analytical run of the followingphase.

    Phase 3 Performing the analysis using STARThis phase consists of:

    Reading input data created by pro-STAR and, if dealing with a restart run, theresults of a previous run.

    Judging the progress of the run by analysing various monitoring data andsolution statistics provided by STAR.

    Phase 4 Post-processing the results using pro-STARThis involves the display and manipulation of output data created by STAR usingthe appropriate pro-STAR facilities.

    The remainder of this chapter discusses the elements of each modelling phase ingreater detail.

    Spatial description and volume discretisationOne of the basic steps in preparing a STAR-CD model is to describe the geometryof the problem. The two key components of this description are:

    The definition of the overall size and shape of the solution domain. The subdivision of the solution domain into a mesh of discrete, finite,

    contiguous volume elements or cells, as shown in Figure 1-1.

  • Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

    Spatial description and volume discretisation

    Version 4.02 1-3

    Figure 1-1 Example of solution domain subdivision into cells

    This process is called volume discretisation and is an essential part of solving theabove equations numerically. In STAR-CD both components of the spatialdescription are performed as part of the same operation, setting up the finite-volumemesh, but separate considerations apply to each of them.

    Solution domain definitionThrough its internal design and construction, STAR-CD permits a very general andflexible definition of what constitutes a solution domain. The latter can be:

    A fluid and/or heat flow field fully occupying an open region of space Fluid and/or heat flowing through a porous medium Heat flowing through a solid A solid undergoing mechanical deformation

    Arbitrary combinations of the above conditions can also be specified within thesame model, as in problems involving fluid-solid heat transfer. The users first taskis therefore to decide which parts of the physical system being modelled need to beincluded in the solution domain and whether each part is occupied by a fluid, solidor porous medium.

    Whatever its composition, the fundamental requirement is that the solutiondomain is bounded. This means that the user has to examine his systems geometrycarefully and decide exactly where the enclosing boundaries lie. The boundaries canbe one of four kinds:

    1. Physical boundaries walls or solid obstacles of some description thatserve to physically confine a fluid flow

    2. Symmetry boundaries axes or planes beyond which the problem solutionbecomes a mirror image of itself

    3. Cyclic boundaries surfaces beyond which the problem solution repeatsitself, in a cyclic or anticyclic fashion

    The purpose of symmetry and cyclic boundaries is to limit the size of thedomain, and hence the computer requirements, by excluding regions wherethe solution is essentially known. This in turn allows one to model theproblem in greater detail than would have been the case otherwise.

  • COMPUTATIONAL ANALYSIS PRINCIPLES Chapter 1

    Spatial description and volume discretisation

    1-4 Version 4.02

    4. Notional boundaries these are non-physical surfaces that serve toclose-off the solution domain in regions not covered by the other two typesof boundary. Their location is entirely up to the users discretion but, ingeneral, 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 Boundarydescription on page 1-10.

    Mesh definitionCreation of a lattice of finite-volume cells to represent the solution domain isnormally the most time-consuming task in setting up a STAR-CD model. Thisprocess is greatly facilitated by STAR-CD because of its ability to generate cells ofan arbitrary, polyhedral shape.

    In creating a finite-volume mesh, the user should aim to represent accurately thefollowing two entities:

    1. The overall external geometry of the solution domain, by specifying anappropriate size and shape for near-boundary cells. The latters external faces,taken together, should make up a surface that adequately represents the shapeof the solution domain boundaries. Small inaccuracies may occur because allboundary cell faces (including rectangular faces) are composed of triangularfacets, as shown in Figure 1-2. These errors diminish as the mesh is refined.

    Figure 1-2 Boundary representation by triangular facets

    2. The internal characteristics of the flow/deformation regime. This is achievedby careful control of mesh spacing within the solution domain interior so that

    triangular facet

  • Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

    Spatial description and volume discretisation

    Version 4.02 1-5

    the mesh is finest where the problem characteristics change most rapidly.Near-wall regions are important and a high mesh density is needed to resolvethe flow in their vicinity. This point is discussed further in Mesh distributionnear walls on page 1-7.

    Mesh spacing considerationsThe 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 influence

    on the speed of convergence and c.p.u. time required per iteration or timestep.

    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 inSTAR-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 andsolid mechanics to produce the right kind of mesh arrangement.

    Mesh distortionMesh distortion is measured in terms of three factors aspect ratio, internal angleand warp angle illustrated in Figure 1-3.

    Figure 1-3 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

    a

    b

    b/a = aspect ratio

    = internal angle

    = warp angle

  • COMPUTATIONAL ANALYSIS PRINCIPLES Chapter 1

    Spatial description and volume discretisation

    1-6 Version 4.02

    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 thesefactors manifest themselves through

    the relative magnitudes of the coefficients in the finite-volume equations,especially those arising from non-orthogonality, and

    the signs of the coefficients (negative values are generally detrimental).It is difficult to place rigid limits on the acceptable departures because they dependon local flow conditions. However, the following values serve as a useful guideline:

    pro-STAR can calculate these quantities and identify cells having out-of-boundsvalues, as discussed in Chapter 3, Mesh and Geometry Checking of the MeshingUser Guide.

    What is really important in this respect is the combined effect of the variouskinds of mesh distortion. If all three are simultaneously present in a single cell, thelimits given above might not be stringent enough. On the other hand, the effects ofdistortion also depend on the nature of the local flow. Thus, the above limits maybe exceeded in the region of

    simple flows such as, for example, uniform-velocity free streams, wall boundary layers, where cells of high aspect ratio (in the flow direction)

    are commonly employed without difficulty.

    Generally speaking, non-orthogonality at boundaries may cause problems andshould be minimised whenever practicable.

    Mesh distribution and densityNumerical 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 highmesh density implies a large number of mesh storage locations, with associated highcomputing cost. It is therefore advisable, wherever possible, to

    ensure that the mesh density is high only where needed, i.e. in regions of steepgradients of the flow variables, and low elsewhere;

    avoid rapid changes in cell dimensions in the direction of steep gradients inthe flow variables.

    The flexibility afforded by STAR-CDs unstructured polyhedral meshes facilitatessuch selective refinement. An illustration of some of the numerous cell shapes thatmay be employed is given in Figure 2-43 and Figure 2-44 of the Meshing UserGuide.

    Aspect Ratio 10Internal angle 45Warp angle 45

  • Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

    Spatial description and volume discretisation

    Version 4.02 1-7

    Of course, it is not always possible to ascertain a priori what the flow structurewill be. However, the need for higher mesh density can usually be anticipated inregions such as:

    Wall boundary layers Jets issuing from apertures Shear layers formed by flow separation or neighbouring streams of different

    velocities Stagnation points produced by flow impingement Wakes behind bluff bodies Temperature or concentration fronts arising from mixing or chemical reaction

    Mesh distribution near wallsAs discussed in Chapter 6, Wall Boundary Conditions of the Methodologyvolume, wall functions are an economic way of representing turbulent boundarylayers (hydrodynamic and thermal) in turbulent flow calculations. These functionseffectively allow the boundary layer to be bridged by a single cell, as shown inFigure 1-4(a).

    Figure 1-4 Near-wall mesh distribution

    The location y of the cell centroids in the near-wall layer, and hence the thicknessof that layer, is usually determined by reference to the dimensionless normaldistance from the wall. For the wall function to be effective, this distance mustbe

    not too small, otherwise, the bridge might span only the laminar sublayer; not too large, as the flow at that location might not behave in the way assumed

    in deriving the wall functions.

    Ideally, should lie in the approximate range 30 to 150. Note that the aboveconsiderations apply to Reynolds Stress models as well as several classes of eddyviscosity model (see Chapter 3, Turbulence Modelling).

    Alternative treatments that do not require the use of wall functions are alsoavailable. These are:

    (b) Two-layer or Low Re models

    Outerregion

    Innerregiony

    (a) Wall function model

    y+

    y+

  • COMPUTATIONAL ANALYSIS PRINCIPLES Chapter 1

    Problem characterisation and material property definition

    1-8 Version 4.02

    1. Two-layer turbulence models, whereby wall functions are replaced by aone-equation k-l model or a zero-equation mixing-length model

    2. Low Reynolds number models (including the V2F model), where viscouseffects are incorporated in the k and transport equations

    For the above two types of model, the solution domain should be divided into tworegions with the following characteristics:

    An inner region containing a fine mesh An outer region containing normal mesh sizes

    The two regions are illustrated in Figure 1-4(b). As explained in the Methodologyvolume (Chapter 6, Two-layer models), the inner region should contain at least15 mesh layers and encompass that part of the boundary layer influenced by viscouseffects.

    A more recent development, called the hybrid wall function is also available thatextends the low-Reynolds number formulation of most turbulence models. Thismay be used to capture boundary layer properties more accurately in cases wherethe near-wall cell size is not adapted for the low-Reynolds number treatment andthus achieve independent solutions.

    Moving mesh featuresSTAR-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 theobvious one: avoid creating excessive distortion when redistributing the mesh. Thiscaution also applies to the use of the other two features, but they have additionalrules and guidelines attached to them. These are summarised in the Methodologyvolume, Chapter 15 (Internal Sliding Mesh on page 15-5 and Cell LayerRemoval and Addition on page 15-7). Additional guidelines also appear in thisvolume, Cell-layer Removal/Addition on page 12-14 and Sliding Meshes onpage 12-18; hence they are not repeated here.

    Problem characterisation and material property definitionCorrect definition of the physical conditions and the properties of the materialsinvolved is a prerequisite to obtaining the right solution to a problem, or indeed toobtaining any solution at all. It is also essential for determining whether the problemcan be modelled with STAR-CD. The user must therefore ensure that the problemis well defined in respect of:

    The nature of the fluid flow (e.g. steady/unsteady, laminar/turbulent,incompressible/compressible)

    Physical properties (e.g. density, viscosity, specific heat) External force fields (e.g. gravity, centrifugal forces) and energy sources,

    when present Initial conditions for transient flows

    y+

  • Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

    Problem characterisation and material property definition

    Version 4.02 1-9

    Nature of the flowIt is very important to understand the nature of the flow being analysed in order toselect 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 unsteadyproblem, such as vortex shedding from a bluff body

    Computing a turbulent flow without invoking a suitable turbulence model Modelling transitional flow with one of the turbulence models currently

    implemented in STAR-CD. None of them can represent transitional behaviouraccurately.

    Physical propertiesThe specification of physical properties, such as density, molecular viscosity,thermal conductivity, etc. depends on the nature of the fluids or solids involved andthe circumstances of use. For example, STAR-CD contains several built-inequations of state from which density can be calculated as a function of one or moreof the following field variables:

    Pressure Temperature Fluid composition

    In all cases where complex calculations are used to evaluate a material property, thefollowing measures are recommended:

    The relevant field variables must be assigned plausible initial and boundaryvalues.

    Where necessary, properties should be solved for together with the fieldvariables as part of the overall solution.

    In the case of strong dependencies between properties and field variables, theuser should consider under-relaxation of the property value calculations, inthe manner described in the Methodology volume (Chapter 7, Scalartransport equations).

    When required, STAR-CDs facility for alternative, user-programmablefunctions may be used.

    Force fields and energy sourcesAs 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 relativeto the viscous (or turbulent) stresses, the flow may become physically unstable. Inthese circumstances it is advisable to switch to the transient solution mode.

    It is also possible to insert additional, external force fields and energy sourcesvia the user programming facilities of STAR-CD. In such cases, it is important tounderstand the physical implications and avoid specifying conditions that lead to

  • COMPUTATIONAL ANALYSIS PRINCIPLES Chapter 1

    Boundary description

    1-10 Version 4.02

    physical or numerical instability. Examples of such conditions are:

    Thermal energy sources that increase linearly with temperature. These cangive rise to physical instability called thermal runaway.

    Setting the coefficient in the permeability function to avery small or zero value. If the local fluid velocity also becomes very small,the result may be numerical instability whereby small pressure perturbationsproduce a large change in velocities.

    Initial conditionsThe term initial conditions refers to values assigned to the dependent variables atall mesh points before the start of the calculations. Their implication depends on thetype of problem being considered:

    In unsteady applications, this information has a clear physical significanceand will affect the course of the solution. Due care must therefore be taken inproviding it. It sometimes happens that the effects of initial conditions areconfined to a start-up phase that is not of interest (as in, for example, flowsthat are temporally periodic). However, it is still advisable to take someprecautions in specifying initial conditions for reasons explained below.

    In calculating steady state problems by iterative means, the initial conditionswill usually have no influence on the final solution (apart from rare occasionswhen the solution is multi-valued), but may well determine the success andspeed of achieving it.

    Poor initial field specifications or, for transient problems, abrupt changes inboundary conditions put severe demands on the numerical algorithm whensubstituted into the finite-volume equations. As a consequence, the followingspecial 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 Numericalsolution control on page 1-13. In either case, increased computing times can be anundesirable side effect.

    Boundary descriptionAs stated in Spatial description and volume discretisation on page 1-2, boundaryidentification and description are intimately connected with the generation of thefinite-volume mesh, since the boundary topography is defined by the outermost cellfaces. Furthermore, correct specification of the boundary conditions is often themain area of difficulty in setting up a model. Problems often arise in the followingareas:

    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 the

    i K i i v i+=

  • Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

    Boundary description

    Version 4.02 1-11

    first instance.

    Boundary locationDifficulties in specifying boundary location normally arise where the flowconditions are incompletely known, for example at outlets. The recommendedsolutions, 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 specification 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 flows, an outlet boundary

    located where the flow 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 onhow the flow is partitioned between the outlets.

    (b) Prescribed flow split outlets coexisting with prescribed mass outflowboundaries in the same domain.

    (c) A combination of prescribed pressure and flow-split outlet conditions.

    Boundary conditionsAnother source of potential difficulty is in boundary value specification whereverknown 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 specification of their boundaryvalues, including the turbulence transport equations when they are invoked

    Inappropriate setting of boundary values leads to erroneous results and, inextreme cases, to numerical instability

    The following recommendations can be given regarding each different type ofboundary:

    1. Prescribed flow 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 flow boundary imposed, overall

    continuity is satisfied (STAR-CD will accept inadvertent massimbalances of up to 5%, correcting them by adjusting the outflows. Anerror message is issued if the imbalance exceeds this figure).

    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

    flow is everywhere outwardly directed; also to recognise that, if inflow

  • COMPUTATIONAL ANALYSIS PRINCIPLES Chapter 1

    Boundary description

    1-12 Version 4.02

    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 flow split between them or the mass outflow rate ateach location.

    (c) The inapplicability of prescribed split outlets to problems where theinflows are not fixed, e.g.

    i) in combination with pressure boundary conditions, orii) in the case of transient compressible flows.

    3. Prescribed pressure The main precautions are:(a) To specify relative (to a prescribed datum) rather than absolute pressures.(b) If inflow is likely to occur, to assign realistic boundary values to

    temperature and species mass fractions. It is also advisable to specify theturbulence parameters indirectly, via the turbulence intensity and lengthscale or by extrapolating them from values in the interior of the solutiondomain.

    4. Stagnation conditions It is recommended to use this condition forboundaries lying within large reservoirs where properties are not significantlyaffected by flow conditions in the solution domain.

    5. Non-reflecting pressure and stagnation conditions A specialformulation of the standard pressure and stagnation conditions, developed tofacilitate analysis of steady-state turbomachinery applications

    6. Cyclic boundaries These always occur in pairs. The main points of adviceare:

    (a) Impose this condition only in appropriate circumstances.Two-dimensional axisymmetric flows with swirl is a good example of anappropriate application.

    (b) For axisymmetric flows, make use of the CD/UD blending scheme toapply the maximum level of central differencing in the tangentialdirection (the default blending factor is 0.95; see also on-line Help topicMiscellaneous Controls in STAR GUIde).

    7. Planes of symmetry It is recommended to use this condition fortwo-dimensional axisymmetric flows without swirl

    8. Free-stream transmissive boundaries Used only for modelling supersonicfree streams

    9. Transient wave transmissive boundaries Used only in problems involvingtransient compressible flows

    10. Riemann boundaries This condition is based on the theory of Riemanninvariants and its application allows pressure waves to leave the solutiondomain without reflection

  • Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

    Numerical solution control

    Version 4.02 1-13

    Numerical solution controlProper control of the numerical solution process applied to the transport equationsis highly important, both for acceptable computational efficiency and, sometimes,in order to achieve a solution at all. By necessity, the means of controlling theprocess depend heavily on the particular numerical techniques employed so nouniversal guidelines can be given. Thus, the recommended settings vary with theparticular algorithm selected and the circumstances of application.

    Selection of solution procedureThe basic selection should be based on a correct assessment of the nature of theproblem and will be either

    a transient calculation, starting from well-defined initial and boundaryconditions and proceeding to a new state in a series of discrete time steps; or

    a steady-state calculation, where an unchanging flow/deformation patternunder a given set of boundary conditions is arrived at through a number ofnumerical iterations.

    PISO and SIMPLE are the two alternative solution procedures available inSTAR-CD. PISO is the default for unsteady calculations and is sometimes preferredfor steady-state ones, in cases involving strong coupling between dependentvariables such as buoyancy driven flows. SIMPLE is the default algorithm forsteady-state solutions and works well in most cases.

    SIMPLE is also used for transient calculations in the case of free surface andcavitating 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 usuallycheaper than outer iterations on all variables within a time step of the transientSIMPLE algorithm. However, there are situations in which PISO would requiremany correctors or even fail to converge unless the time step is reduced, whereasSIMPLE may allow larger time steps with a moderate number of outer iterations pertime step. This is the case when the flow changes very little but certain slowtransients are present in the behaviour of scalar variables (e.g. slow heating up ofsolid structures in the case of solid-fluid heat transfer problems, deposition ofchemical 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 asteady-state solution or when iterative convergence is difficult to achieve, it is betterto perform the calculations using the transient option.

    Transient flow calculations with PISOAs stated in The PISO algorithm on page 7-2 of the Methodology volume, PISOperforms at each time (or iteration) step, a predictor, followed by a number ofcorrectors, during which linear equation sets are solved iteratively for each maindependent variable. The decisions on the number of correctors and inner iterations(hereafter referred to as sweeps, to avoid confusion with outer iterationsperformed as part of the steady-state solution mode) are made internally on the basisof the splitting error and inner residual levels, respectively, according to prescribedtolerances and upper limits. The default values for the solver tolerances and

  • COMPUTATIONAL ANALYSIS PRINCIPLES Chapter 1

    Numerical solution control

    1-14 Version 4.02

    maximum correctors and sweeps are given in Table 1-1. Normally, these will onlyrequire adjustment by the user in exceptional circumstances, as discussed below.

    The remaining key parameter in transient calculations with PISO is the size of thetime increment . This is normally determined by accuracy considerations andmay be varied during the course of the calculation. The step should ideally be of thesame order of magnitude as the smallest characteristic time for convection anddiffusion, i.e.

    (1-1)

    Here, U and are a characteristic velocity and diffusivity, respectively, and isa mean mesh dimension. Typically, it is possible to operate with andstill obtain reasonable temporal accuracy. Values significantly above this may leadto errors and numerical instability, whereas smaller values will lead to increasedcomputing 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 occurduring the start-up phase but is nevertheless acceptable if, later on, the warningseither cease entirely or only appear occasionally, and the predictions lookreasonable. 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 improvesmatters, then the cause may simply be an excessively large .

    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, twofoldchanges are appropriate.

    Pressure under-relaxation a value of 0.8 for pressure correctionunder-relaxation, using PISO, may be helpful for some difficult cases (e.g. forsevere mesh distortion or flows with Mach numbers approaching 1).

    Corrector step tolerance this may be set to a lower value but consult

    Table 1-1: Standard Control Parameter Settings for Transient PISOCalculations

    ParameterVariable

    Velocity Pressure Turbulence Enthalpy Mass fraction

    Solvertolerance 0.01 0.001 0.01 0.01 0.01

    Sweep limit 100 1000 100 100 100

    Pressure under-relaxation factor = 1.0

    Corrector limit = 20

    Corrector step tolerance = 0.25

    t

    tc

    tc minLU------

    L2------------,

    =

    Lt 50 tc

    t

  • Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

    Numerical solution control

    Version 4.02 1-15

    CD adapco first.

    Steady-state flow calculations with PISOWhen PISO operates in this mode, the inner residual tolerances are decreased andunder-relaxation is introduced on all variables, apart from pressure, temperature andmass fraction. However, the last two variables may need to be under-relaxed forbuoyancy driven problems. The standard, default values for these parameters andthe sweep limits, which are unchanged from the transient mode, are given in Table1-2.

    .

    These settings should, all being well, result in near-monotonic decrease in theglobal residuals during the course of the calculations, depending on mesh densityand other factors. If, thereafter, one or more of the global residuals do not fall,then remedial measures will be necessary. In some instances, the offendingvariable(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 ofbetween 0.05 and 0.10 and should be applied to the velocities if themomentum and/or mass residuals are at fault.

    Decrease in solver tolerances as in the transient case, this may provebeneficial, especially in respect of the pressure tolerance and its importance tothe flow solution. A twofold reduction should indicate whether this measurewill work.

    Increase in sweep limits if warning messages about the limits beingreached appear and are not suppressed by measures 1 and 2, then it may beworthwhile increasing the limit(s) on the offending variables.

    Under-relaxation of density and effective viscosity use of this method fordensity can be advantageous where significant variations occur,e.g. compressible flows, combustion, and mixing of dissimilar gases.Effective viscosity oscillations can arise in turbulent flow and non-Newtonianfluid flow and can be similarly damped by this device.

    Table 1-2: Standard Control Parameter Settings for Steady PISOCalculations

    ParameterVariable

    Velocity Pressure Turbulence Enthalpy Mass fraction

    Solvertolerance 0.1 0.05 0.1 0.1 0.1

    Sweep limit 100 1000 100 100 100

    Relaxationfactor 0.7 1.0 0.7 0.95 1.0

    Corrector limit = 20

    Corrector step tolerance = 0.25

    R

  • COMPUTATIONAL ANALYSIS PRINCIPLES Chapter 1

    Numerical solution control

    1-16 Version 4.02

    Steady-state flow calculations with SIMPLEAs noted previously, the control parameters available for SIMPLE are similar tothose for PISO, except that, in the case of the former, a single corrector stage isalways used and pressure is under-relaxed. The standard (default) settings are givenin Table 1-3.

    .

    In the event of failure to obtain solutions with the standard values, then the measuresto be taken are essentially the same as those for iterative PISO, given in the previoussection. However, here, reduction of the pressure relaxation factor is an additionaldevice for overcoming convergence problems. The problems usually arise eitherfrom a highly distorted mesh, or from highly complex physics (many variablesaffecting each other). If the grid is distorted, one should reduce the relaxation factorfor pressure from the beginning of the run (e.g. to 0.1). If convergence problems arestill encountered, a substantial reduction of the under-relaxation factor for velocitiesand turbulence model variables should be tried (e.g. to 0.5). If this does not help, theproblem may lie in severe mesh defects or errors in the set-up. Further reduction ofunder-relaxation factors may be tried if the grid is severely distorted and cannot beimproved; otherwise, improving the mesh quality can be of much greater help.

    Note that the pressure under-relaxation factor needs to be adjusted within thelimits of some range to make the iteration process converge, where the number ofiterations required to reach such convergence is mainly dictated by thecorresponding factors for velocities (and for scalar variables when strongly coupledto the flow). In the case of well-behaved flows and reasonable meshes, therelaxation factor for pressure can be selected as (1.0 - relaxation factor forvelocities), e.g. 0.2 for pressure and 0.8 for velocities. Usually, for a given velocityrelaxation factor, the one for pressure can be varied within some range withoutaffecting the total number of iterations and computing time, but outside this rangethe 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.05and 0.8 if the velocity factor is low, say around 0.5). On the other hand, this rangebecomes narrower when the mesh is distorted.

    The limit to which the velocity relaxation factor can be increased is bothproblem- and mesh-dependent. When many similar problems need to be solved, itis worth trying to work near the optimum as this may save a lot of computing time.

    Table 1-3: Standard Control Parameter Settings for Steady SIMPLECalculations

    ParameterVariable

    Velocity Pressure Turbulence Enthalpy Mass fraction

    Solvertolerance 0.1 0.05 0.1 0.1 0.1

    Sweep limit 100 1000 100 100 100

    Relaxationfactor 0.7 0.3 0.7 0.95 1.0

  • Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

    Numerical solution control

    Version 4.02 1-17

    On the other hand, for an one-off analysis, it may be more efficient to use aconservative setting.

    Note that under some conditions, such as those in Tutorial 13.1, a steady-statesolution cannot be achieved due to the inherent unsteady character of the flow. Thisis often the case when the problem geometry possesses some form of symmetry butthe Reynolds (or another equivalent) number is high and recirculation zones arepresent. In this case the residuals stop falling at some level and then continue tooscillate. The solution at that stage may be far from a valid solution of thegoverning equations and should not be interpreted as such unless the residual levelis 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 asteady-state solution, while a less diffusive turbulence model (such as ReynoldsStress and non-linear eddy-viscosity models) combined with a higher-orderdifferencing scheme (such as central differencing) may not. In such cases, atransient simulation should be performed; the unsteady solution may oscillatearound a mean steady state, in which case the quantities of interest (drag, lift, heattransfer coefficient, pressure drop, etc.) can be averaged over several oscillationperiods.

    Transient flow calculations with SIMPLEThe use of this algorithm in transient calculations essentially consists of repeatingthe steady-state SIMPLE calculations for each prescribed time step. The defaultcontrol parameter settings are therefore as summarised in Table 1-4.

    .

    The main difference compared to the PISO algorithm lies in the fact that alllinearizations and deferred correctors are updated within the outer iterations, byrecalculating the coefficient matrix and source term. For this reason, solvertolerances do not need to be as tight as for PISO; they are actually identical to thoseused for steady-state computations. However, since the discretization of thetransient term enlarges the central coefficient of the matrix in the same way asunder-relaxation does, the relaxation factors for velocities and scalar variables canbe increased (the smaller the time step, the larger the values that can be used forrelaxation factors 0.95 or even more).

    The convergence criterion for outer iterations within each time step is by default

    Table 1-4: Standard Control Parameter Settings for Transient SIMPLECalculations

    ParameterVariable

    Velocity Pressure Turbulence Enthalpy Mass fraction

    Solvertolerance 0.1 0.05 0.1 0.1 0.1

    Sweep limit 100 1000 100 100 100

    Relaxationfactor 0.9 0.3 0.7 1.0 1.0

    Outer iteration limit = 5

  • COMPUTATIONAL ANALYSIS PRINCIPLES Chapter 1

    Numerical solution control

    1-18 Version 4.02

    the same as for steady-state flows. However, the number of outer iterations is alsoset to a default limit of 10; if substantially more iterations are needed to satisfy theconvergence criterion, this is a sign that the time step is too large. In such a case, itis better to reduce the time step rather than allow more outer iterations for a largertime 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, onemay increase the time step; experience shows that optimum efficiency and accuracyare achieved if 5 to 10 outer iterations per time step are performed.

    Note also that the reported mass residuals are computed before solving thepressure-correction equation; after this equation is solved and mass fluxes arecorrected, the mass residuals are more than an order of magnitude lower. For thisreason, one can accept mass residuals being somewhat higher than the convergencecriterion when the limiting number of outer iterations is reached, provided that theresiduals of all other equations have satisfied the criterion. In some cases, anincrease in the under-relaxation factor for pressure (up to 0.8) can lead to a fasterreduction of mass residuals. All these considerations are of course problem-dependent and if several simulations over a longer period need to be performed, itmay 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 atransient simulation than those at later stages. This is the case, for example, whenstarting with a fluid at rest and imposing a full-flow rate at the inlet, or full speed ofrotation (in the absence of a better initial condition). This is equivalent to a suddenchange of boundary conditions at a later time, which would also require that thetime step be reduced. Another possibility of avoiding problems with abrupt startsfrom rest is to ramp the boundary conditions (e.g. a linear increase of velocity fromzero to full speed over some period of time).

    The transient SIMPLE algorithm allows you to select either the defaultfully-implicit Euler scheme or the three-time-level scheme for temporaldiscretisation, described in Chapter 4, Temporal Discretisation of theMethodology volume. The latter scheme is second-order accurate but is currentlyapplied only to the momentum and continuity equations. It should be chosen whentemporal variation of the velocity field is essential, e.g. in the case of a DES/LEStype 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 qualityetc.), transient SIMPLE may allow the use of larger time steps than PISO withoutloss of accuracy.

    Effect of round-off errorsEfforts have been made to minimise the susceptibility of STAR-CD to the effectsof machine round-off errors, but problems can sometimes arise when operating insingle precision on 32-bit machines. They usually manifest themselves as failure ofthe iterative solvers to converge or, in extreme cases, in divergence leading tomachine overflow.

    If difficulties are encountered with problems of this kind, then it is clearlyadvisable to switch to double precision calculations. Instructions on how to do thisare provided in the Installation Manual. As a general rule, however, you should tryto avoid generating very small values for cell volumes and cell face areas byworking with sensible length units. Alternatively, you could re-specify your

  • Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

    Monitoring the calculations

    Version 4.02 1-19

    problem geometry units while preserving relevant non-dimensional quantities suchas Re and Gr.

    Choice of the linear equation solverSTAR-CD offers two types of preconditioning of its conjugate gradient linearequations solvers: one which vectorises fully, and the other, which is numericallysuperior to the first one but vectorises only partially. Therefore, the first one (calledvector solver) is recommended when the code is run on vector machines (such asFujitsu and Hitachi computers), and the second one (called scalar solver) isrecommended 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 theinformation extracted from the calculations at each iteration or time step and usedfor monitoring and control purposes. This consists of:

    Values of all dependent variables at a user-specified monitoring location.Care should be taken in the choice of location, especially for steady-statecalculations. Ideally, it should be in a sensitive region of the flow where theapproach to the steady state is likely to be slowest, e.g. a zone of recirculation.In transient flow calculations, the information has a different significance andother criteria for choice of location may apply. For example, a location maybe chosen so as to confirm an expected periodic behaviour in the flowvariables.

    The normalised global residuals for all equations solved. Apart fromturbulence dissipation rate residuals (see Chapter 7, Completion tests in theMethodology volume), these are used to judge the progress and completion ofiterative calculations for steady and pseudo-transient solutions. In the earlystages of a calculation, the non-linearities and interdependencies of theequations may result in non-monotonic decrease of the residuals. If theseoscillations 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 theMethodology volume) may not be appropriate for the application.

    2. It is also necessary that the features of interest in the solution should havestabilised to an acceptable degree.

    If doubts exist in either respect, it is advisable to reduce the tolerance and continuethe calculations.

    It follows from the above discussion that strong reliance is placed on the globalresiduals to judge the progress and completion of iterative calculations of steadyflows. These quantities provide a direct measure of the degree of convergence of theindividual equation sets and are therefore useful both for termination tests and foridentifying problem areas when convergence is not being achieved.

    R

  • COMPUTATIONAL ANALYSIS PRINCIPLES Chapter 1

    Model evaluation

    1-20 Version 4.02

    Model evaluationChecking the modelSTAR-CD offers a variety of tools to help assess the accuracy and effectiveness ofall aspects of the model building process. In performing the modelling stagesdiscussed previously, the user should therefore take advantage of these facilities andcheck that:

    1. The mesh geometry agrees with what it is