406

Click here to load reader

Star CCm Guide

Embed Size (px)

DESCRIPTION

star

Citation preview

Page 1: Star CCm Guide

CCM USER GUIDE

STAR-CD VERSION 4.02

CONFIDENTIAL — FOR AUTHORISED USERS ONLY

© 2006 CD-adapco

Page 2: Star CCm Guide
Page 3: Star CCm Guide

Version 4.02 i

TABLE OF CONTENTS

OVERVIEW

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

2 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-15

Page 4: Star CCm Guide

ii Version 4.02

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

3 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

Page 5: Star CCm Guide

Version 4.02 iii

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

4 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-20

Page 6: Star CCm Guide

iv Version 4.02

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

5 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-4

Page 7: Star CCm Guide

Version 4.02 v

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

6 POROUS MEDIA FLOW

Setting Up Porous Media Models ............................................................................. 6-1

Useful Points ............................................................................................................. 6-4

7 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

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

Page 8: Star CCm Guide

vi Version 4.02

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

9 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-13

Page 9: Star CCm Guide

Version 4.02 vii

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

Page 10: Star CCm Guide

viii Version 4.02

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

Page 11: Star CCm Guide

Version 4.02 ix

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

APPENDICES

A pro-STAR CONVENTIONSCommand 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 USAGEC PROGRAM UNITSD pro-STAR X-RESOURCESE USER INTERFACE TO MESSAGE PASSING ROUTINESF 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

Page 12: Star CCm Guide
Page 13: Star CCm Guide

Version 4.02 1

OVERVIEW

PurposeThe 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 user’s 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.

Page 14: Star CCm Guide
Page 15: Star CCm Guide

Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

Introduction

Version 4.02 1-1

Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

Introduction

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 Process

The 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 system’s 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.).

Page 16: Star CCm Guide

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 discretisation

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

Page 17: Star CCm Guide

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 definition

Through 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 user’s 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 system’s 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.

Page 18: Star CCm Guide

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 to‘close-off’ the solution domain in regions not covered by the other two typesof boundary. Their location is entirely up to the user’s 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 definition

Creation 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 latter’s 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

Page 19: Star CCm Guide

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 distortion

Mesh 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

Page 20: Star CCm Guide

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 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 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-CD’s 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 45°Warp angle 45°

Page 21: Star CCm Guide

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 walls

As 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

Innerregion

y

(a) Wall function model

y+

y+

Page 22: Star CCm Guide

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

Correct 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+

Page 23: Star CCm Guide

Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

Problem characterisation and material property definition

Version 4.02 1-9

Nature of the flow

It 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 properties

The 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-CD’s facility for alternative, user-programmablefunctions may be used.

Force fields 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 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

Page 24: Star CCm Guide

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 conditions

The 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 description

As 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+=

Page 25: Star CCm Guide

Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

Boundary description

Version 4.02 1-11

first instance.

Boundary location

Difficulties 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 conditions

Another 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 theturbulence parameters, and also to auxiliary quantities, such as density.

(b) Ensure that, if this is the only type of flow boundary imposed, overallcontinuity 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 theflow is everywhere outwardly directed; also to recognise that, if inflow

Page 26: Star CCm Guide

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 topic“Miscellaneous 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

Page 27: Star CCm Guide

Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

Numerical solution control

Version 4.02 1-13

Numerical solution control

Proper 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 procedure

The 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 PISO

As 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

Page 28: Star CCm Guide

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 min δLU------ ρδL2

Γ------------,

⎝ ⎠⎜ ⎟⎛ ⎞=

δLδt 50 δtc≈

δt

Page 29: Star CCm Guide

Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

Numerical solution control

Version 4.02 1-15

CD adapco first.

Steady-state flow calculations with PISO

When 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

Page 30: Star CCm Guide

COMPUTATIONAL ANALYSIS PRINCIPLES Chapter 1

Numerical solution control

1-16 Version 4.02

Steady-state flow calculations with SIMPLE

As 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

Page 31: Star CCm Guide

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 SIMPLE

The 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

Page 32: Star CCm Guide

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 errors

Efforts 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

Page 33: Star CCm Guide

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 solver

STAR-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 (called‘vector’ 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 calculations

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

Page 34: Star CCm Guide

COMPUTATIONAL ANALYSIS PRINCIPLES Chapter 1

Model evaluation

1-20 Version 4.02

Model evaluation

Checking 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 supposed to represent. This isgreatly facilitated by the built-in graphics capabilities that allow the meshdisplay to be

(a) rotated,(b) displaced,(c) reduced,(d) enlarged.

This enables the user to look at the mesh from any viewpoint, with the viewshowing the correct three-dimensional perspective. Frequent mesh displaysduring the mesh generation stage are very useful for verifying the accuracy ofwhat is being created and are therefore strongly recommended, particularlyfor complex-geometry problems. It is best if such geometries are subdividedinto convenient parts that can be individually meshed and then checkedvisually.

2. Materials of different physical properties occupy the correct location in themesh. This can be checked visually by using the built-in colour differentiationscheme. Alternatively, each material’s mesh domain can be plottedindividually. Precise values of specified properties can be checked via thescreen 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 specified boundary values can be obtainedfrom the screen printout.

4. The initial conditions should also be checked, particularly for transientproblems and initial fields specified through user subroutines, by running theSTAR-CD solver for zero iterations/time steps and plotting the relevant fieldvariables.

Checking the calculationsHaving completed the model preparation, the next task is to run the STAR-CDsolver and check the results of the numerical calculations. These results arepresented in various ways, details of which are given in the Post-Processing UserGuide. Briefly, printouts and/or plots can be produced of the following:

• Field values of all primary variables at interior and boundary nodes.• Interpolated values of the above quantities at arbitrary, user-specified points

or surfaces within the solution domain.

Page 35: Star CCm Guide

Chapter 1 COMPUTATIONAL ANALYSIS PRINCIPLES

Model evaluation

Version 4.02 1-21

• Surface heat and mass transfer coefficients and forces; also values of thedimensionless coordinate y+ for near-wall mesh nodes.

• Global quantities such as total force components (e.g. drag, lift) onsubmerged bodies and their dimensionless counterparts, overall energybalances, etc.

It is important to examine this information carefully to verify that the calculationshave been properly set up and are producing sensible results. In particular, the usershould ensure that:

• The interior fields are examined for plausibility and similar checks made onglobal quantities.

• For turbulent flow calculations, the near-wall node y+ values are within therecommended range (30-100) in regions where adherence to this constraint isimportant. In the case of calculations with a two-layer model, checks shouldbe made that the mesh is sufficiently dense within the near-wall layer.

• The magnitude of numerical discretisation errors (spatial and, whererelevant, temporal) is assessed and arrangements made for their reduction toacceptable levels, if necessary.

Of the above tasks, the last is currently the most difficult, for it is not possible toachieve it by a simple calculation. What is required are the following:

• A reliable means of evaluating the discretisation errors. At present, this isaccomplished by repeating the calculations with finer meshes and smallertime steps (strictly, these should be done independently) and noting regions ofappreciable change in the solution.

• Strategies for altering the mesh or time step to reduce errors. Theseadjustments are made manually.

Ideally, the error correction process should continue until the changes fall toacceptable levels. In practice, this approach may not be feasible, especially forthree-dimensional problems involving complex geometries, due to the largepreparation and computing overheads.

An alternative way of gaining some insight into the presence of spatial truncationerrors is to change the spatial discretisation scheme and note the effect on thesolution. The second-order options, or blends thereof, available in STAR-CD willusually produce the lowest numerical errors.

Page 36: Star CCm Guide
Page 37: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Introduction

Version 4.02 2-1

Chapter 2 BASIC STAR-CD FEATURES

Introduction

The main aim of this part of the manual is to provide users, whether experienced ornot in the application of general-purpose computational continuum mechanicscodes, with advice on effective ways of setting up and running a basic continuummechanics model using STAR-CD. The reader is, however, expected to have gonethrough Chapter 1 and the material in the Methodology volume.

All aspects of user interaction are handled by pro-STAR, the pre- andpost-processing subsystem of the STAR-CD suite. As a pre-processor, pro-STARis the means by which the user defines the

• geometry,• calculation mesh,• boundary conditions,• initial conditions,• fluid and solid material properties,• analysis controls,

which uniquely determine the problem to be solved. As a post-processor,pro-STAR can

• read and re-format the various data files produced by the analysis,• manipulate the data read in,• produce extensive and easily comprehensible printouts,• summarise information on the calculated results,• draw sophisticated 3-D graphical images,• animate those images,• draw graphs of various calculated quantities.

Both pre- and post-processing operations are served by an extensive set of plottingfacilities, enabling rapid visualisation of even the largest models, plus on-linecontext sensitive help that provides detailed information on usage.

pro-STAR is a combined command-, menu-, and process panel-driven program.The choice of working interface is entirely up to the user and depends on

• whether the available terminal can accept and display graphical input andoutput,

• whether the host computer’s operating system supports a windowed,graphical user interface (GUI) environment,

• user preference and level of experience with STAR-CD.

GUI facilities are available for UNIX, Linux or Windows implementations ofSTAR-CD using the OSF Motif graphics environment. They consist of two basictypes:

1. Graphical tools such as drop-down menus, dialog boxes, push-buttons,sliders, etc. to assist users in specifying the desired pro-STAR actions. Thesefacilities are arranged around the main pro-STAR window, or have theirstarting point located somewhere on that window. Their purpose and best wayof using them are explained throughout this volume.

Page 38: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Running a STAR-CD Analysis

2-2 Version 4.02

2. A series of process-oriented panels contained within the STAR GUIdewindow. These represent an additional GUI facility, suitable for buildingSTAR-CD models from scratch. An outline description is given in the sectionentitled “The STAR GUIde Environment” on page 2-38. Information on howto use this environment is provided by an on-line Help system accessed fromwithin the STAR GUIde window.

Note, however, that:

• In the present release, a number of pro-STAR facilities are not accessible viaeither of the GUI systems. Where this is the case, the discussion is in terms ofcommands rather than GUI operations.

• For the convenience of users who prefer to work with commands, thedescription of every GUI panel and dialog box also includes a list ofcommands that have equivalent functionality. A summary of all pro-STARcommands is given in Appendix B of the Commands volume. A summary ofpro-STAR’s conventions regarding command syntax can be found in thisvolume, Appendix A. The same information is also available on line bychoosing Help > pro-STAR Help from the menu bar in the main pro-STARwindow and then selecting item PROGRAM (for command syntax) orCOMLIST (for command summary) in the scroll list at the bottom of theHelp dialog box.

• Details of all available commands and specific aspects of the command-drivenmode of operation are discussed in the Commands volume.

Whichever operating mode is chosen, the same principles of use apply, namely:

• A model is constructed or examined with the aid of numerous functions or‘tools’, each of them represented by a menu-item choice, a special dialog box,a STAR GUIde panel or a command.

• Tools are selected as necessary, in a sequence that is sensible for modellingpurposes. The recommended sequence is described in Chapter 1, “The BasicModelling Process” and is further elaborated in the Tutorials volume.

• A tool always provides instant feedback so the user can tell immediately if itwas used properly.

• Users can greatly influence the speed with which certain operations areperformed by intelligent use of the available options.

Running a STAR-CD Analysis

A STAR-CD analysis may be performed in one of the following two ways:

• By typing a series of script names in a shell or command prompt, eachdesigned to help you build a CFD model, obtain a solution and then displaythe analysis results. This is the original method of working with STAR-CDand, for reasonably experienced users, may be the quickest way of gettingresults.

• By employing a new utility, STAR-Launch, as an aid to navigating throughthe various STAR-CD functions. This method should be particularlybeneficial to novice users.

Page 39: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Running a STAR-CD Analysis

Version 4.02 2-3

Using the script-based procedure

To perform the analysis using scripts, the procedure described below should befollowed in the order indicated:

Step 1

Set up an appropriate environment for your STAR-CD system. The desiredpro-STAR setup is defined by a number of environment variables such as:

STARUSR — path to the location of files PRODEFS (for commandabbreviations) and PROINIT (for pro-STAR initialisation) — seeChapter 16, “Set-up Files”

MACRO_LOCAL and MACRO_GLOBAL — paths to the local and global macrolocations (see Chapter 16, “Macros”)

PANEL_LOCAL and PANEL_GLOBAL — paths to the local and globaluser-defined panel locations (see Chapter 16, “Panel definitionfiles”)

TMPDIR — path to the location of pro-STAR’s temporary (scratch) files

Further instructions on how to set the STAR-CD environment variables are givenin the Installation and Systems Guide, supplied with the STAR-CD installationCD-ROM. Note that these settings can usually be made once and for all, at the timewhen STAR-CD is first installed on your computer.

Step 2

Create a separate subdirectory for each case to be analysed and give it a descriptivename. This helps to organise the various files created during a run and makes itmuch easier to check or repeat previous work.

Step 3

Move to the appropriate subdirectory and start a pre-processing (model building)session by typing:

prostar

The system will respond by prompting you to define the pro-STAR variant you wishto use

Please enter the required graphics driverAvailable drivers are:x, xm, glm, mesa [xm]

where the options refer to the various types of graphics libraries commonly used forgraphical displays in workstations or X-terminals, i.e.

x — X-windowsxm — X-windows using the Motif interface for pro-STAR’s GUI

functionsglm — Motif interface plus the standard OpenGL libraries for

pro-STAR’s GUI functionsmesa — As above but using the Mesa OpenGL library (this option is not

available in Windows ports)

Page 40: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Running a STAR-CD Analysis

2-4 Version 4.02

The precise list of options displayed by the prompt depends on how the pro-STARenvironment was originally set up on your particular machine. Type in a responsethat is appropriate to the workstation or terminal you are using.

Note that pro-STAR automatically searches for the highest depth pseudo colour,direct colour or true colour visual that exists for your screen and uses it. This maybe overridden by specifying option -c when starting up pro-STAR, as shownbelow:

prostar -c

This is an 8-bit pseudo colour setting with shared colour map. The setting causes noscreen flashing but requires sufficient available colours to work.

Once the desired pro-STAR variant has been chosen, an introductory panelopens up leading you into STAR-CD’s model-building environment, as discussedin the section on “pro-STAR Initialisation”. From that point on, you may provideinput for setting up your model according to the descriptions given in the remainingchapters of this manual.

Step 4

When you have finished setting up your STAR-CD model, it is advisable to checkthe files created so far in your working directory. These should include:

• File .mdl, containing all user-supplied information about the model• File .ccm, containing a full description of the model geometry. The

STAR-CD solver operates only in SI units and all dimensions must thereforebe defined in metres. However, it is possible to scale the mesh dimensions bya scaling factor if non-SI units were used during mesh generation.

• File .prob, containing problem data, such as material properties, boundaryconditions, control parameters, etc.

• File .echo, containing a log (echo) of all instructions issued to pro-STARduring the session

Depending on the nature of your problem (e.g. whether it requires a specialmodelling facility such as Lagrangian multi-phase) additional files may be created.These are discussed fully in individual chapters of this volume dealing with suchtopics. A detailed description of all commonly used data files is given in Chapter17, “Commonly used files”.

Step 5

If user-defined subroutines are not required, go to Step 6.Otherwise, create a subdirectory called ufile and place your subroutine files

in it. The most convenient way of doing this is to create both the subdirectory andthe files from within the pro-STAR session (see Chapter 14, “Subroutine Usage”).Note that these files contain default (dummy) code to start with and you should editthem as necessary to insert your own code.

Step 6

Based on the geometrical and physical data of the model just created, you are nowin a position to run STAR. This may be done in one of the following ways:

1. Via STAR-GUIde’s “Run Analysis Interactively” panel. Examples of usingthis panel are provided in the Tutorials volume. This way, the STAR

Page 41: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Running a STAR-CD Analysis

Version 4.02 2-5

executable will be run automatically and the analysis results (in terms ofsolution residuals) will be displayed on a separate window; see “TheStarWatch Utility” on page 17-15 for more details.

2. By exiting from pro-STAR and then running STAR from your session’s shellor command prompt. For a large number of cases, it will be sufficient to typeone command. For a single-precision run, type:

star

whereas for a double-precision run, type:

star -dp

Please note that it is not necessary to provide the case name of the model youare running. However, for better bookkeeping, it is still important to keepevery case in its own directory.

In most cases, and based on the model characteristics specified inpro-STAR, STAR automatically recognises the default run-time requirementsand proceeds with the CCM analysis without further user input. Some cases,however, require the specification of additional options related to bothrun-time resources and/or behaviour. Briefly, the user can control theoperational behaviour of STAR in one of the following areas:

• Job precision (single or double precision)• Job control (to abort, kill or restart a job)• Environment (to export environment variables)• User coding (to control the compilation and/or linking of user-supplied

code)• Parallel setup (pertaining to domain decomposition variations, data

distribution and parallel communication libraries)• Resource allocation (to choose which machines to use)

A full list of such options can be obtained by typing:

star -h

or

star -help

The listing will also contain a short description of each option’s purpose. Amore complete description can be found in Appendix F of this manual.

Please note that, in general, one needs to specify the machine (node)resources for running STAR and this input is automatically used to determinethe type of run required. The following examples illustrate this point:

star Runs sequentially on the local node

star origin Runs sequentially on a host called origin

star 4 Runs in parallel with 4 processes on the local node

Page 42: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Running a STAR-CD Analysis

2-6 Version 4.02

star origin,16 Runs in parallel with 16 processes on a host calledorigin

star cheese,2 pickle,2 curry,2 rice,2Runs in parallel on a cluster of 4 machines with 2 processes each

Please note that, for parallel cases, the computational domain decompositionis automatically handled by the star front-end script. The output filesgenerated during the course of the run will be merged and placed in the case’sdirectory. There is then no visible difference between running in sequentialand running in parallel.

Extra options exist to cater for special situations which cannot be detectedautomatically. Please refer to Appendix F for a list of such options, theirsyntax and their intended purpose.

Step 7

Once the run starts, iteration or time-marching continues until one of the followingconditions is met:

• All the iterations or time steps specified for the current run have beencompleted.

• The normalised residual sum drops below a specified value (steady-state runsonly).

• The solution starts to diverge. This occurs when a residual anywhere insidethe solution domain reaches a very high value or a numeric overflowcondition. Divergence is automatically detected by STAR, which then stopsthe calculations and writes a file with extension .div. This is identical informat and content to a normal solution data (.ccm) file and thus enables youto inspect the residuals and identify the mesh location(s) where numericalinstability has occurred.

Check the condition under which your run has terminated. The parameters involvedin controlling the STAR-CD simulation are set in pro-STAR using the facilitiesprovided by the “Analysis Controls” folder in STAR GUIde. Additionalinformation, such as printout of input data, boundary conditions, residual historiesof the inner iterative loops, etc. can also be generated, as described in Chapter 15.

Step 8

At the start of the analysis, STAR will read the following files:

• case.ccm — geometry data (plus solution data for restart runs)• case.prob — problem data

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

• case.vfs — view factors for radiation problems• case.evn — transient event data• case.drp — droplet data

On completion of the run, file case.ccm will contain the current analysis resultsin a form suitable for post-processing or for starting another STAR run. A numberof additional files will also be present in your working directory, including:

Page 43: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Running a STAR-CD Analysis

Version 4.02 2-7

• case.run — summary of input data plus numerical statistics and (optional)printout of solution variables

• case.info — STAR warning messages and (optional) additionalnumerical statistics

• case.rsi — Solution residuals, in a form that can be displayed graphically.

The above is the minimum number of output files created by a STAR run and youshould confirm that they are all present. Additional files may appear depending onthe nature of the problem. Such cases are discussed and explained individually inthe relevant chapters of this volume. A description of all commonly used outputfiles appears in Chapter 17, “Commonly used files”.

Note that, at the beginning of every restart run, all current results files (such asthe ones listed above) are automatically saved in a local sub-directory calledRESULTS.xxx, where xxx stands for the run number. These sub-directories thuscontain results obtained at the end of each successive run and are available for futureinspection, or as a backup in case the restart run’s files are corrupted. If the case issubsequently run from initial conditions, the results of the last run performed arestored in sub-directory RESULTS.000 and all other RESULTS directories deleted.The process then repeats itself with the creation of a new RESULTS directory foreach new restart.

Step 9

You should now check the results of the analysis by looking at the run history(.run) file (see Chapter 15 for more information on its contents). The additionalinformation (.info) file should also be examined for any signs of numericalproblems. These are normally translated into warning messages. Both these filesmay be inspected via a suitable text editor or via panel “Run History of a PreviousAnalysis” in STAR-GUIde.

Satisfactory completion of steady-state STAR runs can usually be judged byobserving the following quantities:

• The residual history printed during the run. The sum of the normalisedabsolute residuals should diminish steadily.

• The monitoring values of the dependent variables at a critical location withinthe solution domain. These should stabilise to the converged solution.

In transient calculations, completion is defined in terms of the elapsed (simulation)time or establishment of a steady state. In the latter case, information on the globalchange and monitoring values can be used in the same way as for a steady stateanalysis.

It is important that checks are made regularly during the initial stages of theanalysis to monitor the solution progress. If divergence occurs, the run should beterminated and appropriate adjustments made to the relevant control parameterssuch as under-relaxation factors. Neglecting this can result in costly andunproductive runs. Note, however, that increases in residuals and oscillations in thecomputed variables during the early stages of a run are not uncommon and shoulddisappear after a few iterations. The run should therefore be given sufficient time tostabilise before any judgement is made on its progress.

Step 10

Continue with an evaluation of the simulation results (post-processing) using the

Page 44: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Running a STAR-CD Analysis

2-8 Version 4.02

relevant facilities in STAR-GUIde. If you have previously exited from pro-STARand run STAR separately (see Step 6 above), continue by typing

prostar

to re-enter pro-STAR. Reply as before to the initial prompt

Please enter the required graphics driverAvailable drivers are:x, xm, glm, mesa [xm]

and then supply the case name and other input, as described in Step 3.

Using STAR-Launch

STAR-Launch is a graphical interface that provides access to most of the CD-adapco modelling tools, including pro-STAR, several es-tools and the STAR solver.Using STAR-Launch eliminates the need to enter multiple script names manually,as described in the previous section, and also ensures settings can be saved betweensessions and between cases. STAR-Launch is intended to be used with only onecase at a time. There is, however, no limit on the number of STAR-Launch windowsthat can be active simultaneously.

Activating STAR-LaunchOn Unix/LinuxEither double-click the appropriate icon on your desktop (for systems which supportthis), or else type

starlaunch &

in an appropriate X-terminal window. This will display the STAR-Launch mainwindow shown below:

On WindowsDouble-click the appropriate icon on your desktop.

Window layoutThe key parts of the STAR-Launch main window are highlighted below. The

Page 45: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Running a STAR-CD Analysis

Version 4.02 2-9

Shortcut Buttons provide quick access to the three main functions of STAR-Launch,namely:

• Setting the working directory• Launching a pre-/post-processing tool• Running the STAR solver

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

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

Main Menubar

Shortcut Buttons

Current Working Directory

Workspace for Process Output

Run STAR InteractivelyLaunch Pre-Post ToolSet Working Directory

Page 46: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Running a STAR-CD Analysis

2-10 Version 4.02

Navigate to the desired directory and click OK. Note that a path can be enteredmanually in the Look In entry box at the top of the browser window. The directorytree will be updated to reflect any valid path entered here.

The path that will be set on clicking OK is shown along the base of the browserwindow.

Starting a pre-/post-processing toolTo start a pro-STAR session, or an equivalent pre-/post-processing tool, select theappropriate entry in the Pre-Post menu, or click the second shortcut button on themain window. The tool that will be started from this button is set using the Pre-Posttab of the Preferences dialog. Only tools available in the current installation will belisted in the Pre-Post menu.

STAR-Launch will open a new Process Output window as shown below, whichwill contain any text generated by the Pre-/Post-processing tool as it starts up.

The STAR-Launch window can be resized as necessary to display more of the textappearing in the Process Output window.

Only one pre-/post-processing tool can be running at any one time. If an attemptis made to start another one, a prompt will appear asking if the existing tool should

Page 47: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Running a STAR-CD Analysis

Version 4.02 2-11

be closed. Choosing Yes will kill the existing process, which could result in loss ofany unsaved data.

When a process is active, the ball appearing in the Process Output window tabwill be shaded red. This will change to black when the process is finished.

Running STAR interactivelySelecting Solver > Run Star Interactively, or clicking the third shortcut button,will display the Run Star Interactively dialog shown below. The dialog providesseveral options for running the STAR solver; detailed information on these optionscan be found in the STAR-Launch On-line Help, accessed from Help > OnlineManual. When all settings have been made, the solver is started by clicking Run.STAR output will appear in a new Process Output window, similar to the oneshown above for the Pre-/Post-processing tool. When the STAR solver finishes, theball on the tab of the output window will turn black.

Note that only one STAR solver can be run at any one time from a STAR-Launchsession. If multiple solver processes are required, more STAR-Launch sessionsmust be opened.

STAR-Launch project files.starlaunch directory and launcherGlobal.xmlWhen STAR-Launch is first used, it will attempt to create a hidden directory,.starlaunch in the users home directory (as given by $HOME). Within thisdirectory, STAR-Launch will write file launcherGlobal.xml. The file isnormally written on exit from STAR-Launch and contains details of the lastworking directory specified by the user. It also stores a flag indicating whether thisstored path is to be used automatically in a new session.

starProject.xmlAnother file, starProject.xml, can be written by STAR-Launch if requestedby the user. This stores settings from the Preferences and Run Star Interactivelydialogs. The various File menu options affecting this are explained below:

• File > Open Project — This presents a file browser that should be used tofind the required starProject.xml file. STAR-Launch will be updated to

Page 48: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

pro-STAR Initialisation

2-12 Version 4.02

reflect settings from the new file.• File > Save Project — This will write a starProject.xml file in the

current working directory. Settings within the file will reflect the current stateof STAR-Launch.

• File > Save As Default — This will write a starProject.xml file in thehidden .starlaunch directory within the user’s home directory.

STAR-Launch start-up procedureWhen STAR-Launch is first started, it will look for the launcherGlobal.xmlfile in the hidden .starlaunch directory. This will be read to determine theinitial working directory. If a starProject.xml file is also contained in thehidden .starlaunch directory, STAR-Launch will read all settings within thefile, and use these to configure the initial state of the GUI. If astarProject.xml file is also found within the initial working directory,STAR-Launch will read the settings within that file, and use these to update theinitial state of the GUI. Settings contained in a local starProject.xml file (i.e.one within the initial working directory) will always take precedence over settingsobtained from a starProject.xml file in the hidden .starlaunch directory.

Preferences dialogSelecting File > Preferences... will display the Preferences dialog shown below:

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

pro-STAR Initialisation

Once the basic GUI mode of operation has been chosen (x, xm, glm or mesa, see“Running a STAR-CD Analysis”, Step 3 above, or via the Preferences dialog inSTAR-Launch), the introductory panel shown below appears. The following threeoptional inputs may be provided:

1. The desired case name — star is the default name assigned to the currentproblem at the start of a pro-STAR session. Overtype this by the correct namein the Case Name text box. Note that:

(a) If a model already exists in your present working directory, its name willbe picked up automatically by pro-STAR.

(b) If you have more than one model, you may choose the desired one byclicking on the file selection icon next to the Case Name box. This

Page 49: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

pro-STAR Initialisation

Version 4.02 2-13

activates a File Selection browser (see page 2-33) that enables you tochoose the desired model, stored in a file of form case.mdl

2. The Resume mode — This can be either a restart from an existing modeldefinition, via its corresponding model (.mdl) file or a brand new case. Clearthis option if the latter applies.

3. The Append mode — The session’s user input will be appended to an existinglog or echo (.echo) file or a new echo file will be created. Clear this option ifthe latter applies.

Refer to the description given in Chapter 17, “Commonly used files” for a definitionof pro-STAR’s model and echo files.

Click on Continue to display the basic pro-STAR GUI windows or Exit to abortthe current session.

Two windows are displayed automatically immediately following the initialisationstage. These are described in the sections entitled “Input/output window” below and“Main window” on page 2-15.

Input/output window

This window, shown on the next page, consists of the following three sub-windows,in top-to-bottom sequence:

1. Command Output — displays the time and date of the run, plus summarydata for the model in hand, if such data were read in from a Restart file at theinitialisation stage. All subsequent output in that window are the echo ofevery instruction issued by the user plus pro-STAR’s response to it. The latterserves as feedback to help determine whether a facility was used properly.

2. Command Input — accepts pro-STAR instructions in the conventional‘Command keyword plus parameters’ format described in the pro-STARCommands volume. Thus, it is possible to work in ‘command’ mode at anystage of the model building process despite the fact that the GUI version ofthe code is active. This is useful when working with facilities that cannot beactivated from a GUI panel or dialog box in the present pro-STAR version.This sub-window can be re-sized by dragging the control ‘sash’ (the smallsquare at the top right-hand corner) up and down.

3. Command History — provides a numbered ‘command history’ list that keepstrack of all pro-STAR instructions issued in the current session, either as

Page 50: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

pro-STAR Initialisation

2-14 Version 4.02

choices from a menu in the main GUI window (see “Main window” on page2-15) or as commands typed in the sub-window above. Menu choices aretranslated into their equivalent commands before being added to the list. Thelist can be used in the following two ways:

(a) Single-click the command number to copy a command into the Inputwindow and then edit it.

(b) Double-click the command number for immediate re-execution.

The Command History sub-window can be re-sized by dragging its control‘sash’ up and down.

Note that:

1. The Command Input sub-window can accept multiple commands by cuttingand pasting from the window of another application (e.g. a text editor). If anyof the imported command text needs editing prior to execution,

(a) click the Pause action button under the window (see the above panel)(b) paste in the required group of commands(c) make the necessary changes(d) click the Pause action button again to allow pro-STAR to begin executing

the commands one by one2. The Command History sub-window will normally list all commands issued to

pro-STAR, including those generated indirectly via an external command file(see Chapter 17, “Commonly used files”) or a user macro (see Chapter 16,

Page 51: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

pro-STAR Initialisation

Version 4.02 2-15

“Macros”). It will also list details (e.g. coordinate values) of items such asvertices, splines, cell faces, etc. that are directly picked from the main windowdisplay with the mouse. Such output may become extremely voluminous andmay thus obscure the record of primary operations performed by the user.Clicking the Short Input History button will prevent this and will causepro-STAR to list only the instructions directly issued by the user.

Main window

The main GUI window, shown below, is used for the following purposes:

• For graphical display of various aspects of the current model.• As a launch pad for those pro-STAR utilities that are available in GUI form.

The user should click one of the eleven drop-down menus appearing in themenu bar and select one of the displayed choices. Commonly used functionsaffecting the model display in the graphics area are also implemented, in theform of action buttons. These are distributed along the top and left-hand-sideborders of the window and are described in Chapter 4 of the Meshing UserGuide. Letting the mouse rest on top of any button causes a brief explanatorylegend to appear in a special window provided for this purpose.

• To show messages for the user, such as prompts to supply data, in the spaceunderneath the graphics area. The default display shows:

(a) The current plot parameters (see “Plot Characteristics” on page 4-3 of the

Page 52: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

pro-STAR Initialisation

2-16 Version 4.02

Meshing User Guide).(b) A clock display showing the current time and date. This may be turned on

or off by selecting Show Clock or Hide Clock from the Utility menu.(c) Three status indicators showing the result of processing the latest

command, irrespective of whether it was typed in directly or issued via aGUI operation. The indicators are arranged as a set of ‘traffic’ lightswhose significance when lit is as follows:

i) Green — the command was executed successfully. The displayedmessage is

Command: <Command Name> is Done

ii) Amber — the indicator flashes to signal the presence of warningmessages in the Output window. The displayed message is

Command: <Command Name> has a Warning, checkthe output window

iii) Red — the command has failed. The displayed message is

Command: <Command Name> has an Error. Clickon the red light to view the error

Clicking on the red light displays an Error/Warning Summarypop-up window with more information on what has gone wrong, asdiscussed under “Error messages” below.

Note that if a GUI operation generates a series of commands, a message isissued for each one in turn as soon as it is processed. If all goes well, themessage finally seen on the screen is for the last command that wasexecuted.

The menu bar

The menu bar items are listed below, along with a reference to chapters containinga detailed description of their functionality:

1. FileProvides all basic housekeeping utilities, including those related toinput/output operations — see Chapter 17, “File Handling”.

2. ToolsActivates dialog boxes that allow definition and manipulation of basicpro-STAR entities (cells, vertices, splines, etc.). Most of these are covered inChapter 2 of the Meshing User Guide. Another type of tool facilitatesroutinely-used, complex operations such as colour selection and mesh surfacelighting effects (see Chapter 4, “Colour settings” in the Meshing User Guide).

3. ListsDisplays lists of all available entities of a certain type (cells, vertices,boundaries, etc.) as well as those currently grouped into a user-defined set.

4. ModulesAccesses special dialog boxes that set up various STAR-CD model

Page 53: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

pro-STAR Initialisation

Version 4.02 2-17

parameters in connection with

(a) Animation control — see Chapter 12 of the Post-Processing User Guide(b) Transient condition definition — see Chapter 5, “Load-step based

solution mode”

5. PlotContains most of the facilities and options used for mesh plotting operations— see Chapter 4 of the Meshing User Guide.

6. PostDisplays the results of a STAR run — see Chapter 1 of the Post-ProcessingUser Guide.

7. GraphProduces various types of graph — see Chapter 14 of the Post-ProcessingUser Guide.

8. UtilityProvides miscellaneous utility functions designed to aid model control anddevelopment, such as calculation of cell volumes and distance betweenvertices — see Chapter 3, “Mesh and Geometry Checking”in the MeshingUser Guide. It also supports special user-controlled operations, such as theassignment of user-defined functions to keyboard keys.

9. PanelsAllows you to set up your own screen buttons or panel tools for performingcommon pro-STAR operations — see Chapter 16.

10. Favorites (optional)This menu appears only if you have chosen any ‘favourite’ (i.e. frequentlyused) panels in the STAR GUIde tree structure (see “Panel navigationsystem”). The relevant panels are listed under this menu, enabling you tojump to them directly.

11. HelpDisplays pro-STAR command help information in a scrolled-text fashion.Also contains on-line versions of the STAR-CD manuals and tutorials.

A mouse click on any of the above menu names displays a drop-down list. Ingeneral, clicking an item on the list starts up the action indicated, unless the nameis followed by

• an ellipsis (…) which means the item displays a new dialog box, or• an arrow (⇒) which means the item opens a secondary list with more items to

choose from.

Throughout this manual, the “>” sign denotes successive mouse clicks on menunames, menu list items, dialog box buttons, etc. For example,

Tools > Cell Tool > Edit Types

means click Tools in the menu bar, then click the Cell Tool item in the drop-downlist, then click the Edit Types button on the displayed Cell Tool dialog.

Page 54: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

General Housekeeping and Session Control

2-18 Version 4.02

General Housekeeping and Session Control

When pro-STAR is initially installed on a computer system, default settings areprovided for the program’s fundamental operating features. These settings,specified mostly via commands typed in the Command Input window, can bealtered in special circumstances. The following aspects of the program’s operationare covered:

Basic set-up

These settings are helpful in establishing an appropriate environment for pro-STARand for accessing facilities related to the operating system of the host machine. Theyare as follows:

1. Operating mode — command BATCH disables pro-STAR’s periodic promptsto stop or continue displaying long lists of data.

2. pro-STAR size — command SIZE lists the maximum number of cells,vertices, boundaries, etc. that the code can handle. If any of these values isinadequate for the model in hand, it may be increased by following theprocedure described in Chapter 17, “Resizing pro-STAR”.

3. Reporting cpu time required to complete a pro-STAR function by typingcommand TPRINT.

4. Accessing special, user-written pro-STAR subroutines by typing commandUSER. It is advisable to use this facility only after consultation withCD-adapco.

5. Communicating with the operating system itself. This may be done by firstchoosing File > System Command from the menu bar to display the SystemCommand dialog box shown below and then typing system commands in itstext box.

This is useful for issuing instructions to the host operating system withouthaving to exit from the pro-STAR environment.

Screen display control

There are several facilities for controlling the screen display during a session, asfollows:

• Defining the layout and look of the pro-STAR windows. Default settings arenormally used for these but the user can override them at will, as explained inChapter 16, “Set-up Files” and also in Appendix D.

• Switching from the terminal’s graphics screen to the text screen via commandTEXT. This is applicable only when running a non-GUI version of pro-STAR

Command: SYSTEM

Page 55: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

General Housekeeping and Session Control

Version 4.02 2-19

and is used for controlling terminals that operate entirely either in text or ingraphics mode.

• Setting the number of lines that appear on each ‘page’ of the CommandOutput window during lengthy listings using command PAGE.

• Displaying a history of the most recent commands issued during the sessionvia command HISTORY. Again, this applies only when running non-GUIversions of pro-STAR since these do not provide a command history window.

• Echoing the user input stream to the same device as the output stream (e.g. thescreen or a disk file) via command ECHOINPUT.

• Reading stored cursor picks from an input file, rather than displaying acrosshair cursor and reading the user-specified picks off the screen —command CURSORMODE.

• Providing a descriptive title for the current model that helps to identify eachplot produced subsequently — choose File > Model Title from the menu barto display the dialog box shown below. The desired title and up to two lines ofsubtitle text should be typed in the text boxes provided.

Error messages

pro-STAR issues error messages as a result of receiving incorrect commands or ifit is unable to execute a valid command for whatever reason. Such messages appearin three places:

• On the standard Output window• At the bottom of the main pro-STAR window, after the red indicator light (see

page 2-16)• On the Error/Warning Summary pop-up panel, as in the example shown

below:

Command: TITLE

Page 56: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

General Housekeeping and Session Control

2-20 Version 4.02

The panel shows a list of all current errors, including their error id and command inwhich the error occurred. If you know the cause of the problem, click Clear to closethe panel. Otherwise, select any item in the list to see the error description at thebottom of the panel.

CommandSUCCEED, typed on its own, tells you (in the output window) whetherthe previous command produced any errors or warnings. On the other hand, typedas SUCCEED, QUIT, it will immediately terminate the pro-STAR session. This canbe useful when pro-STAR is run in batch mode, where it is not desirable for the jobto continue after an error.

Error recovery

If mistakes are made during a session, the following operations are useful for errorrecovery:

• Re-executing a named range of previously issued commands by typingcommand RECALL. This can be most conveniently used in conjunction withthe HISTORY command above.

• Retrieving the state of the model description as it was at the time of theprevious SAVE or RESUME operation — command RECOVER. This isuseful if a mistake is made but the user does not notice it until some time later.A list of commands issued since the last SAVE or RESUME operation isdisplayed, along with a prompt to choose the last command in the list tore-execute. The chosen command will normally precede the one where themistake was made. Once all commands up to that point are re-executed, theuser should type in a correct command and carry on from there.

• Note that the above safety features can be switched off using commandSAFETY. This might speed up pro-STAR execution but at the potential cost ofmaking any sort of recovery from mistakes nearly impossible. Thus, turning

Page 57: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Set Manipulation

Version 4.02 2-21

off these features should be used with extreme caution.

Session termination

The current pro-STAR session is terminated by choosing File > Quit from the menubar. This displays the Quit pro-STAR dialog box shown below, reminding you tosave the results of the session to a .mdl file (in case this has not already been doneexplicitly). Alternatively, you may deliberately exit from pro-STAR without savingthe present session’s work, by clicking Quit, Nosave.

Set Manipulation

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

• C-> — cell sets• V-> — vertex sets• S-> — spline sets• Bk-> — mesh block sets• B-> — boundary sets• Cp-> — couple sets• D-> — droplet sets

Each button offers a wide range of possibilities to select, delete or re-select sets. Forexample, selection may be done by picking all objects falling within a givengeometric range in a local coordinate system. Using other criteria, one can collecttogether all cells or boundaries connected to the current vertex set (and the reverse).Selection can also take place by simply using the screen cursor to point to items onthe current plot.

Each button gives direct access to the following set manipulation options:

• All — select the entire set• None — empty out the current set• Invert — invert the current set, i.e. select all entities that are not currently

selected and un-select the ones that are• New — replace the current set with a new set, formed on the basis of a

criterion given in a secondary drop-down list• Add — add more members to the current set, selected using one of the criteria

in the secondary drop-down list• Unselect — remove some members from the current set, selected using one

Command: QUIT

Page 58: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Set Manipulation

2-22 Version 4.02

of the criteria in the secondary drop-down list• Subset — select a smaller group of members from those in the current set,

selected using one of the criteria in the secondary drop-down list

In addition, C-> offers one extra option, Surface, which selects all cells lying onthe surface of the most recent mesh plot and makes them the current set. Furtherdetails on the above set selection options are given in Chapter 2 of the Meshing UserGuide, for each of the mesh entities described there.

Note that it is possible to save and restore useful cell, vertex, spline, block,boundary and couple sets without the need to rebuild them frequently. This is doneby clicking the INFO button at the left-hand side of the main pro-STAR window.The following operations are possible:

1. To perform a ‘save set’ operation, select INFO > Store Set/Surface/Viewand then click the Sets tab to display the dialog shown below:

The input required is as follows:

(a) Set File — The name of the set (.set) file that will store the setdefinition. If such a file already exists, pro-STAR’s built-in file browsermay be used to help locate it.

(b) Name — An identifier for the set being saved, up to 80 characters long

Click Write to save the set definition.

2. To delete a set definition previously stored, use the same dialog as above andspecify the following information:

(a) Set File — The name of the set (.set) file containing the definition to bedeleted. pro-STAR’s built-in file browser may be used to locate it.

(b) Select Entry — The location of the set to be deleted, as select from thelist.

Click Delete to delete the set definition.

3. To perform a ‘restore set’ operation, select INFO > Recall Set/Surface/View

Commands: SETWRITE SETDELETE

Page 59: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Set Manipulation

Version 4.02 2-23

and then click the Sets tab to display the dialog shown overleaf:

The input required is as follows:

(a) Set File — The name of the set (.set) file containing the set definition.pro-STAR’s built-in file browser may be used to help locate it

(b) Select Entry — Select the particular set required by name from the scrolllist. The status of the selected entry is displayed in the box underneath

(c) Choose Data — Specify the type of set to be read in (All, Cells, Vertices,etc.) by clicking one of the displayed option buttons

(d) Read Option — Specify how the sets to be read in will modify anyexisting sets by selecting one of the menu options (Newset, Add,Unselect or Subset)

Click Recall to recall the selected set.

Note that it is possible to print a summary of all data sets stored so far bytyping command FSTAT.

Selecting sets of various entities has two major uses:

1. To display only items in the currently active set. For example, each time Cellplot is chosen from the Plot menu, pro-STAR plots only cells in the currentlyactive cell set. Note that command SETADD causes all newly-defined cells tobe automatically added to the current set. Thus, successive plots of the currentstate of the mesh can be made without needing to build a new set after eachnew cell definition. SETADD may also be used in the same way for otherkinds of sets, i.e. boundaries, cell couples and splines.

2. To perform almost any modelling or post-processing operation on the

Command: SETREAD

Page 60: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Table Manipulation

2-24 Version 4.02

currently active set, instead of on individual objects or a range of them. Forexample:

(a) Choosing Lists > Cells from the menu bar and clicking the Show CsetOnly option button will list only cells in the current set.

(b) When working with commands, typingVMOD,VSET,2.5will modify the X-coordinate of every vertex in the current vertex set.

All set operations can also be performed by typing commands CSET, VSET, BSET,BLKSET, CPSET, SPLSET and DSET. These are described in detail in thepro-STAR Commands volume.

Table Manipulation

pro-STAR tables are multi-variable entities akin to spreadsheets and can be used tostore values for up to 100 dependent variables as functions of a combination ofseveral independent variables. For most commonly used tables, the independentvariables can be the three spatial coordinates, plus time for transient cases oriteration for steady-state cases. The dependent variables are normally flow fieldsolution variables but, in principle, they could be anything of relevance toSTAR-CD.

Basic functionality

At present, tables are used principally as a substitute for user subroutines in thefollowing situations:

• Boundary Conditions — variable conditions along the surface of a boundaryregion; see Chapter 4, “Boundary Region Definition”, page 4-7. For mostboundary types, the independent variables may be any combination of spatialcoordinates and, for transient cases, time. The only exception is outletboundaries where only time is allowed (i.e. there can be no spatial variation inoutflow conditions along the outlet surface). The permissible dependentvariables vary according to the boundary type considered; a full list is givenunder the various boundary type descriptions in Chapter 4, or thecorresponding on-line Help topics for STAR GUIde’s “Define BoundaryRegions” panel.

• Initial Conditions — non-uniform initial distributions of field variables; seeChapter 4, “Solution Domain Initialisation”. The independent variables maybe any combination of spatial coordinates, for both steady and transient cases.The permissible dependent variables for fluid materials are listed under topic“Initialisation”. Scalar variables representing chemical species mass fractionsmay also be initialised, as described in a separate topic for scalar“Initialisation”. Note that:

(a) The applicability of field variable and scalar initialisation tables can berestricted to a selected domain or a cell type

(b) The only dependent variable allowed for solid materials is temperature

• Source Terms — a description of mass, heat, momentum or scalar speciessources; see Chapter 3, page 3-8. The independent variables may be any

Page 61: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Table Manipulation

Version 4.02 2-25

combination of spatial coordinates and time for transient cases, or iterationnumber for steady-state cases. The permissible dependent variables varyaccording to the source type considered; a full list is given in the on-line Helptopics for the various sources definable via panel “Source Terms”. Note that,as with initial conditions, the applicability of source tables can be restricted toa selected domain or a cell type.

• Rotational Speeds — variable angular velocity in rotating systems, specifiedin panel “Rotating Reference Frames”. The independent variable is time fortransient cases, or iteration number for steady-state cases. The dependentvariable is angular velocity, expressed in r.p.m.

• Run Time Controls — variable time step for transient cases, specified inpanel “Set Run Time Controls”. The independent variable is time, thedependent variable the time step size. Note that STAR assumes a linearvariation in step size between the size values entered at two consecutive timepoints. This is illustrated by the example below, showing the desired time stepvariation and the table structure needed to achieve it:

Figure 2-1 Example of time step variation

Table 2-1: Time step size table

TIME DT

0.0 0.01

1.0 0.1

5.0 0.1

5.0 0.2

10.0 0.3

20.0 0.3

0.35

0.3

0.25

0.2

0.15

0.1

0.05

0.00.00 5.00 10.00 15.00 20.00

DT

(se

c)

Time (sec)

Page 62: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Table Manipulation

2-26 Version 4.02

In addition, a special table type is used to enter problem data for LagrangianMulti-Phase cases. The following two options are available in this category:

• Mass Flow Rate — injection rate history, specified in panel “Spray Injectionwith Atomization” which activates STAR-CD’s built-in spray modellingfacilities. The table is used in transient analyses only and contains injectormass flow rates vs. time (see also topic “Define Injectors”). The same tabletype may also be used in panel “Injection Definition” as part of an explicitspecification of injection characteristics.

• Diameter Distribution Function — a definition of the droplet diameterdistribution function, in terms of spray percentage mass vs. droplet diameter.This table may also be specified in panel “Injection Definition”.

The table editor

Table data are stored in text files and may be created or modified either via asuitable text editor or via pro-STAR’s own GUI facilities. Both options are accessedby clicking the special table editor button

at the bottom left-hand side of the main window. The basic functionality of theeditor is described below.

New tablesTo create a new table, click New Table to display the table view shown below:

Page 63: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Table Manipulation

Version 4.02 2-27

Panel Data EntryTo use the dialog facilities directly, the following input is required (reading fromleft to right along the panel):

1. Table Title — enter a title up to 80 characters long, including spaces. Note,however, that only the first 30 characters found up to the first space in thestring are usable by STAR.

2. Coordinate System — specify the coordinate system number to be used forspatial independent variables (see “Coordinate Systems” on page 2-8 of theMeshing User Guide). A search button is provided for choosing any of thecurrently defined systems from the Coordinate Systems dialog. Depending onyour selection, the three space coordinates are interpreted as follows:

The coordinate names shown above inside parentheses should be used as tableheaders when creating a table outside this GUI environment.

3. Out of bound value options — prescribe the action to be taken if needing tocalculate dependent variable values at points lying outside the table range.Obviously, this does not apply to mass flow rate tables. The available optionsare:

(a) Error — issue an error message(b) Extrapolate — use the closest two data points to calculate an

extrapolated value(c) Cutoff — use the closest data point as the variable value

4. Select Table Type — choose the basic table type from the list of optionsdescribed under “Basic functionality”. The correct type is selectedautomatically if you enter the editor indirectly, i.e. by clicking button New ina STAR GUIde panel that requires the use of tables.

5. Select Dependent Variables — for boundary and source tables, select also thespecific type of boundary or source required from a secondary menu. All validvariables for the chosen table type are displayed automatically in the adjacentscroll list. To select an item from this list:

(a) For single items, click the desired variable(b) For two or more items in sequence, click the first variable, press and hold

down the Shift key, then click the last variable in the group(c) For a random selection, hold down the Cntrl key and then click each

variable in turn

6. Select Independent Variables — all valid variables for the chosen table typeare displayed automatically as a series of option buttons. Choose those neededto define your table by clicking the corresponding button.

7. Click Setup to confirm your selections and enter the data input mode, asshown in the example below.

Cartesian Cylindrical Spherical Toroidal

x (X)y (Y)z (Z)

r (R)θ (ΤΗΕΤΑ)

z (Z)

r (R)θ (ΤΗΕΤΑ)

φ (PHI)

r (R)θ (ΤΗΕΤΑ)

φ (PHI)

Page 64: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Table Manipulation

2-28 Version 4.02

The following points should be kept in mind when specifying table data:

• Table values should be entered for each dependent variable selected in step 5above. Your selection will be automatically reflected in the options shown onDependent Variables scroll box. Fill in all required data for the currentlyselected variable before scrolling to the next one.

• The left-hand side of the panel will display a number of columns, one for eachindependent variable selected in step 6 above. Fill each column with all thevalues assumed by that variable in the table, in ascending order.

• Tables containing two or more independent variables are essentiallymulti-dimensional and need to be specified as a series of two-dimensional x-ytables, as in a spreadsheet. Accordingly, a pair of independent variable valuesare displayed as row and column headings and the user fills in appropriatevalues for the current dependent variable, as shown in the example above.

• To create such two-dimensional tables:

(a) Select the required pair from the Independent Variables menu, noting thatpro-STAR activates only those combinations that correspond to thechoice made in step 6 above. The available pairs for the example shown(an X, Y, TIME selection) will be X - Y, X - TIME and Y - TIME andthe pair chosen is X - Y.

(b) Fix the other independent variable(s) to a desired value, by clicking theradio button next to that value in its column on the left-hand side. In theexample, TIME is fixed to 0.

Commands: TBDEFINE TBCLEAR TBWRITE TBGRAPH

Page 65: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Table Manipulation

Version 4.02 2-29

(c) Click the FILL button. This sets up the 2D table and displays the chosenpair’s values as row and column headings

(d) Fill the table with the required dependent variable values and then clickSave Data.

(e) Fix the other independent variable(s) to a different value and repeat steps(b) to (d) above as many times as necessary

(f) Select another pair from the Independent Variables menu and fill inanother series of 2D tables. This might happen, for example, if instead ofchoosing to enter an X - Y set for a series of fixed TIME’s, you choseinstead to enter X - TIME sets for fixed Y’s followed by Y - TIME setsfor fixed X’s.

• Tables for rotational speeds, run-time controls and Lagrangian multi-phasespecifications always have one independent variable and thus involve filling ina two-column table. The same also applies to the other tables if only a singleindependent variable is specified. A simplified display appears in the editorpanel in these cases.

Once your data input is complete, you may:

1. Check the table contents graphically by plotting them as a pro-STAR graph(see Chapter 14 of the Post-Processing User Guide). To use this facility:

(a) Select the variable to be checked from the Dependent Variables scrollbox. This will be plotted along the graph’s y-axis.

(b) Go to the graph setup section at the bottom of the panel (which nowdisplays the chosen variable) and select an independent variable from theversus scroll box. This will be plotted along the graph’s x-axis.

(c) The names of the remaining independent variable(s) will also bedisplayed in the const boxes. For the purposes of the graph, these will befixed to the value indicated by the radio button in each variable’s column.These values will also appear inside the @ boxes.

(d) Click Graph to see the result of your selection.

2. Save your data in a table file. The file name should have extension .tbl andshould be entered in the File Name box at the bottom of the panel.pro-STAR’s built-in browser may also be used to locate an existing file. ClickWrite Table to save your data in this file.

File Data EntryAn alternative method of generating a new table is to import existing tabular datafrom an ASCII file created outside pro-STAR. To use this method:

1. After opening the Table Editor dialog, select the Import button situated underthe New Table option. This will display the alternative panel view shownbelow.

Page 66: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Table Manipulation

2-30 Version 4.02

2. Click Instruction to open a special text panel giving detailed information onhow the user file shoud be structured and formatted. Check that your own fileconforms to this standard and modify if necessary.

3. Enter the name of your file in the ASCII Data File Name box, or usepro-STAR’s built-in file browser to help locate it.

4. Select option space or comma from the Delimiter menu to indicate how thenumerical values in your table are separated from each other.

5. Click Import to import your data into pro-STAR.6. Enter the remaining table specification items on the right-hand side of the

panel, as described on page 2-27.7. Check the table contents graphically, if required, and then save them in a

pro-STAR table file, as described on page 2-29.

Existing table display/modificationTo read and display the contents of an existing table, click Read Table at the topleft-hand side of the editor and then enter the file name (of form case.tbl) in theFile Name box. pro-STAR’s built-in browser may be used to help locate the file.

Once the table has been read, its contents can be checked visually using the graphfunction described in the previous section or modified as required. Note that:

1. You cannot add new dependent or independent variables to an existing table(or delete any that are currently defined)

Commands: TBREAD TBLIST TBMODIFY TBGRAPH

Page 67: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Plotting Functions

Version 4.02 2-31

2. You may alter both individual values and the number of such values for anyindependent variable. Click Save Modified Data to confirm the changes.

3. Changes to existing dependent variable entries are made by over-typing andconfirmed by clicking Save Data.

4. At the end of the editing session, you should always save your updated tablein a named file by clicking Write Table

Useful points

1. Only one table at a time may be loaded into the pro-STAR editor. If you needto access a second table, you must first save the current one to a named file (ifyou have made changes) before reading in the new one.

2. If you change your mind about the contents of your current table and wish tomake drastic change, clicking New Table enables you to erase all entries andstart afresh.

3. The scale factor applied when saving model geometry data (see Chapter 17,“Data repository file (.ccm)”) is also applied to table coordinate data whenthey are accessed by STAR.

4. Apart from the table file itself, table data needed for the next STAR-CDanalysis are also stored in the STAR problem file (see Chapter 17, “Problemdata file (.prob)”) so that they are available to STAR during the run. The userspecifies which tables will be needed as part of the boundary, initial conditionor other model specification requiring the use of tables.

5. You may use command TBSCAN to scan a named .tbl file. Informationabout its contents is displayed in the I/O window.

Plotting Functions

Basic set-up

The basic hardware-related plotting features are set by a single command,TERMINAL. This command sets:

• The display mode of X-based terminals (use option ALTERNATE only forimproving the plotting speed of certain older types of workstation). Thissetting may also be accessed from the menu bar by switching between optionsPlot > Standard Plot Mode and Plot > Alternate Plot Mode.

• The plot destination — this specifies whether plots are to appear directly onthe screen or written to the neutral plot file (see Appendix B in thePost-Processing User Guide).

• The operating mode of the plotting device — a choice between raster, vectoror extended (for high-performance workstations). It is also possible to togglebetween raster and extended plot mode by clicking the X / GL button at thebottom left-hand side of the main window. Note, however, that this option isavailable only if you are working with the glm version of pro-STAR (see“Running a STAR-CD Analysis”, Step 3).

The basic features of devices operating under one of the above modes are:

1. Vector devices, such as pen plotters, can draw lines in one or more colours,but are not generally capable of filling in closed polygons or erasing parts ofthe plot after drawing in them. When this mode is set:

Page 68: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Plotting Functions

2-32 Version 4.02

(a) All hidden-line plot calculations are done by software.(b) Large amounts of time may be required for large models.(c) All contour plots displayed as line contours rather than filled colours.

2. Raster devices, such as most workstation screens, Postscript laser printers,etc. are capable of filling in polygons quickly and overwriting previouslycoloured-in regions with new colours. When this mode is set:

(a) Hidden-line plots are done by hardware.(b) Contour plots are rendered in filled colours.(c) VECTOR mode operation is still possible if, for example, the user wants

fringe-style rather than filled-colour contour plots.

3. Extended mode devices offer additional functionality such as true (24-bit)colour, hardware Z-buffers, double-frame buffering, coordinatetransformation pipelines, Gouraud shading, etc. Machines with thesehigh-specification graphics attributes can provide:

(a) Real-time rotation, translation and zooming of plots.(b) Contour plots rendered in smoothly varying colour bands.(c) Added lighting effects to enhance a user’s perception of the model

geometry.

This style of plot is limited to machines that support the OPENGL standardand cannot be stored in the neutral plot file at present.

Appendix C in the Post-Processing User Guide lists all currently availablecombinations of plot mode and plot characteristics. The same information can alsobe listed on line by choosing Help > pro-STAR Help from the menu bar and thenselecting the COMBINAT item from the list shown at the bottom of the pro-STARHelp dialog.

Advanced screen control

Advanced screen control functions are implemented as follows:

• Background/foreground colour reversal — from the menu bar, select Plot >Background > Standard (for white lines and text on a black background) orPlot > Background > Reverse (for black lines and text on a whitebackground). Alternatively, use command CLRMODE.

• Maximising the graphics area — from the menu bar, select Plot > MaximumPlot Screen to hide the GUI buttons surrounding the graphics area so as tomake the plot as large as possible. The window is also enlarged to take upalmost the entire screen. This is helpful when making animations since thelargest number of pixels are used, thereby obtaining the highest possibleplotting resolution. Select Plot > Standard Plot Screen to return the windowto its default size and appearance. Alternatively, use command WHOLE.

• Restoration of the original screen settings — command RESET.• Temporary, on-line storage of complete screen images — command SCROUT.• On-line retrieval of screen images previously stored with SCROUT —

command SCRIN. This command also provides an elementary animationfacility, by replaying a sequence of screen images in quick succession.

Page 69: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Plotting Functions

Version 4.02 2-33

• Deletion of screen images previously stored with SCROUT — commandSCRDELETE.

• Customised scaling of text fonts used in pro-STAR — command TSCALE.• Image display control — command PLTBACK. This enables images to be

created and stored in memory and then popped onto the screen (as opposed todisplaying them as they are being created).

For further details on using the above commands, refer to the pro-STAR Commandsvolume.

Screen capture

It is often very useful to be able to save the contents of the graphics screen as apicture file. The latter can then be pasted into a document created by another, saypresentation or word-processing, application. pro-STAR provides this facility viathe Utility > Capture Screen menu option (or by typing command SCDUMP). Theresult of this operation is the creation of a new window containing the picturecurrently displayed in pro-STAR’s main graphics area. The picture can besubsequently saved in a file by choosing Utility > Save Screen As and selecting oneof the following options for the file format:

• XWD (X Window Dump) — X-Motif version of pro-STAR only• GIF (Graphics Interchange Format)• PS (PostScript, either Level 1 or Level 2 format)• EPSF (Encapsulated PostScript, either Level 1 or Level 2 format)

The user needs to make sure that the choice of format is appropriate to the endapplication. Selecting any of the above options opens the File Selection dialogshown below, enabling you to specify the name and destination directory of thepicture file.

If you are working in OpenGL extended graphics mode (see page 2-32), you alsohave a choice of saving a high-resolution screen dump (HRSD) of the extendedmode plotting window. This appears as an additional option, High Res. ScreenDump, in the Utility menu (alternatively, use command HRSDUMP). Selecting this

Page 70: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Plotting Functions

2-34 Version 4.02

option from the main menu opens the High Resolution Screen Dump dialog shownbelow:

The user input is as follows:

1. Select the required file format from the File Type menu as one of

(a) png(b) gif(c) ps (PostScript)(d) eps (Encapsulated PostScript)

2. Enter the file name in the box provided. Clicking the adjacent browser buttonopens the File Selection dialog shown above which helps locate the requiredfile.

3. Clicking the Options button opens a secondary Image Options dialog thatenables you to specify the required image resolution and/or page properties(for PostScript files). An example for GIF/PNG images is shown below.

It is also possible to use the HRSD facility in batch mode to produce high-qualityplots using OpenGL style graphics (i.e. including translucency, special lightingeffects, etc.). You do not require a special OpenGL graphics card on your machineto do this; the pictures can be made off-screen using the ‘mesa’ software emulationof OpenGL as follows:

• Run pro-STAR with mesa graphics in batch mode

prostar mesa -b

• Set extended mode graphics

term,,exte

Page 71: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

The Users Tool

Version 4.02 2-35

• Set up the model as you wish, including any CPLOT/REPLOT operationsneeded to display the picture, and then use the HRSD command as follows:

hrsd,png,output.png (write a .png file)hrsd,ps,test.ps (write a .ps file)

You can also use the various options to change image size, resolution, etc., just asfor interactive mode above (see the HRSD command Help on options for settingimage size, resolution, etc.)

The Users Tool

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

To use this facility, it is important to

• save your Tcl script in a file called STARTkGUI.tcl• assign the path to this file to an environment variable called

STAR_TCL_SCRIPT

Getting On-line Help

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

Page 72: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

Getting On-line Help

2-36 Version 4.02

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

This dialog contains on-line information on:

• Conventions regarding command line syntax• All valid combinations of plot mode and plot characteristics• One-line summaries of every pro-STAR command, grouped by command

module and listed in alphabetical order• A list of all database files available under pro-STAR• pro-STAR environment variable definitions• All file extensions used• A description of pro-STAR’s macro files• A description of pro-STAR’s user-defined Motif panels• A tabulation of radiation parameters required for walls and baffles• Units for all physical quantities used in STAR-CD• A list of user subroutine names and brief descriptions• A list of all GUI tools and dialog boxes

Help on any of the above items is obtained simply by selecting the appropriate titlein the scroll list underneath the main information display area.

In addition, the default listing of any user subroutine may be displayed byselecting item UserSubs from the Module pop-up menu and then choosing the

Page 73: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

Getting On-line Help

Version 4.02 2-37

required subroutine name from the second scroll list.Details on the functionality and syntax of every command may be displayed as

follows:

• By typing the command name in the Find Command text box and pressingReturn

• By selecting the appropriate command module from the Module pop-up menu(see the pro-STAR Commands volume for a description of modules) and thenchoosing the required command name in the scroll list

• By searching through the available help text for a keyword, as typed in theKeyword text box

• In a context-sensitive manner, by choosing option Select Item from the Helpmenu. This changes the mouse pointer from an arrow to a ‘hand’ (Help)pointer with which you can click any part of the main pro-STAR window.Such an action will automatically display the corresponding commanddescription for that part of the window.

An example of command help is shown below:

The middle section of the Help menu gives on-line access to every volume in theSTAR-CD documentation set, consisting of Release Notes for the current version,pro-STAR Commands, Methodology, Tutorials and also the CCM, Meshing andPost-Processing User Guides. To view these documents, users must make sure thatAdobe’s Acrobat™ Reader is installed on their machine. Instructions on how to dothis are given in the STAR-CD Installation and Systems Guide. There is also a Helpsection containing useful information on how to best use Acrobat for viewingon-line help text corresponding to each panel of the STAR GUIde system describedbelow.

The last section of the Help menu activates your machine’s web browser anddirects it to useful web sites set up by CD-adapco.

Page 74: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

The STAR GUIde Environment

2-38 Version 4.02

The STAR GUIde Environment

STAR GUIde represents the latest development in easy-to-use GUI tools forbuilding STAR-CD models. It works by

• dividing the CCM analysis task into groups of major modelling activities;• displaying pre-defined groups of panels relating to each of the activities so

that the user can specify model parameters and characteristics pertinent to thecurrent activity;

• guiding the user through the modelling process in a logical sequence so thatno steps of that process are overlooked.

At present, the STAR GUIde panels cover a subset of pro-STAR’s capabilities, i.e.those that relate to the most common tasks of the modelling process. Additionalcapabilities are being continually added and appear in each new version ofSTAR-CD.

STAR GUIde may be accessed from pro-STAR’s main window using either ofthe following two methods:

1. Selecting Tools > STAR GUIde from the menu bar2. Clicking the STAR GUIde button at the top left-hand side of the window.

This displays the introductory screen shown below. The screen consists of twoparts:

• On the left is the Navigation Centre (NavCenter), a tool for guiding the userthrough the various stages of the model building process. These stages arerepresented by panels and are subdivided into logical groups. The panels andtheir groups are shown as a tree structure within the NavCenter sub-window.

• On the right is the initial Help screen explaining how STAR GUIde works andwhat its function buttons do. This is replaced by the contents of the currentprocess panel as you go through each stage of model building.

Page 75: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

The STAR GUIde Environment

Version 4.02 2-39

The following points should be borne in mind when using this tool:

1. The NavCenter tree contains a set of yellow folder icons representing eachmajor modelling activity and acts as the starting point for defining your ownmodel. A complete STAR-CD simulation can be set up and run by performingthe activities in the folder tree and in the order shown.

2. Click on one of the yellow folder icons (or on the text next to them) to openand close the folder and to display its constituent process panels andsub-folders.

3. Click on a grey panel icon (or on the text next to it) to open the panel; itscontents will be displayed on the right-hand side of the STAR GUIde window.Each process panel enables you to enter or generate data needed to completethat process.

4. Where appropriate, the input for a given process is distributed amongstcolour-coded, ‘file tabs’. These are brought to the forefront by clicking on theappropriate tab. The colour coding depends on the entity (block, spline, cell,etc.) being processed and is consistent with the colour coding used in the main

Page 76: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

The STAR GUIde Environment

2-40 Version 4.02

pro-STAR window.5. In some instances, clicking a button on a panel activates a separate,

free-floating dialog box. This happens whenever such a dialog provides themost convenient means of entering the data required.

6. To exit from the STAR GUIde, click the Close STAR GUIde button at thebottom of the NavCenter sub-window.

Panel navigation system

The set of five buttons at the top right-hand side of the STAR GUIde window aredesigned to help you navigate through the system and get more information aboutwhat to do. The function of each button is as follows:

Go Back — returns to the previously selected panel.

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

Favorite — enables you to store the names of frequently usedpanels so that you may jump to them directly, i.e. without firstopening the STAR GUIde window and then searching throughthe NavCenter tree. A ‘favourite’ panel is selected by firstdisplaying it in STAR GUIde, clicking Favorite and thenchoosing the Add to favorites option. The reverse operation isperformed by choosing Remove from favorites. The currentfavourites are listed under the Favorites menu in the mainpro-STAR window.

Help — provides concise information on the current panel,including descriptions of the data required, explanations of thechoices available, suggestions on things to look out for, etc. Helpscreens use Adobe’s Acrobat™ Reader system; their contentstherefore appear in a separate window opened by that system.Information on how to best use Acrobat for reading these screensis given under the Help menu in the main pro-STAR window(option Help).

Page 77: Star CCm Guide

Chapter 2 BASIC STAR-CD FEATURES

General Guidelines

Version 4.02 2-41

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

STAR GUIde usage

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

General Guidelines

The following general guidelines should be kept in mind when running STAR-CDmodels, including those described in the Tutorials volume:

1. Take advantage of the on-line Help facilities to check the code’s conventionsand, if necessary, the structure and meaning of individual commands. Thesefacilities are accessed either from the GUI Help menu (see “Getting On-lineHelp”) or by typing

HELP, command_name

in the pro-STAR I/O window.

Page 78: Star CCm Guide

BASIC STAR-CD FEATURES Chapter 2

General Guidelines

2-42 Version 4.02

2. Make frequent use of the File > Save Model option (or command SAVE) tostore the current state of your model description on the pro-STAR model file(.mdl). This safeguards against unexpected mishaps (power failures, systemcrashes, etc.) by enabling you to restart your work from the point where thelast SAVE operation was performed. You should, however, make sure that themodel is in a satisfactory state before saving it.

3. If necessary, split lengthy model-building sessions into several parts, by usingoption File > Quit (or command QUIT) at any convenient point in yourcurrent session and then saving your work on the .mdl file. To continueworking on the model, re-enter pro-STAR as discussed in Step 10 on page 2-7and then perform the next operation. However, remember that for transientproblems the transient data (.trns) file has to be explicitly re-connected tothe pro-STAR session by using the Connect button in the AdvancedTransients dialog (or command TRFILE).

4. Mistakes in pro-STAR can be rectified in two ways:

(a) Use option File > Resume Model (or command RESUME) to go back tothe state of the model saved with the last SAVE operation and start againfrom there

(b) Use command RECOVER to play back all commands issued since the lastSAVE operation, re-execute the code up to the one that went wrong, andcontinue from there

5. Note that command execution can be terminated half way through in thefollowing circumstances:

(a) By typing Abort instead of a parameter value while supplying parametervalues to a command in ‘novice’ mode.

(b) By typing Ctrl+C while waiting for a command to finish processing.Note that the effect of this operation is machine-dependent and thereforegreat caution should be exercised in its use; in some machines it will abortthe entire pro-STAR session.

6. Display the relevant STAR GUIde panels frequently to check the settings ofpro-STAR parameters; alternatively use command STATUS. In the latter case,the screen information relates to the active command module, so make sureyou are in the right module by typing the appropriate keyword (MESH,PROPERTY, CONTROL, etc.)

7. Remember that all pro-STAR windows can be re-sized using the mouse. It isrecommended that both the I/O and the main window are positioned and sizedso that both are visible simultaneously. This is particularly helpful when youneed to use commands for a particular operation, or if you want to check thecommands that were generated automatically by a particular GUI operation.

Page 79: Star CCm Guide

Chapter 3 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION

Introduction

Version 4.02 3-1

Chapter 3 MATERIAL PROPERTY AND PROBLEMCHARACTERISATION

Introduction

The physical properties of the fluid and/or solid materials within the model aretypically defined immediately after setting up the mesh and performing a thoroughvisual and numerical check on it. STAR-CD can analyse problems containingarbitrary combinations of

• multi-domain fluids, where there is no mixing of fluid streams,• porous materials,• solids materials.

The Cell Table

The process of setting up properties is usually quite simple and relies on the conceptof cell identity and the consequent use of the cell table, as discussed under “Celltypes” on page 2-37 of the Meshing User Guide. The cell table can be defined usingpro-STAR’s Cell Table Editor, accessed by clicking the CTAB button on theleft-hand side of the main pro-STAR window.

All cells in the mesh can be indexed and differentiated in various ways with theaid of an entry in the cell table. This enables the user to specify a

• cell table index• cell type• material number• colour table index• porosity index• spin index• group number• surface lighting material index• processor number• conduction thickness• radiation switch• initial free-surface identifier• identifying name

for a set of cells, as shown in the dialog below. The meaning of the variousparameters that may be set in this table is described in “Cell properties” on page2-38 of the Meshing User Guide.

Page 80: Star CCm Guide

MATERIAL PROPERTY AND PROBLEM CHARACTERISATION Chapter 3

The Cell Table

3-2 Version 4.02

The rules governing the use of the cell table are as follows:

• All entries in the table are identified by an index, listed under the Table #heading in the editor’s scroll list. A new entry is set up by clicking on the nextavailable number in the list and then specifying the relevant cell properties.

• Every cell in the model is associated with a cell table index.• All cells linked via a common index belong to a common Cell Type (Fluid,

Solid, Baffle, etc.), selected from the editor’s pop-up menu.• Different materials are identified by separate material property numbers,

typed in the Material Number text box.• The default cell table index is number 1 and is associated with a fluid whose

material number is 1.• By default, material number 1 refers to air properties at standard conditions.• Cell indexing normally differentiates the cells’ material type. However, it can

also be used purely for visual and/or selection purposes. Thus, in the diffusermodel shown in Figure 3-1 there is a single material number (no. 1),corresponding to the one and only domain in the model, but the cells can beindexed to different colours or different types of surface shading (see Chapter4 of the Meshing User Guide). This is done by typing different values in theColor Table Index or Lighting Material text boxes, respectively.

• Colour selection is facilitated by clicking the multi-coloured button next tothe Color Table Index box. This opens a Color Palette panel where the desiredcolour is selected by simply clicking the appropriate square. Thecorresponding colour number is then automatically entered into the box.

• Another possibility is to index cells on the basis of a common group number,typed in the Group Number text box. This groups together all cells belongingto a particular ‘object’, e.g. a distinct portion of the mesh. Such objects mighttypically be generated with the help of an external CAD package and

Commands: CTABLE CTNAME CTMODIFY CTLISTCTDELETE CTCOMPRESS

Page 81: Star CCm Guide

Chapter 3 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION

The Cell Table

Version 4.02 3-3

imported into pro-STAR using IGES or VDA data files. Group numbers arenormally generated automatically as part of the data import function (see“Importing Data from other Systems” on page 3-1 of the Meshing UserGuide).

• Cell table entries can be further identified by a name, typed in the Name box.

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

Figure 3-1 Cell indexing to implement differentiation by cell colour

Cell table entries may be displayed at any stage of the pro-STAR session by clickingCTAB on the main window. Any identifier, index, or reference number used in acell table entry may be changed to a different value simply by selecting the entry inthe Cell Table Editor’s scroll list and making the required changes.

Cell table entries may also be deleted by clicking the Delete button. Note that allcells indexed to this entry must be deleted or changed to a different index before thetable entry itself can be deleted. Tables that contain deleted (or undefined) entriessuch as this may be cleaned up by clicking the Compress button. This removes allredundant entries and re-numbers the remaining ones.

Cell indexing

Cells are assigned an identity (cell index) using the Cell Tool shown overleaf. Thismay be done in two ways:

1. Implicitly, by taking on the index that is active at the moment of theircreation. The active cell type can be changed at any time by highlighting thetype required in the Cell Table list displayed by the Cell Tool and thenclicking the Set Active Type button. The selection is indicated in the list by aletter ‘A’ against the active type.

2. Explicitly, by collecting together a group of cells and then changing theiridentity to the currently-active type. This can be done by:

(a) Pointing at the desired cells with the screen cursor — choose optionModify Type > Cursor Select. The action is terminated by clicking theDone button displayed on the plot.

(b) Changing all cells contained within a polygon drawn on the screen withthe screen cursor — choose option Modify Type > Zone. The action isterminated by clicking on

i) the same point twice to complete the polygon;

Cell index 1 Cell index 2 Cell index 3

Colour 2

Colour 3

Colour 4

Page 82: Star CCm Guide

MATERIAL PROPERTY AND PROBLEM CHARACTERISATION Chapter 3

The Cell Table

3-4 Version 4.02

ii) the Close button displayed, to let pro-STAR complete the polygon;iii) the Abort button displayed, to abort the selection operation.

(c) Changing all surface cells encountered when searching from a startingposition given by a ‘seed’ vertex (see the description on page 2-49 of theMeshing User Guide). This can be done by choosing option Modify Type> Surface (New Edge Vertex Set) (or Surface (Current Vertex Set)).The ‘seed’ vertex is selected with the screen cursor.

(d) Changing all cells in the current cell set — choose option Modify Type >Cell Set.

Another method of making changes is via the Cell List dialog, shown overleaf. Thismay be displayed by clicking the Cell List button on the Cell Tool or choosing Lists> Cells from the main menu bar. The cell or cell range to be changed must first beselected on the list. To change the associated cell type, click Change Type, choosea different cell table index on the displayed Change Cell Table box and then clickApply.

Commands: CTYPE CCROSS CFIND CZONE CTCOMPRESS

Page 83: Star CCm Guide

Chapter 3 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION

Multi-Domain Property Setting

Version 4.02 3-5

The result of the above process can be checked using the Check Tool, option DoubleCells (see “Microscopic checking” on page 3-28 of the Meshing User Guide). Thiswill verify whether a cell table entry exists for every cell within the range specified.

Multi-Domain Property Setting

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

Figure 3-2 Multi-domain flow with solid material domains

Command: CMODIFY

Domain 1

Domain 2

Metal plate

Page 84: Star CCm Guide

MATERIAL PROPERTY AND PROBLEM CHARACTERISATION Chapter 3

Multi-Domain Property Setting

3-6 Version 4.02

Setting up models

Step 1

Create an appropriate set of cell types and material indices for your model duringmesh generation, using the procedure described in “The Cell Table” on page 3-1.The appropriate settings to be supplied via the Cell Table Editor for the exampleshown in Figure 3-2 are as follows:

Domain 1

Metal plate

Page 85: Star CCm Guide

Chapter 3 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION

Multi-Domain Property Setting

Version 4.02 3-7

Domain 2

The Material Number indices 11, 12 and 13 above refer to the physical property setsassociated with each fluid domain and with the solid plate domain. Note thatdifferent cell table indices 1, 2 and 4 are also assigned to each of these because eachcell table index can only refer to one material number. In cases with multipledomains it is recommended that each domain is given a separate material number,even if domains have identical physical property sets. This is to allow each domainto have its own initialisation, reference values and residual normalisation.

Step 2

Open the Thermophysical Models and Properties folder in STAR GUIde. Forthermal problems, specify any special thermal transfer conditions (radiation, solarradiation or solid-fluid heat transfer) prevailing in your model by making therelevant selection(s) in the “Thermal Options” panel.

Step 3

Set the physical properties of each fluid domain by opening sub-folder Liquids andGases and then entering numerical values and/or selecting appropriate options inthe “Molecular Properties” panel. Note that:

• The option chosen for density calculations determines whether the flow istreated as compressible or incompressible. Special considerations regardingthe analysis of compressible flows are discussed in “Compressible Flow” onpage 3-9 of this chapter.

• Non-Newtonian flow may be simulated by selecting the relevant molecularviscosity calculation option. The treatment of non-Newtonian fluids isdiscussed further in “Non-Newtonian Flow” on page 3-11 of this chapter.

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

Page 86: Star CCm Guide

MATERIAL PROPERTY AND PROBLEM CHARACTERISATION Chapter 3

Multi-Domain Property Setting

3-8 Version 4.02

Step 4

If you have selected the solid-fluid heat transfer option, an additional sub-folder,Solids, will appear in the STAR GUIde tree structure. Specify the physicalproperties of the solid material by entering numerical values and/or choosingappropriate options in the “Material Properties” panel. If your model containsmultiple solid domains possessing different properties, each domain may beselected in turn via the Material # control at the bottom of the panel (see also the“Solids” Help topic).

Step 5

For turbulent fluid domains, choose an appropriate option from the “TurbulenceModels” panel. Further details are given in “Turbulence Modelling” on page 3-12of this chapter.

Step 6

For thermal problems, turn on the enthalpy equation solver in all fluid domainsusing the “Thermal Models” panel. The enthalpy equation solver for solid materialsis activated simply by selecting Solid-Fluid Heat Transfer in the “Thermal Options”panel. Special considerations regarding the use of this option are discussed in “HeatTransfer In Solid-Fluid Systems” on page 3-16 of this chapter.

Step 7

Specify initial values for the flow variables in each fluid domain using the“Initialisation” panel (Liquids and Gases folder). The temperature distributioninside solid materials is specified via a separate “Initialisation” panel under theSolids folder.

Step 8

Set the reference quantities (pressure and temperature) and monitoring celllocation(s) for each domain using the “Monitoring and Reference Data” panel(Liquids and Gases folder). The reference temperature and monitoring cell locationfor solids is specified via a separate “Monitoring and Reference Data” panel underthe Solids folder.

Step 9

For buoyancy-driven or any other problems involving body forces, specify thenecessary parameters using the “Buoyancy” panel. Special considerationsregarding the use of this option are discussed in “Buoyancy-driven Flows andNatural Convection” on page 3-20 of this chapter.

Step 10

If necessary, specify mass sources or additional source terms for the solution of themomentum, turbulence or enthalpy equation. The type of source is chosen byselecting the appropriate tab in STAR GUIde’s “Source Terms” panel (sub-folderSources):

• Mass — specify mass sources or sinks, i.e. fluid injection or withdrawal, to beused in the solution of the mass conservation equation (tab “Mass”). Specialconsiderations regarding the use of subroutine FLUINJ for this purpose arediscussed in “Fluid Injection” on page 3-21 of this chapter.

• Momentum — specify momentum sources, e.g. a fan driving the flow atsome location of your model, where the fan is not explicitly modelled (tab

Page 87: Star CCm Guide

Chapter 3 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION

Compressible Flow

Version 4.02 3-9

“Momentum”).• Turbulence — specify sources appropriate to the turbulence model used.

These may be additional source terms or, in the case of the k-ε model,replacements for the existing terms (tab “Turbulence”).

• Enthalpy — specify heat sources or sinks, e.g. radioactive sources in anuclear reactor cooling problem (tab “Enthalpy”).

All property and physical model settings in your problem may be inspected byselecting the relevant panels in the Thermophysical Models and Properties folder.In sub-folders Liquids and Gases and Solids, open each constituent panel in turn andscroll through the available materials. Alternatively, type command MLIST todisplay a brief or comprehensive listing of properties for any material in the Outputwindow.

Compressible Flow

The theory behind compressible flow problems and the manner of implementing itin STAR-CD is given in the Methodology volume (Chapter 16, “CompressibleFlows”). This section contains an outline of the process to be followed when settingup such problems and important points to bear in mind. Also included arecross-references to appropriate parts of the STAR GUIde on-line Help system,containing details of the user input required.

Setting up compressible flow models

Step 1

Go to panel “Molecular Properties” in STAR-GUIde and select each compressiblefluid domain via the slider at the bottom of the panel.

Step 2

Declare the flow as (ideal gas) compressible by selecting option Ideal-f(T,P) fromthe “Density” pop-up menu. This effectively switches on the compressibilitycalculations by making the density a function of both pressure and temperature.

Step 3

Set up boundary conditions that are appropriate to the type of flow being analysed.These are as follows:

Subsonic flow (Ma < 1 throughout the solution domain)

Supersonic flow (Ma > 1 throughout the solution domain)

Inflow OutflowStagnation conditions PressureInlet PressureInlet Outlet (for steady flow, but see point no. 1 below)Inlet Wave transmissive (for transient flow)

Inflow OutflowInlet OutletInlet Pressure

Page 88: Star CCm Guide

MATERIAL PROPERTY AND PROBLEM CHARACTERISATION Chapter 3

Compressible Flow

3-10 Version 4.02

Transonic flow (Ma < 1 and Ma > 1 within the solution domain)

The user should refer to the on-line Help text for panel “Define Boundary Regions”(especially that for “Inlet” boundaries) for a description of how to set up boundaryconditions for this type of flow.

Useful points on compressible flow

1. The combination of inlet and outlet boundary conditions for subsonic flowspresented under Step 3 above does not constitute, strictly speaking, a ‘wellposed’ problem. However, it is offered as an option for use in circumstanceswhere the pressure is known at the inflow (or at some other point inside thesolution domain) but not at the outflow. In such a case, users should designatethe known pressure as the reference pressure and make sure the correspondingcell location lies as close as possible to the known location (e.g. the inletboundary surface). The success of the simulation will depend on themagnitude of the Mach number. For the higher Mach numbers (e.g. Ma > 0.7)very low under-relaxation factors will have to be specified (e.g. 0.001 forpressure) in order to obtain a converged solution.

2. Special considerations apply to tetrahedral meshes or meshes containingtrimmed (polyhedral) cells. If such meshes contain supersonic inletboundaries then, to obtain a stable/convergent solution, it is necessary tocreate at least two cell layers immediately next to the boundary (see Figure4-5 on page 4-23). If pro-STAR’s automatic meshing module is employed forthis purpose, use its built-in mesh generation capabilities. If the mesh isimported from a package that lacks these facilities, you must extrude the meshin a direction normal to the boundary and then shift the boundary location tothe edge of the newly-created, layered structure.

3. In the case of a transonic problem with subsonic inflow, residualnormalisation for momentum (and k, ε if appropriate) is based on themomentum (and k, ε) flux values at the inlet, as usual. However, because ofthe large difference in velocity magnitude between the inlet and the rest of theflow field, this may place an unnecessarily stringent condition on the built-insolution convergence criterion (as discussed in Chapter 1, “Monitoring thecalculations”, this is based on the magnitude of the normalised residuals). Inthis situation, it could be more appropriate to inspect the convergence historyof, say, mass and enthalpy and terminate the solution process after asufficiently large number of iterations.

4. For inviscid flows, it is possible to calculate temperature from a constant

Subsonic Inflow Subsonic OutflowStagnation conditions PressureInlet PressureSupersonic Inflow Subsonic OutflowInlet PressureSupersonic Inflow Supersonic OutflowInlet PressureSubsonic Inflow Supersonic OutflowStagnation conditions Pressure

Page 89: Star CCm Guide

Chapter 3 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION

Non-Newtonian Flow

Version 4.02 3-11

stagnation enthalpy relationship rather than the standard enthalpy equation.To do this, go to panel “Thermal Models” in STAR-GUIde and select optionStagnation Enthalpy from the Conservation pop-up menu. The appropriatestagnation temperature should then be typed in the Stagnation Temp. text box.

5. It could be advantageous, even when a steady state is sought, to do a transientcalculation using the “Pseudo-Transient Solution” method. To do this, selectoption Pseudo-Transient from the pop-up menu in the “Solution Method”STAR GUIde panel.

6. In the case of flow through ducts of non-uniform cross-section wheresupersonic conditions are expected over the whole or part of the solutiondomain, it is sometimes necessary to under-relax the initial velocities. This isdone by activating special flux under-relaxation using panel “MiscellaneousControls” in STAR GUIde. This operation affects only the velocityinitialisation.

Non-Newtonian Flow

The theory behind non-Newtonian flow and the manner of implementing it inSTAR-CD is given in the Methodology volume (Chapter 16, “Non-NewtonianFlows”). This section contains an outline of the process to be followed whenspecifying non-Newtonian fluids and includes cross-references to appropriate partsof the STAR GUIde on-line Help system. The latter contains details of the userinput required.

Setting up non-Newtonian models

Step 1

Decide whether the power law offers an adequate representation of thenon-Newtonian fluid behaviour and what the value of the constants m and n inequation (1-6) of the Methodology should be. Alternatively, supply a suitableexpression in subroutine VISMOL.

Step 2

Go to panel “Molecular Properties” in STAR-GUIde and select the domaincontaining the non-Newtonian fluid via the slider at the bottom of the panel.

Step 3

Use the “Molecular Viscosity” menu to either specify the model parameters m andn (option NonNewt, text boxes EM and EN) or call subroutine VISMOL (optionUser).

Useful points on non-Newtonian flow

1. Bear in mind that constitutive relations for non-Newtonian flow are basicallyempirical curve-fitting formulae. It is therefore inadvisable to use thembeyond the range of the available data.

2. The model parameters are functions of temperature, pressure andcomposition. They may also be functions of the rate of strain tensor’s range

(see equation (1-5) in Chapter 1 of the Methodology volume), over whichthe equation is fitted. If any of these effects are significant, they should beallowed for in user subroutine VISMOL.

IIs

Page 90: Star CCm Guide

MATERIAL PROPERTY AND PROBLEM CHARACTERISATION Chapter 3

Turbulence Modelling

3-12 Version 4.02

Turbulence Modelling

The theory behind the currently available models is given in Chapter 2 of theMethodology manual. A number of methods are also available for implementing theno-slip boundary conditions for turbulent flow, as follows:

1. Wall functions, applied to cells immediately adjacent to a wall. This methodemploys special algebraic formulae (described in Chapter 6, “High Reynoldsnumber turbulence models and wall functions” of the Methodology volume)to represent velocity, temperature, turbulence parameters, etc. within theboundary layer that forms next to the wall; see Figure 3-3(a). The method isalso appropriate for use with one-equation (k-l, Spalart-Allmaras), k-ω andReynolds Stress models. An alternative, ‘non-equilibrium’ type of wallfunction is also provided for taking pressure gradient effects into account (seeequation (6-17), (6-18) and (6-19) in the Methodology volume) but this isavailable only for k-ε models (linear and non-linear).

2. Two-layer models, employed as combinations of a high Reynolds number(k-ε) model with a low Reynolds number (one-equation or zero-equation)model. The latter is applied to the near-wall region where the mesh should befinely spaced, as shown in Figure 3-3(b); see also Chapter 6, “Two-layermodels” in the Methodology volume. You are free to combine the wallfunction and two-layer approach within the same problem, provided that alinear k-ε type model is in use and the two treatments are applied to differentboundary regions. However, care must be exercised at transition pointsbetween the two methods.

3. Low Reynolds number models, in which viscous effects are incorporated inthe k and ε transport equations. No special near-wall treatment (other than anoptional definition of wall surface roughness) is therefore required; see alsoChapter 6, “Low Reynolds number turbulence models”. Both low Re and wallfunction treatments may be used in the same problem, but only if they applyto separate domains.

4. Hybrid wall boundary condition, which offers a special wall treatment forlow Reynolds number models independent of the normalised parameter .For finely spaced meshes, this is identical to the standard low Reynoldsnumber treatment. For coarser meshes, it provides special algebraic formulaeto represent velocity, temperature, turbulence parameters, etc. similar toordinary wall functions (see also Chapter 6, “Hybrid wall boundarycondition”).

The choice of wall treatment (where relevant) is made in the “Near-WallTreatment” tab of the “Turbulence Models” panel. If a two-layer model isemployed, you will need to indicate the wall or baffle region to which it applies viathe “Define Boundary Regions” panel.

y+

Page 91: Star CCm Guide

Chapter 3 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION

Turbulence Modelling

Version 4.02 3-13

Figure 3-3 Mesh spacing in the near-wall region

The following points should be borne in mind when considering the effectivenessor accuracy of a particular turbulence model or near-wall treatment:

Wall functions

1. For reasons of accuracy, the normal distance y from the wall for near-wallcells (see Figure 3-3) should be such that the dimensionless parameter iskept within the limits , where:

2. It is important to place y outside the viscous sublayer. This can be achieved byobserving the lower limit on the value of .

3. The above considerations apply equally to both standard and non-equilibriumwall functions. The difference between the two is that the latter takes thepressure gradient into account. This provides more accurate results in terms ofwall shear forces but has little effect on the character of the flow.

4. If the non-equilibrium option is chosen, the normal user inputs for wallroughness (specified via the Roughness pop-up menu for wall and baffleboundaries, see panel “Define Boundary Regions”) are not applicable.

Two-layer models

1. These should be preferred for non-equilibrium flows, as they produceimproved friction and heat transfer predictions. Their use, however, will resultin larger meshes within the model and hence significantly higher calculationtimes. This is because the near-wall region requires a finer mesh than thatneeded by the wall function treatment.

2. In order to resolve properly the distributions of velocity and other variableswithin the near-wall region (i.e. at ), it is necessary to ensure that it isspanned by about 15 mesh nodes. In general, this may require some trial anderror adjustment of the mesh, since the near-wall region thickness is notknown a priori. Once a suitable mesh density is chosen, the value of at the

k - ε model

Low Re model

NWL

(b) Two-layer models

match location

y

(a) Wall function model

y+

30 y+ 100< <

y+ ρ Cµ

1 4⁄k

1 2⁄y µ⁄≡

y+

y+ 40≤

y+

Page 92: Star CCm Guide

MATERIAL PROPERTY AND PROBLEM CHARACTERISATION Chapter 3

Turbulence Modelling

3-14 Version 4.02

node next to the wall should be no larger than ~3 to resolve the velocityprofile, but smaller to resolve the thermal profile.

3. If the prescribed NWL thickness is not sufficiently large to encompass thenear-wall region throughout the domain in question (i.e. the switchinglocation between high and low Re regions shown in Figure 3-3 lies outside theNWL in some places), the switching location there is assumed to be at theedge of the NWL and a warning message is issued on file case.info. Insuch cases, it is possible to increase the NWL thickness to a more suitablevalue and restart the calculations.

4. There is an additional option for fixing the above switching location to itscurrent position. If this option is selected from the start of the analysis, itseffect is to make the switching point distance equal to the NWL thickness.

5. During post-processing, the partitioning of the mesh into

(a) near-wall region cells where the one-equation model applies(b) other cells in the NWL(c) ordinary cells in the flow field interior

can be inspected by opening panel “Load Data” in STAR GUIde (“Data tab”),choosing “Cell Data” as the data type and then selecting option Two Layerfrom the Scalar Data scroll list. Option FMU allows inspection of thedistribution of a quantity given by

Low Re models

1. These should be preferred for non-equilibrium flows, for the same reasons astwo-layer models. However, their use may require meshes that are even largerthan those for the two-layer approach.

2. The default treatment assumes a smooth wall but the wall surface roughnessmay also be specified, if required.

3. In order to resolve properly the distribution of velocity and other variables,approximately 20 mesh nodes are needed within the near-wall region( ). The value of at the node next to the wall should then be ~1.Note that this meshing strategy differs from that for two-layer models, whereapproximately 15 mesh nodes are needed over the near-wall region. Thismeans that a mesh designed for two-layer models will not necessarily besuitable for low Re models.

4. As with two-layer models, computing times are substantially greater thanwhen using a wall function approach.

5. It is recommended that such models are run in double precision.

Hybrid wall boundary condition

1. The hybrid wall condition is an extension of low Reynolds number boundaryconditions. It applies only to the following low Reynolds number turbulencemodels:

(a) k-ε (linear, cubic and quadratic)(b) k-ω (standard and SST variants)

νt

Cµk2 ε⁄

------------------

y+ 40≤ y+

Page 93: Star CCm Guide

Chapter 3 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION

Turbulence Modelling

Version 4.02 3-15

(c) Spalart-Allmaras

2. The approach automatically selects a low Reynolds number wall treatment ora wall function, depending on the local flow field and near-wall mesh spacing.It should be preferred in situations where

(a) the normalised parameter is unknown, or(b) large variations in create uncertainties as to whether a low Reynolds

number boundary treatment or a wall function is appropriate.

Reynolds Stress models

1. Both the Gibson-Launder and SSG models are high Reynolds number modelsso they need to be used in conjunction with wall functions.

2. Since Reynolds Stress models solve additional transport equations forReynolds Stress components, they consume a substantially greater amount ofcomputing time compared to k-ε models.

3. The ‘standard’ wall reflection term used in the Gibson - Launder model is notsuitable for impingement flows. In such circumstances, it will return thewrong distribution of the stress component normal to the wall. It is thereforeadvisable to use the term calculated by the Craft model instead.

DES models

1. A transient analysis setting is required, although the problem being modelledmay in reality be a steady-state one.

2. The 3-time-level temporal discretisation scheme within the transient SIMPLEalgorithm achieves second-order accuracy, but may be computationallyexpensive. Choosing the PISO algorithm results in an accuracy comparable tothat of a formally second-order scheme, whilst being computationallycheaper.

3. Central differencing or automatic blending (see Chapter 2, “BlendingFunction” in the Methodology volume) is recommended for the discretisationof convective terms in the momentum equation; the MARS scheme isrecommended for the turbulence equations.

LES models

1. A transient analysis setting is required, although the problem being modelledmay in reality be a steady-state one.

2. The 3-time-level temporal discretisation scheme within the transient SIMPLEalgorithm achieves second-order accuracy, but may be computationallyexpensive. Choosing the PISO algorithm results in an accuracy comparable tothat of a formally second-order scheme, whilst being computationallycheaper.

3. The time step size should be selected in such a way that the maximumCourant number does not exceed 0.5

4. Central differencing is recommended for the discretisation of convectiveterms in the momentum equation; the MARS scheme, with blending factornot less than 0.5, can be conveniently used for bounded scalars (e.g. mixturefractions or enthalpy).

y+

y+

Page 94: Star CCm Guide

MATERIAL PROPERTY AND PROBLEM CHARACTERISATION Chapter 3

Heat Transfer In Solid-Fluid Systems

3-16 Version 4.02

Changing the turbulence model in use

This facility allows you to run a turbulent flow case by restarting from a simulationdone for the same case but with a different turbulence model. No special user inputis required to run such a case.

The table below illustrates the combinations allowed and the conversion formulaadopted when STAR encounters a different turbulence model in the solution file tothe one currently in force:

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

Heat Transfer In Solid-Fluid Systems

The theory behind this type of heat transfer models and the manner of implementingit in STAR-CD is given in Chapter 16, “Heat Transfer in Solid-Fluid Systems” ofthe Methodology volume. This section contains an outline of the process to befollowed when setting up this type of model and includes cross-references toappropriate parts of the STAR GUIde on-line Help system. The latter containsdetails of the user input required and important points to bear in mind when settingup problems of this kind.

FROM (Restart field)

Spalart-Allmaras k-ε type*

k-ω(Wilcoxand SST)

ReynoldsStress

(GL andSSG)

V2F

TO

(N

ew s

olut

ion

fiel

d)

Spalart-Allmaras

k-ε type* Not needed Not needed

k-ω(Wilcoxand SST)

ReynoldsStress

(GL andSSG)

Not needed Not needed

V2F Not needed Not needed

νt Cµk

2

ε-----= νt

k

ω----= νt Cµ

k2

ε-----= νt Cµ

k2

ε-----=

ε Cµkω=

ω εCµk---------= ω ε

Cµk---------= ω ε

Cµk---------=

ε Cµkω=

ε Cµkω=

Page 95: Star CCm Guide

Chapter 3 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION

Heat Transfer In Solid-Fluid Systems

Version 4.02 3-17

Setting up solid-fluid heat transfer models

Step 1

Specify the model regions occupied by the solids and fluids present and define theirphysical properties.

Figure 3-4 Simple heat exchanger

In terms of the heat exchanger example shown in Figure 3-4, this requires thefollowing actions (see also “Multi-Domain Property Setting” on page 3-5):

• Set up cell table entries for fluid materials 1,2 and solid material 3• Assign all cells in the mesh to the appropriate cell type (1, 2, 3) as described

in the section on “Cell indexing” on page 3-3.• Specify the physical properties of each material

Step 2

Turn on Solid-Fluid Heat Transfer in the “Thermal Options” STAR-GUIde panel.Note that this also has the effect of switching on the temperature solver in solidmaterials.

Step 3

Switch on the temperature solver in each fluid material using the “Thermal Models”panel.

Step 4

Normally, STAR-CD treats the solid-fluid interface as part of the default wallregion (region 0). However, unlike other parts of this region whose default thermalcondition is adiabatic, the solid-fluid interface is treated as a conducting wall.Therefore:

• If an additional thermal resistance exists at the interface, define the latter as aseparate region and use the “Define Boundary Regions” panel to specify it asa conducting wall having the required thermal resistance value (see the STARGUIde “Wall” Help topic for more information).

• STAR uses default expressions to calculate heat transfer (film) coefficients atall solid/fluid interfaces, including those at external walls and baffles. You cansupply alternative expressions for these quantities via subroutine MODSWF

Step 5

If a printout of temperature distribution in the model is required, use command

Material 1 — steam

Material 2 — hot gas

Heat flow

Material 3 — steel

Page 96: Star CCm Guide

MATERIAL PROPERTY AND PROBLEM CHARACTERISATION Chapter 3

Heat Transfer In Solid-Fluid Systems

3-18 Version 4.02

PRTEMP to specify whether the printed values are absolute or relative to the datumtemperature previously defined (see topic “Reference Data” in the STAR GUIdeon-line Help system).

Heat transfer in baffles

Thermal conduction along the plane of a baffle’s surface is currently neglected (seethe STAR GUIde “Baffle” Help topic for more information). However, this effectmay still be modelled by expanding a baffle into a single layer of solid cells usingcommand CBEXTRUDE (see also Chapter 2, “Extrusion” in the Meshing UserGuide). The surrounding mesh is automatically adjusted to make room for the solidcells, as shown in Figure 3-5.

Figure 3-5 ‘Fully-conducting’ baffle creation

Note that:

• Special cell shapes (such as prisms) are created at the edges of the solid celllayer, as shown in the exploded view of the baffle in Figure 3-5. This bringsthe baffle thickness down to zero and avoids the need to create coupled cellsin those parts of the mesh.

• The modelling of heat conduction will be slightly in error as a result of theintroduction of the above artificial cell shapes.

• A baffle of the kind described here may be attached directly to an externalboundary or to internal boundaries such as solid-fluid interfaces to model aconducting fin. In the latter case, you need to make sure that the cell typeassigned to baffle cells is different from that assigned to solid cells at the baseof the baffle.

Alternative treatment for baffle heat transferIt can be seen that the expansion process described above will create a disturbancein the fluid cells around the baffle and may result in a highly irregular mesh. In orderto avoid this problem, a facility is provided for specifying a finite baffle thickness(to be used internally for heat conduction calculations) but without actuallyexpanding the baffle to that thickness. Thus, the fluid flow calculations are based onan undisturbed mesh structure.

Ordinary baffle Fully-conducting baffle

Before After

Page 97: Star CCm Guide

Chapter 3 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION

Heat Transfer In Solid-Fluid Systems

Version 4.02 3-19

To use this facility, the following steps are needed:

Step 1

Using the Cell Table Editor, create a separate baffle cell type and a separate solidcell type. The latter will be used to represent the ‘conducting baffles’.

Step 2

Create the baffle cells in the appropriate mesh location using the baffle cell typedefined in Step 1.

Step 3

Apply command CBEXTRUDE to the baffle cells created in Step 2 and extrude theminto solid cells using the solid cell type created in Step 1. Note that:

• Upon extrusion, the baffle cells will be removed from the mesh and replacedby the solid cells that they have been extruded into.

• If no solid cell type identification, ICTID, is supplied in the CBEXTRUDEcommand, the solid cell identification will be set as cell type 1.

• If no solid cell thickness, DT, is supplied in the CBEXTRUDE command (thisis the normal practice), the default thickness will be applied, currently set at0.2 × 10-3 m.

Step 4

Go back to the Cell Table Editor and select the solid cell type defined in Step 1.Enter the actual conduction thickness in the box labelled Conduction Thickness

Step 5

Turn on Solid-Fluid Heat Transfer in the “Thermal Options” STAR-GUIde panel.

Step 6

Apply the appropriate wall boundary condition to the solid cells created in Step 3.If none is specified, the default wall boundary condition for region number 0 willbe used. This results in a conducting, no-slip wall.

Note that:

• Conducting baffles of the same thickness DT specified in commandCBEXTRUDE and of the same Conduction Thickness specified in the CellTable Editor can share the same cell type.

• Conducting baffles that have a different DT or different Conduction Thicknessmust also have a different cell type.

• A conducting baffle that is attached to a solid base must have a different celltype to that of the solid to which it is attached.

Useful points on solid-fluid heat transfer

1. The On button in the Solid-Fluid Heat Transfer section of the “ThermalOptions” STAR-GUIde panel must always be used to turn on the solution ofthe energy equation in solids, even if the entire model is made up of solidcells.

2. It is usually advisable to run solid-fluid heat transfer simulations in doubleprecision. This helps to overcome potential convergence problems arising as aresult of a large disparity in thermal conductivity between fluid and solid. The

Page 98: Star CCm Guide

MATERIAL PROPERTY AND PROBLEM CHARACTERISATION Chapter 3

Buoyancy-driven Flows and Natural Convection

3-20 Version 4.02

choice of single or double precision mode can be made when running STAR(see Chapter 2, “Running a STAR-CD Analysis”, Step 6).

3. A convenient way of modelling thermal contact resistance between twoadjacent solid domains is to define a baffle of suitable properties at the facesof the appropriate solid cells in one of the domains.

4. In some situations the energy under-relaxation factor in fluid domains has tobe reduced below its default value of 1.0 to aid convergence. In such cases, werecommend that the corresponding factor for solids is left at 1.0.

5. If your model contains an arbitrary or embedded mesh interface between thefluid and solid cells, you will need to match cells on either side of theinterface, as described in Chapter 3, “Couple creation” in the Meshing UserGuide.

6. If your model contains scalar variables, the only valid scalar boundarycondition for walls located at the solid-fluid interface is Adiabatic.

Buoyancy-driven Flows and Natural Convection

The theory behind flow problems of this kind and the manner of implementing it inSTAR-CD is given in the Methodology volume (Chapter 16, “Buoyancy-drivenFlows and Natural Convection”). The present chapter contains an outline of theprocess to be followed when setting up buoyancy-driven flows and includescross-references to appropriate parts of the STAR GUIde on-line Help system. Thelatter contains details of the user input required and important points to bear in mindwhen setting up problems of this kind.

Setting up buoyancy-driven models

Step 1

Switch on the temperature solver using the “Thermal Models” STAR-GUIde panel

Step 2

Switch on the density solver by selecting one of the following options from the“Density” pop-up menu in the “Molecular Properties” panel:

• Isobaric — isobaric density variation (normally used for liquids)• Ideal-f(T) — density variation based on the Ideal Gas Law• User-f(T) — density variation based on user-defined relationships

Step 3

Set up the problem’s initial conditions using the “Initialisation” panel controls

Step 4

Define the reference pressure and temperature plus the reference pressure celllocation using the “Monitoring and Reference Data” panel

Step 5

Use the “Buoyancy” panel to specify suitable buoyancy parameters for yourproblem.

Useful points on buoyancy-driven flow

1. Check the settings in STAR GUIde’s “Gravity” panel (which determine the

Page 99: Star CCm Guide

Chapter 3 MATERIAL PROPERTY AND PROBLEM CHARACTERISATION

Fluid Injection

Version 4.02 3-21

gravitational body force effects) before starting a buoyancy calculation. Alsonote that, if droplets and/or liquid wall films are present in your model,gravitational effects for these features must be switched on separately.

2. It is usually advisable to run buoyancy-driven flow simulations in doubleprecision. This is because the body force terms in the momentum equation areoften so small compared to the other terms that they can be masked by theround-off error of the calculation. The consequences of working in singleprecision mode are oscillation in the residual values and non-convergence ofthe solution. The choice of single or double precision mode can be madewhen running STAR (see Chapter 2, “Running a STAR-CD Analysis”, Step6).

3. In multi-domain problems, the reference density and datum location shouldbe defined domain-wise.

4. If you use the option for direct specification of the reference density, the lattershould be assigned a realistic value based on the expected density variation inthe fluid. For simulations without pressure boundaries:

(a) In steady-state calculations, unrealistic values can give rise to a bodyforce that is out of balance with the piezometric pressure gradient. Thiscan cause delay in the solution convergence.

(b) In transient calculations, these initial disturbances could also produceunrealistic initial fields and therefore invalidate the results of the analysis.

5. If convergence problems are encountered, it is advisable to begin thecalculations with a small amount of under-relaxation on both temperature anddensity, e.g. 0.9. The desired values may be entered in the correspondingRelaxation Factor boxes inside panel “Solver Parameters” in STAR GUIde.This measure often helps to stabilise the solution and promote convergence.

6. In problems of this type, there is very strong coupling between thetemperature, scalar mass fraction and flow fields. It is therefore advisable touse the PISO algorithm which is more suitable for this type of coupling.

7. If convergence problems are encountered, it may be necessary to run themodel in transient mode. This involves approaching the steady-state solution,if one exists, by means of time steps. The most convenient way of doing thisis to use the single-transient solution mode (see Chapter 5, “Default(single-transient) solution mode”), since this way one does not need to set upload steps.

8. Buoyancy-driven flows with high Grashof number (i.e. Gr > 109) aresometimes naturally unstable (i.e. time-dependent without a single uniquesolution). In such cases, a converged steady-state solution cannot be obtainedand you should opt for the transient approach. A method of calculating thetime step size is given in the Methodology volume (Chapter 16,“Buoyancy-driven Flows and Natural Convection”).

Fluid Injection

The theory behind flow problems of this kind and the manner of implementing it inSTAR-CD is given in the Methodology volume (Chapter 16, “Local FluidInjection/Extraction”). This section contains an outline of the process to be

Page 100: Star CCm Guide

MATERIAL PROPERTY AND PROBLEM CHARACTERISATION Chapter 3

Fluid Injection

3-22 Version 4.02

followed when setting up fluid injection problems. Also included are cross-references to appropriate parts of the on-line Help system, containing details of theuser input required.

Setting up fluid injection models

Step 1

Create a set of all cells where fluid injection or removal is to be take place. Aseparate cell table index number should be assigned to this set (see “The Cell Table”on page 3-1).

Step 2

Activate the injection facility using the “Mass” tab in STAR-GUIde’s “SourceTerms” panel.

Step 3

Copy subroutine FLUINJ into the ufile sub-directory of your working directory,as described in Chapter 14, “Subroutine Usage”.

Step 4

Insert appropriate code in subroutine FLUINJ using a suitable editor. Usually, thecode specifies the mass flux injected or removed (on a per unit volume basis) forcells of the required type, so that a single value can be used for the entire cell setselected. An example of this is given in the sample coding supplied in subroutineFLUINJ. If only the total amount of mass injected is known, the required value maybe obtained by dividing by the total volume of the cell set. Thus, you may need tocalculate this volume first, either by choosing Utility > Calculate Volume > CellSet from pro-STAR’s main menu bar or by using command VOLUME.

If mass is being injected, specify all relevant properties of the incoming fluid(i.e. it is assumed that the fluid is bringing all its properties into the computationaldomain). The properties in question may be velocity components (U, V, W),turbulence parameters (k, ε), temperature and chemical species mass fractions.If mass is being removed, only the mass flux needs to be specified as the withdrawnfluid is assumed to possess the (known) properties in its vicinity.

Page 101: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Introduction

Version 4.02 4-1

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Introduction

The process of defining boundaries in a model can be divided into two major steps:

1. Identify the location of individual, distinct boundaries (i.e. where theboundaries are).

2. Specify the conditions at the boundaries (i.e. what the conditions are).

It is of the utmost importance that boundaries are chosen and implementedcorrectly, since the outcome of the simulation depends on them. Users should havea good understanding of the physical significance and numerical implications ofdifferent boundary conditions and should apply them correctly to their model. It istherefore advisable to refer to the relevant sections of the Methodology volume forguidance.

Boundary Location

The two important geometrical features of boundaries are:

1. They are created on the outer surfaces of the mesh, except for:

(a) so-called baffle boundaries, which are normally positioned at theinterface of two cells;

(b) solid/fluid interface boundaries in heat transfer problems.

2. They are grouped into boundary regions. A boundary region consists of agroup of cell faces that cover the desired boundary surface. Figure 4-1 showsa boundary region made up of nine cell faces.

Figure 4-1 Boundary region definition

The rules governing the use of boundary regions are as follows:

• Regions are numbered in an arbitrary manner by the user, in order to identifythem.

• The indexing of boundary cell faces (or boundaries, for short) comprising aregion is done automatically by pro-STAR, in a similar manner to theautomatic cell numbering discussed in “Cells” on page 2-37 of the MeshingUser Guide. In the example shown in Figure 4-2, boundary nos. 1 to 9 areassigned to region 1.

Page 102: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Boundary Location

4-2 Version 4.02

Figure 4-2 Boundary cell face indexing

Thus, each boundary in the model is identified by a region number (user-defined)and composed of boundary cell faces that are automatically numbered bypro-STAR.

pro-STAR offers two methods for setting up boundary regions:

1. Typing commands from the keyboard, as described below2. Using the facilities of panel “Create Boundaries” in STAR GUIde (“Regions”

tab)

Command-driven facilities

The available functions are as follows:

• Assignment of boundaries to a region using the keyboard — commandBDEFINE. This requires input of the region number, cell number and cellface number on which the boundary will be created. pro-STAR generates theboundary number automatically.

• Further boundaries can be created individually or generated from an existingset, using command BGENERATE. This creates additional boundaries byapplying an offset to the cell numbers of a previously-defined set.

• Modification of the region number assigned to a boundary face — commandBMODIFY.

• Re-assignment of a boundary to a different region graphically — commandBCROSS.

• Conversion of a set of shells into a set of boundaries — command BSHELL.The starting shells are not deleted by this process.

• Counting the currently defined boundaries — command COUNT. The sameoperation can also be executed by choosing Utility > Count > Boundariesfrom the menu bar.

For further details on the function and application of boundary commands, refer tothe pro-STAR Commands volume.

1 2 3

4 5 6

7 8 9

Page 103: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Boundary Location

Version 4.02 4-3

Boundary set selection facilities

Boundaries may need to be grouped together for the purposes of mass manipulationor plotting, thus defining a boundary set. This is done by selecting one of the listoptions provided by the B-> button in the main pro-STAR window. The availableoptions are:

1. All — puts all existing boundaries in the current set2. None — clears the current set3. Invert — replaces the current set with one consisting of all currently

unselected boundaries4. New — replaces the current set with a new set of boundaries5. Add — adds new boundaries to the current set6. Unselect — removes boundaries from the current set7. Subset — selects a smaller group of boundaries from those in the current set

For the last four options, the required boundaries are collected by choosing an itemfrom a secondary drop-down list, as follows:

• Cursor Select — click on the desired boundaries with the cursor, completethe selection by clicking the Done button on the plot

• Zone — use the cursor to draw a polygon around the desired boundaries.Complete the polygon by clicking the right mouse button (or the Done buttonoutside the display area to let pro-STAR do it for you). Abort the selection byclicking the Abort button.

• Region (Current) — select all boundaries whose region number is currentlyhighlighted in the boundary region table

• Region (Cursor Select) — select all boundaries belonging to a given region.The required region is selected by clicking on a representative boundary withthe cursor.

• Patch (Cursor Select) — select all boundaries containing radiation patches(see Chapter 7, Step 6). The patches in question are selected by clicking withthe cursor.

• Vertex Set (All) — all constituent vertices of the selected boundaries must bein the current vertex set

• Vertex Set (Any) — the selected boundaries must have at least oneconstituent vertex in the current vertex set

• Attach, Baffle, Cyclic, Degas (Phase Escape boundary condition used inEulerian multi-phase problems), Freestream, Inlet, Monitoring,NonReflective_Pressure, NonReflective_Stagnation, Outlet, Pressure,Radiation, Riemann, Stagnation, Symplane, Transient, Wall — allboundaries must be of the type selected, regardless of region number

More boundary set operations are available in the Boundary List dialog (see“Boundary listing” below) or by typing command BSET (see the pro-STARCommands volume for a description of additional selection options).

Boundary listing

Boundary information is displayed in the Boundary List dialog shown below,obtained by selecting Lists > Boundaries from the main menu bar. Boundarydefinitions are displayed in a scroll list in numerically ascending order, in terms of:

Page 104: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Boundary Location

4-4 Version 4.02

• Boundary serial number• Parent cell serial number• Face number of this cell that has been defined as a boundary• Patch serial number of any radiation patch that has also been created on that

face• Region number• Boundary type

There is also a choice of listing all boundaries or just the current set (marked byasterisks in the Bset column). The choice is made by simply selecting the Show AllBoundaries or Show Bset Only option, respectively.

To select boundaries from the list:

• For single items, click the number of the required boundary.• For two or more items in sequence, click the first boundary you want to select,

and then press and hold down the Shift key while you click the last boundaryin the group.

Once the desired boundaries are selected, the following additional operations arepossible:

1. Addition to (or removal from) the current set — click the Add to Set/Removefrom Set button.

2. Deletion — click the Delete Boundary button.3. Change of boundary region — click the Change Region button. This

activates an additional dialog, shown below. To change the region typeassociated with the selected boundaries, choose a different region number onthe displayed Change Region box and then click the Apply button.

Commands: BLIST BDELETE BMODIFY BSET

Page 105: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Boundary Region Definition

Version 4.02 4-5

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

Boundary Region Definition

Having specified the location of all boundaries in the model, the next step is to

• define their individual type (i.e. set the boundary condition);• supply information relevant to that type.

The boundary types available at present are:

1. Inlet2. Outlet3. Pressure4. Non-reflective pressure5. Stagnation6. Non-reflective stagnation7. Wall8. Baffle9. Symmetry plane

10. Cyclic11. Free-stream transmissive12. Transient-wave transmissive13. Riemann Invariant14. Attachment15. Radiation16. Monitoring17. Phase-escape (Degassing)

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

Page 106: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Boundary Region Definition

4-6 Version 4.02

• In the “Molecular Properties” STAR GUIde panel, the ideal gas option fordensity will switch the density solver on

• In the “Turbulence Models” panel, any of the K-Epsilon options will switchon the k, ε and viscosity solver

Note that:

1. In the case of a variable such as temperature, you need to switch on thetemperature solver explicitly (in panel “Thermal Models”) before proceedingwith region definitions.

2. Specification of alternative sets of variables needed to completely defineboundaries of type ‘Inlet’ or ‘Pressure’ is possible, as discussed in thesections dealing with such boundaries.

3. It is possible to check for common mistakes in prescribing boundaryconditions (e.g. boundary velocities specified in an undefined local coordinatesystem) by using the facilities available within the “Check Everything”STAR-GUIde panel.

4. Boundary regions may be given an optional alphanumeric name to helpdistinguish one region from another more easily.

The easiest way of applying a desired boundary condition to a given region is viathe STAR GUIde system; go to the Define Boundary Conditions folder and open the“Define Boundary Regions” panel, as in the example shown below:

The number and purpose of the text boxes appearing in the panel and whether theyare active or not depends on

• the type of condition selected;• which variables are being solved for.

Page 107: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Boundary Region Definition

Version 4.02 4-7

On the other hand, all forms of the panel possess a number of common features,listed below:

1. New regions are defined by:

(a) Selecting an unused region in the boundary regions scroll list(b) Choosing the desired boundary condition via the Region Type menu

options. The effect of this is to immediately display input boxes forsupplying boundary values for all flow variables required.

(c) Typing an optional name in the Region Name text box

2. Modification of existing regions is performed in a similar way. The changesare made permanent by clicking the Apply button.

3. Additional boundary regions with identical properties to a pre-defined baseregion set may also be generated by typing command RGENERATE in thepro-STAR I/O window.

4. Selected region definitions can be deleted by clicking Delete Region.5. The Compress button eliminates all deleted or undefined regions from the

boundary regions scroll list and renumbers the remaining ones contiguously.6. All free surfaces in your model that are neither defined as boundaries nor

explicitly assigned to a region will become part of region no. 0 (shown in theexample above). The latter’s properties may be specified in the same way asfor any other region. By default, this region is assumed to be a smooth,stationary, impermeable, adiabatic wall.

7. Non-uniform or time-varying conditions may be specified for some boundarytypes. This is done by choosing one of the following from the Options menu(the default setting, Standard, means constant and uniform conditions):

(a) User — specify the required conditions in one of the user subroutineslisted below (see also Chapter 14):

i) BCDEFI — Inletii) BCDEFO — Outlet

iii) BCDEFP — Pressureiv) BCDNRP — Non-reflective pressurev) BCDEFS — Stagnation

vi) BCDNRS — Non-reflective stagnationvii) BCDEFW — Wall or Baffle

viii) BCDEFF — Free-stream transmissiveix) BCDEFT — Transient-wave transmissivex) BCDEFR — Riemann invariant

The panel also displays a Define user coding button. Click it to store thedefault source code in sub-directory ufile, ready for further editing.

(b) Table — use values stored in a table file as boundary conditions. The filename is of form case.tbl (see Chapter 2, “Table Manipulation”) andmay be entered in the Table Name text box. Alternatively, the file may beselected using pro-STAR’s built-in browser.

Note that whilst one table can be applied to multiple boundary regions,multiple tables cannot be applied to the same boundary region. A list of

Page 108: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Boundary Region Definition

4-8 Version 4.02

valid dependent variable names that may be used in tables is given foreach boundary type in the sections that follow. In addition, the coordinatesystem used in a table must be the same as the coordinate systemspecified for its associated boundary regions.

Table values are actually assigned to a boundary by the STAR-CDsolver during the analysis. This is done as follows:

i) Table data are mapped onto the appropriate boundary region in themesh

ii) Boundary face-centre coordinates are compared with the tablecoordinates

iii) Variable values at face centres are calculated from the table datausing inverse distance-weighted interpolation

iv) The resulting values are assigned to the boundary for the wholeduration of the analysis

Figure 4-3 shows an example of using a table to assign boundaryconditions to a computational boundary. The coordinates anduser-supplied values are stored at the nodes of the table data grid and theSTAR flow variables are stored at the boundary face centres. In theexample, boundary values at face centre 1 are calculated as a weightedaverage of the table data located at ABCD. Similarly, values at face centre2 are a weighted average of the table data located at EFGH.

Figure 4-3 Mapping and interpolation of table data onto a boundary

Please also note the following:

i) It is possible to produce contour or vector plots of the boundaryconditions specified by the table, as a means of checking that thetable values have been entered correctly. To do this, click PlotBoundary after you have read in the table and then specify whichflow variables you wish to plot.

AB

C DEF

G H

1

2

Boundaryface centre

Table data nodeTable data map Boundary mesh

Page 109: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Inlet Boundaries

Version 4.02 4-9

ii) The use of boundary condition tables is not supported for casesusing the load-step method to define transient conditions (seeChapter 5, “Load-step based solution mode”)

(c) GT-POWER — set up a link with the GT-POWER engine systemsimulation tool (see Chapter 11 of the Supplementary Notes). Thisprovides automatic updating of boundary conditions at inlet and/orpressure boundaries during engine simulation runs. Note that this facilitybecomes active only after the relevant option has been selected in the“Miscellaneous Controls” panel.

(d) Rad. Eq. Tip — impose a radial equilibrium condition by specifying thestatic pressure at the tip of a turbomachinery case.

(e) Rad. Eq. Hub — impose a radial equilibrium condition by specifying thestatic pressure at the rotor hub of a turbomachinery case.

Inlet Boundaries

Introduction

This condition describes an inflow boundary and thus requires specification of inletfluxes for

• mass• momentum• turbulence quantities• energy• chemical species mass fraction

as appropriate. The same boundary type may also be used to specify an outflowcondition (i.e. ‘negative inlet’). Note that boundary values are needed only forvariables pertinent to the problem being analysed (see “Boundary RegionDefinition” on page 4-5).

In specifying turbulence quantities, it is possible to select in advance the form inwhich the required boundary values will be input. It is also possible to specify howmass influx is treated under subsonic compressible flow conditions. The choices aremade in the “Define Boundary Regions” panel for inlets, as shown in the examplebelow, and are fully described in the “Inlet” on-line Help topic.

Page 110: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Inlet Boundaries

4-10 Version 4.02

Useful points

1. If the Flow Switch and Turb. Switch settings are changed after velocitycomponents and turbulence boundary conditions have been input, the existingvalues are not converted in any way, but are interpreted differently. Youshould therefore use “Define Boundary Regions” to correct these values.

2. Boundary values for turbulence in domains using a Reynolds Stress modelmay be specified solely in terms of k and ε instead of Reynolds Stresscomponents. If this option is chosen, turbulence conditions at the boundaryare assumed to be isotropic.

3. At negative inlets, i.e. inlet boundaries with velocity components pointing outof the solution domain, values for temperature, turbulence quantities andchemical species mass fractions are ignored.

4. Special considerations apply to tetrahedral meshes or meshes containingtrimmed (polyhedral) cells. If such meshes contain supersonic inletboundaries then, to obtain a stable/convergent solution, it is necessary tocreate at least two cell layers immediately next to the boundary (see Figure4-5 on page 4-23). If pro-STAR’s automatic meshing module is employed forthis purpose, use its built-in mesh generation capabilities. If the mesh isimported from a package that lacks these facilities, you must extrude the meshin a direction normal to the boundary and then shift the boundary location tothe edge of the newly-created, layered structure.

5. If boundary conditions are set using a table (see page 4-7), the permissiblevariable names that may appear in the table and their meaning is as follows:

(a) U — U-component of velocity

Page 111: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Outlet Boundaries

Version 4.02 4-11

(b) V — V-component of velocity(c) W — W-component of velocity(d) TE — Turbulence kinetic energy or intensity, depending on the Turb.

Switch setting(e) ED — Turbulence kinetic energy dissipation rate or length scale,

depending on the above setting(f) UU - Reynolds stress component(g) VV - Reynolds stress component(h) WW - Reynolds stress component(i) UV - Reynolds stress component(j) VW - Reynolds stress component(k) UW - Reynolds stress component(l) T — Temperature (absolute)(m) DEN — Density(n) Scalar_name — Mass fraction; use the scalar species name, e.g. H2O,

N2 etc. as the scalar variable name(s)

You must also ensure that the coordinate system used is the same as thecoordinate system specified in the “Define Boundary Regions” panel.

6. When running a transient, compressible flow case in which the mass flux is tobe maintained at a constant value (the Flow Switch menu setting is MassFlux), you must specify both velocity components and density as inletconditions. This applies to all methods of boundary condition input, i.e.,Standard STAR GUIde panel entry, User coding or Table.

7. Inlet boundaries should only be placed on the external surfaces of a fluiddomain.

Outlet Boundaries

Introduction

This condition should be applied at locations where the flow is outwardly directedbut the conditions are otherwise unknown. There are two types of outlet boundary:

1. Prescribed flow split boundary. The conditions that must be observed are:

(a) The specified split factor must be positive.(b) Flow splits for all outlet regions belonging to a given fluid domain should

sum to unity, i.e.

(4-1)

(c) This type of boundary must not be used in combination with a pressure ora stagnation pressure boundary within the same fluid domain.

(d) This type of boundary must not be used for transient compressible flowcases

2. Prescribed mass outflow rate boundary. The conditions that must be observedin this case are:

(a) The specified outflow rate must be positive.(b) This type of boundary must be used in combination with at least one

f s

f s∑ 1=

mout

Page 112: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Pressure Boundaries

4-12 Version 4.02

pressure boundary.

The desired boundary type is imposed via the “Define Boundary Regions” panel foroutlets, as shown in the example below, and is fully described in the “Outlet”on-line Help topic.

Useful points

1. Outlet boundaries of the two basic types described above must not coexist inthe same domain.

2. For solution stability and accuracy, outlet boundaries should be used only fardownstream of strong recirculation areas, where it is reasonable to expect trueoutflow everywhere on the boundary.

3. Prescribed mass outflow boundaries are recommended for obtaining fullydeveloped flow in pipes, channels, etc.

4. The difference between outflow conditions described using negative inlet asopposed to prescribed mass outflow boundaries is that the former prescribesboth the velocity distribution as well as the mass rate, whereas the latterprescribes only the mass rate.

5. If boundary conditions are set using a table (see page 4-7), only one variablename FSORMF, is allowed. The meaning of this variable is either flow splitor mass outflow rate, depending on the Condition pop-up menu settingdescribed above. Note that the variable must be a function of time only.

6. Outlet boundaries are incompatible with:

(a) Transonic flows(b) Cavitating flows

7. Outlet boundaries should only be placed on the external surfaces of a fluiddomain.

Pressure Boundaries

Introduction

This condition specifies a constant static pressure or piezometric pressure on agiven boundary. For turbomachinery cases, it is also possible to specify the staticpressure at the tip or hub and impose a pressure distribution that satisfies radial

Page 113: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Pressure Boundaries

Version 4.02 4-13

equilibrium. The direction and magnitude of the flow are determined as part of thesolution. Thus,

• if the flow is directed outwards, the values of the other variables areextrapolated from the upstream direction;

• if the flow is directed inwards, the values are obtained from the suppliedboundary conditions.

In specifying turbulence quantities, temperature, mass fraction or (optional)tangential velocity components, it is possible to select in advance the way in whichthese quantities will be determined. The choices are made in the “Define BoundaryRegions” panel for pressure boundaries, as shown in the example below, and arefully described in the “Pressure Boundary” on-line Help topic. However, any suchconditions are only applied if the flow direction is towards the solution domaininterior.

Useful points

1. For a given fluid domain, pressure boundaries must not coexist with outletboundaries of the ‘Flow Split’ type.

2. Analyses with multiple pressure boundaries inherently converge more slowlythan those where the inlet flow rates and flow splits have been specified.

3. Numerical instability may occur when large or curved surfaces are used aspressure boundaries.

4. It is advisable to choose a reference pressure that is of the same order as thepressure values on the boundaries. For example, if the model contains twoboundaries at 10 and 11 bars a reasonable reference pressure would be 10

Page 114: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Stagnation Boundaries

4-14 Version 4.02

bars. This practice will help to avoid start-up difficulties and to minimiseproblems due to machine round-off errors.

5. If the Turb. Switch setting is changed to Zero Grad after turbulence boundaryconditions have been input, the values already supplied are ignored.

6. If the piezometric setting is chosen for problems involving buoyancy drivenflow, you must ensure that the datum level location and density (as specifiedin the “Buoyancy” panel) are for a point lying on the pressure boundary itself.

7. In cases where a pressure boundary coexists with another pressure orstagnation boundary, it is recommended that the user supplies an estimate forthe maximum velocity within the solution domain in the relevant text box ofthe “Initialisation” panel (see also “Solution Domain Initialisation” on page4-42).

8. To obtain a stable/convergent solution for tetrahedral meshes or meshescontaining trimmed (polyhedral) cells, use of the UVW On option (i.e.explicit velocity specification, see the “Pressure Boundary” STAR GUIdepanel) is recommend.

9. Any type of mesh may be used for problems containing radial equilibriumboundaries but only one such region must be employed in the model. Notealso that in cases of high circumferential velocity gradients in the radialdirection, the user may change the number of averaging intervals to capturethe problem details more accurately. The default interval value (50) ishowever adequate for most cases.

10. If boundary conditions are set using a table (see page 4-7), the permissiblevariable names that may appear in the table and their meaning is as follows:

(a) PR — Pressure (relative)(b) TE — Turbulence intensity(c) ED — Turbulence length scale(d) T — Temperature (absolute)(e) Scalar_name — Mass fraction; use the scalar species name, e.g. H2O,

N2 etc. as the scalar variable name(s)

11. When option Mean On is used (see the “Pressure Boundary” STAR GUIdepanel), the scope for tabular input of pressure is limited. Temporal variationsin pressure may be prescribed through tabular input, but not spatial variations.

12. Pressure boundaries should only be placed on the external surfaces of a fluiddomain.

Stagnation Boundaries

Introduction

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

Page 115: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Stagnation Boundaries

Version 4.02 4-15

Useful points

1. If a fluid domain contains a stagnation boundary, it must also contain apressure boundary.

2. Boundary values for turbulence in domains using a Reynolds Stress modelmay be specified solely in terms of k and ε instead of Reynolds Stresscomponents. If this option is chosen, turbulence conditions at the boundaryare assumed to be isotropic.

3. It is recommended that the user supplies an estimate for the maximumvelocity within the solution domain via the relevant text box of the“Initialisation” panel (see also “Solution Domain Initialisation” on page4-42). This will ensure that the calculations start with a reasonable initialvelocity field.

4. For a given fluid domain, stagnation boundaries must not co-exist with outletboundaries of the ‘Flow Split’ type.

5. To obtain a stable/convergent solution for tetrahedral meshes or meshescontaining trimmed (polyhedral) cells, it is necessary to create at least twocell layers immediately next to the boundary (see Figure 4-5 on page 4-23). Ifpro-STAR’s automatic meshing module is employed for this purpose, use itsbuilt-in mesh generation capabilities. If the mesh is imported from a packagethat lacks these facilities, you must extrude the mesh in a direction normal tothe boundary and then shift the boundary location to the edge of thenewly-created, layered structure.

6. Stagnation boundaries are incompatible with:

(a) Eulerian multi-phase flows

Page 116: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Non-reflective Pressure and Stagnation Boundaries

4-16 Version 4.02

(b) Free surface flows(c) Cavitating flows

7. If boundary conditions are set using a table (see page 4-7), the permissiblevariable names that may appear in the table and their meaning is as follows:

(a) DCX — Direction cosine for U-component of velocity(b) DCY — Direction cosine for V-component of velocity(c) DCZ — Direction cosine for W-component of velocity(d) PSTAGB — Stagnation pressure (relative)(e) TSTAG — Stagnation temperature (absolute)(f) TINTB — Turbulence kinetic energy or intensity, depending on the Turb.

Switch setting(g) TLSCB — Turbulence kinetic energy dissipation rate or length scale,

depending on the Turb. Switch setting(h) Scalar_name — Mass fraction; use the scalar species name, e.g. H2O,

N2 etc. as the scalar variable name(s)

You must also ensure that the coordinate system used is the same as thecoordinate system specified in the “Define Boundary Regions” panel.

8. Stagnation boundaries should only be placed on the external surfaces of afluid domain.

Non-reflective Pressure and Stagnation Boundaries

Introduction

This type of boundary condition was specially developed for turbomachineryapplications. It may only be used in situations where the working fluid is an idealgas and the flow is compressible. Furthermore, it requires the presence of periodic(cyclic) boundaries in a transverse direction relative to the dominant flow direction,as illustrated in Figure 4-4 below.

Page 117: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Non-reflective Pressure and Stagnation Boundaries

Version 4.02 4-17

Figure 4-4 Example of non-reflecting boundary mesh structure

Boundaries of this kind are frequently used as non-reflective pressure/stagnationpairs. The information required for each type represents the average value of thedependent variables that need to be satisfied by the simulation and is supplied in the“Define Boundary Regions” panel. The relevant form of this panel fornon-reflecting stagnation boundaries is shown in the example below and is fullydescribed in the “Non-reflective Stagnation Boundary” on-line Help topic.

Wall

Wall

Circumferentialdirection

Flow (axial)direction

Cyclicboundary

Cyclicboundary

Page 118: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Non-reflective Pressure and Stagnation Boundaries

4-18 Version 4.02

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

Useful points

1. Non-reflective pressure and stagnation conditions impose a number ofrestrictions on the type of mesh employed at the boundary surface:

(a) The boundary must contain only quadrilateral faces, aligned along thecircumferential direction as shown in Figure 4-4.

(b) The cell layer adjacent to the boundary must contain only hexahedralcells

2. Such conditions cannot be assigned to boundary region no. 0.3. Each strip of boundary faces along the circumferential direction must be

assigned to a different non-reflective region number. However, these regionscan have the same boundary conditions.

4. The boundary surface must be delimited by cyclic boundaries along thetransverse direction, as shown in Figure 4-4.

5. If N is the number of cells along the circumferential direction, the maximumnumber of harmonics to be used by the Discrete Fourier Transform algorithmis N/2 -1. The minimum number is 0.

6. To ensure that the analysis runs smoothly, it may be necessary to start thesimulation by using standard pressure and stagnation boundary conditionsover a number of iterations. This can then be followed by a restart run wherethe non-reflecting boundaries have been applied.

7. For a given fluid domain, non-reflective boundaries must not coexist withoutlet boundaries of the ‘Flow Split’ type.

8. At present, certain physical features must not be present in cases containingnon-reflective boundaries. The excluded features are:

(a) Transient calculations(b) Chemical reactions and scalar variables(c) Radiation(d) Reynolds Stress and V2F turbulence models(e) Two-phase flow

Page 119: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Wall Boundaries

Version 4.02 4-19

(f) Moving meshes(g) Liquid films(h) Free surface and cavitation

9. If boundary conditions are set using a table (see page 4-7), the permissiblevariable names that may appear in the table and their meaning is as follows:

(a) Non-reflective pressure boundaries

i) PR — Pressure (relative static)ii) TE — Turbulence kinetic energy or intensity, depending on the

Turb. Switch settingiii) ED — Turbulence kinetic energy dissipation rate or length scale,

depending on the above setting

(b) Non-reflective stagnation boundaries

i) DCX — Direction cosine for U-component of velocityii) DCY — Direction cosine for V-component of velocity

iii) DCZ — Direction cosine for W-component of velocityiv) PSTAGB — Stagnation pressure (relative)v) TSTAG — Stagnation temperature (absolute)

vi) TINTB — Turbulence kinetic energy or intensity, depending on theTurb. Switch setting

vii) TLSCB — Turbulence kinetic energy dissipation rate or lengthscale, depending on the above setting

The user must also ensure that the coordinate system used is the same as thecoordinate system specified in the “Define Boundary Regions” panel.

10. Non-reflective boundaries should only be placed on the external surfaces of afluid domain.

Wall Boundaries

Introduction

STAR-CD’s implementation of wall boundaries involves a generalisation andextension of the no-slip and impermeability conditions commonly used at suchsurfaces. Thus, a wall boundary may be defined as:

• Of the no-slip or slip type. The latter is applicable to inviscid flows (inpractice µ is set to 10–30 Pa s). The no-slip boundary conditions for turbulentflow are implemented using one of the methods discussed in Chapter 3,“Turbulence Modelling”.

• Smooth or rough.• Moving or stationary. A wall may move within the surface it defines. If

motion normal to that surface is desired, use the moving mesh featuresdiscussed in Chapter 12, “Moving Meshes”.

• Permeable or impermeable to heat and/or mass flow.• Resistant or not to heat flux due to a thermal boundary layer or intervening

solid material.• Radiating or non-radiating (see also Chapter 7).

Page 120: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Wall Boundaries

4-20 Version 4.02

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

Thermal radiation properties

In thermal radiation problems:

1. Values for thermal emissivity, reflectivity and transmissivity [dimensionless]are required (see also Chapter 7). These should be typed in the text boxesprovided.

2. The thermal absorptivity is calculated as (1- reflectivity - transmissivity).3. The defaults are those for a black body (emissivity equal to 1.0, reflectivity

and transmissivity equal to 0.0).

Kirchoff’s law (emissivity = absorptivity) is not enforced by the solver. For yourwall boundary condition to obey Kirchoff’s law, you must enter the condition:

emissivity = absorptivity = 1 - transmissivity - reflectivity

Solar radiation properties

In solar radiation problems:

1. External walls must be declared as Exposed or Unexposed to incidentradiation, by selecting the appropriate option from the Solar Heating pop-up

Page 121: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Wall Boundaries

Version 4.02 4-21

menu. Note that:

(a) This option does not apply to internal ‘walls’ (i.e. baffles and solid/fluidinterfaces)

(b) The external (FASTRAC) DTRM method distinguishes between directand diffuse solar radiation — see topic Solar Radiation. However, theabove option affects both of them equally.

2. The thermal resistance of an exposed wall to incident solar radiation isneglected.

3. Walls can be made transparent to incident radiation, in which case a value oftransmissivity [dimensionless] should be supplied in the text box provided.Thus, the direct solar radiation received by walls can be

(a) absorbed,(b) reflected as diffuse radiation, or(c) transmitted.

4. Direct radiation transmitted through transparent walls (e.g. windows), istracked along the angle of solar inclination (specified via the Solar Radiationoption in the “Thermal Options” panel) until it falls on an obstructing surface.

5. The remaining user input depends on the problem conditions:

(a) If only solar radiation is present:

i) The reflected diffuse radiation is neglectedii) The absorptivity is calculated as (1 – transmissivity)

(b) If both thermal and solar radiation are present:

i) The code treats the two radiation components separatelyii) Values of reflectivity and transmissivity for each component are

supplied in separate text boxes and the corresponding absorptivitycalculated as (1 – reflectivity – transmissivity)

iii) Choosing the internal DTRM method for radiation calculations hasthe effect of making the solar transmissivity equal to the thermaltransmissivity.

Other radiation modelling considerations

• The FASTRAC method must be used for thermal/solar radiation problemswith transmissive external walls.

• If the FASTRAC method is used, it is necessary to specify the transmissivityvalue prior to the view factor calculation.

• The user input required under the various combinations of thermal and/orsolar radiation conditions may be conveniently summarised in the tablebelow:

Page 122: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Wall Boundaries

4-22 Version 4.02

.

Useful points

1. For stationary mesh cases, only velocities in directions parallel to the wallsurface may be specified, e.g. a planar wall can move only within its ownplane. For moving mesh cases, all velocity components should in general bespecified.

2. Wall function and two-layer models can be used with any kind of mesh.However, for tetrahedral meshes or meshes containing trimmed (polyhedral)cells, it is advisable to create at least one cell layer immediately next to thewall boundary (see Figure 4-5 below). If pro-STAR’s automatic meshingmodule is employed for this purpose, use its built-in mesh generationcapabilities. If the mesh is imported from a package that lacks these facilities,you must extrude the mesh in a direction normal to the boundary so that thewall is located at the edge of the newly-created, layered structure.

3. The practice recommended above is particularly important for wallboundaries that strongly influence the character of the flow.

4. If boundary conditions are set using a table (see page 4-7), the permissiblevariable names that may appear in the table and their meaning is as follows:

(a) U — U-component of wall velocity(b) V — V-component of wall velocity(c) W — W-component of wall velocity(d) TORHF — Wall temperature (absolute) or heat flux(e) RESWT — Wall thermal resistance(f) Scalar_name — Mass fraction at the wall; use the scalar species name,

e.g. H2O, N2 etc. as the scalar variable name(s)(g) Scalar_name-RSTSC — Wall resistance for a given species, e.g.

H2O-RSTSC, N2-RSTSC, etc.

You must also ensure that the coordinate system used is the same as thecoordinate system specified in the “Define Boundary Regions” panel.

5. Wall boundaries should only be placed on the surfaces of a fluid or soliddomain. They are the only valid boundary type for the interfaces betweensolid and fluid domains.

6. Scalar boundary conditions at solid-fluid interfaces must be set to zero flux.

Table 4-1: Summary of radiative surface property requirements

ConditionProperty

Emissivity Reflectivity Absorptivity Transmissivity Exposure

Thermal Y Y N (=1-R-T) Y N

Thermal& Solar

YN (=0)

YY

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

YY Y

Solar N (=0) N (=0) N (=1-T) Y Y

Page 123: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Baffle Boundaries

Version 4.02 4-23

Figure 4-5 Example of tetrahedral plus layered mesh structure

Baffle Boundaries

Introduction

Baffles are zero-thickness cells within the flow field. They represent solid or porousdomains whose physical dimensions are much smaller than the local meshdimensions, as shown in the example of Figure 4-6.

Figure 4-6 Example model with baffles: duct bend with turning vanes

Baffle ‘cells’ are normally defined via the Cell Tool, as described in Chapter 2, page2-48 of the Meshing User Guide and should be placed on cell faces inside a fluiddomain. If no boundary conditions are specified for the baffle surfaces, they areassumed to be smooth, stationary, impermeable, adiabatic walls. If one needs tospecify any other conditions, it is necessary to define special boundaries (calledbaffle boundaries) explicitly on the baffle surfaces. These boundaries can then begrouped into regions and the “Define Boundary Regions” panel can be used to applythe desired conditions, as shown in the example below.

Page 124: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Baffle Boundaries

4-24 Version 4.02

The discussion of porous media in Chapter 6 also applies, in a modified form, toporous baffles. Thus, it is possible to calculate such a flow by formulating theporous media equation in terms of a pressure drop, , across the baffle. Thedefinition of the baffle resistance coefficients is also adjusted to account for thischange. Obviously, it is now necessary to provide only one pair of such coefficients.

Setting up models

Inputs for baffle regions are very similar to inputs for walls, including a choicebetween wall functions and the two-layer model (see the “Baffle” on-line Helptopic). There are a few exceptions which are noted below:

1. It is usually possible to impose different boundary conditions on either side ofthe baffle. As shown in the example dialog above, conditions for Side 1 aresupplied first. It is then necessary to click the Apply button, which displaysthe Side 2 dialog and a message to enter appropriate parameters for that side.Once this is done, the process should be completed by clicking Apply asecond time.

2. The numbering of the sides is based on the manner in which the baffle wasdefined. Side 1 is the ‘outward normal’ side as defined by the cross product oftwo vectors pointing from the first node to the second node and from the firstnode to the fourth node, as shown in Figure 4-7.

∆p

Page 125: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Baffle Boundaries

Version 4.02 4-25

Figure 4-7 Numbering convention for various baffle shapes

Another way of determining side numbers is to view the baffle cell andconsult the cell definition. If the ordering of the cell vertices is counterclockwise, you are viewing Side 1.

3. The fact that the boundary conditions can be designated separately for eachside enables the user to have one side moving and the other stationary or oneside isothermal and the other side adiabatic. The conditions can be mixed inany combination with two exceptions:

(a) If the thermal boundary condition for Side 1 of the baffle is Conduction,STAR-CD calculates the one-dimensional heat transfer across the bafflebased on the local temperature and flow conditions on either side. Thischoice of boundary condition naturally excludes a different choice forSide 2 and therefore the Wall Heat pop-up menu is deactivated for thatside. An exception to this rule occurs when thermal radiation is switchedon, in which case radiation properties for both sides of the baffle need tobe supplied.

(b) In a similar way, if the baffle is porous, only one set of resistancecoefficients is needed. The required values are supplied as input for Side1. Since these naturally apply to the entire baffle, no input is necessary forSide 2.

Specific input required for baffles is fully described in the STAR GUIde “Baffle”Help topic. The user should supply values first for Side 1 and then for Side 2 (withthe exceptions noted above).

Thermal radiation properties

In thermal radiation problems:

1. Values for thermal emissivity, reflectivity and transmissivity [dimensionless]are required (see also Chapter 7). These should be typed in the text boxesprovided.

2. The absorptivity is calculated as (1 – reflectivity – transmissivity).3. The defaults are those for a black body (emissivity equal to 1.0, reflectivity

1

2

3

4

1

2

3,3

Side 1

Side 2

Side 1

Side 2

Page 126: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Baffle Boundaries

4-26 Version 4.02

and transmissivity equal to 0.0).

The effect of baffle transmissivity is taken into account during the view factorcalculations. Therefore, any changes in transmissivity during the run (for example,as part of a transient calculation) will activate beam tracking and a re-calculation ofview factors. Note that use of transparent baffles is restricted to surface-to-surfaceradiation only and thus excludes participating media radiation.

Note also that Kirchoff’s law (emissivity = absorptivity) is not enforced by thesolver. For your baffle boundary condition to obey Kirchoff’s law, you must enterthe condition:

emissivity = absorptivity = 1 - transmissivity - reflectivity

Solar radiation properties

In solar radiation problems, user input depends on the problem conditions:

1. If solar radiation only is present:

(a) It is assumed to be completely absorbed by the baffle (i.e. absorptivity =1)

(b) The reflected diffuse radiation is neglected(c) As a result, no user input is required

2. If both thermal and solar radiation are present:

(a) Values for emissivity, reflectivity and transmissivity [dimensionless] aresupplied separately for each radiation component

(b) Choosing the internal DTRM method for radiation calculations has theeffect of making the solar transmissivity equal to the thermaltransmissivity. Therefore, only a reflectivity value needs to be suppliedfor the solar component.

Other radiation modelling considerations

• If the FASTRAC method is used, it is necessary to specify the transmissivityvalue prior to the view factor calculation.

• The user input required under the various combinations of thermal and/orsolar radiation conditions may be conveniently summarised in the tablebelow:

.

Table 4-2: Summary of radiative surface property requirements

ConditionProperty

Emissivity Reflectivity Absorptivity Transmissivity Exposure

Thermal Y Y N (=1-R-T) Y N

Thermal& Solar

YN (=0)

YY

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

YY N

Solar N (=0) N (=0) N (=1) N (=0) N

Page 127: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Symmetry Plane Boundaries

Version 4.02 4-27

Useful points

1. For stationary mesh cases, only velocities in directions parallel to the bafflesurface may be specified, e.g. a planar baffle can move only within its ownplane. For moving mesh cases, all velocity components should in general bespecified.

2. If boundary conditions are set using a table (see page 4-7), the permissiblevariable names that may appear in the table and their meaning is as follows:

(a) U — U-component of baffle velocity(b) V — V-component of baffle velocity(c) W — W-component of baffle velocity(d) TORHF — Baffle temperature (absolute) or heat flux(e) RESWT — Baffle thermal resistance(f) Scalar_name — Mass fraction; use the scalar species name, e.g. H2O,

N2 etc. as the scalar variable name(s)(g) Scalar_name-RSTSC — Baffle resistance for a given species, e.g.

H2O-RSTSC, N2-RSTSC, etc.

You must also ensure that the coordinate system used is the same as thecoordinate system specified in the “Define Boundary Regions” panel.

Symmetry Plane Boundaries

Symmetry boundaries are used for two purposes:

1. To reduce the size of the computational mesh by placing the boundary along aplane of geometrical and flow symmetry.

2. To approximate a free-stream boundary.

No user input is required beyond definition of the boundary location. The quantitiesset to zero at the boundary are:

• The normal component of velocity• The normal gradient of all other variables

Symmetry boundaries should only be placed on the external surfaces of a fluid orsolid domain. They cannot be used in FASTRAC radiation calculations.

Cyclic Boundaries

Introduction

Cyclic boundaries impose a repeating or periodic flow condition on a pair ofgeometrically identical boundary regions, numbers 1 and 2 in the example of Figure4-8. Selected scalar variables are forced to be equal at corresponding faces on thetwo regions. As shown in Figure 4-8, velocity components are also equalised in acommon local coordinate system specified by the user. Such boundaries thus serveto reduce the size of the computational mesh. This is illustrated by the example ofFigure 4-9, showing a cascade of repeating baffles.

Page 128: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Cyclic Boundaries

4-28 Version 4.02

Figure 4-8 Cyclic conditions defined using a local coordinate system

Figure 4-9 Regular cyclic boundaries with integral match

Setting up models

Cyclic boundaries are defined using STAR GUIde panels in the following multi-stage process:

1. In panel “Create Boundaries”, use tab “Regions” to set up a pair of regions, ofidentical size and shape, and designate them as cyclic

2. In tab “Cyclics”, specify a number of parameters that enable them to bematched to each other geometrically and which take into account the meshcharacteristics at either end. This involves the following considerations:

(a) Specification of suitable coordinate increments (offsets) that allow one

U2

V2

U1V1

Cyclic boundary 2 Cyclic boundary 1YL

RL

XLΘL

U1 = U2V1 = V2W1 = W2

Local cylindrical system

Cyclic boundary 1

Cyclic boundary 2

Inlet

Page 129: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Cyclic Boundaries

Version 4.02 4-29

member of the pair to be located if one starts at the other member. A localcoordinate system in which the regions are matched is also specified.

(b) Whether the regions form a regular cyclic (as in Figure 4-9) or ananticyclic pair (as in Figure 4-10). The latter appears in problems whereall flow variable profiles have to be reversed in a specified direction ofthe matching coordinate system. This operation also reverses thecoordinate value of each boundary face in that direction before adding thecorresponding offset. Thus, placing the coordinate system origin on anaxis of symmetry and choosing its location carefully can eliminate theneed for offsets, as in the anticyclic system shown in Figure 4-10.

Figure 4-10 Partial anticyclic boundaries with integral match

(c) Whether there is a one-to-one correspondence between boundary faces oneither side of the cyclic pair, as in the examples shown in Figure 4-9 andFigure 4-10. This requires a so-called integral matching operation. If nosuch correspondence exists, typically because one side is more finelymeshed than the other (as in Figure 4-11), the system requires anarbitrary matching operation. The latter is similar to matching cell faceson either side of an interface between mesh blocks (see Chapter 3,“Arbitrary connectivity” in the Meshing User Guide). It thus involvesmatching of so-called master boundary faces on one side of the cyclic pairwith slave faces on the other side.

3. In tab “Cyclics”, finish up by performing the geometric matching operationbetween boundary faces on either side of the pair to form so-called cyclic sets.Note that the same operation may also be performed manually, whereby eachcyclic set and the boundaries contributed by each cyclic pair member arenamed explicitly using command CYCLIC. The list of cyclic pairs can also beextended with the CYGENERATE command, beginning from a pre-existingstarting set.

Cyclic boundary 1

Cyclic boundary 2

Local Cartesian coordinate system

Page 130: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Cyclic Boundaries

4-30 Version 4.02

Figure 4-11 Cyclic boundaries with arbitrary match

4. In panel “Define Boundary Regions”, specify the physical cyclic boundaryconditions that exist between the members of the pair, as shown below:

These can be of two types:

(a) Ordinary cyclic conditions, whereby all flow variable values on onemember are matched with the corresponding values on the other member.

(b) Partial cyclic conditions, whereby the matching process is subject to anadditional constraint of either a prescribed pressure drop or a fixed massflow rate across the cyclic pair. An example of a fixed mass flow ratesystem, representing one half of a continuous loop flow system, is shownin Figure 4-10. For thermal problems, the bulk mean temperature on theinflow side of the cyclic pair is also required.

Useful points

1. One member of the cyclic pair must be designated as an Inflow boundary andthe other as an Outflow boundary

Page 131: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Cyclic Boundaries

Version 4.02 4-31

2. If the partial cyclic condition is specified via the STAR GUIde interface, theInflow and Outflow sides are indicated via the Flow Direction menu and thepressure drop or flow rate must be a positive number. Note that this numbermust be the same for both members of the pair.

3. If the partial cyclic condition is specified via the RDEFINE command, theinflow and outflow sides are distinguished by assigning a pressure drop orflow rate to one member that is equal in magnitude but of opposite sign to thatfor the other member. The sign convention is as follows:

(a) Pressure Drop+ Inflow– Outflow

(b) Flow rate+ Outflow– Inflow

4. Partial cyclic conditions can only be applied to boundaries matched inCartesian coordinates

5. Such conditions are not available for chemical species mass fractions andcannot be used in variable-density flows

6. Arbitrary cyclic matching (see page 4-29 above) is not allowed for partialcyclic conditions

7. Cyclic boundaries cannot be used in FASTRAC radiation calculations.8. Cyclic boundaries should only be placed on the external surfaces of a fluid

domain.

Cyclic set manipulation

All currently defined cyclic sets are shown in the Cyclic Set List below:

The list may be displayed by choosing Lists > Cyclic Sets from the main menu bar.The sets are numbered and listed in numerically ascending order, together with theirconstituent master and slave boundary numbers for arbitrarily matched regions (seepage 4-29 above). There is a choice of showing all cyclic sets (click button ShowAll Cyclic Sets) or just those with at least one member (master or slave boundary)in the current boundary set (click button Show Cyclic Sets with Boundaries in

Commands: CYLIST CYDELETE CYCOMPRESS

Page 132: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Free-stream Transmissive Boundaries

4-32 Version 4.02

Bset Only). Items in the second category are marked by asterisks in the Bsetcolumn.

To select cyclic sets from the list:

• For single items, click the required set number.• For two or more items in sequence, click the first set you want to select, press

and hold down the Shift key and then click the last set in the group.

Once the desired sets are selected, the following operations are possible:

• Deletion — click on the Delete button.• Compression — click on the Compress button. This involves the elimination

of all deleted cyclic sets and renumbering of the remaining ones.

A third operation, for validating arbitrarily matched cyclic boundaries, isimplemented in the “Check Everything” panel. The operation checks that

• all sets in a given range exist and reference arbitrarily-matched cyclic regions;• there is overlap between boundaries on the two sides of the cyclic set;• the overlapping areas from either side match up.

All checks are performed to within a specified tolerance.

Free-stream Transmissive Boundaries

Introduction

This type of boundary may be used only in models involving supersonic freestreams where the working fluid is an ideal gas. The facility enables shock wavesgenerated in the interior of the solution domain to be transmitted, without reflection,through the boundary to the wider (free stream) space surrounding the domain.Flow can be out of the solution domain (compression waves) or into the solutiondomain (expansion waves). In either case, boundary values of scalar variables areextrapolated from the solution domain interior. In the case of turbulent inflow(expansion waves), the turbulence quantities have to be specified as part of the userinput.

To set up boundaries of this kind, you need to:

1. Decide on an appropriate location for the boundary, preferably parallel to themain (supersonic) stream.

2. Supply values in the “Define Boundary Regions” panel for all free-streamproperties, as shown in the example below. The required input is fullydescribed in the “Free-stream Transmissive Boundary” on-line Help topic.

Page 133: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Free-stream Transmissive Boundaries

Version 4.02 4-33

The STAR-CD solver calculates the magnitude and direction of the flow at theboundary as part of the analysis, based on the simple wave theory given in [3] and[4].

Useful points

1. A value of temperature at the boundary is obligatory. The user must thereforeensure that temperature calculations are activated, via the “Thermal Models”panel, before defining the boundary conditions.

2. Boundary values for turbulence in domains using a Reynolds Stress modelmay be specified solely in terms of k and ε instead of Reynolds Stresscomponents. If this option is chosen, turbulence conditions at the boundaryare assumed to be isotropic.

3. To obtain a stable/convergent solution for tetrahedral meshes or meshescontaining trimmed (polyhedral) cells, it is necessary to create at least twocell layers immediately next to the boundary (see Figure 4-5 on page 4-23). Ifpro-STAR’s automatic meshing module is employed for this purpose, use itsbuilt-in mesh generation capabilities. If the mesh is imported from a packagethat lacks these facilities, you must extrude the mesh in a direction normal tothe boundary and then shift the boundary location to the edge of thenewly-created, layered structure.

4. Boundary conditions specified in a table will be applied only if fluid isentering the solution domain from the outside. If this is not the case, i.e.theflow is parallel to the boundary or crossing it from inside the domain,boundary values will be extrapolated from interior values and the table datawill not be used.

5. If boundary conditions are set using a table (see page 4-7), the permissible

Page 134: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Transient-wave Transmissive Boundaries

4-34 Version 4.02

variable names that may appear in the table and their meaning is as follows:

(a) UINF — U-component of velocity(b) VINF — V-component of velocity(c) WINF — W-component of velocity(d) PINF — Pressure (relative)(e) TINF — Temperature (absolute)(f) TEINF — Turbulent kinetic energy or intensity, depending on the Turb.

Switch setting(g) EDINF — Turbulent kinetic energy dissipation rate or length scale,

depending on the Turb. Switch setting

You must also ensure that the coordinate system used is the same as thecoordinate system specified in the “Define Boundary Regions” panel.

6. Free-stream transmissive boundaries should only be placed on the externalsurfaces of a fluid domain.

Transient-wave Transmissive Boundaries

Introduction

This type of boundary may be used only in transient, compressible flows where theworking fluid is an ideal gas. It enables transient waves to leave the solution domainwithout reflection. STAR-CD uses the simple wave theory to calculate conditionsbehind the wave and to specify such conditions at the boundaries.

To set up boundaries of this kind, you need to:

1. Decide on an appropriate location for the boundary2. Supply values in the “Define Boundary Regions” panel for all dependent

variables, representing conditions outside the boundary (at ‘infinity’). Therequired input is fully described in the “Transient-wave TransmissiveBoundary” on-line Help topic.

Page 135: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Transient-wave Transmissive Boundaries

Version 4.02 4-35

STAR-CD calculates the magnitude and direction of the flow at the boundary aspart of the analysis, based on the transient wave theory given in [3] and [4].

Useful points

1. A value of temperature at the boundary is obligatory. The user must thereforeensure that temperature calculations are activated, via the “Thermal Models”panel, before defining the boundary conditions.

2. Boundary values for turbulence in domains using a Reynolds Stress modelmay be specified solely in terms of k and ε instead of Reynolds Stresscomponents. If this option is chosen, turbulence conditions at the boundaryare assumed to be isotropic.

3. To obtain a stable/convergent solution for tetrahedral meshes or meshescontaining trimmed (polyhedral) cells, it is necessary to create at least twocell layers immediately next to the boundary (see Figure 4-5 on page 4-23). Ifpro-STAR’s automatic meshing module is employed for this purpose, use itsbuilt-in mesh generation capabilities. If the mesh is imported from a packagethat lacks these facilities, you must extrude the mesh in a direction normal tothe boundary and then shift the boundary location to the edge of thenewly-created, layered structure.

4. Boundary conditions specified in a table will be applied only if fluid isentering the solution domain from the outside. If this is not the case, i.e.theflow is parallel to the boundary or crossing it from inside the domain,boundary values will be extrapolated from interior values and the table datawill not be used.

5. If boundary conditions are set using a table (see page 4-7), the permissible

Page 136: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Riemann Boundaries

4-36 Version 4.02

variable names that may appear in the table and their meaning is as follows:

(a) UINF — U-component of velocity(b) VINF — V-component of velocity(c) WINF — W-component of velocity(d) PINF — Pressure (relative)(e) TINF — Temperature (absolute)(f) TEINF — Turbulent kinetic energy or intensity, depending on the Turb.

Switch setting(g) EDINF — Turbulent kinetic energy dissipation rate or length scale,

depending on the above setting

You must also ensure that the coordinate system used is the same as thecoordinate system specified in the “Define Boundary Regions” panel.

6. Transient-wave transmissive boundaries should only be placed on the externalsurfaces of a fluid domain.

Riemann Boundaries

Introduction

This type of boundary is typically employed in external aerodynamics simulationsand may be used only if the working fluid is an ideal gas. It enables weak pressurewaves to leave the solution domain without reflection and is valid for bothsteady-state and transient problems.

To set up boundaries of this kind, you need to:

1. Decide on an appropriate location for the boundary2. Supply values in the “Define Boundary Regions” panel for all dependent

variables, representing conditions outside the boundary (at ‘infinity’). Therequired input is fully described in the “Riemann Boundary” Help topic.

Page 137: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Riemann Boundaries

Version 4.02 4-37

STAR-CD calculates the magnitude and direction of the flow at the boundary aspart of the analysis, based on the Riemann invariant theory given in [7].

Useful points

1. Check that the density of the domain to which such a boundary belongs is setto Ideal-f(T,P)

2. Boundary values for turbulence in domains using a Reynolds Stress modelmay be specified solely in terms of k and ε instead of Reynolds Stresscomponents. If this option is chosen, turbulence conditions at the boundaryare assumed to be isotropic.

3. A value of temperature at the boundary is obligatory. The user must thereforeensure that temperature calculations are activated, via the “Thermal Models”panel, before defining the boundary conditions.

4. To obtain a stable/convergent solution for tetrahedral meshes or meshescontaining trimmed (polyhedral) cells, it is necessary to create at least twocell layers immediately next to the boundary (see Figure 4-5 on page 4-23). Ifpro-STAR’s automatic meshing module is employed for this purpose, use itsbuilt-in mesh generation capabilities. If the mesh is imported from a packagethat lacks these facilities, you must extrude the mesh in a direction normal tothe boundary and then shift the boundary location to the edge of thenewly-created, layered structure.

5. Boundary conditions specified in a table will be applied only if fluid isentering the solution domain from the outside. If this is not the case, i.e.theflow is parallel to the boundary or crossing it from inside the domain,boundary values will be extrapolated from interior values and the table data

Page 138: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Attachment Boundaries

4-38 Version 4.02

will not be used.6. If boundary conditions are set using a table (see page 4-7), the permissible

variable names that may appear in the table and their meaning is as follows:

(a) UINF — U-component of velocity(b) VINF — V-component of velocity(c) WINF — W-component of velocity(d) PINF — Pressure (relative)(e) TINF — Temperature (absolute)(f) TEINF — Turbulent kinetic energy or intensity, depending on the Turb.

Switch setting(g) EDINF — Turbulent kinetic energy dissipation rate or length scale,

depending on the above setting(h) Scalar_name — Mass fraction; use the scalar species name, e.g. H2O,

N2 etc. as the scalar variable name(s)

You must also ensure that the coordinate system used is the same as thecoordinate system specified in the “Define Boundary Regions” panel.

7. Riemann boundaries should only be placed on the external surfaces of a fluiddomain.

Attachment Boundaries

Attachment boundaries are used for the following two purposes:

1. To define the interface between cells that may be connected or disconnectedfrom each other (see Chapter 12, “Cell Attachment and Change of FluidType”).

2. To define the interface between mesh blocks that slide past each other, eitherin an ‘integral’ or ‘arbitrary’ manner — see “Regular sliding interfaces” onpage 12-18.

Two input parameters are needed:

• A local coordinate system in which the boundaries are to be matched• An alternate boundary region number

The second parameter is required for cell layer attachment cases and serves tomaintain appropriate boundary conditions in the solution domain if the cells oneither side of the interface become disconnected. The alternate boundary region

Page 139: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Radiation Boundaries

Version 4.02 4-39

must be of ‘wall’ or ‘inlet’ type. Examples of cases requiring attachment boundariesare given in Chapter 12.

Useful points

1. To obtain a stable/convergent solution for meshes containing trimmed(polyhedral) cells, it is necessary to create at least two cell layers immediatelynext to the boundary (see Figure 4-5 on page 4-23). If the pro-STAR AutoMesh module is employed, use its built-in mesh generation capabilities forthis purpose. If the mesh is imported from a package that lacks such facilities,you must extrude the mesh in a direction normal to the boundary and thenshift the boundary location to the edge of the newly-created, layered structure.

2. Attachment boundary regions must be created in pairs, one on each of themesh blocks that are attached to, detached from or sliding past each other.

3. Attachment boundaries should be placed on the surfaces of domains/subdomains.

Radiation Boundaries

Radiation boundaries are used for the purpose of separating that part of your modelwhere radiation effects are important from other parts where such effects arenegligible. This type of boundary only influences radiation calculations and iscompletely transparent to the fluid flow and non-radiative heat transfer in yourmodel.

Two input parameters are needed (see also Chapter 7):

1. The boundary radiation temperature [K], normally set to a value close to theexpected temperature in the surrounding area

2. The boundary surface emissivity [dimensionless], normally set to 1.0

The location and properties of such a boundary should be chosen so that:

• Radiant energy passing through it escapes to the outside world with minimalback-radiation into the sub-domain where it emanated. The escaped radiationshould be low enough not to influence conditions in the outside world.

• Its presence does not adversely affect the accuracy of the calculations insidethe radiative sub-domain(s)

• If a coupled-cell interface exists between the radiative and non-radiativesub-domains, the boundary must be placed on the cells that are inside the

Page 140: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Phase-Escape (Degassing) Boundaries

4-40 Version 4.02

radiative sub-domain.

Useful points

1. The use of radiation boundaries is not required in radiation problemsemploying the Discrete Ordinates method. Turning radiation off for aparticular cell type is sufficient to exclude radiation calculations in that meshregion.

2. Radiation boundaries are currently incompatible with FASTRAC radiationcalculations.

3. Radiation boundaries should be placed on cell faces inside a fluid domain.

Phase-Escape (Degassing) Boundaries

This type of boundary appears exclusively in Eulerian multi-phase problems (seeChapter 10 of this volume) and represents a degassing free-surface bounding atwo-phase system of gas bubbles in a liquid, corresponding to the dispersed andcontinuous phases, respectively. The boundary conditions applied to each phase areas follows:

1. For the continuous phase, the boundary acts like a slip wall, allowing theliquid to flow parallel to the boundary surface without friction

2. For the dispersed phase, the boundary acts like an opening allowing bubblesto escape into the surrounding medium, unless retained within the solutiondomain by the drag forces acting on them.

No further user input is required on the “Define Boundary Regions” panel. Note thatonly one boundary of this type should be present in your model. Degassingboundaries should only be placed on the external surfaces of a fluid domain.

Monitoring Regions

These are arbitrary surfaces, defined in the same way as ordinary boundaries butplaced on any cell faces within a fluid or solid domain so as to form internalsurfaces. They are used purely for monitoring engineering data such as mass flux(see panel “Monitor Boundary Behaviour”) so no further user input is required onthe “Define Boundary Regions” panel.

Monitoring regions do not affect the flow field in any way; STAR simplycalculates the monitored data values at the specified region’s surface and storesthem for subsequent display as a function of time or number of iterations (see panel“Engineering Data”). The same data values are available at monitoring regions asat open boundary regions, except that:

• Item Heat Flux is not available• Field values are taken from the neighbouring cell centres and are not

interpolated to the boundary• Item Enthalpy In/Out is based on convection only, so it will be zero in solid

materials

Each face of a monitoring region “belongs” to a neighbouring cell, such that themass flux is defined as being positive when it leaves this cell through the face. Thisin turn determines the face’s orientation and, for consistent calculation of the total

Page 141: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Boundary Visualisation

Version 4.02 4-41

mass flux through the region, it is important that all its faces are oriented the sameway.

The choice of which cell a monitoring region face belongs to is made when thatface is defined. Commands BFIND, BCROSS, and BZONE do this by picking a cellface, as do their associated GUI operations, and are therefore suitable for thispurpose. On the other hand, commands BDEF, BGEN and BDX should not be usedto define monitoring region faces as they do not involve the explicit selection of acell face and hence the orientation of the monitoring region face is indeterminate.Caution should also be exercised when generating such regions automatically, forexample by cell refinement. When visualising monitoring regions, their orientationis indicated using an arrow normal to the boundary and whose direction indicatesthe direction of positive flux, as shown in Figure 4-12 below.

Figure 4-12 Monitoring region display

Boundary Visualisation

As described in “Boundary set selection facilities” on page 4-3, boundaries can becollected into sets. The currently defined set can then be displayed on top of thecalculation mesh by choosing Cell Plot Display Option Bound from the mainwindow and re-plotting. The cell faces representing the boundaries will be markedby distinctive fill patterns and colours, characteristic of the boundary typerepresented. Boundary faces will be superimposed on any kind of plot alreadydisplayed on the screen other than a section plot. Note that the boundary displayoption may also be selected by choosing Plot > Cell Display > Boundaries fromthe menu bar. Alternatively, you may type commands BDISPLAY, ON orCDISPLAY, BREGION in the I/O window.

Page 142: Star CCm Guide

BOUNDARY AND INITIAL CONDITIONS Chapter 4

Solution Domain Initialisation

4-42 Version 4.02

Solution Domain Initialisation

Steady-state problems

User action depends on whether the solution is to start from the initial state of themodel (initial run) or to continue from a previously computed solution (restart run).

Initial runsInitial conditions for flow field variables are assigned in STAR-GUIde’sThermophysical Models and Properties folder:

• For fluid field variables, use panel “Initialisation” in the Liquids and Gasessub-folder. Note that there is a separate “Turbulence tab” for initializingturbulence parameters. If this is done by specifying the initial turbulenceintensity I and length scale l, the turbulence kinetic energy k and dissipationrate ε are computed as follows:

(4-2)

(4-3)

where U is the initial velocity magnitude. For turbulence models other thanthe k-ε type, the turbulence scales (ω for k-ω models or for theSpalart-Allmaras model) are computed automatically.

• For chemically reacting flows, you may also need to use panel “Initialisation”in the Additional Scalars sub-folder to specify initial mass fractions forchemical species.

• In conjugate heat transfer problems, another panel also called “Initialisation”in the Solids sub-folder can be used to specify initial temperatures in solidmaterials.

Restart runsVarious options for this operation are available in panel “Analysis (Re)Start” withinthe Analysis Preparation/Running folder. If option Standard Restart is chosen, thesolution from a previous run serves as the starting point for the current run. If InitialField Restart is chosen in this panel, the STAR-CD solver only corrects the massfluxes to satisfy continuity. The Initial Field Restart option should be chosen ifany change has been made to the boundary conditions or reference quantities(pressure and/or temperature). This option must also be chosen if new scalars havebeen defined by selecting additional modelling options such as Lagrangianmulti-phase or chemical reaction.

Special considerations apply to cases where the restart also involves a change inthe mesh configuration, typically a refinement of a coarser starting mesh. These arecovered in Chapter 5, “Solution Control with Mesh Changes”.

Transient problems

In transient problems, all flow field variables should be given the correct values forthe problem at hand. Depending on the physical conditions being modelled, this canbe done in one of the following ways:

1. Specify uniform values — select option Constant in the “Initialisation” panel

k 1.5U2I

2=

ε k1.5

l--------=

νt

Page 143: Star CCm Guide

Chapter 4 BOUNDARY AND INITIAL CONDITIONS

Solution Domain Initialisation

Version 4.02 4-43

and then type values for each variable in the text boxes provided. Turbulenceparameters, scalar mass fractions and solid temperatures may be initialised asdescribed in section “Initial runs” above for steady-state cases.

2. Set values through a user-supplied subroutine — select option User in theInitialization panel and then specify the required distributions in subroutineINITFI.

3. Read in a previously computed distribution that corresponds to the desiredsetting — select an option from the “Analysis (Re)Start” panel (usuallyInitial Field Restart plus one of the options in the Initial Field Restartpop-up menu depending on the problem at hand). Option Standard Restartmust be used for all moving mesh cases and should also be chosen to start atransient analysis from a previously computed steady-state solution. Note thatsuch restarts should not be performed for Lagrangian multi-phase cases, asthe meaning of the droplet treatment is different between steady-state andtransient analyses.

Page 144: Star CCm Guide
Page 145: Star CCm Guide

Chapter 5 CONTROL FUNCTIONS

Introduction

Version 4.02 5-1

Chapter 5 CONTROL FUNCTIONS

Introduction

At this stage of modelling, the following tasks should have been completed:

1. Mesh set up2. Material property and continuum mechanics model specification3. Definition of boundary type and location

The penultimate task before a STAR analysis run is to set the parameters thatcontrol that run. This consists of

• setting various parameters that affect the progress of the numerical solutionalgorithm used by STAR;

• specifying the type and amount of run-time output and post-processing data.

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

Analysis Controls for Steady-State Problems

Solution controlsSolution control parameters have a strong influence on the progress of the analysis,so it is important to have a basic understanding of their significance and effectduring a run. You are therefore advised to refer to Chapter 7 in the Methodologyvolume for a detailed discussion of under-relaxation and other solution controltopics.

STAR-CD offers two alternatives for solving steady-state problems:

1. An iterative method employing under- relaxation factors2. A pseudo-transient time marching to the steady-state solution with a

fixed-length time step. Note, however, that an under-relaxation factor (defaultvalue 0.2) is still used on the pressure correction equation.

Incompressible, non-reacting and low Mach number flows usually convergesmoothly and fast in a combination with the inertial under-relaxation shown inequation (7-14) of the Methodology volume.

If fluid flows which are characterized by travelling waves (e.g. pressure wavesin compressible fluids, or gravity waves in free surface flows) can reach a steadystate, the convergence process is typically much more robust and stable if one canresolve to some extent the waves travelling during the iteration process. For this, itis important that waves travel in all cells with the same pseudo time step, and thepseudo-transient mode is usually better suited to this class of problems.

In other problems (e.g. inviscid flows and where the initial velocity field is zero),we can have very small or zero values of the central coefficients at an early stageof the iteration process. In such cases, local pseudo time steps become very largeor infinite (see equation (7-19)), which again has an impact on the convergence andstability of the solution. In flows which exhibit this kind of problem, use of thepseudo-transient mode is recommended.

The main advantage of the iterative method employing under-relaxation factorscompared with the pseudo-transient mode is that, in the former, the under-relaxation

AP

Page 146: Star CCm Guide

CONTROL FUNCTIONS Chapter 5

Analysis Controls for Steady-State Problems

5-2 Version 4.02

factors vary between 0 and 1 and a large number of cases run nearly optimally withdefault values (e.g. 0.7 for momentum and 0.2 for pressure correction) that arebased on considerable past experience. However, in the pseudo transient approach,the time step varies between zero and infinity and a suitable value is not always easyto find. The optimum value can be determined only by numerical experiments. Asa guideline, one should choose a time step such that the Courant number based onthe characteristic velocity and the characteristic mesh size is between 1 and 8. Notethat, as with under-relaxation, lower values of time step are more likely to promoteconvergence, while larger ones lead to a faster solution.

The task of setting up solution controls for either of these methods can be dividedinto the following steps:

Step 1

Start up the STAR GUIde system and then define the type of problem you aresolving by selecting Steady State from the Time Domain pop-up menu in the“Select Analysis Features” panel

Step 2

Go to the Solution Controls folder and open the “Solution Method” panel. From thepop-up menu at the top of the panel select:

• Steady State for conventional steady-state runs. Also choose the numericalalgorithm to be used (see topic “Steady-State Solution”). In every case,specify the maximum residual error tolerance (i.e. maximum acceptable levelof remaining error in the solution), plus any additional parameters required bythe algorithm you have chosen.

• Pseudo-Transient for pseudo-transient runs (see topic “Pseudo-TransientSolution”). The maximum residual error tolerance (i.e. maximum acceptablelevel of remaining error in the solution) should be specified; the normalisedresiduals are displayed on the screen and also saved on file case.run, as inordinary steady-state runs.

Step 3

In the “Primary Variables” panel, inspect the solution status for flow variables andmaterial properties (see topic “Equation Status”) to confirm that the right variableswill be solved for.

Step 4

Check the “Solver Parameters” (under-relaxation factors, number of calculationsweeps and residual error tolerances for each solution variable).

Step 5

Choose one of the available “Differencing Schemes”. It is suggested thathigher-order differencing schemes such as LUD or MARS should be used if highspatial discretisation accuracy is required.

Output controlsHaving set the solution control parameters, the next task is to choose the type andvolume of output from the forthcoming STAR run. The bulk of this output consistsof solution variable values at cell centroids. Output controls can be applied by goingto the Output Controls folder in the STAR GUIde system and following the steps

Page 147: Star CCm Guide

Chapter 5 CONTROL FUNCTIONS

Analysis Controls for Steady-State Problems

Version 4.02 5-3

below:

Step 6

Consider whether detailed printout on the solution progress is required and ifnecessary specify the appropriate settings in the “Monitor Numeric Behaviour”panel.

Step 7

Decide whether you want to follow the progress of the analysis by generatingvarious types of monitoring data at every iteration. If so, go to the MonitorEngineering Behaviour sub-folder and use one or both of the following panels:

• “Monitor Boundary Behaviour” — select one or more boundary regions andthe type of monitoring information to be generated for them

• “Monitor Cell Behaviour” — select one or more sub-domains, defined interms of cell sets, and the type of monitoring information to be generated forthem

The requested data are stored in special files (case.erd and case.ecd forboundary and cell data, respectively), from where they may be displayed aspro-STAR graphs at the end of the analysis (see panel “Engineering Data” in thePost-Processing folder) or read by an external post-processing package.

Step 8

Specify the manner of saving mesh data for use in post-processing and/or restartruns via the “Analysis Output” panel (“Steady state problems”). If desired, go to the“Additional Output Data” section to select any wall data to be included in thesolution (.ccm) file. This is important, as these settings will affect the availabilityof data for post-processing. You can also select what wall data are to be ‘printed’(i.e. displayed on your screen) and stored in the .run file at the end of the run.

For both post and print control parameters, it is up to you to check the defaultsettings and change them, if necessary, according to the type of problem beinganalysed.

Other controlsStep 9

Go to the Sources sub-folder and inspect the “Source Terms” panel to see if anyadditional information (such as extra source terms for flow variables) is needed tocompletely describe your problem. Note that STAR-CD provides special switchesand constants for activating various beta-level features in the code, or for turning oncalculation procedures designed for debugging purposes. These are found in the“Switches and Real Constants” panel and are normally used only after consultationwith CD-adapco. An alternative way of performing this function is to enter specialdebugging instructions into the Extended Data panel, accessible from the Utilitiesmenu in the main window (or issue command EDATA).

Step 10

Go to the Analysis Preparation/Running folder and open the “Set Run TimeControls” panel:

• For conventional steady-state runs, enter the maximum number of iterations

Page 148: Star CCm Guide

CONTROL FUNCTIONS Chapter 5

Analysis Controls for Transient Problems

5-4 Version 4.02

(or calculation loops, see “Steady state problems”).• For pseudo-transient runs, specify the time step size and the maximum

number of time steps. A variable step magnitude may also be specified viauser subroutine DTSTEP, by selecting option User in the Time Step Optionpop-up menu (see “Steady state problems (Pseudo-transient)”).

Step 11

To complete the controls specification, you need to decide whether the analysis isto start from initial conditions or restart from a previous run. Set the appropriatesolution controls in the “Analysis (Re)Start” panel.

Analysis Controls for Transient Problems

Transient problems can be divided into three groups:

1. Systems whose flow, thermal and chemical fields are originally inthermodynamic equilibrium and which are subjected to a set ofnon-equilibrium boundary conditions at the start of the calculation. Thesystem’s response is to gradually approach a new steady state. Such problemscan be analysed in STAR either in the steady-state or transient mode; somebuoyancy driven flows are best run in transient mode (see also Chapter 3,“Buoyancy-driven Flows and Natural Convection”).

2. Systems whose boundary conditions change in a prescribed fashion, e.g. dueto opening and shutting of flow valves.

3. Inherently unstable systems that never reach a steady state and exhibit either

(a) a cyclic (or periodic) behaviour, as in some vortex shedding problems, or(b) chaotic behaviour, as in some buoyancy driven flows.

Procedures for solving all of these problem types are described below.

Default (single-transient) solution mode

This procedure, referred to as the ‘single-transient’ solution mode in earlier versionsof STAR-CD, is the quickest and easiest way of setting up transient problems. It isalso suitable for steady-state compressible or buoyancy driven flows that requireclose coupling between the momentum, enthalpy, chemical species and densityequations. Other important characteristics are:

• It is fully supported by pro-STAR’s STAR GUIde interface• It can accommodate problems with time-varying boundary conditions through

the use of tables (see Chapter 2, “Table Manipulation”)• Changes in boundary region type (e.g. a pressure boundary changing to a wall

boundary) are also possible but require stopping and restarting the analysis atthose times when such changes occur

The single-transient mode provides an alternative to the “Load-step based solutionmode” discussed below, by eliminating the need for a transient history file andexplicit load step definitions. It is in fact equivalent to performing a single load step,hence the name ‘single transient’. To use this approach, follow the procedure below.

Page 149: Star CCm Guide

Chapter 5 CONTROL FUNCTIONS

Analysis Controls for Transient Problems

Version 4.02 5-5

Solution controlsStep 1

Start up the STAR GUIde system and then define the type of problem you aresolving by selecting Transient from the Time Domain pop-up menu in the “SelectAnalysis Features” panel.

Step 2

Go to the Solution Controls folder and open the “Solution Method” panel. Select thenumerical algorithm to be used (see topic “Transient problems”). Also select thetime differencing scheme required.

Step 3

Display the “Primary Variables” panel and check that the solution parametersettings are appropriate for your case. If there is any need for alterations, consultChapter 1, “Transient flow calculations with PISO” or “Transient flow calculationswith SIMPLE” in this volume for information and advice.

Output controlsThe output to be produced by a transient run is chosen in a similar manner to thatfor steady-state problems. However, since the volume of data that can be generatedis potentially very large, additional controls are provided to limit the amount to whatis absolutely essential.

Step 4

Open the “Analysis Output” panel (“Transient problems”).

1. In the “Post tab”, specify control parameters for the wall data that will bewritten to the solution (.ccm) file and/or printed and saved in the .run file atthe end of the run, in the same manner as for steady-state problems.

2. In the “Transient tab”, specify control parameters for data destined for:

(a) The transient post data (.pstt) file. The difference between this and theusual solution (.ccm) file is as follows:

i) File case.ccm contains analysis results only for the last time step.These form a complete set of all cell data relevant to the currentproblem and the file can therefore be used to restart the analysis.

ii) File case.pstt, on the other hand, contains user-selected data,such as cell pressures, wall heat fluxes, etc. written atpredetermined points in time. These are defined by the parametersentered in the “Transient tab”. The file is therefore suitable forpost-processing runs but cannot be used to restart the analysis.

(b) The data display appearing on your screen at predetermined points intime (not necessarily the same as the ones specified for the post data).This information is also saved in the run history (.run) file.

The “Transient tab” control parameters must be used with care since they couldcause excessively large data files to be written. On the other hand, they must not beused too sparingly as they may fail to record important data. If the analysis is splitinto several stages, as is usually the case with large models and/or lengthy

Page 150: Star CCm Guide

CONTROL FUNCTIONS Chapter 5

Analysis Controls for Transient Problems

5-6 Version 4.02

transients, it is advisable to give the .pstt file produced at the end of each stage aunique file name. This helps to spread the output produced amongst several filesand thus eases the data management and manipulation processes.

Step 5

Specify any other output controls required, e.g. whether you want to generatemonitoring data at every time step, in the same manner as for steady-state problems(see “Analysis Controls for Steady-State Problems”, Step 7).

Other controlsStep 6

Specify any other necessary controls in the Sources and Other Controls sub-folders,in the same manner as for steady-state problems.

Step 7

Go to the “Set Run Time Controls” panel (Analysis Preparation folder) and specify:

1. The analysis run time2. The method of calculating the time step size and the total number of time

steps, see “Transient problems”

Step 8

To complete the controls specification, you need to decide whether the analysis isto start from initial conditions or restart from a previous run. Set the appropriatesolution controls in the “Analysis (Re)Start” panel.

Load-step based solution mode

This older procedure allows for all intricacies in the transient problem specification,including variable boundary conditions. However, it is more complex to set up andmaintain as it requires definition of so-called ‘load steps’ (see “Load stepcharacteristics” below) and their storage in special transient history files. Otherimportant characteristics are:

• It is driven by its own special user interface, the Advanced Transients dialog,accessed by selecting Modules > Transient in pro-STAR’s main menu bar

• Time variations may be specified only in terms of load steps, as described inthe sections to follow; the use of tables is not permissible

• It is part of the recommended procedure for setting up moving-mesh casesdefined via pro-STAR ‘events’ (see Chapter 12, “Moving Meshes”)

• It does not support models containing features introduced in STAR-CD V3.20or later, such as Eulerian multi-phase and liquid films

Load step characteristics

For problems involving changing boundary conditions, the main considerations are:

• To define the variation in boundary conditions as a series of events whichoccur over a period of time. These events, called load steps in pro-STARterminology, represent a transition from one state of the boundary conditionsto another with increasing time.

• To divide each load step into several time increments, or time steps.

Page 151: Star CCm Guide

Chapter 5 CONTROL FUNCTIONS

Analysis Controls for Transient Problems

Version 4.02 5-7

The allowable variations in the boundary conditions are as follows:

1. Step — where the boundary values change discontinuously from one state tothe next, see Figure 5-1(a).

2. Ramp — where the values change linearly between the state at the beginningof the load step to that at the end, see Figure 5-1(b).

3. Function of time — where the variation is arbitrary and is prescribed via auser subroutine.

Any combination of load step types can be specified, as shown in Figure 5-1(c)–(d).

Figure 5-1 Representation of boundary value changes by load steps

The difference between the available alternatives is illustrated in Figure 5-2 for loadstep number n and a time increment of DT.

The following information is specified every time a load step is defined:

1. The number of time steps to be performed.2. The boundary values prevailing at the end of the load step.3. The manner in which the boundary values should vary between the start and

end of the load step. The action of the program is then as follows:

(a) For step settings, the value at the start and at all intermediate times is keptequal to value at the end time, as specified in stage 2. above.

(b) For ramp settings, the value at the start is made equal to that specified atthe previous load step. All intermediate values vary linearly between thestart and end values, as shown in Figure 5-2.

Boundaryconditionvalue

Boundaryconditionvalue

Boundaryconditionvalue

Boundaryconditionvalue

S S S SR R R RR

1 2 3 4 1 2 3 4 5Time Time

1 2 3 4 5 1 2 3 4 5 6Time Time

(a) (b)

(c) (d)

S S R R R R R R S SR

Page 152: Star CCm Guide

CONTROL FUNCTIONS Chapter 5

Analysis Controls for Transient Problems

5-8 Version 4.02

(c) For user settings, values between the start and end times vary in anarbitrary manner, according to what is prescribed in the user-suppliedsubroutine (see Figure 5-2).

Figure 5-2 Types of change in boundary conditions

Some examples of different load step sequences are shown in Figure 5-1 where theletters S and R denote a step or ramp setting respectively.

Load step definition

The user should bear in mind the following points when defining load steps:

1. Special considerations apply if the very first load step has a ramp setting. Thisis because there is no previous load step to fix the value of its starting point.The problem is resolved by defining an extra, dummy load step which merelyserves to supply the required boundary value. Examples of this situation areshown in Figure 5-1, cases (b) and (d).

2. At each new load step, the user is free to modify any existing boundary regiondefinition. For example, boundaries that were previously outlets can nowbecome walls and vice versa. However, new boundary regions cannot beadded or existing ones deleted, nor can the physical extent of the boundariesbe modified in any way. The user must therefore plan the model’s boundaryregion definitions adequately before starting a transient analysis. A stepsetting is always imposed at every boundary type change.

3. When the boundary values at the start and end of a load step are identical, thesole purpose of defining the load step would be to permit subdivision of timeinto discrete time steps so as to track the transient behaviour of the flow field.

4. The time step size can vary from one load step to the next to suit the problemconditions. The size should be small enough to meet the following two

Boundary condition value

Time

Load step n–1

Load step n

Load step n+1

A

B

User coding

Ramp

Step

DT

Page 153: Star CCm Guide

Chapter 5 CONTROL FUNCTIONS

Analysis Controls for Transient Problems

Version 4.02 5-9

targets:

(a) Stability of the numerical solution algorithm, by minimising thecumulative error in the numerical solution.

(b) Capture of the transient details of the flow.

A good way of testing the sufficiency of the time step size is by calculating theCourant number Co, a dimensionless quantity given by

(5-1)

where and l are a characteristic velocity and dimension, respectively. Note thatin compressible flows should be replaced by , where c is the velocity ofsound. For optimum results, the user should calculate the Courant number in twoways:

1. Cell-wise, by setting to an estimated local velocity and l to thecorresponding local mesh dimension (e.g. cell diagonal). The time step shouldbe chosen such that the maximum Courant number does not exceed 100.

2. Globally, by setting to the estimated average velocity in the flow field andl to a characteristic overall dimension of the model (e.g. pipe length in pipeflow). The time step should be chosen so that it is commensurate with the timescale of the physical process being modelled. Although precise figures cannotbe given for all cases, a Courant number derived from this criterion istypically in the range 100 to 500.

The user should inspect the time steps derived in these two ways and select thesmallest one for use in the analysis.

Solution procedure outline

The overall task of setting up parameters for a load-step based transient calculationcan be divided into the following steps:

Solution controlsStep 1

Start up the STAR GUIde system and then define the type of problem you aresolving by selecting Transient from the Time Domain pop-up menu in the “SelectAnalysis Features” panel.

Step 2

Go to the Solution Controls folder and open the “Solution Method” panel. Select thenumerical algorithm to be used (see topic “Transient problems”).

Step 3

Display the “Primary Variables” panel and check that the solution parametersettings are appropriate for your case. If there is any need for alterations, consultChapter 1, “Transient flow calculations with PISO” or “Transient flow calculationswith SIMPLE” in this volume for information and advice. Note that this informationis stored for each load step in file case.trns. Therefore, if any changes areneeded to these parameters after your load steps have been defined, you will need

Cov ∆tl

------------=

vv v c+

v

v

Page 154: Star CCm Guide

CONTROL FUNCTIONS Chapter 5

Analysis Controls for Transient Problems

5-10 Version 4.02

to retrieve the load step information, make the changes and then save theinformation back in the .trns file (see the description of Step 4 and Step 5 below)

Load step controlsStep 4

Choose Modules > Transient from the menu bar to activate the AdvancedTransients dialog shown below. Select option Advanced Transients On byclicking the action button at the top right-hand side of the dialog.

Type the maximum load step number that will be specified in the text boxprovided and then click Initialize to set up a file (case.trns) for storing alltransient history information (i.e. changes in boundary conditions, distribution andlength of time steps, etc.). This is a binary file that works very much like the normalpro-STAR problem description (.mdl) file, but is used only in transient problems.The file’s name is entered in the Transient File text box.

For a restart run, click the Connect action button to retrieve existing load stepinformation. Note that a number of different files can be utilised in a given run, byfirst clicking Disconnect to release the current file and then connecting to a newone, as specified in the Transient File text box. pro-STAR’s built-in file browsermay be used to locate the required file(s). If necessary, a revised maximum load stepnumber should be typed in the box provided.

Commands: TRFILE LSTEP LSLIST LSSAVE

Page 155: Star CCm Guide

Chapter 5 CONTROL FUNCTIONS

Analysis Controls for Transient Problems

Version 4.02 5-11

Step 5

If the SIMPLE solution algorithm has been chosen, select a time differencingscheme from the Temporal Discretization pop-up menu. Option Euler Implicitselects the (default) first-order Euler implicit scheme while Three Time LevelImplicit selects the second-order three-time-level implicit scheme. The latter givesmore accurate solutions but requires more computer time and memory. Your choiceof the time differencing scheme should be confirmed by clicking Apply.

Step 6

Supply in a sequential manner all information needed to completely define eachload step. The current load step should be indicated by highlighting it in the scrolllist with the mouse. The required information depends on the time-varyingcharacter of the problem and can consist of:

1. Basic parameters of the load step — type these in the text boxes underneaththe load step list. The available parameters are:

(a) Load step identifying number.(b) Number of time steps.(c) Time increment per time step — if the option button next to this text box

is selected, pro-STAR will look for time increment definitions in usersubroutine DTSTEP. Any number typed in the text box will be availableto the subroutine as a default value.

(d) A choice of step or ramp setting for changes in the boundary conditions(note that the ramp setting cannot be chosen if the User option is alreadyselected in step (c) above).

(e) Output frequency of print and post-processing data (see “Output controls”below).

2. Redefinition of the boundary type, e.g. changing from wall to outlet boundaryconditions and vice versa to simulate the operation of an exhaust valve in areciprocating engine — see “Boundary Region Definition” on page 4-5.

3. Modification of selected boundary values, without changing the boundarytype, as shown in Figure 5-1 — see page 4-7 in the section on “BoundaryRegion Definition”.

4. Unusual boundary value changes, i.e. other than step-wise or ramp-wise —see option User in the section on “Boundary Region Definition” on page 4-7.The desired variation should be calculated in the appropriate user subroutine(BCDEFI, BCDEFO, BCDEFS, BCDEFP, BCDEFF, BCDEFT, or BCDEFW, see“Boundary condition subroutines” on page 14-5). These routines shouldsupply the required values at every time step and for all boundary regionsaffected. Any region not covered in this way will take on the usual ramp orstep variation specified during the basic load step parameter setting.

Remember that in cases where the boundary conditions are to vary linearly from the

LSCOMPRESS LSRANGE LSGET LSDELETEMVGRID CPRINT CPRANGE WPRINTTDSCHEME CPOST SCTRANS WPOSTCDTRANS

Page 156: Star CCm Guide

CONTROL FUNCTIONS Chapter 5

Analysis Controls for Transient Problems

5-12 Version 4.02

start of the calculation, it is necessary to supply the boundary conditions at the startof the calculations. This is achieved by introducing a dummy first load step withramp setting. With the exception of the boundary condition, all other data for sucha load step are ignored.

Output controlsThe output to be produced by a transient run is chosen in a similar manner to thatfor steady-state problems. However, since the volume of data that can be generatedis potentially very large, additional controls are provided to limit the amount to whatis absolutely essential. These controls are implemented in the Advanced Transientsdialog and can be sub-divided into a number of basic steps as described below. Notethat they are part of the definition for a given load step and can be repeated asnecessary during subsequent load steps to achieve the desired fine control over thetype and volume of output.

Step 7

Decide whether printed output is required. If so, specify:

• The printout frequency (in terms of a time step interval) by typing a suitablevalue in the Print Freq. text box.

• The cell variables (e.g. velocities, pressure, temperature, etc.) to be printed —click the appropriate Cell Print selection button underneath the desiredvariable(s).

• The part of the mesh over which the above quantities will be printed — type asuitable cell range in terms of starting, finishing and increment cell number inthe text boxes provided.

• The wall variables (e.g. shear forces, heat fluxes, etc.) to be printed — clickthe appropriate Wall Print selection button underneath the desiredvariable(s).

If some of the cell or wall variables to be printed are additional scalar variables suchas chemical species mass fraction, they are specified via the Scalars Selectselection button (see Chapter 13, “Multi-component Mixing”, Step 8).

Step 8

Decide whether post-processing information is required. If so, specify:

• The output frequency (in terms of a time step interval) by typing a suitablevalue in the Post Freq. text box.

• The cell variables (e.g. velocities, pressure, temperature, etc.) to be stored —click the appropriate Cell Post selection button underneath the desiredvariable(s).

• The wall variables (e.g. shear forces, heat fluxes, mass fluxes, etc.) to bestored — click the appropriate Wall Post selection button underneath thedesired variable(s).

If some of the cell or wall variables to be written are additional scalar variables suchas chemical species mass fraction, they are specified via the Scalars Select button(see Chapter 13, “Multi-component Mixing”, Step 8).

All the above information is written to a special transient post data (.pstt) file.

Page 157: Star CCm Guide

Chapter 5 CONTROL FUNCTIONS

Analysis Controls for Transient Problems

Version 4.02 5-13

The difference between this and the usual solution (.ccm) file is as follows:

• File case.ccm contains the calculation results of only the last time step.These form a complete set of all cell data and the file can therefore be used torestart the analysis.

• File case.pstt, on the other hand, contains user-selected data, such as cellpressures, wall heat fluxes, etc. written at predetermined points in timedefined by the parameter typed in the Post Freq. text box. The file is thereforesuitable for post-processing runs but cannot be used to restart the analysis.

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

Other load step and general solution controlsStep 9

Store each completed load step definition in the transient history (.trns) file byclicking on the Save action button. The parameters of the saved definition aredisplayed in the Load Step scroll list.

Step 10

Once all the necessary load steps have been defined, set the total number of loadsteps to be performed during the next STAR analysis by typing the starting andfinishing load step number in the text boxes provided. Confirm by clicking theApply button.

Note that all the above operations have an immediate effect on the transientsettings, reflected by immediate changes to what is displayed in the dialog box.However, any subsequent changes made outside this box, e.g by issuing commandsvia the pro-STAR I/O window, will not be shown. To display these changes, you willneed to click the Update button at the bottom of the dialog.

Step 11

In addition to the load-step specific information described above, you may alsorequest additional, detailed information that applies to the run as a whole. Thisincludes:

• Values of the field variables at a monitoring cell location at each time step.The desired location is specified in the “Monitoring and Reference Data”STAR-GUIde panel. One monitoring cell must be selected for each differentmaterial present in the model.

• Various types of engineering data, as selected from the Monitor EngineeringBehaviour panels for specified grid and/or boundary regions. These are alsoproduced at each time step.

• Input data, boundary conditions and locations, inner iteration statistics, etc.These options are set in the “Monitor Numeric Behaviour” panel.

Page 158: Star CCm Guide

CONTROL FUNCTIONS Chapter 5

Analysis Controls for Transient Problems

5-14 Version 4.02

Step 12

Specify any other necessary controls in the Sources and Other Controls sub-folders,in the same manner as for steady-state problems.

Step 13

The total number of time steps for the run is normally equal to the sum of all timesteps in each load step, as defined in Step 6. However, this total may be setindependently via command ITER, which may effectively stop the run in themiddle of a load step.

Step 14

To complete the controls specification, you need to decide whether the analysis isto start from initial conditions or restart from a previous run. Set the appropriatesolution controls in the “Analysis (Re)Start” panel.

Other transient functions

Before initiating a transient run, the user is free to review and modify the existingset of load step definitions. The relevant facilities available in the AdvancedTransients dialog are:

• Modification — highlight the load step to be changed, type values for themodified parameters and click Save.

• Deletion — highlight the load step to be deleted and click Delete.• Compression of the transient history file — clicking Compress eliminates all

deleted steps and renumbers the remaining ones.

Additional points to bear in mind about transient problems are:

1. An analysis can most conveniently be performed in stages, using an initialand several restart runs. When specifying a restart run, you must remember to

(a) read in the state of the model as it was when the last run finished, usingthe “Analysis (Re)Start” STAR-GUIde panel (Standard Restart option)

(b) reconnect to the transient history (.trns) file, as described in page 5-10,Step 4 of this section, if additional load steps are to be specified.

2. Along with time-varying boundary values and boundary conditions, you mayalso elect to vary the geometry of his model, e.g. by moving the mesh in acylinder-and-piston problem. This can be done by selecting On in the MovingGrid Option pop-up menu at the top of the Advanced Transients dialog. Thisoperation also requires either

(a) a user-defined subroutine (NEWXYZ) to calculate the vertex coordinates asa function of time, or

(b) the use of special commands provided in the EVENTS module (seeChapter 12, “Moving Meshes”). These permit changes to both vertexlocations and cell connectivities.

The modified vertex coordinates are also written to the transient post data(.pstt) file and can be loaded and plotted during post-processing.

Page 159: Star CCm Guide

Chapter 5 CONTROL FUNCTIONS

Solution Control with Mesh Changes

Version 4.02 5-15

Solution Control with Mesh Changes

The discussion so far in this chapter assumes the usual condition of identical meshgeometry between restart runs. However, it sometimes becomes apparent thatchanges in mesh geometry applied part-way through the solution process willimprove the quality of the final result. For example, inspection of the currentsolution file may reveal that mesh refinement is needed in some part of the mesh toresolve the flow pattern adequately. Rather than beginning a new analysis fromscratch with a new, refined mesh, STAR-CD allows redefinition of the mesh andresumption of the analysis (via a restart run) from the currently available solution.This requires a special mapping operation, called SMAP, that utilises the existingsolution data in the .ccm file to create new, approximate solution data thatcorrespond to the re-defined mesh. An example of the result of such an operation isgiven in Chapter 10, “Solution Mapping” of the Post-Processing User Guide.

STAR can read this new file and restart the analysis to obtain a proper solutionfor the current mesh.

Mesh-changing procedure

A description of the steps necessary for performing a mesh-changing operationrequiring refinement is given below. Note that although restarting with a refinedmesh is typical, the same rules apply to any other mesh re-definition,e.g. coarsening, changing cell shapes, or even creating a mesh structure that isphysically larger (or smaller) overall than the original configuration.

Step 1

Check the directory of your current (coarse-mesh) model to confirm that apro-STAR model file (say, case-coarse.mdl) and a STAR solution file (say,case-coarse.ccm) exist.

Step 2

Start a pro-STAR session and read in the coarse-mesh model fromcase-coarse.mdl. Then:

• Select File > Case Name from the main window, change the case name to,say, case-fine and click Apply

• Perform whatever mesh refinement operations are necessary (see for exampleChapter 3, “Mesh Refinement” in the Meshing User Guide)

• Select File > Write Geometry File from the main window and save therefined mesh geometry in file case-fine.ccm

Step 3

Signal to STAR that the next run will restart from a different (mapped) solution stillto be created:

• Go to the Analysis Preparation/Running folder in STAR GUIde and open the“Analysis (Re)Start” panel

• Select option Initial Field Restart from the Restart File Option menu• Accept the (default) Restart File name (case-fine.ccm)• Select option Restart (Smapped) from the Initial Field Restart menus and

click Apply

Page 160: Star CCm Guide

CONTROL FUNCTIONS Chapter 5

Solution Control with Mesh Changes

5-16 Version 4.02

Step 4

Save all information for the refined mesh, including the restart mode specificationabove:

• Select File > Save Model from the main window to save filecase-fine.mdl

• Select File > Write Problem File from the main window to save filecase-fine.prob

Step 5

Restore the original coarse-mesh model as follows:

• Select File > Resume From in the main window• Input the original mesh by specifying case-coarse.mdl as the model file

and click Apply• Go to the Post-Processing folder in STAR GUIde and display the “Load

Data” panel.• Read in the coarse-mesh solution data by specifying case-coarse.ccm as

the input file name and then clicking Open Post File

Step 6

Select those coarse-mesh cells that should be used in the mapping process and putthem in a cell set (see “Cell set selection facilities” on page 2-46 of the MeshingUser Guide). This is because SMAP operates only on cells in the current set. This setmay include both fluid and solid cells and will normally contain all cells in themodel.

The SMAP operation itself is initiated by choosing Utility > Solution Mappingfrom the main window menu bar to display the Smap/Tsmap dialog shown below:

The required user input is as follows:

1. Input CCM file — The refined mesh file, case-fine.ccm, created in Step

Commands: SMAP TSMAP

Page 161: Star CCm Guide

Chapter 5 CONTROL FUNCTIONS

Solution-Adapted Mesh Changes

Version 4.02 5-17

2 above and containing only geometry data at present. If necessary, usepro-STAR’s built-in file browser to locate the file.

2. Output CCM file — The refined mesh solution file, case-fine.ccm. Atthe end of the mapping operation, this will contain (mapped) solution data aswell as geometry data and will therefore be suitable as a restart file for a finemesh analysis.

3. Instructions on how to assign flow variable values to any fine-grid cells thatmay lie outside the domain defined by the coarse-grid cells. The availableOutside Options are:

(a) Default — use default values, as defined in panel “Initialisation” ofsub-folder Liquids and Gases in STAR-GUIde

(b) Nearest — use values from the nearest cell neighbours(c) Zero — use a value of 0.0

Note that the default mapping algorithm is selected by the Use Smap button.Clicking the Use Tsmap button activates a slightly different algorithm that attemptsto enforce global conservation on the fine-grid domain. Other ways in which thisoption differs from the standard option are as follows:

1. It is not applicable to polyhedral fluid cells2. Only two Outside Options are available, Nearest and Zero.3. The volume made up by the fine-grid cells should be fully contained within

the volume of the coarse-grid cells. This condition may be satisfied within atolerance (specified as a volume fraction) entered in the Volume Tolerancebox.

Step 7

To visualise the outcome of the mapping operation, use the “Load Data”panel inSTAR GUIde’s Post-Processing folder. The mapped solution data file just createdmay be accessed via the “File(s) tab” and field values loaded via the “Data tab”. Thedata may then be checked by plotting contours but note that only “Cell Data” shouldbe used for this purpose.

Step 8

If the mapped results are deemed satisfactory, terminate the pro-STAR sessionwithout writing a model file (as this would save the original coarse-grid data) andthen run STAR to continue the analysis from the mapped solution.

Other noteworthy points are:

• If option Use Tsmap is selected in moving mesh problems containingremoved cells (see “Cell-layer Removal/Addition” on page 12-14), the cell setto be mapped should not include removed cells.

• If any baffles are present in the coarse-grid domain to be refined and mapped,delete the baffles before refinement and redefine them after refinement.

• Do not change the reference temperature in the restart run.

Solution-Adapted Mesh Changes

Section “Solution Control with Mesh Changes” of this chapter shows how totransfer a solution from one mesh to another. In that section, Step 2 simply states

Page 162: Star CCm Guide

CONTROL FUNCTIONS Chapter 5

Solution-Adapted Mesh Changes

5-18 Version 4.02

that you need to perform whatever mesh refinement operations are necessary. Thissection aims to show how these changes can be made using the solution from aprevious run as a guide.

The most frequently used refinement procedures have been assembled in the“Adaptive Refinement” panel of the STAR GUIde system. This caters for meshrefinement based on the results of a previous run. One may employ a refinementoperation based on either

• flow variable gradients, or• solution residuals.

Both types of data are stored in the solution (.ccm) file and one may then choosethe flow variable and selection method to be employed. A typical refinementsession would consist of the following steps:

Step 1

Go to the Analysis Preparation/Running folder in the STAR GUIde system andopen the “Adaptive Refinement” panel. In the “Refinement Criteria” tab, choose acriterion by selecting the appropriate sub-tab. The flow variable on which to basethe refinement depends on the application. For flow-dominated problems, thevelocity magnitude or the turbulence kinetic energy have been found to give goodresults; for chemical reaction- dominated problems, the temperature might be abetter choice. Note that:

• Using the Percent of Cells selection method allows you to closely control thenumber of cells selected for refinement

• You may perform multiple selections based on different variables anddifferent criteria; the selection results are accumulated into a compound cell.set

• You may abandon your current selection at any stage and start again byclicking the New button

Step 2

Go to the “Set Modifications” tab and select set modification options, e.g.

• The Near Wall Cell Options may be used to ensure that near-wall cells are leftunrefined when limitations on the magnitude of y+ need to be observed.

• The final set can be ‘grown’, i.e. expanded to include neighbouring cells, toaccount for inaccuracies in the error estimate and to prevent large differencesin refinement level between neighbouring parts of the mesh.

Check the set to be refined visually by plotting it. If necessary, last-minutemodifications can be made to this set using the standard pro-STAR cell set utilities(see “Set Manipulation” on page 2-21).

Step 3

Once the required cells are finally selected, the “Refine” tab enables you to

• refine them using a simple 2 × 2 × 2 subdivision,• recreate the cell connectivity,• prepare the resulting new model for the next run. This last step entails

mapping the old solution to the new geometry, changing the solution mode toa restart run from the new (mapped) .ccm file and redefining the monitoring

Page 163: Star CCm Guide

Chapter 5 CONTROL FUNCTIONS

Solution-Adapted Mesh Changes

Version 4.02 5-19

and pressure reference cells, if these were within the area that has beenrefined.

Note, however, that there are many other ways to proceed. Consider filling thevolume occupied by the chosen cells with one or more blocks (maybe after a littlepadding out) and then specifying block factors to build a mesh with progressive,concertina-style refinement. You may also choose to fill the volume with acompletely new mesh built by any pro-STAR operation or imported from anexternal package (see “Importing Data from other Systems” on page 3-1 of theMeshing User Guide). The reverse effect, coarsening the mesh, may by achieved viaone of the above methods or by using the CJOIN command.

Page 164: Star CCm Guide
Page 165: Star CCm Guide

Chapter 6 POROUS MEDIA FLOW

Setting Up Porous Media Models

Version 4.02 6-1

Chapter 6 POROUS MEDIA FLOWThe theory behind flow problems of this kind and the manner of implementing it inSTAR-CD is given in Chapter 8 of the Methodology volume. The present chaptercontains an outline of the process to be followed when setting up a porous mediaproblem and includes cross-references to appropriate parts of the on-line Helpsystem. The latter contains details of the user input required and important points tobear in mind when setting up problems of this kind.

Setting Up Porous Media Models

Step 1

Index the cells in the area where distributed resistance exists. This requires use ofthe cell table (see Chapter 3, “The Cell Table”). As an example, consider thespecification of a filter in the pipe shown in Figure 6-1.

Figure 6-1 Flow through filter in a pipe

• For the non-filtered sub-domains (using cell index 1, fluid material propertyindex 12 and porous material index 0) the Cell Table Editor would look asfollows:

• For the filtered sub-domain (using cell index 2, fluid material property index12 and porous material index 11) the Cell Table Editor would look as follows:

cell index1

cell index1

filter

flow in flow outcell index2

Page 166: Star CCm Guide

POROUS MEDIA FLOW Chapter 6

Setting Up Porous Media Models

6-2 Version 4.02

The reason for using an identical fluid property index (i.e. 12) is that bothsub-domains are part of the same fluid domain.

Step 2

Supply property values (resistance coefficients and porosity) for the poroussub-domain using the “Resistance and Porosity Factor” STAR-GUIde panel. If yourmodel contains multiple porous sub-domains possessing different properties, eachsub-domain may be selected in turn via the Porous Material # control at the bottomof the panel (see also the “Porosity” Help topic).

Figure 6-2 Coordinate system definition in pipe with honeycomb sections

Thus, for the example shown above, the Resistance and Porosity Factor panel

x2

x35

x2

x1x3

1

12

14z

yx

r θ

z

Honeycombs

Coordinate system 5(cylindrical)

x1 = rx2 = θx3 = z

Coordinate system 1(Cartesian)

x1 = xx2 = yx3 = z

x1

Page 167: Star CCm Guide

Chapter 6 POROUS MEDIA FLOW

Setting Up Porous Media Models

Version 4.02 6-3

settings for the two honeycomb sections should be as follows:

First honeycomb section

• Porous material index — 12• Local coordinate system — 1• Flow is along the x- (x1-) direction, hence the value chosen for the resistance

coefficients (7) is assigned to Alphax1 and Betax1• The porosity value (0.5) is required only for transient analyses

Second honeycomb section

• Porous material index — 14• Local coordinate system — 5• Flow is along the θ- (x2-) direction, hence the value chosen for the resistance

coefficients (7) is assigned to Alphax2 and Betax2• The porosity value (0.5) is required only for transient analyses

Page 168: Star CCm Guide

POROUS MEDIA FLOW Chapter 6

Useful Points

6-4 Version 4.02

Step 3

Consider whether, as a consequence of special conditions in your problem,additional input is required for each porous material. Specifically:

1. If turbulence effects are important, specify the relevant parameters using the“Turbulence Properties” STAR-GUIde panel.

2. If there is heat transfer present, specify an effective thermal conductivity andturbulent Prandtl number using the “Thermal Properties” STAR-GUIdepanel.

3. If the problem requires calculation of chemical species mass fractions, theeffective mass diffusivity and turbulent Schmidt number for each species needto be specified via the “Additional Scalar Properties” STAR-GUIde panel.

4. If you are doing a transient analysis, enter an appropriate value in the Porositybox (see also page 8-2 of the Methodology volume).

Useful Points

1. All porous media properties can be modified by a user subroutine (PORCON,PORDIF, PORKEP, POROS1 or POROS2).

2. α and β should always be positive numbers3. Excessive values of α and β should be avoided. In cases such as honeycomb

structures where cross-flow resistances are much higher than those in the flowdirection, the difference in α and β between one direction and the othershould be limited to four orders of magnitude.

Page 169: Star CCm Guide

Chapter 6 POROUS MEDIA FLOW

Useful Points

Version 4.02 6-5

4. Avoid setting β = 0 because this can cause → 0 as → 0, leading to apotentially unstable situation.

5. When calculating resistance coefficients from expressions involving pressuredrops, remember that the pressure drops are based on unit lengths in eachdirection.

6. Bear in mind the difference between velocity magnitude and velocitycomponent in your coefficient calculations.

7. Special considerations apply to modelling systems incorporating porousbaffles (see “Baffle Boundaries” on page 4-23). Note that baffles may also beused to model a flow resistance at the interface between a fluid and a poroussub-domain, by placing baffles of suitable properties on the faces of theappropriate porous cells.

8. In simulations involving moving meshes, porous media must not be used inareas where there is internal relative mesh motion (cell expansion orcontraction).

9. As a result of the particular method used in STAR-CD to calculate pressuregradients at cells on either side of the fluid-porous interface, you need toensure that porous sub-domains are at least two cell layers thick in anycoordinate direction.

10. Tetrahedral meshes should not be used in porous media cases.11. For examples of porous media flow, refer to the Methodology volume

(Chapter 8, “Examples of Resistance Coefficient Calculation”) and to Tutorial3.1, Tutorial 3.2 and Tutorial 3.3 in the Tutorials volume.

Ki V

Vui

Page 170: Star CCm Guide
Page 171: Star CCm Guide

Chapter 7 THERMAL AND SOLAR RADIATION

Radiation Modelling for Surface Exchanges

Version 4.02 7-1

Chapter 7 THERMAL AND SOLAR RADIATIONThe theory behind problems of this kind and the manner of implementing it inSTAR-CD is given in Chapter 9 of the Methodology volume. The present chaptercontains an outline of the process to be followed when setting up a thermal radiationmodel and includes cross-references to appropriate parts of the on-line Help system.The latter contains details of the user input required and important points to bear inmind when setting up problems of this kind.

Radiation Modelling for Surface Exchanges

Step 1

Open the “Thermal Options” panel in STAR GUIde and select one of the followingcalculation methods from the Radiation menu:

1. Discrete Transfer - Internal VF Calc, making sure that optionNon-Participating is also selected.

2. Discrete Transfer - FASTRAC VF Calc

Continue by entering all necessary modelling parameters, as discussed in topic“Thermal Radiation”.

Step 2

If present, solar radiation effects can be included by selecting Solar Radiation Onand then entering all necessary modelling parameters, as discussed in topic “SolarRadiation”. Note that thermal and solar radiation calculations are independent ofeach other. A solar-radiation-only analysis may thus be performed without selectingany options from the Radiation menu mentioned in Step 1 above.

Solar radiation may enter the solution domain through any open boundary, aswell as through transparent walls; see “Solar radiation properties” on page 4-20 fora description of how the latter are specified.

Step 3

Inspect the Cell Table Editor entries for cell types assigned to the medium lyingbetween the model’s radiating surfaces and ensure their Radiation option is set toOn.

Step 4

In the Liquids and Gases folder:

1. Assign thermal properties to the fluid domains via the “Molecular Properties”panel

2. Turn on the temperature solver in the “Thermal Models” panel

Step 5

In the “Define Boundary Regions” panel, specify surface radiative properties for allboundaries apart from symmetry and cyclic ones. To do this:

1. If only thermal radiation is modelled:

(a) Specify emissivity, reflectivity and transmissivity of all wall, baffle andsolid-fluid interface boundaries, as necessary. The description given in“Thermal radiation properties” on page 4-20 (for walls) and on page 4-25

Page 172: Star CCm Guide

THERMAL AND SOLAR RADIATION Chapter 7

Radiation Modelling for Surface Exchanges

7-2 Version 4.02

(for baffles) should be read before entering values in this panel.(b) Specify the radiation temperature and emissivity at ‘escape’ surfaces, i.e.

boundaries of type “Inlet”, “Outlet”, “Pressure Boundary”, “StagnationBoundary”, “Free-stream Transmissive Boundary”, “Transient-waveTransmissive Boundary” and “Riemann Boundary”. The required valuesare entered in the boxes labelled T Radiation and Emissivity.Note that if the FASTRAC method has been chosen, the T Radiationvalue is not used. Instead, the Surrounding environment temperaturespecified in the “Thermal Options” panel is used to describe what liesbeyond such open boundaries. Note also that the Emissivity value must beset to 0.0

2. For problems involving both thermal and solar radiation, as well as the aboveparameters, you also need to specify values for the solar reflectivity andtransmissivity. These are required at walls, baffles, or solid-fluid interfaces.The description given in “Solar radiation properties” on page 4-20 (for walls)and on page 4-26 (for baffles) should be read before entering such values.

3. For problems involving only solar radiation, the transmissivity of wallboundaries is the only user input required.

Step 6

Specify radiation patches unless your problem involves only solar radiation. Tab“Patches” in panel “Create Boundaries” contains most facilities necessary for thistask. If you are using the Internal method, you may also create patches via one ofthe following command-driven options:

1. By specifying the face number that defines the boundary face to be includedin the patch — command BDEFINE.

2. By converting a set of shells into a patch — command BSHELL

Please also note that:

• Patches generated for use by the Internal method cannot also be used by theFASTRAC method.

• The FASTRAC patch specification procedure is different from that for theInternal method. Moreover, the patches are not generated until after the viewfactor calculation procedure has been initiated (see Step 8 below).

• ‘Escape’ surfaces do not need to be patched if the FASTRAC method hasbeen chosen.

Step 7

Check the patches created using one of the following methods:

1. Select Patch from the Cell Plot Display Options in the main pro-STARwindow

2. Choose Plot > Cell Display > Boundary Patches from the main menu bar3. Type commands BDISPLAY, PATCH or CDISPLAY, ON, BPATCH in the I/O

window.

The next cell plot will then display boundaries coloured according to patch numberinstead of according to boundary type.

Page 173: Star CCm Guide

Chapter 7 THERMAL AND SOLAR RADIATION

Radiation Modelling for Participating Media

Version 4.02 7-3

Step 8

The action here depends on your choice of view factor calculation method:

• If you have chosen Discrete Transfer - Internal VF Calc, write thegeometry and problem files in the usual way and then run STAR. The viewfactor and any solar radiation flux calculations are performed at the start of theanalysis. In moving mesh cases, view factors are re-calculated at every timestep. View factors are saved in a binary file (case.vfs) and are retrievedfrom that file in a restart run.

• If you have chosen Discrete Transfer - FASTRAC VF Calc, go to theAnalysis Preparation/Running folder, open the “Run Analysis Interactively”panel and start up the external program that calculates the view factors. Oncompletion, the results are stored in file case.nvfs. Subsequent actions areas for the Internal method but using the .nvfs file instead. Note that are-calculation of the view factors is required if either the solar radiationparameters (Step 2) or boundary transmissivity (Step 5) are altered.

Radiation Modelling for Participating Media

This approach is most commonly used to model the radiative effects of a fluid fillingthe space between radiating solid surfaces. However, STAR-CD is also capable ofcalculating radiative heat transfer through transparent solid domains, which maythen be treated in a similar manner to the intervening fluid. This enables you tomake a realistic assessment of, for example, the effect of objects such as windowson the overall heat transfer within an enclosure.

The necessary steps for participating media analysis are as follows:

Step 1

1. Open the “Thermal Options” panel in STAR GUIde and select one of thefollowing calculation methods from the Radiation menu:

(a) Discrete Transfer - Internal VF Calc, making sure that optionParticipating is also selected.

(b) Discrete Ordinates. The participating media radiation option is turnedon automatically.

2. Continue by entering all necessary modelling parameters, as explained intopic Thermal Radiation

3. If your problem contains solid domains (including transparent ones) turn onthe Solid-Fluid Heat Transfer option

Note that inclusion of solar radiation effects is not currently possible for this typeof analysis.

Step 2

Using the Cell Table Editor:

• If transparent solid cells are present, index them to a separate cell type andassign a solid material number to them

• Select option On from the Radiation menu for all fluid and transparent solidcell types in your model

Page 174: Star CCm Guide

THERMAL AND SOLAR RADIATION Chapter 7

Radiation Modelling for Participating Media

7-4 Version 4.02

Step 3

Go to the Liquids and Gases folder:

1. Assign thermal properties to the fluid domains via the “Molecular Properties”panel

2. Turn on the temperature solver in the “Thermal Models” panel and clickShow Options. In the Participating Media section, specify bulk radiativeproperties (absorption and scattering coefficients) for the fluid lying betweenthe radiating surfaces. The Conservation and Enthalpy settings in this paneldo not affect the radiation solution.

Step 4

If transparent solids are present, go to the Solids folder:

1. Assign thermal properties to the solid domains via the “Material Properties”panel

2. Assign radiative properties (absorption and scattering coefficients) to thesolid domains via the “Radiative Properties” panel

Step 5

In the “Define Boundary Regions” panel, specify surface radiative properties for allboundaries apart from symmetry and cyclic ones. Thus:

• Specify emissivity, reflectivity and transmissivity of all wall, baffle andsolid-fluid interface boundaries, as necessary. The description given in“Thermal radiation properties” on page 4-20 (for walls) and on page 4-25 (forbaffles) should be read before entering values in this panel.

• Specify the radiation temperature and emissivity at ‘escape’ surfaces, i.e.boundaries by type “Inlet”, “Outlet”, “Pressure Boundary”, “StagnationBoundary”, “Free-stream Transmissive Boundary” and “Transient-waveTransmissive Boundary”. The required values are entered in the boxeslabelled T Radiation and Emissivity.

Note that:

• All boundaries are assumed to be diffuse (i.e. their radiative properties are notdependent on the direction of radiation incident on or leaving the surface).

• The absorptivity of the solid-fluid interface (1 - transmissivity - reflectivity)should be consistent with the absorptivity of the solid material defined in Step4.

Step 6

If you have chosen the Discrete Transfer - Internal VF Calc method, createradiation patches for all relevant boundary regions, including external boundariesof solid cells. This process is as described in “Radiation Modelling for SurfaceExchanges”, Step 6 and 7.

Step 7

Write the geometry and problem files in the usual way and then run STAR. If theinitialization stage completes successfully, you will see an echo of the specifiedmodelling parameters in the .info and .run files.

• If you have chosen the Discrete Transfer - Internal VF Calc method, the

Page 175: Star CCm Guide

Chapter 7 THERMAL AND SOLAR RADIATION

Capabilities and Limitations of the DTRM Method

Version 4.02 7-5

view factor calculations are performed at the start of the analysis. In movingmesh cases, view factors are re-calculated at every time step. View factors arealso saved in a binary file (case.vfs) and are retrieved from that file in arestart run. Participating media data are stored in another binary file(case.pgr) and then retrieved from it in a restart run.

• If you have chosen the Discrete Ordinates method, the STAR solver is calledevery n iterations during the run to solve the radiative transfer equation(where n is the value specified in the “Thermal Options” panel). The solverallocates and frees memory each time, which is reported. In addition, thesolver prints out a residual history for the solution of the radiative transferequation, as well as a summary of the computation.

• At convergence, the displayed value for the Imbalance quantity should besmall compared to heat fluxes of engineering interest. This indicates that thenet radiation emission from the medium equals the net absorption into theboundary. If all boundaries are adiabatic and there are no other energy sourceterms, both the net boundary emission and the net media emission willseparately reach very small values.

Capabilities and Limitations of the DTRM Method

1. Lagrangian particle radiation may be modelled by setting Constant 82 to anon-zero value equal to the particle emissivity. For coal combustion cases,this operation may be performed via the “NOx/Radiation” panel in STARGUIde.

2. Conducting walls (solid-fluid interfaces) should have their transmissivity setto either 1 or 0, depending on whether radiative heat transfer through the solidmaterial is to be considered. If radiation in the solid is on, the transmissivity atthe solid-fluid interface must be 1, otherwise it must be 0.

3. The FASTRAC method must be used for thermal/solar radiation problemswith transmissive external walls.

4. At present, the FASTRAC method does not apply to problems containingsymmetry or cyclic boundary regions.

5. ‘Escape’ or open flow boundaries (inlet, outlet, pressure, etc.) require anassumption regarding the radiation passing through these boundaries andemitted from outside the solution domain. The Internal method assumes thatthis externally emitted radiation is coming from a surface of giventemperature that coincides with the escape boundary surface. The FASTRACmethod assumes that a distant ‘environmental’ black body emits radiation at agiven temperature. These differing assumptions lead to slightly differentresults. In addition, the Internal method allows specification of differentradiation temperatures at each open boundary whereas FASTRAC assumesthat all open boundaries "see" the same environmental surface.

6. Radiation patches cannot be applied to boundaries assigned to the default wallregion (region no. 0). If you need to turn on radiation modelling in a problemcontaining such boundaries, you will need to re-assign them first to a non-zerowall region number.

7. The accuracy of the radiation calculations depends on the patch size sincequasi-uniform radiation properties are assumed for a patch. The accuracy of

Page 176: Star CCm Guide

THERMAL AND SOLAR RADIATION Chapter 7

Capabilities and Limitations of the DTRM Method

7-6 Version 4.02

the view factor calculations depends on both the patch size and the number ofbeams emitted per patch. For maximum accuracy:

(a) Patches should be planar.(b) The aspect ratios of patches should be close to 1.0.(c) If you are using the Internal view factor calculation method, any

refinement of patches should be followed by an increase in the number ofbeams, so that all patches are resolved adequately (see “Patch and beamdefinition” on page 9-2 of the Methodology volume for a discussion ofthis point).

(d) Patches should not span multiple regions unless the assumption ofquasi-uniform radiation properties is valid over those regions.

However, acceptable results may be obtained even if one or more of the aboveconditions are not fully met.

8. If the wrong patch number is assigned to a cell face during the patchdefinition process (Internal view factor calculations only), the mistake can berectified either:

(a) numerically via the BMODIFY command, or(b) graphically (using the screen cursor) via the BCROSS command.

9. Patches defined as part of the Internal view factor calculation can be stored ina file (case.bnd) and read back from it using the normal boundary exportand import facilities provided in panels “Export Boundaries” and “ImportBoundaries”, respectively.

10. The default number of beams used in the Internal view factor calculationprocess (100) may be sufficient for coarse patches. In situations where a patchis created for every boundary cell face, the number of beams may need to beincreased (between 1600 and 2500 for typical radiation problems) in order toresolve adequately the patches present in the system. The FASTRACcalculation method uses a fixed number of beams (1,024).

11. The CPU time for Internal view factor calculations increases in proportion tothe number of patches multiplied by the number of beams. The CPU time forradiation heat transfer calculations increases in proportion to the number ofpatches. The FASTRAC view factor calculations are also dependent on thenumber of patches but the CPU time required is considerably reduced.

12. User subroutine USOLAR cannot be used for solar radiation problemsemploying the FASTRAC method.

13. STAR-HPC runs are not feasible for problems involving participating mediaradiation.

14. STAR-HPC runs for problems involving solar radiation are only feasible if theFASTRAC method has been chosen.

15. Surface-exchange problems using the Internal calculation method can be runin STAR-HPC mode, but the view factors have to be calculated in‘single-processor’ mode. To do this, run the case for zero iterations on a singleprocessor and save the view factor (.vfs) file.

16. As stated on page 7-3, Step 8 above, Internal view factors for moving meshcases are re-calculated at every time step. Therefore, in view of the previousrestriction, STAR-HPC runs for problems involving both radiation and a

Page 177: Star CCm Guide

Chapter 7 THERMAL AND SOLAR RADIATION

Capabilities and Limitations of the DORM Method

Version 4.02 7-7

moving mesh are not feasible. Note also that FASTRAC view factorcalculations cannot be used in moving mesh cases at present.

17. Note that command PATCH generates only shell surfaces. It cannot be used tocreate radiation patches.

Capabilities and Limitations of the DORM Method

1. The discrete ordinates model (DORM) does not need radiation patches andthe computational overheads involved in their use. In addition, to facilitateswitching from a discrete transfer (DTRM) to a discrete ordinate (DORM)model for the same problem, STAR will accept geometry files with or withoutpatches.

2. Nevertheless, using DORM can still add significantly to the CPU time andmemory needed for a given simulation. For this reason, users are encouragedto plan their analyses conservatively until they gain experience with the CPUtime and memory requirements of their model. The run-time output for theDORM calculation will echo the memory requirements (see Step 7 above).

3. The memory requirements of the calculation depend on your choice ofangular discretization. The table below gives a guide to memory usage per100,000 cells. Note that this holds for single-precision calculations and a greymedium.

.

4. The model may be run in the normal way under STAR-HPC. However, thesolution history for a serial run will be different from that for a parallel run.Although the radiative transfer equation is similar to a normal transportequation, there is no equivalent of the diffusion term and so the equation is notelliptic. To solve this equation efficiently, a specialized solver that follows thedirections of each ordinate is used. Thus, in the STAR-HPC environment,some domains may receive the information about certain directions only afterit has crossed through the other domains. Nevertheless, converged solutions inserial and HPC calculations are identical.

5. Coupling between the ordinate directions at cyclic and symmetry boundariesapproximates such boundaries as diffuse.

6. DORM is fully compatible with all cell shapes supported by pro-STAR(polyhedral cells, baffle cells, etc.)

7. DORM can also be used to model surface-exchange problems (i.e.non-participating media analyses). Since the participating media mode is

Table 7-1: Approximate memory required for DORM analysis

Ordinates Angulardiscretization

Additional memory per100,000 cells

8 S2 45 MB

24 S4 55 MB

48 S6 75 MB

80 S8 95 MB

Page 178: Star CCm Guide

THERMAL AND SOLAR RADIATION Chapter 7

Radiation Sub-domains

7-8 Version 4.02

always on, the absorption and scattering coefficients must be set to zero forsuch cases.

8. At present, DORM does not support cases involving solar radiation.

Radiation Sub-domains

In some problems, radiation effects are important only within a restrictedsub-domain of the overall solution domain, e.g. when doing a complete continuummechanics analysis around a car body, where radiation calculations are onlynecessary under the car bonnet.

Under such circumstances, it is possible to confine the radiative heat transfertreatment to the part of the model where it is relevant, thus avoiding the lengthycalculations needed for a full radiation analysis. The following steps are thennecessary:

Step 1

In the “Thermal Options” STAR GUIde panel, turn on the radiation calculations byselecting either the Discrete Transfer - Internal VF Calc or the DiscreteOrdinates option in the Radiation menu and then specify all necessary radiationparameters.

Step 2

Using the Cell Table Editor:

• Create a separate cell type for all cells occupying the sub-domain that issubject to the radiative treatment

• For this cell type only, turn the Radiation option On

Step 3

The action here depends on your choice of method in Step 1 above:

• For the Discrete Transfer - Internal VF Calc method (whetherParticipating or Non-Participating), create the necessary number of special‘Radiation’ boundaries so as to completely separate the radiative from thenon-radiative part of the domain.

• For the Discrete Ordinates method, radiation boundaries are not applied.Step 2 above is all that is required to define the problem properly; no furtheraction is necessary.

Step 4

Within the radiative sub-domain, use the “Define Boundary Regions” panel tospecify radiation properties for all boundary regions, including the specialboundaries created above (see also Chapter 4, “Radiation Boundaries”).

Step 5

If you have chosen the Discrete Transfer - Internal VF Calc method, createpatches on all boundaries surrounding the radiative sub-domain, including theradiation boundaries, as described in “Radiation Modelling for Surface Exchanges”.

Step 6

Write the geometry and problem files in the usual way and then run STAR.

Page 179: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Introduction

Version 4.02 8-1

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Introduction

STAR-CD allows for two kinds of chemical reaction:

• Homogeneous — the reaction occurs within the bulk of the fluid• Heterogeneous — the reaction takes place only at surfaces, such as in

catalytic converters

Heterogeneous reactions are currently implemented via user-supplied subroutines.Homogeneous reactions are grouped into three distinct types:

1. Unpremixed/Diffusion — reactions of this type occur when the fuel andoxidant streams enter the solution domain separately, as in a Diesel engine.The reactions may be sub-divided into the following groups:

(a) Local Source — these include eddy break-up, chemical kinetic, andhybrid models (see “Local Source Models” on page 8-2 for more details)

(b) Complex Chemistry — these model the reaction system by including thefull reaction mechanism (see “Complex Chemistry Models” on page 8-11for more details).

(c) Presumed Probability Density Function (PPDF) — these include singleand multiple fuel implementations and the Laminar Flamelet model (see“Presumed Probability Density Function (PPDF) Models” on page 8-3for more details)

2. Partially Premixed — combustion of this type is one of the essential featuresin Gasoline Direct Injection engines, where combustion occurs in anon-uniform mixture. The reactions may be sub-divided into the followinggroups:

(a) Local Source, of the type mentioned above(b) Complex Chemistry, of the type mentioned above(c) Regress Variable, represented by a Flame Area Evolution (FAE) model

3. Premixed — reactions of this type occur when the fluid initially has auniform composition, as in a spark ignition engine

(a) Local Source, of the type mentioned above(b) Complex Chemistry, of the type mentioned above(c) Regress Variable, represented by various eddy break-up and flame-area

models (see “Regress Variable Models” on page 8-10 for more details)

The theory behind reaction models of the local source, complex chemistry andPPDF type is described in Chapter 10 of the Methodology volume. Regress variablemodels are normally used in engine combustion simulation and are describedseparately in Methodology Chapter 11. A set of recently implemented enginecombustion models is discussed in the section on “Setting Up Advanced I.C. EngineModels” on page 8-22 of this chapter.

In some cases, the model describing the main chemical reaction(s) may need tobe supplemented by subsidiary models that describe:

Page 180: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Local Source Models

8-2 Version 4.02

• Ignition mechanisms• Emission of pollutants, typically NOx products. Special considerations apply

to modelling NOx-type reactions, as discussed in “NOx Modelling” on page8-39.

• Application Specific models, such as engine knock

All these models together constitute a so-called chemical reaction scheme. Notethat:

• Chemical schemes are defined and numbered individually• Chemical scheme definitions can exist independently of any fluid domains or

scalar variables. However, they need to be explicitly assigned to a domainbefore they can be used in your simulation.

• Each fluid domain may be associated with only one chemical reactionscheme. However, this association may be changed by the user to suitproblem requirements or to try out alternative reaction models.

• Special considerations apply to modelling coal combustion; these arediscussed in the section on “Coal Combustion Modelling” on page 8-41.

Local Source Models

The main characteristics of this group of models are as follows:

1. Up to 30 chemical reactions may be defined per scheme2. The reactions are irreversible3. Each reaction is associated with a single chemical species designated as the

leading reactant (equivalent to fuel in a combustion reaction). This speciescharacterises the reaction and is consumed by it. The remaining reactingspecies are defined as reactants.

4. The products of a reaction are defined as products. However,

(a) if a product of a reaction participates as a reactant in a second reaction, itshould be specified as a leading reactant or ordinary reactant, asappropriate;

(b) if a product is transported into the solution domain from an externalsource, it also should be specified as a reactant.

5. The distribution of products within the solution domain can be calculatedalgebraically, provided that the products are generated only within thedomain.

6. If all incoming streams consist of identical fuel-to-reactant ratios (in transientcases the initial fields must also have the same ratio), the reaction process istermed premixed (see “Premixed reaction/homogeneous systems” on page10-4 of the Methodology volume). If this is not the case, the process is eitherof the diffusion or the partially premixed type and the user needs to solve anadditional scalar transport equation for the mixture fraction (total massfraction of burned and unburnt fuel, see “Diffusion reaction /non-homogeneous systems” on page 10-5).

7. STAR-CD automatically sets up mixture fraction scalars for each leadingreactant in diffusion and partially premixed reactions. However, it is the user’sresponsibility to ensure that boundary conditions for both leading reactant and

Page 181: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Presumed Probability Density Function (PPDF) Models

Version 4.02 8-3

mixture fraction are specified correctly and that they are the same for both ofthem.

8. The reactions themselves are defined by specifying the amounts (inkilomoles) of the participating leading reactants, reactants and products. Forexample, the input required for the following reaction (combustion ofmethane)

(8-1)

is

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

Presumed Probability Density Function (PPDF) Models

Models of this type are described in Chapter 10, “Presumed-PDF (PPDF) Model forUnpremixed Turbulent Reaction” in the Methodology volume. These fall into twomain groups:

• Single-fuel PPDF, where only one type of fuel and one type of oxidiser arepresent, though each of these may enter the combustion system through morethan one inlet.

• Multiple-fuel PPDF, where two types of fuel and one type of oxidiser arepresent.

Single-fuel PPDF

The basic equations solved are for the mean mixture fraction and its variance(see Chapter 10, “Single-fuel PPDF” in the Methodology volume). There is a choicebetween equilibrium chemistry models (these assume a local instantaneouschemical equilibrium) and a laminar flamelet model that allows for non-equilibriumeffects (such as flame stretch).

Equilibrium modelsIn these models, the PDF integration may be performed in two ways:

1. By employing a numerical integration technique2. By expressing all instantaneous values of the variables as polynomials of the

mixture fraction and then doing the integration analytically. Polynomialcoefficients may be

(a) supplied by the user(b) read in from a built-in database stored in file ppdf.dbs(c) calculated by the CEA (Chemical Equilibrium with Applications)

program [5, 6]. This is an auxiliary program that computes the chemical

Reaction (1) kmol

Leading reactant (fuel) (1) — 1Reactant (1) — 2Product (1) — 1Product (2) — 2

CH4 2O2 CO2 2H2O+→+

CH4O2CO2H2O

f g f

Page 182: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Presumed Probability Density Function (PPDF) Models

8-4 Version 4.02

equilibrium composition of a mixture. This program is included in theSTAR-CD suite and is used in conjunction with the built-in PPDF model.

There is also a choice between adiabatic and non-adiabatic PPDF:

1. For adiabatic PPDF:

(a) The mixture density and temperature are calculated numerically or frompolynomials in f. Note that these polynomials are based on molarfractions.

(b) Since temperature is calculated independently, the ‘Constant’ specificheat property option with default values may be used

2. For non-adiabatic PPDF, the density is calculated from the ideal gas law andthe temperature from the enthalpy transport equation.

The mass fractions of all other chemical species related to the reaction are definedas additional scalar variables and calculated numerically or from the user-suppliedpolynomials in f, as above. Up to forty eight such species can be specified by theuser.

Laminar flamelet modelIn this model, the PDF integration is always performed numerically and the resultsstored in a look-up table which is characterised by its mean mixture fraction,mixture fraction variance and strain rate. There is also a choice between an adiabaticand a non-adiabatic model, as above.

The setup procedure for the model is described in the on-line Help for the“Reaction System” STAR GUIde panel. One part of this procedure is to specify thereaction mechanism, stored in a reaction definition file in CHEMKIN format. Thisis organized in three sections:

• Element data• Species data• Reaction data

The basic data are often supplemented by auxiliary data for special reactions suchas third-body reactions.

Element DataAll chemical species in the reaction mechanism must be composed of chemicalelements or isotopes of chemical elements. Each element and isotope must bedeclared using a one- or two-character symbol. The purpose of the element data isto associate the element atomic weights with their character symbol representations.If an ionic species is used in the reaction mechanism (e.g, OH+), an electron mustbe declared as the element E.

Element data must start with the word ELEMENTS (or ELEM) but, followingthat, there are minimal restrictions on the formatting of the rest of the section. Anynumber of element symbols can be written on any number of lines. The symbolsmay appear anywhere on a line, but those on the same line must be separated byblanks. Any line or portion of a line starting with an exclamation mark (!) isconsidered a comment and will be ignored. Blank lines are also ignored.

If an element is in the list below, then only the symbol identifying it need appear

Page 183: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Presumed Probability Density Function (PPDF) Models

Version 4.02 8-5

in the element data. The recognized elements are as follows:

H, HE, LI, BE, B, C, N, O, F, NE, NA, MG, AL, SI, P, S, CL, AR, K, CA, SC, TI,V, CR, MN, FE, CO, NI, CU, ZN, GA, GE, AS, SE, BR, KR, RB, SR, Y, ZR, NB,MO, TC, RU, RH, PD, AG, CD, IN, SN, SB, TE, I, XE, CS, BA, LA, CE, PR, ND,PM, SM, EU, GD, TB, DY, HO, ER, TM, YB, LU, HF, TA, W, RE, OS, IR, PT, AU,HG, TL, PB, BI, PO, AT, RN, FR, RA, AC, TH, PA, U, NP, PU, AM, CM, BK, CF,ES, FM, D, E

For an isotope, the atomic weight must follow the identifying symbol and bedelimited by slashes (/). The atomic weight may be given in integer, floating-point,or “E” format, but internally it will be converted to a floating-point number. Forexample, the isotope deuterium may be defined as D/2.014/. If desired, the atomicweight of an element in the above list may be altered by including the atomic weightas input just as though the element were an isotope.

An acceptable format for element data specification is shown below:

ELEMENTS H D /2.014/ O N END! END is optional

Species DataEach chemical species in a reaction must be identified on one or more speciesline(s). Any set of up to 16 upper or lower case characters can be used, as for speciesnames, which are case sensitive. In addition, each species must be composed ofelements that have been identified in the element data section.

Species data must start with the word SPECIES (or SPEC) but, as alreadydiscussed, subsequent formatting of this section is not particularly important. Anacceptable format for species data specification is shown below:

SPEC H2 O2 H O OH HO2 H2O

Reaction DataThe reaction mechanism may consist of any number of chemical reactionsinvolving the species named in the species section. A reaction may

• be reversible or irreversible;• be a three-body reaction with an arbitrary third body and/or enhanced

third-body efficiencies;• have one of several pressure-dependent formulations.

The rate of each reaction is defined by specifying , and from the generalArrhenius rate equation for the forward reaction, see equation (10-65) in theMethodology volume.

Reaction data must start with the word REACTIONS (or REAC). On the sameline, you may specify units of the activation energies to follow by including theword CAL/MOLE, KCAL/MOLE, JOULES/MOLE, KJOULES/MOLE, KELVINS,or EVOLTS. The default units for are cal/mole and the default units for arecm, mole, sec and K. Including the word MOLECULES on the REACTIONS linechanges the units of to cm, molecules, sec and K.

The lines following the REACTIONS line contain reaction definitions togetherwith their Arrhenius rate coefficients, as described in Table 8-1. The description is

AR βR ER

ER AR

AR

Page 184: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Presumed Probability Density Function (PPDF) Models

8-6 Version 4.02

composed of reaction data and optional auxiliary information data.

Table 8-1:

Species Symbols

Each species in a reaction is described by a unique sequence of characters, asthey appear in the species data (e.g. CH4).

Coefficients

A species symbol may be preceded by an integer or real coefficient. The coeffi-cient’s meaning is that there are that many moles of the particular speciespresent as either reactants or products; e.g. 2OH, is equivalent to OH + OH.Non-integer coefficients are allowed, but the element balance in the reactionmust still be maintained.

Delimiters

+A plus sign is the delimiter between each reactant species and eachproduct species.

=An equality sign is the delimiter between the last reactant and thefirst product in a reversible reaction.

=>An equality sign with an angle bracket on the right is the delimiterbetween the last reactant and the first product in an irreversiblereaction.

Special Symbols

+M

An M as a reactant and/or product stands for an arbitrary thirdbody. It should appear as both a reactant and a product. In a reac-tion containing an M, certain species can be specified as havingenhanced third-body efficiencies; in which case auxiliary data(described below) must follow the reaction line. If no enhancedthird-body efficiencies are specified, all species act equally as thirdbodies and the effective concentration of the third body is the totalconcentration of the mixture.

(+M)

An M as a reactant and product surrounded by parentheses indi-cates that the reaction is pressure-dependent, in which case auxil-iary information line(s) (described below) must follow the reactionto identify the fall-off formulation and parameters. A species mayalso be enclosed in parentheses. For example, (+H2O) indicatesthat water is acting as the third body in the fall-off region, not thetotal concentration M.

!An exclamation mark means that all following characters on thereaction line are comments. For example, the comment may beused to give a reference to the source of the reaction and rate data.

Page 185: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Presumed Probability Density Function (PPDF) Models

Version 4.02 8-7

The second field of each reaction line is used to define the Arrhenius ratecoefficients , and , in that order. At least one blank space must separatethe first number and the last symbol in the reaction. The three numbers must beseparated by at least one blank space and be given in integer, floating point, or “E”format (e.g., 123, 123.0 or 123E1). Their units are as specified in the REACTIONSline above. An example of reaction data for a simple mechanism is shown below:

REACTIONS CAL/MOLEH2 + O2 = OH 1.70E+13 0.000 47780OH + H2 = H2O + H 1.17E+9 1.300 3626H + O2 = HO2 3.61E+17 -0.720 0.000O + H2 = OH + H 5.06E+04 2.670 6290HO2 + H2 = H2O2 + H 1.25E+13 0.000 00.5H2O2 + 0.5H2 = H2O 1.60E+12 0.000 3800

! example of real coefficients

END ! END statement is optional;

The basic rules for specifying reaction data are summarised below:

1. The first line must start with the word REACTIONS (or REAC), and mayinclude units definition(s).

2. The reaction description can begin anywhere on the line. All blank spaces,except those between Arrhenius coefficients, are ignored.

3. Each reaction description must have = or => between the last reactant and thefirst product.

4. Each reaction description must be contained within one line.5. Three Arrhenius coefficients ( , and ) must appear in order on each

line, separated from each other and from the reaction description by at leastone blank space; no blanks are allowed within the numbers themselves.

6. No more than six reactants or six products are allowed in a reaction.7. Comments are any characters following an exclamation mark.

Auxiliary Reaction DataThe format of an auxiliary information line is a character-string keyword followedby a slash-delimited (/) field containing an appropriate number of parameters (ineither integer, floating point, or “E” format). Different types of auxiliary reactiondata are described below, followed by an example:

1. Third-Body and Pressure-Dependent Reaction ParametersIf a reaction contains M as a reactant and/or product, auxiliary informationlines may follow the reaction line to specify enhanced third-body efficienciesof certain species. The keyword defining an enhanced third-body efficiency isthe species name of the third body, and its single parameter is its enhancedefficiency factor. A species that acts as an enhanced third body must bedeclared as a species.

If a pressure-dependent reaction is indicated by a (+M) or by a speciescontained within parentheses, say (+H2O), one or more auxiliary informationlines must follow to define the pressure-dependence parameters. For allpressure-dependent reactions, an auxiliary information line must follow tospecify either the low-pressure limit Arrhenius parameters (for fall-offreactions) or the high-pressure limit Arrhenius parameters (for chemically

AR βR ER

AR βR ER

Page 186: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Presumed Probability Density Function (PPDF) Models

8-8 Version 4.02

activated reactions). For fall-off reactions, the keyword LOW must appear onthe line, with three rate parameters , and . For chemically activatedbimolecular reactions, the keyword HIGH must appear on the line, with thethree rate parameters , and .There are then three possibleinterpretations of the pressure-dependent reaction:

(a) Lindemann formulation - no additional parameters are defined(b) Troe formulation - in addition to the LOW or HIGH parameters, the

keyword TROE followed by three or four parameters must be included inthe following order: a, b, c and d, as defined in equation (10-77) of theMethodology volume. The fourth parameter is optional and if omitted, thelast term in equation (10-77) is not used.

(c) To define an SRI pressure-dependent reaction, in addition to the LOW orHIGH parameters, the keyword SRI followed by three or five parametersmust be included in the following order: a, b, c, d and e, as defined inequation (10-79) of the Methodology volume. The fourth and fifthparameters are optional. If only the first three are stated, then by default

and .

2. Landau-Teller ReactionsTo specify Landau-Teller parameters, the keyword LT must be followed bytwo parameters — the coefficients and from equation (10-81) in theMethodology volume. The Arrhenius parameters , , and are takenfrom the numbers specified on the reaction line itself. If reverse parametersare specified in a Landau-Teller reaction via REV (see item 4 below), thereverse Landau-Teller parameters must also be defined, with the keyword RLTand two coefficients and for the reverse rate.

3. Logarithmic Interpolation of Pressure-Dependent RatesThis generalized way of describing the pressure dependence of a reaction rateis indicated by the PLOG keyword in auxiliary lines. In this case, the reactiondescription should not include (+M) in it, although this is used to indicate thatthe reaction is pressure dependent in other cases. This particular option fordescribing pressure-dependent reactions cannot be combined in any givenreaction with other options for describing pressure dependence. Onesupplementary line starting with the PLOG keyword needs to be supplied foreach pressure in the set. The keyword is followed by slash-delimited valuesfor the pressure (in atmospheres) and the rate parameters for that pressure.The supplementary lines need to be in order of increasing pressure. If the rateexpression at a given pressure cannot be described by a single set ofArrhenius parameters, more than one set may be provided. Each of theseshould be followed by the keyword DUPLICATE, meaning the sum of the setsof rates provided for a given pressure will be used. The units of the rateparameters provided with the PLOG keyword should match the units used forthe overall reaction description. Note that, in this case, although rateparameters need to be supplied on the main reaction line to prevent an error,those values are superseded by the ones provided on the supplementary lines.

4. Reverse Rate ParametersFor a reversible reaction, auxiliary data may follow the reaction to specifyArrhenius parameters for the reverse-rate expression. Here, the three

A0 β0 E0

A∞ β∞ E∞

d 1= e 0=

BR CRAR βR ER

BR CR

Page 187: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Presumed Probability Density Function (PPDF) Models

Version 4.02 8-9

Arrhenius parameters ( , , and ) for the reverse rate must follow thekeyword REV. This option overrides the reverse rates that would be normallycomputed by satisfying microscopic reversibility through the equilibriumconstant, as described by equation (10-66) in the Methodology volume.

5. Reaction Order ParametersAuxiliary data may be included to override the reaction order for a species,using the auxiliary keywords FORD or RORD, for forward and reversereaction descriptions, respectively. Each occurrence of these keywords mustbe followed by the species name and the new reaction order. This optionoverrides the stoichiometric coefficients for the species included in theauxiliary data.

6. Reaction UnitsIt is sometimes convenient to specify units for a particular reaction rate fit thatdiffer from the default units specified for other reaction expressions in thechemistry mechanism. In such a case, you should employ the auxiliarykeyword UNITS. This keyword must be followed by one or more of thefollowing unit descriptors: MOLECULE, CAL, KCAL, JOULE, KJOULE,KELVIN, or EVOLTS. The inclusion of MOLECULE would indicate that thereaction rate expression is in units of molecules/cm3 rather than mole/cm3.The remaining unit descriptors specify the energy units in the rate expression.Note that the temperature units in the rate expression are always in Kelvin.

An example of the use of auxiliary reaction data for a three-parameter Troe fall-offreaction with enhanced third-body efficiencies is shown below:

CH3+CH3(+M)=C2H6(+M) 9.03E16 -1.18 654LOW / 3.18E41 -7.03 2762 /TROE / 0.6041 6927 132. /H2/2/ CO/2/ CO2/3/ H2O/5/

Multiple-fuel PPDF

1. Four equations are solved, for the progress variables (primary fuel mixturefraction), (secondary fuel mixture fraction), (primary fuel variance)and (variance of variable ξ, see Chapter 10, “Multiple-fuel PPDF” in theMethodology volume).

2. Only an equilibrium chemistry model is available in this case3. The PDF integration is always performed numerically

Other noteworthy points about PPDF models are:

1. In order to increase the efficiency of combustion systems by increasing thetemperature of incoming oxidisers, the use of vitiated air containingcombustion products is a viable option. The basic PPDF model, whichassumes that only fuel and air enter the system, cannot be used for this kind ofproblem. However, STAR-CD’s implementation has been extended to allowup to four dilutants to enter the combustion system. The basic setup is thesame as that used for the standard PPDF model. However, additionaltransported scalars are defined to represent the dilutants; therefore, additionalboundary conditions need to be defined for them.

AR βR ER

f pf s g f

Page 188: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Regress Variable Models

8-10 Version 4.02

It is emphasised that PPDF with dilutants can only be used in conjunctionwith the single-fuel, equilibrium chemistry model plus the non-adiabaticPPDF option.

2. The multiple-fuel PPDF option may also be used to model a systemcontaining only one type of fuel but two different types of oxidiser.

Regress Variable Models

Models in this group solve a transport equation for a regress variable representingthe combustion process and are described in the Methodology volume, Chapter 11.Their main features are:

1. The regress variable b defined by equation (11-4) in the Methodology volumeis the transported variable and is a passive scalar

2. All physical scalar variables participating in such schemes are linearly relatedto b

3. Regress variable models may be classified into two groups:

(a) Flame-area models, discussed in sections “Premixed Combustion inSpark Ignition Engines” and “Partially Premixed Combustion in SparkIgnition Engines” of the Methodology volume:

i) “The Weller flame area model” — makes use of the wrinklingfactor Ξ, which is either obtained from an algebraic relationshipgiven by equation (11-36) or from the solution of a transportequation

ii) “The CFM-ITNFS model” — employs a transport equation for theflame area density Σ, given by equation (11-10)

iii) “The Weller 3-equation model” — requires the solution ofequations for both wrinkling factor and mixture fraction

iv) All have their own ignition models

(b) Eddy break-up models, used in a manner similar to that described aboveunder “Local Source Models”.

4. The one-step reaction representing the combustion process is associated witha single chemical species designated as the leading reactant (or fuel). Thisspecies characterises the reaction and is consumed by it. The remainingreacting species are defined as reactants.

5. The reaction is irreversible and is defined by specifying the amounts (inkilomoles) of the participating leading reactants, reactants and products.

6. pro-STAR includes facilities for checking that mass is conserved.7. If all incoming streams consist of identical fuel-to-reactant ratios (in transient

cases the initial fields must also have the same ratio), the reaction process istermed premixed (see “Premixed reaction/homogeneous systems” on page10-4 of the Methodology volume). If this is not the case, i.e. the process is ofthe partially premixed type, an additional scalar transport equation for themixture fraction needs to be solved. The only regress variable model that maybe used in partially premixed systems is the Weller 3-equation model.

8. STAR-CD automatically sets up mixture fraction scalars for each leadingreactant in diffusion and partially premixed reactions. However, it is the user’s

Page 189: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Complex Chemistry Models

Version 4.02 8-11

responsibility to ensure that boundary conditions for both leading reactant andmixture fraction are specified correctly and that they are the same for both ofthem.

9. Exhaust gases present in EGR (Exhaust Gas Recirculation) systems are takeninto account by defining active scalars for each exhaust gas species andsolving additional transport equations for their mass fraction (see alsoChapter 11, “Exhaust Gas Recirculation” in the Methodology volume).

Complex Chemistry Models

The complex chemistry model supports two types of format for reaction mechanismdefinition. One of them is the CHEMKIN format, the other the STAR-CD nativeformat described below.

In order to use STAR-CD’s complex chemistry model, a reaction mechanism filecalled cplx.inp&& has to be created by the user for each chemical scheme inwhich a complex chemistry model is applied. The characters ‘&&’ at the end of thefile name represent the chemical scheme number in which the complex chemistrymodel is applied. For example, if such a model is applied in chemical scheme no. 2,the reaction mechanism file should be called cplx.inp02. STAR will write anecho file cplx.inp&&-echo for each cplx.inp&& file it has read, so thatusers can ensure settings have been correctly applied.

File cplx.inp&& contains the reaction formula, chemical kinetic data andkeywords and extra parameters for special reactions, as outlined below:

Reaction formula definitionThe general form of a reaction formula is given by

Here, , , …, , , … are the stoichiometric coefficients which could beinteger or real numbers, , , …, , , … are species names, , , …,

, , … are the mass fraction exponentials, A is the pre-exponential factor (inunits of cm-mole-sec-K), β the temperature exponent and E the activation energy ofthe Arrhenius rate constant (in cal/mol). If the mass fraction exponentials are equalto 1, they are not written into the corresponding echo file (cplx.inp&&-echo).

Rules:

• There are no spaces between stoichiometric coefficients , and speciesnames. If or are equal to 1, they can be omitted.

• and must be separated by at least one space from the species name.If the value of or is not specified, it will be assumed that =or = .

• Character ‘=’ is used for reversible reactions; ‘⇒’ for irreversible reactions.• There is no ‘+’ character between the pre-exponential factor, A, and the

nearest species name. A, β and E are separated by at least one blank space.• Everything following the ‘!’ character is treated as a comment• The ‘+’ character should not be used in a real number expression. For

example, 1.2E+05 should be written as 1.2E05.• The maximum number of reactants or products in a single reaction must not

exceed 5

n1′R1 m1′ n2′R2 m2′ …+ + n1″P1 m1″ n2″P2 m2″ … A β E+ +=

n1′ n2′ n1″ n2″R1 R2 P1 P2 m1′ m2′

m1″ m2″

ni′ ni″ni′ ni″

mi′ mi″mi′ mi″ mi′ ni′

mi″ ni″

Page 190: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Complex Chemistry Models

8-12 Version 4.02

Three-body reaction definitionTo define a three-body reaction, add a line starting with the keyword M after thereaction formula, i.e.

Rules:

• Keyword M must be enclosed by two ‘/’ characters and is not case sensitive• A, B, … are species names and , , … are the corresponding efficiency

factors. They are separated by at least one blank space.

The Landau-Teller reactionTo define a Landau-Teller reaction, add a line starting with the keyword RLT afterthe normal reaction formula, i.e.

Rules:

• Keyword RLT must be enclosed by two ‘/’ characters and is not case sensitive• B and C are the Landau-Teller parameters and are separated by at least one

blank space• If the reaction is a three-body reaction as well, a new line is added starting

with ‘ ’ and the third body efficiency factors

The Lindemann fall-off reactionTo define a Lindemann fall-off reaction, add a line starting with the keyword LOWafter the reaction formula, i.e.

Rules:

• Keyword LOW must be enclosed by two ‘/’ characters and is not casesensitive

• , , and are the pre-exponential factor, temperature exponent andactivation energy, respectively, of the low pressure limit and are separatedeach from each other by at least one blank space

• The corresponding values for the high pressure limit are assumed to be thosegiven above as part of the reaction formula definition

• If the reaction is a three-body reaction as well, a new line is added startingwith ‘ ’ and the third body efficiency factors

The Troe fall-off reactionTo define a Troe fall-off reaction, add two lines starting with keywords LOW andTROE, respectively, after the reaction formula, i.e.

/M/ A/α1/ B/α2/ …

α1 α2

/RLT / B C

/M/

/LOW / AL βL EL

AL βL EL

/M/

/LOW / AL βL EL

Page 191: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Complex Chemistry Models

Version 4.02 8-13

Rules:

• The definition of keyword LOW is the same as above• The pre-exponential factor, temperature exponent and activation energy

values for the high pressure limit are assumed to be those given above as partof the reaction formula definition

• Keyword TROE must be enclosed by two ‘/’ characters and is not casesensitive

• a, b, c and d are the corresponding Troe parameters (d is optional)• If the reaction is a three-body reaction as well, a new line is added starting

with ‘ ’ and the third body efficiency factors.

The SRI fall-off reactionTo define a SRI fall-off reaction, add two lines starting with the keywords LOW andSRI, respectively, after the reaction formula, i.e.

Rules:

• The definition of keyword LOW is the same as above• The pre-exponential factor, temperature exponent and activation energy

values for the high pressure limit are assumed to be those given above as partof the reaction formula definition

• Keyword SRI must be enclosed by two ‘/’ characters and is not case sensitive• a, b, c, d and e are the corresponding SRI parameters and are separated from

each other by at least one blank space.• If the reaction is a three-body reaction as well, a new line is added starting

with ‘ ’ and the third body efficiency factors.

The Eddy Break-up reactionTo define an eddy break-up reaction in turbulent combustion, add a line startingwith keywords EBU after the reaction formula, i.e.

Rules:

• Keyword EBU must be enclosed by two ‘/’ characters and is not case sensitive• and are constansts appearing in the standard eddy break-up model,

see equation (10-8). If is not zero, the product will be included in thereaction rate calculation.IOP is an integer determining which EBU model is being used:

IOP = 1 : Standard EBU model, reaction rate determined by equation(10-8)

/TROE/ a b c d

/M/

/LOW / AL βL EL

/SRI / a b c d e

/M/

/EBU / Aebu Bebu IOP fi

Aebu Bebu

Bebu

Page 192: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Chemical Reaction Schemes

8-14 Version 4.02

IOP = 2 : Combined time scale model, reaction rate determined byequation (10-15)IOP = 3 : Hybrid kinetic/EBU model, reaction rate determined byequation (10-11)

For IOP = 2 or 3, the corresponding pre-exponential factor, temperatureexponent and activation energy are defined as usual.

• is optional and represents the burnt fuel mass fraction used in ignitionmodelling (see Chapter 10, “Ignition” in the Methodology volume)

In an eddy break-up reaction defined as

species A1 will be treated as the fuel, A2 as the oxidizer and B1 as the product. Themass fractions corresponding to these species are denoted in equation (10-8) as

, respectively. The eddy break-up reaction is also assumed to beirreversible.

An example reaction mechanism file is shown in Table 8-2.

Setting Up Chemical Reaction Schemes

Step 1

Go to the “Select Analysis Features” panel and choose option Chemical Reactionfrom the Reacting Flow menu. Click Apply. The Reacting Flow sub-folder willappear in the NavCenter tree, nested inside folder Thermophysical Models andProperties.

Table 8-2

H + O2 = OH + O 2.24E4 0. 16795O + O = O2 2.62E16 –0.84 0

H2/2.40/ H2O/5.40/ CH4/2.00/ CO/1.75/ CO2/3.60/HCO = CO 1.2 + H 5.00E12 0. 19208 ! modified

CO + O = CO2 1.80E10 0. 23856.020E14 0. 3000

H + CH2 = CH3 6.0E14 0. 0.1.04E26 –2.76 1600

.7830 74.0 2941.0 6964CH4 + 2O2 = CO2 + 2H2O 0. 0. 0.

4. 0. 1 0.CH + N2 = HCNN 3.1E12 0.150 0.0

H2/2.0/ H2O/6.0/ CH4/2.0/ CO/1.5/ CO2/2.0/1.3E25 –3.16 740

0.667 235.0 2117.0 4536.0

f i

A1 A2 … B1 B2 …+ +→+ +

YF YO YP,,

/M/

/M/

/LOW /

/LOW //TROE/

/EBU /

/M//LOW //TROE/

Page 193: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Setting Up Chemical Reaction Schemes

Version 4.02 8-15

Step 2

Open the Reacting Flow sub-folder to display a second sub-folder called ChemicalReactions. This contains all panels needed to fully define a chemical reactionscheme.

Step 3

Go to the Chemical Reactions sub-folder, open panel “Scheme Definition” andselect a free scheme number using the Chemical Scheme # scroll bar at the bottomof the panel. You must then:

• Specify the basic reaction type (Unpremixed/Diffusion, Premixed,Partially Premixed, or Heterogeneous/Surface) by choosing an option fromthe Reaction Type menu

• Select the most appropriate reaction model for your problem from theReaction Model menu. The menu options depend on the reaction typespecified above.

• For some models, you will also need to specify the form of theirImplementation or the method of calculating the Unburnt Gas Temperature,as explained in the “Scheme Definition” Help topic.

Step 4

In the “Reaction System” panel, use the on-line help provided to assist you inspecifying the relevant chemical reaction definitions, control settings and modelparameters. pro-STAR associates all chemical species defined in this panel withadditional scalar variables of the same name and also does a stoichiometric checkfor every reaction. The required scalars and their properties are retrieved frompro-STAR’s built-in database. Note that:

• If a species cannot be mapped to a material in a database, a warning isdisplayed in the Output window and a fresh scalar of that name (but withundefined properties) is created and added to the scalars list. You shouldtherefore go to the “Molecular Properties (Scalar)” panel to specify themissing properties before proceeding further. It is also important thatdefinition of all domain (material) properties via panel “MolecularProperties” has already been completed before any scalar properties aredefined.

• If the mass fraction of a non-reacting species is to be included in thecalculations, assign a scalar variable to the species via the “MolecularProperties (Scalar)” panel and put it at the end of the existing scalars list.

• The parameters of a reaction can be redefined at any time by selecting itsparent scheme via the Chemical Scheme # scroll bar and then making thenecessary changes.

Step 5

In the “Ignition” panel, choose an ignition model or ignition start-up scheme,depending on the chemical scheme type defined in Step 3

Step 6

If required, go to panel “Emission” and activate the built-in pollutant emissionmodels for NOx and/or soot

Page 194: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Chemical Reaction Schemes

8-16 Version 4.02

Step 7

Some schemes allow the inclusion of knock modelling as part of the overallchemical reaction simulation process. Parameters for this model may be specifiedin panel “Knock”.

Step 8

If the Coupled Complex Chemistry model is in use, go to panel “SolutionControls” to select the appropriate solution method controls and to perform thenecessary species-to-scalar mapping.

Step 9

Go back to Step 3 and repeat the above process until all schemes have been defined.

Step 10

Assign a reaction scheme to every fluid domain in your model using the “SchemeAssociation” panel. Note that it is not necessary to assign every available scheme toone of the domains. This allows you to define redundant schemes and thenexperiment with different schemes for the same domain, by performing separateanalyses for each combination. In multi-domain problems where each domain hasa different scalar composition, the “Additional Scalars” panel (Equation Behavioursub-folder) enables you, in effect, to select which scalars exist in what domain.

It is strongly recommended to make use of pro-STAR Constants 64, 89 and 90 whenrunning combustion cases. Their effect is as follows:

• Setting Constant 64 = 2 will constrain calculated values for all active scalarmass fractions to the range 0.0 — 1.0. Thus, numerical under- andover-shoots that can destabilize the solution process may be avoided

• Constant 89 can be assigned to the minimum allowable temperaturecalculated by STAR

• Constant 90 can be assigned to the maximum allowable temperature

Useful general points for local source and regress variable schemes

1. You are strongly recommended to perform stoichiometric checks for everyreaction, especially if Step 4 above found missing scalars that weresubsequently defined manually. To do this, click the Check Stoichiometrybutton in the Reaction System tab when you have finished setting up themodel and before writing data to the problem (.prob) file.

2. For steady-state problems involving reactions that use a hybrid model,experience so far has shown that the best practice is to obtain a convergedsolution first, using only the eddy break-up model for all reactions. Thechemical kinetic model should then be employed by selecting theCombined/User option and the analysis continued using the hybrid modeluntil the final solution is obtained.

3. The steady-state under-relaxation factors for temperature T and all scalarvariables representing transported mass fraction, mixture fraction, etc. shouldbe identical. The recommended range is 0.3 to 0.7. Note that this factor has noeffect for scalars calculated by other means, e.g. by an internal algebraicequation.

4. The residual error tolerance for temperature and all scalar variables can be

Page 195: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Setting Up Chemical Reaction Schemes

Version 4.02 8-17

tightened from the default value of 0.01 to 0.001. This will increase thenumber of sweeps per PISO iteration but will improve the accuracy.

5. The turbulent Prandtl and Schmidt numbers for all scalar variables should beidentical.

6. For premixed flames, the value of mixture fraction is known and remainsconstant throughout the analysis.

7. When defining domain material properties via the “Molecular Properties”panel in STAR-GUIde, you are recommended to choose option Polynomialin the “Specific Heat” pop-up menu. This will load suitable polynomials fromthe CHEMKIN or CEC thermodynamic databases [1, 2]. A polynomialvariation for molecular viscosity and thermal conductivity can be specified inthe same way. For mass diffusivity, set via the “Diffusivity” panel inSTAR-GUIde, the Constant option is recommended for maximum efficiency,particularly in the case of turbulent combustion.

8. If the same reaction appears in more than one scheme, user input can bereduced by employing command RSTATUS to copy the reaction definitionfrom a previous scheme to the current one.

9. If modelling considerations demand it, individual reactions in multi-stepreaction systems can be turned on or off at appropriate points in thesimulation. This may be done by selecting Off in the Status pop-up menucorresponding to the reaction concerned.

10. Chemical reactions (especially those for combustion) commonly take place ina domain where air is the background material. Given that the nitrogencomponent is often chemically inert and therefore does not appear in achemical reaction equation, it is convenient to include N2 as a separate scalarto represent the background material. Therefore:

(a) If N2 does not appear in a reaction definition, pro-STAR willautomatically set up an extra active scalar called N2. By default, itsphysical properties are those for nitrogen and the solution method is set toInternal (see panel “Additional Scalars”). The value of the N2 massfraction returned by STAR is such as to make the mass fractions at everycell sum to 1.0

(b) If N2 is present in a reaction definition, N2 will be set up like any otherscalar and its solution method will be set to Transport.

11. If you are modelling an EGR system, the recirculated gases must be explicitlydefined as active transported scalars within STAR Guide’s “AdditionalScalars” folder. These must also be given names that are different from thoseof the parent species participating in the chemical reaction and make sure thattheir properties (as defined in the “Molecular Properties (Scalar)” panel) arecorrect. STAR will then be able to distinguish between species representingproducts of the chemical reactions and the ones coming from the EGR stream.

12. Complex chemistry models must be run in double precision.13. If a regress variable is employed by a combustion model, its initial value must

be set to 1 for correct model operation. You must therefore ensure that theregress variable scalar in your model is initialised properly before proceedingwith the simulation.

Page 196: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Chemical Reaction Schemes

8-18 Version 4.02

Chemical Reaction Conventions

The following conventions should be observed when typing reaction definitions inthe “Reaction System” panel:

1. Enter the ‘→’ symbol as two consecutive characters ‘->’2. Specify the leading reactant as the first chemical substance on the left-hand

side of the reaction equation. Its name will appear in the Leading Reactantslist at the bottom of the panel, once the reaction details are confirmed.

3. Specify up to three ordinary reactants taking part in the reaction(s). Theirnames will appear in the Reactant Parameters list, once the reaction detailsare confirmed.

4. If a reaction constituent only occurs on the right-hand side of all reactionequations, it will be assumed to be a product and its name will appear in theProducts list. However, if you wish this constituent to be a reactant (see, forexample, point no. 4. on page 8-2), type the symbol [R] immediately after itsname.

5. In multiple reaction schemes, the normal rule for what may appear as aproduct is as follows:

(a) Reaction 1 is allowed to produce leading reactants 2 to 30 as products(b) Reaction 2 is allowed to produce leading reactants 3 to 30 as products(c) Reaction 3 is allowed to produce leading reactant 4 to 30 as products

.

.

.

(d) Reaction 29 is allowed to produce leading reactant 30 as a product(e) Reaction 30 is not allowed to produce any leading reactants

For example, the two equations in the following scheme

should be defined in the order shown above and not the other way round inorder to satisfy this rule. The system in this example also includes an influx of

from an external source so that both and are reactants in thiscase. Therefore, the symbol [R] needs to be entered after the latter’s name.

6. Note that, point no. 5 above notwithstanding, STAR will still allow onereaction only to create a product that has already been defined as the leadingreactant of a previous reaction.

Useful points for PPDF schemes

1. In single-fuel PPDF models, the quantities and are automaticallyassigned by STAR-CD as scalar numbers 1 and 2. For the multiple-fuelmodel, the quantities , , and become scalar numbers 1 to 4,respectively.

2. Any additional variables are assigned to further scalars, beginning with scalar

CH4 1.5 O2 CO 2H2O r[ ]+→+

CO 0.5 O2 CO2→+

H2O O2 H2O

f g f

f p g f f s gξ

Page 197: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Setting Up Chemical Reaction Schemes

Version 4.02 8-19

number 3 (single-fuel) or 5 (multiple-fuel). This can be confirmed bydisplaying a STAR-GUIde panel that contains a Scalar list (for example,“Initialisation” in the Additional Scalars folder).

3. In adiabatic PPDF applications:

(a) Remember that only the quantities given in item 1 above are calculatedfrom transport equations. Temperature, density and all other variables arecalculated internally. However, if any additional non-reacting scalars aredefined (see “Setting Up Chemical Reaction Schemes”, Step 4) these aresolved in the normal way.

(b) pro-STAR provides a reminder that density is no longer calculated by oneof the normal options. Thus the density setting in the “MolecularProperties” panel is automatically changed to read PPDF.

(c) Polynomial coefficients should be supplied in terms of molar fractions(kmol/kmol). However, scalar concentrations for initial and boundaryconditions should be specified as mass fractions.

(d) If the molecular weights of all scalar species are correctly specified,STAR will output the calculated species concentrations in terms of massfractions. However, if all species molecular weights are assigned the samevalue, the output will be in terms of species mole fractions.

4. In non-adiabatic PPDF applications, check the information displayed by theSTAR-GUIde interface to ensure that:

(a) Option Active is selected from the Influence pop-up menu for allchemical species (“Molecular Properties (Scalar)” panel in folderAdditional Scalars)

(b) Option Chemico-Thermal is selected from the Enthalpy pop-up menu(“Thermal Models” panel in folder Liquids and Gases)

(c) The Ideal-f(T,P) option is used for density (see topic “Density”)(d) The Polynomial option is used for specific heat (see topic “Specific

Heat”)(e) The scalar species concentrations are specified in terms of mass fractions

5. If the PDF is to be calculated by numerical integration, a number of controlparameters should be specified. These are illustrated in the Figure below:

Page 198: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Chemical Reaction Schemes

8-20 Version 4.02

Figure 8-1 Control parameters for PDF integration

The quantities shown in Figure 8-1 are defined as follows:

(a) — stoichiometric mass fraction(b) — mixture fraction points. This is the total number of locations

where chemical equilibrium calculations are performed.(c) MF — multiplying factor. This is the number of points added between

any two adjacent points, such as and . These extra points areused for improving the resolution of the calculation and their values areextrapolated from those at and . The total number of points Ntused in the integration is given by

. (8-2)

(d) — integration partition. This parameter represents the percentage ofpoints used to resolve the region between 0 and in the mixture fractionspace, i.e. the number of points in this region is given by

6. When using the laminar flamelet model, the following points should be bornein mind:

(a) Each flamelet library refers to a different strain rate. A typical examplemight be to have 6 flamelet libraries at strain rates of 0, 25, 50, 200, 400and 1000 s-1.

(b) Calculating flamelet libraries may be very time consuming. Therefore,when creating a new library, you should consider restarting thecalculation from the nearest available strain rate wherever possible.However, if the difference in strain rate is quite large and convergencebecomes difficult, it will be necessary to specify a new set of initialconditions and start again.

(c) STAR-CD provides an option for either specifying the inlet strain rate or

0

φ

f

MF

N1 N2 fs Ni Ni+1 NF

1

× × ×

}

f sNF

Ni Ni 1+

Ni Ni 1+

Nt MF 1+( ) NF 1–( )× 1+=

PFf s

PF 100⁄( ) Nt

Page 199: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Setting Up Chemical Reaction Schemes

Version 4.02 8-21

calculating it via a built-in code. For simplified reaction mechanisms, trythe first alternative combined with the restart option from a previouslyconverged strain rate. For more complex mechanisms, you may want totry the second alternative, check what strain rate the code calculates, andthen change the initial conditions accordingly. When the initial conditionsare sufficiently close to the desired strain rate, you may be able to selectthe first alternative with a restart option to achieve a solution.

(d) The results of each flamelet library calculation are printed out in aseparate output panel. You should always inspect that panel to ensure thedisplayed values are reasonable.

(e) If your problem setup contains multiple reaction scheme definitions, anylaminar flamelet model(s) should appear at the top of the reaction schemelist.

Useful points for complex chemistry models

1. The distinction between premixed, partially premixed and unpremixedcombustion made in the pro-STAR GUI is irrelevant for complex chemistrymodels, since transport equations are solved for all species (or one of them iscalculated as ). Hence, this model is available for all the abovereaction types.

2. The calculation of reaction rates can be very time-consuming. Users maytherefore specify, via Constant 173, a temperature limit below which reactionrates will not be calculated. The default value of this limit is 300 K but may bere-set as necessary.

3. The steady-state complex chemistry solver employs an internal sub-timestepwhose default value is 10–5. Users may change this value via Constant 154.Normally, a very small sub-timestep value will result in the calculation oflarge reaction rates, which could in turn make the solution of the steady-statetransport equations unstable. On the other hand, if the value is too large, thechemistry solver will become very time-consuming.

4. For very stiff problems, the maximum number of sub-timesteps may need tobe increased beyond its default value, currently set at 500. This is done viaConstant 192. Users can also change the chemistry solver’s relative andabsolute convergence tolerance via Constants 123 and 124, respectively. Thedefault values for these are set at 10–4 and 10–10, respectively.

5. There is a balance between robustness and convergence rate. The latter maybe increased by higher values of the species under-relaxation factor, but usersshould be careful that the stability of the solution is not sacrificed at the sametime.

6. For steady-state cases, it is recommended that the initial species distributionshould correspond to a non-combustible mixture, such as air.

Useful points for ignition models

1. Shell and 4-step ignition models: Option Use Heat of Reaction in the“Reaction System” STAR GUIde panel is valid only when thepro-STAR-defined specific heat polynomial coefficients are used. When thereaction is exothermic, the heat of reaction value is negative. For an

1 ΣYi–

Page 200: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Advanced I.C. Engine Models

8-22 Version 4.02

endothermic reaction, the value is positive.

2. CFM ignition model: In problems where only a part of the solution domain isbeing simulated, you need to specify (via Constant 142) a geometrical factorwhose value is the fraction of the flame kernel area in the partial (simulation)domain relative to the entire domain. For example, for a wedge-shapedsolution domain in a cylindrical system and with the ignition point lying onthe axis, this value should be , where is the angular extent of thewedge. The default value of the above factor is 1.

Setting Up Advanced I.C. Engine Models

The notes below describe the set up of combustion simulations that employ theCFM, ECFM, ECFM-3Z or Level Set models. Note that:

• The GUI facilities presented are available only when running the Auto Meshversion of pro-STAR (prostar -amm).

• Use of ECFM, ECFM-3Z and their attendant ignition models requires aspecial licence obtainable from CD-adapco.

Note also that if you are resuming from an .mdl file in which a combustion modelhas been defined, it is important to delete this model, its submodels (such as NOx,Soot and Knock) and the associated scalars before selecting an alternative model.This requires issuing the following pro-STAR commands (or performing theequivalent GUI operations):

SCDEL,ALL — delete all scalarsSOOT,n,OFF — turn off soot modelling, where n stands for everycurently-defined chemical scheme numberNOX,n,OFF — turn off Nox modellingKNOCK,n,OFF — turn off knock modellingCRDEL,ALL — delete all chemical reaction schemesCHSCHEME,m,NONE — remove chemical scheme associations with

STAR domains (streams), where m stands for every currently-defineddomain

CHER,OFF — turn off chemical reaction calculations

To set up a case:

Step 1

In the Select Analysis Features panel, select all general features required for anengine combustion simulation (these parameters will be selected in advance if thees-ice engine simulation expert system is used):

• Time Domain > Transient (select option Angle and enter values for RPMand Initial Position)

• Reacting Flow > Chemical Reaction• Multi-Phase Treatment > Lagrangian Multi-phase (if modelling sprays)

Step 2

Select folder Thermophysical Models and Properties > Liquid and Gases and thenenter appropriate values in the following panels:

θ∆ 360⁄ θ∆

Page 201: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Setting Up Advanced I.C. Engine Models

Version 4.02 8-23

• Molecular Properties• Turbulence Models• Thermal Models (select Temperature Calculation On and then choose

options Conservation > Static Enthalpy and Enthalpy > Thermal)• Initialization• Monitoring and Reference Data• Buoyancy (where applicable)

Step 3

At this stage, the special IC set-up panel can be used, accessed by selectingAdvanced > IC Setup from pro-STAR’s main menu. The panel shown below willthen pop up:

• The panel will initially display the Analysis setup sub-panel. Check that theCombustion option is selected and then choose the type of combustion modelrequired from the drop-down menu underneath.

• Fuel parameters:Select the desired fuel from the second drop-down menu. Depending on themodel type, i.e. spark or compression, the panel will display a default octaneor cetane number in the text box on the right. You should replace this with anappropriate value if necessary. The corresponding chemical reaction formulawill also be displayed below the fuel name.

Step 4

Click the Combustion tab button on the left to display the Combustion sub-panel.Its contents depend on the combustion model selected, as described below.

Page 202: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Advanced I.C. Engine Models

8-24 Version 4.02

Coherent Flame model (CFM)

The chemical reaction for the chosen fuel is displayed at the top.

• Modelling parameters — enter values for coefficients α and β to be used inthe source term of the Σ equation (see equation (11-10) in the Methodologyvolume).

• Ignition parameters:

(a) In the Spark time box, input the time (in degrees crank angle or inseconds) at which the spark is to be discharged

(b) Enter the ignition Location in terms of X, Y, Z coordinates relative to

Page 203: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Setting Up Advanced I.C. Engine Models

Version 4.02 8-25

coordinate system no. 1 (in model units)(c) In the Delay box, enter the time delay (or transition time t1 , see Chapter

11, “Ignition treatment for the CFM-ITNFS model” in the Methodologyvolume)

(d) In the Kernel diameter box, enter the appropriate value in mm

• Enter the Mixture fraction for the premixed air-fuel mixture• Specify whether exhaust gas recirculation (EGR) should be On or Off• Specify whether emissions (NOx) and/or Knock is to be modelled by selecting

On or Off from their respective drop-down menus.

Apart from the above input, the panel will also execute commands to effect thefollowing changes (which will overwrite any property settings specified previouslyin pro-STAR’s Molecular Properties panel):

• Set up appropriate property definitions for material #1 and change themolecular viscosity setting to MultiComponent

• Define the specific heat setting of the background fluid as Polynomial• Create chemical species scalars and assign appropriate physical properties to

them, imported from the built-in property database props.dbs

Note that there is an alternative method of setting up a CFM model usingpro-STAR’s Chemical Reactions panels in STAR GUIde. The main differencebetween the two is that

• pro-STAR specifies the ignition location in terms of the centroid of an‘ignition cell’

• the IC Setup panel specifies the location in terms of its X, Y, Z coordinatesand passes them on to STAR via an Extended Data segment delimited by thekeywords BEGIN SPARK_DATA and END SPARK_DATA and appended tothe .prob file.

It is most important that the two approaches should not be mixed.

Page 204: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Advanced I.C. Engine Models

8-26 Version 4.02

Extended Coherent Flame model (ECFM)

The chemical reaction for the chosen fuel is displayed at the top.

• Modelling parameters — enter values for coefficients α and β to be used inthe source term of the σ equation (see equation (11-90) in the Methodologyvolume).

• The PSDF Moments soot model may be used by selecting On from the MaussSoot Model drop-down menu (see “Soot Modelling” on page 8-39)

Page 205: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Setting Up Advanced I.C. Engine Models

Version 4.02 8-27

• Ignition parameters — there are two ignition model choices:

(a) Standard:

i) In the Spark time box, enter the time (in degrees crank angle or inseconds) at which the spark is to be discharged

ii) Enter the ignition Location in terms of X, Y, Z coordinates relativeto coordinate system no. 1 (in model units)

(a) Aktim — see “The Arc and Kernel Tracking ignition model (AKTIM)”on page 8-33

• Enter a Sector angle value if you want to perform a “Sector Mesh” analysis.

The panel also executes additional commands to effect the following changes:

• Turn on the Transient setting and associate the ECFM chemical scheme withmaterial #1

• Define 17 scalars and their material properties

Page 206: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Advanced I.C. Engine Models

8-28 Version 4.02

Extended Coherent Flame model 3Z (ECFM-3Z) — spark ignition

The chemical reaction for the chosen fuel is displayed at the top.

• Modelling parameters — enter values for coefficients α and β to be used inthe source term of the σ equation (see equation (11-90) in the Methodologyvolume).

• Select the Multiple Cycles option if you wish to run a simulation over multipleengine cycles

Page 207: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Setting Up Advanced I.C. Engine Models

Version 4.02 8-29

• The PSDF Moments soot model may be used by selecting On from the MaussSoot Model drop-down menu (see “Soot Modelling” on page 8-39)

• Parameter Start of ECFM-3Z is the time at which fuel / air mixing andcombustion will start to be calculated. The user should set this time equal tothe time when fuel injection starts, in degrees crank angle or seconds.

• Ignition parameters — there are two ignition model choices:

(a) Standard:

i) In the Spark time box, enter the time (in degrees crank angle or inseconds) at which the spark is to be discharged

ii) Enter the ignition Location in terms of X, Y, Z coordinates relativeto coordinate system no. 1 (in model units)

(b) Aktim — see “The Arc and Kernel Tracking ignition model (AKTIM)”on page 8-33

• Multiple ignition locations — the number of locations can beincreased/decreased by clicking the up/down # location arrows. Coordinatesfor each ignition location can be entered by selecting the particular locationfrom the drop-down menu.

• Specify whether Knock is to be modelled by selecting On or Off from thedrop-down menu

• Enter a Sector angle value if you want to perform a “Sector Mesh” analysis.

In addition, the panel defines 25 appropriate scalars and their material properties.

Extended Coherent Flame model 3Z (ECFM-3Z) — compression ignition

The chemical reaction for the chosen fuel is displayed at the top.

• Modelling parameters — enter values for coefficients α and β to be used inthe source term of the σ equation (see equation (11-90) in the Methodologyvolume).

• Select the Multiple Cycles option if you wish to run a simulation over multipleengine cycles

• The PSDF Moments soot model may be used by selecting On from the MaussSoot Model drop-down menu (see “Soot Modelling” on page 8-39)

Page 208: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Advanced I.C. Engine Models

8-30 Version 4.02

• Parameter Start of ECFM-3Z is the time at which fuel / air mixing andcombustion will start to be calculated. The user should set this time equal tothe time when fuel injection starts, in degrees crank angle or seconds.

• There is an additional option to turn On the Tabulated Double-DelayAutoignition Model (see “The Double-Delay autoignition model” on page8-37).

Useful points for ECFM models

1. The information entered in the ECFM and ECFM-3Z panels is passed on toSTAR via an Extended Data segment delimited by the keywords BEGINECFM_DATA and END ECFM_DATA. This segment is created automaticallyand may be inspected by selecting Utilities > Extended Data from the mainpro-STAR window’s menu bar but the user does not need to add any furtherinformation to it. The segment is appended to the end of the .prob file whenthe later is saved at the end of the current pro-STAR session.

2. All ECFM models must be run in double precision.3. Although the list of fuels for use in these models is limited, users can supply

their own fuel definition by selecting option User Defined from the fuelselection drop-down menu and then specifying the number of C and H atoms.The specific heat ‘cp’ should be changed accordingly.

4. ECFM models cannot be used in conjunction with the k-ω or theSpalart-Allmaras turbulence models.

5. Additional scalars may be added but they must be Inactive.6. It is important to remember that species N, O, H, OH cannot be present as part

of EGR gases.7. Model parameters should be specified via the panels described in this

document. Users should not attempt to supply any parameters via the standardpro-STAR STAR GUIde panels.

8. If ECFM models are applied in materials other than no. 1, make sure that thesolution method for scalars in these materials is the same as for material 1.The correct setting is Transport, except for scalar RVB (the progress variable‘c’) which should be Internal.

9. The ECFM model is currently emulated by the ECFM-3Z model. Tracers forspecies NO, CO, H2 and SOOT are turned off, along with O2UM and FUM,and the corresponding mass fractions are set to 0.0 (i.e. the system is always“mixed”). Comparisons with results from earlier STAR-CD implementationswill show slightly differences as different sub-models for the post-flameregime are used in the current version.

10. For unburnt gases, the initial mass fractions of fuel and oxygen tracers (TF,TO2) plus any other applicable tracers (TCO, TH2, TNO, TSOOT) must beset equal to the corresponding initial mass fractions of species Fuel and O2plus, if applicable, species CO, SOOT, NO, H2.

Page 209: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Setting Up Advanced I.C. Engine Models

Version 4.02 8-31

Level Set model

The chemical reaction for the chosen fuel is displayed at the top.

• Re-initialization method — select an option from the adjacent pop-up menu(see Chapter 9, “Re-initialisation” in the Supplementary Notes volume)

• Select the Multiple Cycles option if you wish to run a simulation over multipleengine cycles

• Ignition parameters

(a) In the Spark time box, enter the time (in degrees crank angle or inseconds) at which the spark is to be discharged

(b) Enter the ignition kernel Location in terms of X, Y, Z coordinates relativeto coordinate system no. 1 (in model units) and ignition kernel Radius (inmetres)

(c) Enter the ignition Duration (in degrees crank angle or in seconds)

• Multiple ignition kernel locations — the number of locations can beincreased/decreased by clicking the up/down # location arrows. Data for eachignition kernel can be entered by selecting the particular location from thedrop-down menu.

The information entered in the Level Set panel is passed on to STAR via anExtended Data segment delimited by the keywords BEGIN LEVELSETDATA andEND LEVELSETDATA. This segment is created automatically and may beinspected by selecting Utilities > Extended Data from the main pro-STARwindow’s menu bar. The user does not normally need to add any further informationto it unless advanced features of the model need to be implemented, as described inChapter 9 of the Supplementary Notes volume.

The Extended Data segment is appended to the end of the .prob file when thelater is saved at the end of the current pro-STAR session.

Page 210: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Advanced I.C. Engine Models

8-32 Version 4.02

Step 5

Click the Write data tab button on the left to display the Write data sub-panel,shown below.

Write Data sub-panel

In this panel:

• Click Save parameters to save the combustion parameters to a file calledstar.ics. This file is important as it contains combustion data and shouldbe kept together with the .mdl file. The file name can be changed ifnecessary.

• Click Write and close to write the problem settings to a model (.mdl) fileand close the panel

• Click Close to close the panel without writing anything to the .mdl file

Step 6

Initialize certain scalars, as shown below. Only those scalars included in a listshould be initialised; all others should have 0 as their initial value.

• For ECFM:

(a) Fuel → set the fuel initial mass fraction(b) O2 → set the O2 initial mass fraction(c) CO2 → set the CO2 initial mass fraction(d) H2O → set the H2O initial mass fraction(e) N2 → set the N2 initial mass fraction(f) TF → set the unburnt fuel initial mass fraction(g) TO2 → set the unburnt O2 initial mass fraction

• For ECFM-3Z:

(a) Fuel → set the fuel initial mass fraction(b) O2 → set the O2 initial mass fraction(c) CO2 → set the CO2 initial mass fraction(d) H2O → set the H2O initial mass fraction(e) N2 → set the N2 initial mass fraction

Page 211: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Setting Up Advanced I.C. Engine Models

Version 4.02 8-33

(f) TF → set the unburnt fuel initial mass fraction(g) TO2 → set the unburnt O2 initial mass fraction(h) TCO → set the unburnt CO initial mass fraction(i) TH2 → set the unburnt H2 initial mass fraction(j) TNO → set the unburnt NO initial mass fraction(k) TSOOT → set the unburnt soot initial mass fraction(l) FUM → set the initial mass fraction of the Unmixed Fuel (default value is

0)(m) O2UM → set the initial mass fraction of the Unmixed Oxygen

Step 7

Define the time step size and any load steps in the appropriate transient settingspanel (where applicable).

The Arc and Kernel Tracking ignition model (AKTIM)

AKTIM may be used only with one of the ECFM options, as follows:

• Select the required ECFM model• Choose option Aktim from the Ignition menu• In the Spark time box, enter the time (in degrees crank angle or in seconds) at

which the spark is to be discharged• Enter the ignition Location in terms of X, Y, Z coordinates relative to

coordinate system no. 1 (in model units)• If the electrodes are represented as distinct entities in the mesh, select option

Regions from the Electrode Model menu and input the boundary regionnumbers corresponding to the anode and cathode. Otherwise, select Area andtemperature from the Electrode Model menu and input the surface area andtemperature of the anode and cathode. The two alternatives are illustratedbelow.

• Specify the Diameter of the cathode and anode electrodes• Input values for parameters , L , R in the Secondary Circuit section of

the panel• Multiple ignition locations — the number of locations can be increased/

decreased by clicking the up/down # location arrows. Coordinates for eachignition location can be entered by selecting the particular location from thedrop-down menu.

E2 tSI( )

Page 212: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Advanced I.C. Engine Models

8-34 Version 4.02

Page 213: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Setting Up Advanced I.C. Engine Models

Version 4.02 8-35

Useful points for the AKTIM model

Use of Extended DataThe information contained in the above panels is passed on to STAR via the ECFMExtended Data segment (see “Useful points for ECFM models” on page 8-30). Thecontents of this segment do not need to be altered by the user except in the case oftwo-dimensional (x-y) problems. For such problems:

• Select Utilities > Extended Data from the main pro-STAR window’s menu

Page 214: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Advanced I.C. Engine Models

8-36 Version 4.02

bar to display the current ECFM_DATA segment in the Extended Data panel.• Enter a new line containing the keyword TWODS anywhere within the

segment (typically at the end)• Save and then Close the Extended Data panel

Entering the above keyword enforces the turbulent fluctuation contribution to thecalculation of the flame kernels’ positions in the z-direction to be zero.

Post and track dataTwo new files are written by STAR when AKTIM is in use:

1. casename.strk, the track file for spark particles2. casename.ktrk, the track file for flame kernel particles

Track filesThe .strk and .ktrk files can be used in the same way as .trk files for droplets(see Chapter 7, “The Particle Track File” in the Post-Processing User Guide). Theycan be loaded via the Plot Droplets/Particle Tracks panel by choosing option TrackFile in the Load Droplet Data section and then specifying the appropriate file nameand extension. Note that:

• This action will erase all current droplet track data• Only option Constant is supported in the Droplet Radius menu• Only option Color is supported in the Fill Color menu

Post filesThe .ccm file contains all solution data and can be used to plot spark particles andflame kernel particles. These can be loaded into pro-STAR via commandGETD,POST,SPARK for spark particles orGETD,POST,FLAME for flame kernelparticles. Note that:

• After the .ccm file is loaded, the wrinkling factor, progress variable, massand burnt gas mass in the flame kernel particle can be plotted by selectingDiameter, Temperature, Mass and Count, respectively, from the Fill Colormenu in STAR GUIde’s Plot Droplets/Particle Tracks panel

• No other options in the Fill Color menu are supported

There are no files equivalent to .pstt or .ccm_timestep for the spark andflame kernel particles.

HPC issuesFor HPC calculations, the electrodes must be meshed or specified in only oneprocessor domain. In addition, spark particles will not be permitted to pass betweendifferent processor domains.

Mesh qualityIt is important to use good quality meshes when the electrodes are resolved. This isbecause the source terms might be very high during the ignition process. Thus,localized and big numerical errors due to poor quality meshes may lead to wrongresults, instabilities and/or divergences.

Page 215: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Setting Up Advanced I.C. Engine Models

Version 4.02 8-37

The Double-Delay autoignition model

This model may be employed by selecting ECFM-3Z, compression and thenturning On the Tabulated Double-Delay Autoignition Model option, as shownbelow. A new scalar YIG2 is created to track the primary autoignition progress.Scalar YIG monitors the progress of the main autoignition.

STAR requires three types of data for this model:

1. The primary ignition delay time tdelay12. The secondary ignition delay time tdelay23. The burnt fuel mass fraction ffrac

Each of the above is tabulated at nT values of temperature T, nP values of pressurep, nE values of equivalence ratio E and nX values of residual gas mole fraction X.Hence, a 4-dimensional array structure is employed for each data item.

By default, the model uses ignition delay data read from pre-computed tables.Users may also use their own data by storing them in three separate text files calleddelay1.dat, delay2.dat and ffrac.dat for the primary delay, secondarydelay and burnt fuel mass fraction, respectively. The files must be placed in the caseworking directory.

User data creation procedureThe following steps are necessary to create user-generated data files:

• Select Utilities > Extended Data from the main pro-STAR window’s menubar to display the current ECFM_DATA segment in the Extended Data panel.

• Enter a new line containing the keyword LU2DATA in the line after LAUTO2• Save and then Close the Extended Data panel• Create the three data files described above in a format suitable for STAR

input. The Fortran program listed below shows how these files should bewritten.

Program Example_UserDatacc nT, nP, nE, nX, Tmin, Tstep, p, E, X, tdelay1, tdelay2, ffrac are user input data.c Tmin, Tstep are the minimum temperature and the temperature step (K) in the table,c respectively, so thatc T(1)=Tmin, T(2)=T(1)+Tstep, T(3)=T(2)+Tstep, ...c p(1),...,p(nP) are the nP pressure (bars) points in the table in ascending order.

Page 216: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Setting Up Advanced I.C. Engine Models

8-38 Version 4.02

c E(1),...,E(nE) are the nE equivalence ratio points in the table in ascending order.c X(1),...,X(nX) are the nX residual gases points in the table in ascending order.c tdelay1(iT,iP,iE,iX), tdelay2(iT,iP,iE,iX), ffrac(iT,iP,iE,iX) are user-definedc 4-dimensional arrays for the primary delay, secondary delay and burnt fuel massc fraction.cc... File "delay1.dat"c Double Precision Tmin,Tstep,p,E,X,tdelay1,tdelay2,ffrac Dimension p(nP), E(nE), X(nX) Dimension tdelay1(nT,nP,nE,nX) Dimension tdelay2(nT,nP,nE,nX) Dimension ffrac(nT,nP,nE,nX)c open(iunit,file=’delay1.dat’) write(iunit,*) nT, nP, nE, nX write(iunit,*) Tmin, Tstep do ip=1,nP write(iunit,*) p(ip) end do do ie=1,nE write(iunit,*) E(ie) end do do ix=1,nX write(iunit,*) X(ix) end do do ix=1,nX do ie=1,nE do ip=1,nP do it=1,nT write(iunit,*) tdelay1(it,ip,ie,ix) end do end do end do end do close(iunit)

cc... File "delay2.dat"c open(iunit,file=’delay2.dat’) do ix=1,nX do ie=1,nE do ip=1,nP do it=1,nT write(iunit,*)tdelay2(it,ip,ie,ix) end do end do end do end do close(iunit)cc... File "ffrac.dat"c open(iunit,file=’ffrac.dat’) do ix=1,nX do ie=1,nE do ip=1,nP do it=1,nT write(iunit,*)ffrac(it,ip,ie,ix) end do end do end do end do close(iunit)c end

Note that if any of the above files is not present, STAR will abort the simulationwith warning messages.

For verification purposes, STAR will also output three text files at the beginningof the simulation containing the parameters and data specified by the user. The filesare called check_data1 for the primary delay, check_data2 for the

Page 217: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

NOx Modelling

Version 4.02 8-39

secondary delay and check_dataf for the burnt fuel mass fraction and arewritten into the working directory for sequential runs or into the first processor’sdirectory for HPC runs.

NOx Modelling

NOx concentration is usually low compared to other species in combustion systems.As a result, it is generally agreed that NOx chemistry has negligible influence andcan be decoupled from the main combustion and flow field calculations.

The recommended procedure for performing a NOx analysis is as follows:

Step 1

Set up the combustion model as usual.

Step 2

In the Chemical Reactions folder of STAR GUIde, open the “Emission” panel andthen go the “NOx” section. Select option On from the NOx Model menu to activateSTAR-CD’s built-in NOx subroutines.

Step 3

Turn on the appropriate NOx production mechanism from the Thermal, Prompt orFuel menus (see Chapter 10, “NOx Formation” in the Methodology volume).Option User in any of these menus enables you to perform the necessarycalculations via subroutine NOXUSR. If option On is selected for Thermal NOx,specify values for the required constants as explained in the on-line help topic for“NOx”.

Step 4

Check that pro-STAR has created an extra passive scalar variable called NO, byopening the “Molecular Properties (Scalar)” panel in the Additional Scalars folderand inspecting the currently defined scalars.

If the problem requires the prediction of fuel NOx (this is only applicable tonitrogen-containing fuels, e.g. coal), check that an additional passive scalar calledHCN has also been created.

Step 5

If your model provides for the calculation of OH and H mass fractions, their valueswill be used in equation (10-84) of the Methodology volume to implement theextended Zeldovich mechanism.

Step 6

For steady-state problems, make sure that a sufficient number of iterations has beenperformed for the solution of NO and (if present) HCN to have converged.

Soot Modelling

The Flamelet Library soot model is applicable only to unpremixed and partiallypremixed reactions and is activated via the Emission panel’s “Soot” section inSTAR GUIde. The only user input required is four scaling factors, see equation(10-120) and (10-121), that determine the magnitude of the contribution from eachsource term.

For example, a decrease in the value of the scaling factors for positive source

Page 218: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Soot Modelling

8-40 Version 4.02

terms (surface growth and particle inception) results in slower formation of soot. Indiffusion flames, this can shift the point of maximum soot volume fraction furtherdownstream.

A typical range for these factors is 0.5 — 10.0 and their default value is 1.The PSDF Moments soot model may be used in conjunction with any ECFMcombustion model (see “Setting Up Advanced I.C. Engine Models”) and isaccessed via the GUI facilities presented when running the Auto Mesh version ofpro-STAR (prostar -amm). The relevant panel is shown below:

To use this model:

• Select the required ECFM model• Select option On from the Mauss Soot Model menu• Choose the number of Moments to be solved for (0, 2, 3, or 4). The effect of

EGR (if present) will be taken into account. If 0 is selected, “The FlameletLibrary method” described in Chapter 10 of the Methodology volume will beused.

• Enter scaling factors (see “The method of moments” on page 10-29 of theMethodolgy volume for definitions) for the following quantities:

(a) Surface Growth(b) Fragmentation(c) Particle Inception(d) Oxidation Rate

Use of this method with models other than ECFM is possible only within thepro-STAR environment. The steps required for set-up in this case are as follows:

1. Select a combustion model that allows Soot to be employed2. Select option Soot on in the Emissions panel3. If no moments need to be solved, bypass steps 4, 5 and 64. Define 2, 3 or 4 additional passive scalars with names M0, M1, M2, M3,

depending on how many moments are to be solved for. These represent thequantities with the r-th moment and units of [mol/m3]. STAR willMr ρ⁄ Mr

Page 219: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Coal Combustion Modelling

Version 4.02 8-41

identify them as the moments for the soot model.5. Select option Transport in the Analysis Control > Solution Control >

Equation Behaviour > Additional Scalars panel as the method of solution forthese scalars

6. Deactivate the SOOT scalar, as in this case the soot mass fraction is obtainedfrom the soot PSDF moments solution

7. If EGR is present (up to 40% in concentration), then:

(a) Define 3 new active scalars with names EGR_CO2, EGR_N2, EGR_H2O.These distinguish the CO2, N2, H2O arising from the EGR from the CO2,N2, H2O arising from the combustion

(b) Assign the same molecular properties to them as for scalars CO2, N2,H2O in the Molecular Properties (Scalar) panel. in addition, theproperties in the Binary Properties panel should be the same as for scalarsCO2, N2, H2O.

(c) Select option Transport in the Analysis Control > Solution Control >Equation Behaviour > Additional Scalars panel as the method of solutionof the EGR scalars.

Note that EGR can be set up for soot cases even if no moments are solved for.The EGR for soot calculation is not supported for PPDF models.

If at least two moments are solved for, the following (mass averaged) data will beproduced at each time-step:Soot Volume, SootMass, Number Density, Mean Diameter, Dispersion SizeDistribution, Variance of the Size Distribution, Surface DensityThese are added after the scalar data in the .spd file (see Chapter 9, “EngineCombustion Data Files” in this volume).

Coal Combustion Modelling

Coal combustion models involve two-phase flow with complex solid and gas phasechemical reactions. To reduce CPU time, it is recommended to run such asimulation as a two-stage process using the STAR GUIde system. Thus, initially theproblem is run isothermally. Then, once a reasonably converged solution isobtained, the problem is re-run with coal combustion turned on. An outline of thesteps involved and recommendations on model set-up at each stage of the processis given below:

Stage 1

Run the model as an isothermal (non-reacting) problem and obtain a convergedsolution which effectively serves as an initial condition for the flow field.

Step 1

Generate a mesh for the problem as usual and check that the steady-state analysismode has been chosen in the “Select Analysis Features” panel.

Step 2

Check that the temperature calculation is switched on in the “Thermal Models”panel (Liquids and Gases sub-folder) and select an appropriate turbulence model inthe “Turbulence Models” panel.

Page 220: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Coal Combustion Modelling

8-42 Version 4.02

Step 3

Define all boundaries and set up boundary conditions throughout, includingappropriate temperature distributions at inlet boundaries.

Step 4

Run the case until a reasonable flow field is established (see Note 1 below).

Stage 2

Turn on coal combustion and generate the final solution as follows:

Step 1

Go to the “Select Analysis Features” panel and choose option Coal Combustionfrom the Reacting Flow menu and Lagrangian Multi-Phase from the Multi-PhaseTreatment menu. Click Apply. The Coal Combustion sub-folder will appear in theNavCenter tree, nested inside folders Thermophysical Models and Properties >Reacting Flow. An additional sub-folder, Lagrangian Multi-Phase, will also openin the NavCenter tree. At the same time, pro-STAR will set up your modelautomatically for this type of analysis, using the ‘Constant Rate’, ‘1st-Order Effect’and ‘Mixed-is-burnt’ sub-models as defaults for volatiles, char and gas combustion,respectively.

Step 2

If radiation effects are to be modelled, go to the “Thermal Options” panel in folderThermophysical Models and Properties and select the appropriate radiation model,as described in Chapter 7 of the CCM User Guide (see also Note 2 below).

Step 3

Go to the Coal Combustion sub-folder and supply or modify data in each of itspanels in turn:

• In the “Coal Composition” panel, enter coal composition data and clickApply. The data supplied in this panel can be stored in a file calledcoal.dbs by entering a coal name and clicking Save to D/B. Alternatively,you can read the coal composition from an existing file by clicking OpenD/B.

• Data entered in the Proximate analysis tab should be supplied on an airdried basis.

• Data in the Ultimate analysis tab should be supplied on a ash-free basis,where C + H + O + N + Chlorine (Cl) + Sulphur (S) = 1. The Cl and Scomponents are then assumed to be ash. If Cl and S need to be included inthe calculations, these components can be modelled separately via usersubroutine PARUSR at a later point. Details of this method are given inChapter 3 of the Supplementary Notes volume describing coal blendmodelling. This chapter also covers all other aspects of this type ofmodel, such as specifying the components and reaction rates for thedifferent coals in the blend.

• Supply the coal Q factor, which is an adjustment for volatile matter, in theMiscellaneous tab. Studies have shown that under certain heatingconditions, a significantly higher amount of volatile matter can bedevolved than that measured by the standard proximate analysis test. This

Page 221: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Coal Combustion Modelling

Version 4.02 8-43

effect is accounted for by the Q factor which is defined by

(V*/VM) = Q (8-3)

where V* is the volatiles yield and VM the proximate analysis matter.• Also in the Miscellaneous tab, enter the net calorific value of the fuel and

the fraction of total nitrogen in the volatiles. Finally, choose the volatilesspecific heat option (see Note 3 below).

• In the “Sub Models” panel, select the desired models for volatiles, char andgas combustion.

• To speed up convergence, the Constant Rate scheme should be selectedinitially in the Volatiles tab. The initial devolatilisation temperatureshould be set to that of the primary inlet flow containing the coal particles(this will help with initialising the temperature field and instigatingignition). After the rest of the coal particle parameters have been set, theproblem should be run using an Initial Field Restart (panel “Analysis(Re)Start”) from the isothermal solution obtained in Stage 1 and run forseveral hundred iterations or until a reasonably stable solution is reached.The devolatilisation temperature should then be raised to a more realisticlevel (e.g. 550 K) and the model run once again using a StandardRestart until a stable solution is reached. The Single Step or2-Competing steps model should then be chosen. These require valuesfor pre-exponential factors and activation energy that should bedetermined experimentally or taken from the available literature (as is thecase with the default values used by STAR). The solution should then bere-run with a standard restart (see Notes 4 and 5 below regardingchanging parameters or submodels in this panel).

• In the Char tab, select one of the three char models available. Char ratescan be determined experimentally or taken from the literature.

• In the Gaseous Combustion tab, select either Mixed-is-Burnt (fastchemistry approach) or the 1-step or 2-step EBU models. When this isset, pro-STAR will create the appropriate scalars and select the transportor internal solution method for them, depending on the model chosen.Char oxidation products can be changed for specific gaseous combustionmodels using Constant 120, as explained in “Switches and constants forcoal modelling” below.

• In the “NOx/Radiation” panel, turn on the NOx generation and/or coalparticle radiation options, as required. Note that, if the latter is chosen, youshould already have set up your model for radiation calculations as describedin Chapter 7. Enter the particle emissivity value. The NOx model can beturned on near the end of the solution as it has only a small effect on theoverall flow field.

• In the “Control/Printout” panel, specify the required solution control andprintout parameters. It is sometimes necessary to initially reduce theunder-relaxation factor of the particle source term (to as low as 0.1) in orderto achieve a stable solution. The factor may be increased later on in thesolution. The iteration number at which particle source term averaging starts

Page 222: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Coal Combustion Modelling

8-44 Version 4.02

should be set to a high value to ensure a converged solution can be reached(see Note 6 below).

Step 4

Go to Chemical Reactions sub-folder and open the “Emission” panel. Turn on theappropriate NOx models, i.e. thermal, fuel and prompt NOx. Then go to the“Scheme Association” panel and click Apply to assign the chemical reactionschemes defined above to the current fluid domain.

Step 5

Go to the “Initialisation” panel (Additional Scalars sub-folder) and set up anappropriate initial mass fraction for the carrier fluid (e.g. for air YO2 = 0.233, YN2 =0.767).

Step 6

Go the “Lagrangian Multi-Phase” folder, check the settings for the Lagrangiantwo-phase modelling scheme and make any changes/additions necessary fordefining coal particle initial positions, entrance behaviour and physical properties(panel “Droplet Physical Models and Properties”):

• Turbulent dispersion can be turned on in the Global Physical Models tab topredict a realistic particle track behaviour.

• In the Droplet Properties tab, ensure that all values of Hfg in the ComponentProperties list are set to 0.

Step 7

Switch off the heat and mass transfer time scale calculation by going to the“Switches and Real Constants” panel (Other Controls sub-folder) and settingconstants C71 and C72 to 1.0.

Step 8

Go to the “Thermal Models” panel and check that options Static Enthalpy andChemico-Thermal have been selected for the enthalpy equation.

Step 9

Go to the “Scalar Boundaries” panel (Define Boundary Conditions folder) andadjust the scalar mass fractions at the inlet boundaries.

Step 10

Go to the “Analysis (Re)Start” panel (Analysis Preparation/Running folder) and setup the analysis as a restart run, beginning from the solution obtained in Stage 1.

Step 11

Run the case until the solution converges or reasonably small residuals areachieved.

Useful notes

1. If the coal model is turned off to run the case in non-reacting mode, it may benecessary to first turn off /delete the chemical scheme definition alreadyset-up in the “Scheme Definition” panel.

2. To avoid solution instabilities and reduce computer time in radiation cases, itis advisable to run the simulation for several hundred iterations with radiationturned off before switching it back on to complete the simulation.

Page 223: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Coal Combustion Modelling

Version 4.02 8-45

3. In the “Coal Composition” panel (Miscellaneous tab) you have three optionsfor setting the volatiles specific heat:

(a) Coal CV (the recommended option) uses the enthalpy of volatilescalculated from the heat balance of the coal combustion for both char andvolatiles.

(b) CH4 assumes that all volatiles are methane.(c) Mass Weighted considers the mixture of volatile components and

calculates the overall volatile enthalpy as the sum of the products of massfraction and enthalpy for each individual volatile component, i.e.

4. If you change any parameter in the “Coal Composition” panel, the chemicalreaction scheme is changed and therefore the gas combustion scheme in the“Sub Models” panel must be reset. When you re-apply the gas compositionscheme, this also resets the scalars involved. Therefore, you must

(a) re-apply the scheme association,(b) initialise the additional scalars for the background fluid,(c) reset Hfg = 0 for all components in the Lagrangian “Droplet Physical

Models and Properties” panel, and(d) define scalar boundary conditions for the inlet.

5. Accurate modelling can be achieved through input of appropriate values fordevolatilisation and char rates. Manipulating these values can increase thesolution accuracy, while changes in the turbulence models employed can leadto more accurate prediction of the flow aerodynamics.

6. The iteration number at which to begin source term averaging should be set toa high value so as to ensure that a stable initial flow field has been achieved(and also to economize on computer time expended). This number has adefault setting of 50 iterations and should be altered to a value suitable forestablishing a stable flow field. This may be done by setting Constant 24 tothe desired value.

7. When discretising the coal particle size distribution, it is important to includesome sub-5 micron particles. This enables a stable flame to be established inthe immediate vicinity of the burner inlets.

8. When starting the coal combustion calculations in Stage 2, it is important touse the constant rate devolatilisation option for all particles, and to make thedevolatilisation temperature equal to the particles’ initial temperature. This isthe numerical equivalent of ‘lighting up’ the combustion system in a real-lifesituation.

Switches and constants for coal modelling

It is sometimes advisable to define some of the following pro-STAR Constants andSwitches when setting up a coal model:

• Constant 24 — see Note 6 above• Constant 64 = 2 — constrain active scalar values to the range 0.0 — 1.0• Constant 71 = 1 — deactivates the mass transfer time scale• Constant 72 = 1 — deactivates the heat transfer time scale• Constant 82 — specifies the coal particle emissivity in radiation problems

H ΣYihi=

Page 224: Star CCm Guide

CHEMICAL REACTION AND COMBUSTION Chapter 8

Coal Combustion Modelling

8-46 Version 4.02

• Constant 88 — specifies the maximum coal particle temperature• Constant 89 — specifies the minimum carrier fluid temperature limit• Constant 90 — specifies the maximum carrier fluid temperature limit• Constant 120 — specifies special options for the char reaction, as follows:

(a) Constant 120 = 0 — use the default V3.26 settings(b) Constant 120 = 1 — the char reaction product is CO(c) Constant 120 = 2 — the char reaction products are CO and CO2, where

(8-4)

and the default values are A = 3.0×108 and T* = 30,193

• Constant 70 — used for changing the value of A in conjunction with Constant120

• Constant 74 — used for changing the value of T* in conjunction withConstant 120

• Switch 71 — specifies an implicit calculation of the source terms in theparticle energy equation (can improve algorithm stability)

Special settings for the Mixed-is-Burnt and Eddy Break-Up models

When Constant 120 is used, the following settings are also required depending onthe combustion model that has been chosen:

For Mixed-is-Burnt:

• Constant 120 = 0 — no extra scalars need to be defined; the product of thechar reaction is CO2

• Constant 120 = 1 — two extra scalars are needed, to be defined in theAdditional Scalars > Molecular Properties panel:

(a) MIX_CO — this is a passive scalar representing the CO mixture fractionand is to be solved by a transport equation. The latter is specified in panelAnalysis Controls > Solution Controls > Equation Behavior > AdditionalScalars panel by choosing option Transport from the Solution Methodmenu.

(b) CO — this is an active scalar to be solved algebraically. This is specifiedin panel Analysis Controls > Solution Controls > Equation Behavior >Additional Scalars panel by choosing option Internal from the SolutionMethod menu.

• Constant 120 = 2 — three extra scalars are needed, to be defined in theAdditional Scalars > Molecular Properties panel:

(a) MIX_CO — this is a passive scalar representing the CO mixture fractionand is to be solved by a transport equation. The latter is specified in panelAnalysis Controls > Solution Controls > Equation Behavior > AdditionalScalars panel by choosing option Transport from the Solution Methodmenu.

(b) MIX_CO2 — this is a passive scalar representing the CO2 mixturefraction and is to be solved by a transport equation. The latter is specified

YCOYCO2

------------ AT*–T

---------⎝ ⎠⎛ ⎞exp=

Page 225: Star CCm Guide

Chapter 8 CHEMICAL REACTION AND COMBUSTION

Coal Combustion Modelling

Version 4.02 8-47

in panel Analysis Controls > Solution Controls > Equation Behavior >Additional Scalars panel by choosing option Transport from theSolution Method menu.

(c) CO — this is an active scalar to be solved algebraically. This is specifiedin panel Analysis Controls > Solution Controls > Equation Behavior >Additional Scalars panel by choosing option Internal from the SolutionMethod menu.

For Eddy Break-Up:

One-step model — Constant 120 cannot be used because the char reaction productcan only be CO2

Two-step model

• Constant 120 = 0 — no extra scalars are needed; the char reaction product isCO

• Constant 120 = 2 — no extra scalars are needed; the char reaction productsare CO and CO2

Page 226: Star CCm Guide
Page 227: Star CCm Guide

Chapter 9 LAGRANGIAN MULTI-PHASE FLOW

Setting Up Lagrangian Multi-Phase Models

Version 4.02 9-1

Chapter 9 LAGRANGIAN MULTI-PHASE FLOWThe theory behind Lagrangian multi-phase problems and the manner ofimplementing it in STAR-CD is given in the Methodology volume, Chapter 12. Thepresent chapter contains an outline of the process to be followed when setting up aLagrangian multi-phase simulation, including details of the user input required andimportant points to bear in mind when setting up problems of this kind.

Setting Up Lagrangian Multi-Phase Models

Step 1

Go to panel Select Analysis Features in STAR GUIde and choose optionLagrangian Multi-Phase from the Multi-Phase Treatment menu. Click Apply.The Lagrangian Multi-Phase folder will appear in the NavCenter tree, containing anumber of panels that are appropriate to this type of analysis.

Step 2

In the first panel, “Droplet Controls”, set various solution control parameters (seethe on-line Help text for more details).The same panel also defines how droplet parcel initial conditions (entrancebehaviour and location) are to be specified. The available options are:

• Spray injection with atomization — use one of the built-in nozzle andatomisation models (see Chapter 12, “Nozzle flow models” and “Atomisationmodels” in the Methodology volume). These are especially useful in internalcombustion engine studies.

• Explicitly defined parcel injection — explicit (‘manual’) setting of allrequired quantities. This option also allows the use of distribution functionsfor the droplet diameters.

• User Subroutine — specify everything via a user subroutine

Step 3

The second panel, “Droplet Physical Models and Properties”, defines dispersedphase heat, mass and momentum transport mechanisms (including inter-droplet andwall collisions), plus droplet physical properties. Several different droplet typesmay coexist in your model, so properties are specified for each individual type.

Step 4

The folder’s remaining panels relate to splitting droplets into parcels for modellingpurposes and defining the latter’s entrance behaviour (initial velocities and entranceproperties). How this is done depends on the option chosen in Step 2; the folder willdisplay the appropriate panel for each choice:

1. Spray injection with atomization — opens a single panel, “Spray Injectionwith Atomization”, in which you specify the fuel mass flow rate entering thesolution domain through an injection nozzle. The liquid fuel is converted intodroplets whose injection velocity depends on the nozzle modelcharacteristics. In addition, a number of atomisation models are employed todetermine the distribution of droplet diameters and velocity directions on exitfrom the nozzle.

2. Explicitly defined parcel injection — opens the following two panels:

Page 228: Star CCm Guide

LAGRANGIAN MULTI-PHASE FLOW Chapter 9

Setting Up Lagrangian Multi-Phase Models

9-2 Version 4.02

(a) “Injection Definition” sets up parcel entrance conditions, in terms ofeither velocity and rotation components or nozzle parameters

(b) “Injection Points” defines parcel entrance locations

The association between conditions and locations is made by first dividing parcelsinto injection groups that share the same entrance conditions. All entrance locationsdefined subsequently are then assigned to one of these groups. The concept isillustrated by the example shown in Figure 9-1 below:

Figure 9-1 Illustration of terminology for explicitly defined parcel injection

3. User Subroutine — opens a single panel, “Droplet User Subroutine”, thatcalculates all parcel initial conditions through user coding

Injection Group 1

Set 1, 3pts

Set 2, 6pts

Injection Group 2 Injection Group 3

Set 2, 8pts

Set 1, 1pt

Set 1, 12 pts

Single Parcel

Injection Point

Injection Definition

Constant Diam.

Wi = –5 m/s

2 parcels/point

mT = 0.05 kg/s

Rosin-Ram PDF

Vi = 2 m/s

mT = 0.02 kg/s

3 parcels/point

Injection Definition

Normal PDF

Wi = 7 m/s

mT = 0.05 kg/s

1 parcel/point

Injection Definition

Droplet Type 1

Heat transfer ON

Properties of Heptane

Momentum ON

Droplet Type 2Momentum ON

Properties of Water

Heat transfer OFF

Injection Points

Set 1: Line, 3 pts

Set 2: Circle, 6 pts

Injection Points

Set 1: Single point

Set 2: Line, 8 pts

Injection Points

Set 1: Boundary,

12 pts

Page 229: Star CCm Guide

Chapter 9 LAGRANGIAN MULTI-PHASE FLOW

Setting Up Lagrangian Multi-Phase Models

Version 4.02 9-3

Note that the Spray injection and Explicitly defined options are mutuallyexclusive. Thus, if you change your mind about which method to use for specifyinginitial conditions, you will need to go back to panel “Droplet Controls”, pick theother method and overwrite the previous definitions. On the other hand, UserSubroutine may be used in conjunction with either of the above options, i.e. STARwill take the definitions supplied in subroutine DROICO into account as well as thespray or explicit definitions.

Step 5

Check the result of the parcel initialisation process graphically by displaying theparcels in the context of a plot of the domain into which they are launched, asillustrated in Figure 9-2:

Figure 9-2 Plot of droplet initial conditions

This is done by going to the Post-Processing folder, panel “Plot Droplets/ParticleTracks” and using the plotting facilities of the “Droplets” tab, as explained in theon-line Help text. Alternatively, choose Post > Get Droplet Data from the mainwindow menu bar to display the Load Droplet Data dialog shown below andperform the same function from there.

Page 230: Star CCm Guide

LAGRANGIAN MULTI-PHASE FLOW Chapter 9

Data Post-Processing

9-4 Version 4.02

Data Post-Processing

pro-STAR provides special facilities for visualising the results of a Lagrangianmulti-phase flow analysis. These facilities fall into the following two categories:

1. Static displays — these show the location of one or more droplets at a givenpoint in time. Alternatively, they may also be used to show successivepositions of a given droplet as it progresses through the solution domain. Thedroplets are represented by small circles, as shown in Figure 9-3. The circlesize and colour can be made to depend on a variety of local droplet properties.

Figure 9-3 Static display illustration

2. Trajectory displays — these show droplet tracks, either as continuoustrajectories or as animated streaks, whose rate of progress through thesolution domain can be controlled by the user, as illustrated in Figure 9-4.

Page 231: Star CCm Guide

Chapter 9 LAGRANGIAN MULTI-PHASE FLOW

Data Post-Processing

Version 4.02 9-5

Figure 9-4 Trajectory display illustration

Static displays

Steady-state problemsStep 1

Read the required droplet data from the track (.trk) file generated automaticallyby the STAR-CD solver for Lagrangian flow problems. To do this, use panel “PlotDroplets/Particle Tracks”, tab “Droplets”.

Step 2

If necessary, use command DTIME to specify a time range over which you wantdroplet track data to be plotted. The display will then include only locations visitedby droplets during this time interval.

Step 3

Use the “Droplets” tab controls to choose options appropriate to the plot you wantto create. Note that a droplet display may be superimposed on a post data plot bychoosing Plot > Cell Display > Droplets from the main window menu (or byissuing command CDISPLAY, ON, DROPLET) before the cell plotting operation. Ifthe plot is a contour plot and the droplet fill colour varies according to a physicalproperty, a secondary scale will be displayed for that droplet property. If thedroplets are filled with a single arbitrary colour, and droplet velocity vectors aredisplayed, the secondary scale will correspond to droplet velocity magnitude, asrepresented by the vector colours.

Page 232: Star CCm Guide

LAGRANGIAN MULTI-PHASE FLOW Chapter 9

Data Post-Processing

9-6 Version 4.02

Step 4

Select a set of parcels whose progress through the solution domain is to bedisplayed. The selection procedure is analogous to that described in Chapter 2 of theMeshing User Guide regarding sets of cells, vertices, splines, etc. Thus, sets may beselected by

• a coloured button marked D -> on the left-hand-side of the main window• a similar button labelled Dp in the “Droplets” tab• typing command DSET in the I/O window. This provides the most extensive

range of selection options.

The set selection facilities available via the D -> or Dp buttons are as follows:

1. All — puts all parcels in the set2. None — clears the current set3. Invert — selects all unselected parcels and clears the current set4. New — replaces the current set with a new set of parcels5. Add — adds new parcels to the current set6. Unselect — deletes parcels from the current set7. Subset — selects a smaller group of parcels from those in the current set

For the last four items, the target parcels may be assembled by choosing an optionfrom a secondary drop-down list, as described below. In every case, whatconstitutes a valid option depends on how droplet data were read into pro-STAR:

1. For all loading choices, option Cell Set selects parcels that are containedwithin the physical space occupied by the current cell set. If the choice wasTrack File (see Step 1 on page 9-5), all droplet tracks whose initial positionsfall within the current cell set are selected.

2. If the loading choice was Droplet Initial Conditions (see Step 5 on page 9-3)or Current Post Data File (see Step 2 on page 9-8), the following options areavailable:

(a) Cursor Select — click on the desired parcels with the cursor; completethe selection by clicking the Done button on the plot

(b) Zone — use the cursor to draw a polygon around the desired parcels.Complete the polygon by clicking the last corner with the right mousebutton (or click Done outside the display area to let pro-STAR do it foryou). Abort the selection by clicking the Abort button.

3. If the loading choice was Current Post Data File, the following options areavailable:

(a) Active — select all active parcels(b) Stuck — select all parcels that have stuck to a wall and become

immobilised

Note that droplet set information is not saved in the restart (.mdl) file oncompletion of the post-processing run

Step 5

Display the selected parcels as a series of droplet circles by clicking Droplet Plotin the “Droplets” tab

Page 233: Star CCm Guide

Chapter 9 LAGRANGIAN MULTI-PHASE FLOW

Data Post-Processing

Version 4.02 9-7

The locations of the circles represent the points where a parcel intersects cellboundaries as it travels from the beginning to the end of its path through the mesh.

Step 6

If detailed numerical information is required on the selected parcels, choose Lists >Tracks from the main window menu bar to open the Particle/Droplet Track Datadialog. Select the track file and then click Load Data to read in and display allavailable information in that file, as shown below:

The required information is displayed by clicking the appropriate parcel number(shown in the Track column) with the mouse. The same information (but in adifferent format) can also be displayed on the I/O window by typing commandPTPRINT.

Special data requirementsIn some situations, the user may require the following additional information:

1. The position of a range of parcels at a given point in time, as opposed to aspecified parcel at a series of time points. The data needed for such a displaymay be obtained by interpolation of the available data at the time point inquestion using command PTREAD. Continue by specifying the appropriateparcel set and then use the “Droplets” tab in STAR GUIde to display therequired droplet distributions. Note that the time specified in PTREAD isindependent of any time information specified via command DTIME (see Step2 above)

2. The ‘age’ of all currently-loaded parcels, given by command DAGE. Aparcel’s age is defined as the interval between the time when the first parcelentered the solution domain and the time when the parcel in question hits awall or exits from the solution domain. Age is calculated from data in the

Page 234: Star CCm Guide

LAGRANGIAN MULTI-PHASE FLOW Chapter 9

Data Post-Processing

9-8 Version 4.02

track (.trk) file and may be used as the basis for selecting a parcel set, viacommand DSET. This information may be listed in the I/O window usingcommand DLIST.

Transient problemsStep 1

Decide which time step is to be inspected and then load the corresponding data(from file case.pstt), using STAR GUIde’s “Load Data” panel (“File(s) tab”).If more than one transient file is available, pro-STAR will locate the right oneautomatically.

Step 2

Open panel “Plot Droplets/Particle Tracks” (“Droplets” tab) and read the contentsof the transient file by selecting option Current Post Data File from the pop-upmenu at the top.

Step 3

Choose appropriate options in the Droplet Plot Options section of the same tab, asfor “Steady-state problems”.

Step 4

Select the desired parcel set using the most appropriate of the methods describedunder “Steady-state problems”.

Step 5

Plot droplets by clicking the Droplet Plot button.

Step 6

Information about a range of parcels at the current time step can also be displayedin the I/O window using command DLIST. For example,

DLIS,1,50,2,OTHER

will list the density, diameter, mass, droplet count and temperature of every secondparcel between 1 and 50. Information on parcel ‘age’ is also obtainable with thiscommand (having first executed command DAGE). In transient problems, age isdefined as the interval between the time when the first parcel entered the solutiondomain and the current time.

Trajectory displays

Trajectory displays are basically droplet track displays. These are plotted ascontinuous trajectories or animated streaks, using the options provided in panel“Plot Droplets/Particle Tracks” (“Droplets” tab). As for particle tracks generated atthe post-processing phase, the data required for such plots are stored in filecase.trk. This file is generated automatically during the Lagrangian multi-phaseanalysis for both transient and steady-state calculations.

Note that:

• It is also possible to print position, velocity and other droplet data stored incase.trk for each track using command PTPRINT.

• The data in this file will be overwritten if the user generates post-processing

Page 235: Star CCm Guide

Chapter 9 LAGRANGIAN MULTI-PHASE FLOW

Engine Combustion Data Files

Version 4.02 9-9

particle tracks without first saving the droplet data.

Engine Combustion Data Files

In addition to the normal results files, engine combustion cases also produceadditional output data (.spd) files, written by STAR if the Lagrangian multi-phaseand/or combustion simulations options are in use. One such file is produced forevery fluid domain in your model and contains both fuel droplet data (representedas globally averaged quantities) and general engine data.

The information in this file may also be displayed in graphical form using theutilities provided in STAR GUIde’s Graphs folder (see panel “External Data”). Themeaning of the quantities appearing in the file is as follows:

Name Meaning

T-Step Time step number

Time Elapsed time at this time step [s]

Crank_Ang. Crank Angle [degrees]

Average_P Cylinder absolute average pressure [pa]

Average_T Cylinder absolute average temperature [K]

Average_d Cylinder average density [kg/m3]

Cylinder_Mass In-cylinder mass [kg]

Tot_Inj_Lqui Total injected mass [kg]

Cur_mas_Fue Total mass of liquid phase [kg]

Evaporated Total evaporated mass [kg]

Evaprt_% Ratio of total evaporated mass to the total injected mass [%]

Leading_par Unused

Distance Unused

Velocity Unused

V_mag Unused

Idr Unused

Sauter_D Sauter mean diameter [m]

AngMom_XFluid angular momentum w.r.t. the X-axis of the local coordi-nate system used in the model [kg/m2s]

AngMom_Y Fluid angular momentum w.r.t. the Y-axis

AngMom_Z Fluid angular momentum w.r.t. the Z-axis

Mass_Burnt Burnt fuel mass [kg]

Page 236: Star CCm Guide

LAGRANGIAN MULTI-PHASE FLOW Chapter 9

Useful Points

9-10 Version 4.02

Note that, depending on the model, some of the above data may have no meaning.

Useful Points

1. The above treatment is strictly valid only for droplets whose physicaldimensions are appreciably smaller than those of a typical mesh cell throughwhich they travel. It is recommended that the total droplet volume(i.e. volume of a typical droplet times the number of droplets in the parcel)should not exceed 40% of this cell volume.

2. If a convergent solution cannot be easily obtained in steady-state modelsusing the coupled approach, it may be beneficial to start the analysis byobtaining a solution that does not include the dispersed phase. The lattershould then be introduced into the calculated flow field and the analysisrestarted using the Initial Field Restart option to produce the final, completesolution.

3. In steady-state models using the uncoupled approach, the computer timerequired may again be reduced by obtaining the solution in two stages. First, aconverged solution without the dispersed phase should be calculated. Thedispersed phase should then be introduced and the analysis restarted using theInitial Field Restart option to obtain the desired solution in one iteration only.

4. In transient analyses involving droplets that move faster than theirsurrounding fluid, the Courant number used for estimating a reasonable timestep size (see Chapter 5, “Load step definition”) should be based on thedroplet rather than the fluid velocity.

5. STAR-CD’s default treatment for heat transfer coefficients can be combinedwith user-calculated mass transfer coefficients and vice-versa. In practice,however, the user will most probably want to use the same calculationprocedure for both of them.

6. Complex or unusual physical conditions relating to momentum, heat andmass transfer between droplets and the continuous phase can beaccommodated by supplying user subroutines DROMOM, DRHEAT andDRMAST that describe each transfer process, respectively. Similarly, specialconditions relating to the momentum, heat and mass transfer behaviour ofdroplets at wall boundaries can be specified by supplying the requiredrelationship via subroutine DROWBC.

%Evap_Burnt Burnt fuel as a percentage of fuel evaporated

Heat_Release_Rate

Heat release rate [J/s]

Scalar Mass of scalar no. i [kg]

Page 237: Star CCm Guide

Chapter 10 EULERIAN MULTI-PHASE FLOW

Introduction

Version 4.02 10-1

Chapter 10 EULERIAN MULTI-PHASE FLOW

Introduction

The theory behind problems of this kind is given in the Methodology volume,Chapter 13. This chapter contains an outline of the process to be followed whensetting up an Eulerian multi-phase analysis. Also included are cross- references toappropriate parts of the on-line Help system, containing details of the user inputrequired.

Setting up multi-phase models

Step 1

Switch on the Eulerian multi-phase simulation facility using the “Select AnalysisFeatures” panel in STAR GUIde:

• Select Eulerian Multi-Phase from the Multi-Phase Treatment menu• Click Apply. pro-STAR checks if another multi-phase simulation option

(Lagrangian, Free Surface, Cavitation) is already on. If so, it issues a warningmessage and turns it off.

• An additional sub-folder called Eulerian Multi-Phase now appears in theNavCenter tree, within the Thermophysical Models and Properties folder.

Step 2

Set up the mesh and define the boundary region locations as usual. At present, onlypart of the full STAR-CD boundary type set is available for this kind of analysis.The permissible options are:

1. Inlet2. Outlet3. Pressure4. Wall5. Non-porous baffle6. Cyclic7. Symmetry8. Degassing9. Attachment

10. Monitoring

Note that:

• The above list contains an additional boundary type, ‘Degassing’, valid onlyfor Eulerian multi-phase flows. This permits dispersed phase mass to escapeinto the media surrounding the solution domain (see also Chapter 4,“Phase-Escape (Degassing) Boundaries” in this volume). Your problemshould not contain more that one boundary of this type.

• Only the currently available boundary types, as listed above, can be set up viathe “Create Boundaries” panel.

Step 3

Open the Thermophysical Models and Properties folder and use each of itssub-folders to provide relevant information about your problem. Note that:

Page 238: Star CCm Guide

EULERIAN MULTI-PHASE FLOW Chapter 10

Setting up multi-phase models

10-2 Version 4.02

• Thermal/solar radiation is not supported in this version of the code.• Use the Liquids and Gases panels to specify physical properties and special

flow conditions in your model. Note that:

(a) Only a single domain (or material) is allowed at present, so the Material #slider in each panel remains set to 1.

(b) Where appropriate, data are entered per phase, with the number of phasescurrently restricted to two. Of these, no. 1 is treated as the continuous andno. 2 as the dispersed phase.

(c) “Molecular Properties” — compared to single-phase problems, only arestricted range of options is available for evaluating physical properties.The specification process and permissible options are common to bothphases.

(d) “Turbulence Models” — if turbulent flow conditions prevail, specify amethod for calculating the turbulence characteristics of both phases andalso the turbulence-induced drag

(e) “Thermal Models” — if heat transfer is present in the analysis, turn on thetemperature solver for each phase as required

(f) “Initialisation” — specify initial conditions for each phase(g) “Monitoring and Reference Data” — supply a reference pressure and

temperature and the cell location corresponding to the reference pressure.The values specified apply to both phases.

(h) “Buoyancy” — if buoyancy effects are important, specify a datumlocation and reference density. Again, these values apply to both phases.

• The current version does not support the following features:

(a) Multi-component mixture problems requiring the presence of additionalscalar variables in either phase. Therefore, STAR GUIde does not displaythe Additional Scalars sub-folder.

(b) Porous media flow, therefore the Porosity sub-folder is not displayed.(c) Chemical reactions of any kind, including coal combustion and the

STAR/KINetics package. Therefore, the “Select Analysis Features” paneldoes not permit the above options to be turned on.

(d) Liquid films of any kind. Again, the “Select Analysis Features” paneldoes not allow this option.

Step 4

In the Eulerian Multi-Phase folder:

• Open the Interphase Momentum Transfer sub-folder to specify appropriatemodels and related parameters for this part of the analysis. The information issupplied in two separate panels:

(a) “Drag Forces” — define a model for calculating drag forces directly orvia the drag coefficient

(b) “Other Forces” — define models for calculating other interphase forces(e.g. virtual mass and/or lift force)

• If heat transfer is present in the analysis, use the “Interphase Heat Transfer”panel to specify the method of calculating the Nusselt number (and hence theheat transfer coefficient).

Page 239: Star CCm Guide

Chapter 10 EULERIAN MULTI-PHASE FLOW

Setting up multi-phase models

Version 4.02 10-3

• Specify the size of the particles making up the dispersed phase using the“Particle Size” panel. At present, all particles are assumed to be of equal size.

Step 5

If required by problem conditions, use the “Source Terms” panel in folder Sourcesto specify mass sources or additional source terms for the momentum, turbulence orenthalpy equations of either phase. At present, multi-phase sources may only bespecified via user subroutines.

Step 6

Specify boundary conditions using the “Define Boundary Regions” panel. Thepermissible range of boundary types is shown in Step 2. Note that for inlet, pressure,wall/baffle and cyclic regions, separate boundary conditions are needed for eachphase.

When pro-STAR’s boundary display facilities are used to check the variousboundary region definitions (see Chapter 4, “Boundary Visualisation”), inlet phasevelocities will be displayed according to the setting of the Phase # slider in panel“Define Boundary Regions”.

Step 7

In the Analysis Controls folder:

• Select Solution Controls > Equation Behavior, open the “PrimaryVariables” panel and make any necessary adjustments to the current settings

• If you wish to monitor the value of any flow variable(s), as a function ofiteration or time step, select Output Controls > Monitor EngineeringBehavior and then open panel “Monitor Boundary Behaviour” and/or panel“Monitor Cell Behaviour”. The choice depends on whether you wish tomonitor values at a boundary region or within a cell set. Note that the choiceof which variables to monitor is phase-dependent.

• If you are running a transient problem, use the “Transient tab” in the“Analysis Output” panel to select which variables you wish to store in thetransient post data file (.pstt). Note that the choice of such variables isphase-dependent.

Step 8

Run STAR in double precision mode. There are two reasons for this:

• Solving the volume fraction equation in this manner gives rise to a smallertruncation error, especially in parts of the mesh where the volume fraction isclose to 1 or 0. This is sometimes essential for convergence of the solution.

• Double precision cases have been more extensively tested

Step 9

Post-processing the analysis results follows the same rules as single-phaseproblems. Note that:

• Analysis data are stored in the .ccm file per phase. A phase slider in the“Data tab” of panel “Load Data” enables you to select the precise datarequired.

• Likewise, phase-specific data may be plotted in a graph. The types of graphavailable are described in topics “Residual / Monitored History Data”,

Page 240: Star CCm Guide

EULERIAN MULTI-PHASE FLOW Chapter 10

Setting up multi-phase models

10-4 Version 4.02

“Engineering Data” and “Analysis History Data”.

Useful points on Eulerian multi-phase flow

1. The momentum under-relaxation factors should be the same for bothcontinuous and dispersed phases. The pressure under-relaxation factor shouldalso be equal to the volume fraction factor. Suggested values for theseparameters are 0.3 on momentum for both phases and 0.1 on pressure andvolume fraction.

2. To ensure satisfactory convergence for steady and pseudo-transient cases, amaximum residual error tolerance of 1.0 × 10-6 is recommended.

Page 241: Star CCm Guide

Chapter 11 FREE SURFACE AND CAVITATION

Free Surface Flows

Version 4.02 11-1

Chapter 11 FREE SURFACE AND CAVITATION

Free Surface Flows

The theoretical description of free-surface flow models is given in Chapter 14 of theMethodology volume. This section contains an outline of the procedure to befollowed when setting up free-surface flow problems. Also included arecross-references to appropriate parts of the on-line Help system, which containsdetails of the user input required.

Setting up free surface cases

Step 1: Define the mesh and boundary regions

Set up an appropriate mesh and define its boundary regions in the usual way. Allstandard STAR mesh features are applicable to free-surface flows but this is not alsothe case for all types of boundary region. The boundary types currently supportedin free-surface problems are:

• Inlet• Outlet• Slip and no-slip impermeable walls• Symmetry planes• Static and piezometric pressure (with both environmental and mean options

deactivated)• Baffles• Cyclic boundaries (except for partial cyclics in which the mass flow rate is

specified)• Attachment boundaries• Monitoring boundaries

Step 2: Activate the free surface model

Turn on the free-surface option using the “Select Analysis Features” panel of theSTAR GUIde system:

• Select On from the Free Surface menu• Select option Transient from Time Domain menu. Free-surface flows have to

be computed in a time-marching manner, even if the final solution is steady. Inthe latter case, one can choose larger time steps or only one iteration per timestep to save on computing time, as described in Step 7 below.

• Click Apply. An additional folder called Free Surface will now appear in theNavCenter tree.

Note that:

1. A passive scalar named VOF is required for free-surface problems. pro-STARwill automatically define such a scalar (if it has not been defined already) onpressing the Apply button in the Select Analysis Features folder. This scalarstores the volume fraction of the ‘heavy’ fluid in the solution domain (see“Mathematical model” on page 14-2 of the Methodology volume) andrequires definition by the user of appropriate boundary conditions.

2. Certain combinations of the free surface model with other STAR-CD features

Page 242: Star CCm Guide

FREE SURFACE AND CAVITATION Chapter 11

Free Surface Flows

11-2 Version 4.02

are not currently supported. Such features are:

(a) Eulerian and Lagrangian multi-phase flow(b) Reacting flow(c) Radiative heat transfer(d) Aeroacoustic analysis

pro-STAR will issue a warning message if an attempt is made to switch onany of the above features and the free surface model will then be switched off.

Step 3: Define model control parameters

In the Free Surface folder, open the “Controls” panel and specify appropriatesettings for the following parameters:

1. Differencing Scheme — this defines the differencing scheme to be used for thesolution of the VOF transport equation:

(a) The default scheme is HRIC, which stands for ‘High-Resolution InterfaceCapturing’. As suggested by the name, this scheme should be employed ifa sharp interface between the heavy and light fluids is to be resolved.There is also a blending factor associated with the scheme. The defaultvalue for this factor is appropriate for most situations; higher valuesprovide a sharper interface but there is a danger of interface alignmentwith grid lines under unfavourable flow direction. In such a case, theblending factor should be reduced.

(b) The Upwind scheme will not provide a sharp interface but it may be usedon coarse or poor-quality meshes or when a sharp resolution of theinterface is not an issue.

2. Surface Tension — determines whether the surface tension effect across theheavy-light fluid interface is to be included in the calculations. The effect isexcluded by default as it plays an important role only in small-scale problems,where the mesh is fine enough to resolve the interface curvature on a scalethat results in an appreciable pressure difference. The latter is proportional toσ/R, where σ is the surface tension coefficient and R the radius of interfacecurvature. Note that the HRIC scheme must be selected if you choose toinclude surface tension in your model.

Step 4: Define material properties

The fluid medium in a free-surface problem is defined as a single fluid materialpossessing two components: a ‘heavy’ and a ‘light’ one. To define their respectivematerial properties, go to the Free Surface folder and open the “MolecularProperties” panel. For each of the heavy and light components, fill in the relevantproperty values or select materials from pro-STAR’s built-in property database andthen click Apply.

Step 5: Define thermophysical models

In the Thermophysical Models and Properties folder:

1. If your application involves solid-fluid heat transfer:

Page 243: Star CCm Guide

Chapter 11 FREE SURFACE AND CAVITATION

Free Surface Flows

Version 4.02 11-3

(a) Open the “Thermal Options” panel and then select Heat Transfer On inthe Solid-Fluid Heat Transfer section

(b) Click Apply(c) As a result of the above, a sub-folder called Solids will appear in the

STAR GUIde tree. Use this sub-folder to define solid material properties.More than one solid domains may be defined in such models.

Note that radiative heat transfer is not currently supported in free-surfaceproblems.

2. If gravitational effects are important in your application, open the “Gravity”panel and define the gravitational acceleration and its direction with respect tothe coordinate system of the solution domain.

3. The overall flow conditions should be specified by entering the Liquid andGases sub-folder. This is designed to supply relevant information for thefollowing aspects of the model:

(a) Open the “Turbulence Models” panel and choose an appropriateturbulence model for your case, or select the Laminar flow option ifapplicable.

(b) If thermal effects are important, open the “Thermal Models” panel andselect the Temperature Calculation On option. In the Show Optionssection, choose the enthalpy formulation and transport equation to besolved for it. Please note that the following are not supported infree-surface cases:

i) Stagnation Enthalpy option in the Conservation menuii) Chemico-Thermal option in the Enthalpy menu

(c) Initialise the flow field and turbulence quantities in the “Initialisation”panel. Only the Constant and User options are supported for free-surfacecases.

(d) Use the “Monitoring and Reference Data” panel to specify the locationsof the monitoring and reference cells, as well as the reference pressureand temperature.

(e) Use the “Buoyancy” panel to specify whether buoyancy effects are to beincluded in the calculation. Select the On button if this effect isimportant. It is advisable to use a Datum Density value corresponding tothe ‘light’ fluid density and, if possible, to choose the Datum Location ata cell that is likely to be always occupied by the ‘light’ fluid.

4. Define ‘active’ and ‘passive’ scalars in the Additional Scalars sub-folder. Apassive scalar named VOF should already be defined at this stage. Note that:

(a) When the Cavitation option is turned On (see “Cavitating Flows” onpage 11-5), an active scalar named CAV also needs to be defined

(b) Apart from CAV, no other active scalar can be defined for free-surfaceproblems

(c) You may define as many ‘passive’ scalars as are necessary for yourmodel

(d) The diffusion term in the transport equation for all scalars defined in afree-surface model will be switched off

Page 244: Star CCm Guide

FREE SURFACE AND CAVITATION Chapter 11

Free Surface Flows

11-4 Version 4.02

5. In the Additional Scalars sub-folder, initialize the distribution of the VOFscalar by opening the “Initialisation” panel and choosing one of the availableoptions. In most cases, either Constant values, User coding, or assignmentaccording to cell type is applied. In the latter case, click CTAB on the mainpro-STAR window to open the Cell Table Editor and use it to set the InitialFree Surface Material switch to Light (for those cell types initially occupiedby the ‘light’ fluid) or to Heavy (for cell types initially occupied by the‘heavy’ fluid).

6. For free-surface problems involving porous media, use the Porosity sub-folderto define properties for the porous materials in the normal way.

7. Use the Sources sub-folder to define external source terms for momentum,turbulence, enthalpy and scalars. Note that:

(a) User Coding is the only supported option in this case(b) The VOF transport equation does not accept additional source terms

Step 6: Define boundary conditions

Go to the Define Boundary Conditions folder

• Open the “Define Boundary Regions” panel and specify appropriate boundaryconditions in the usual manner

• Open the “Scalar Boundaries” panel and specify boundary conditions for theVOF scalar

Valid boundary types for free-surface problems are listed under Step 1. If a pressureboundary condition is specified, make sure that both the Envir Press (environmentalpressure) and Mean (pressure profile mean value) options are set to Off.

Step 7: Define analysis control parameters

Go to the Analysis Controls folder:

1. Select the Solution Controls sub-folder and then open the “Solution Method”panel to set/adjust the solution algorithm parameters. Note that:

(a) Only the SIMPLE algorithm is applicable to free-surface problems(b) Both CG and AMG solvers are applicable and the desired one may be

selected from the Solver Type menu. AMG is recommended since itusually leads to shorter computing times.

(c) Select option Euler Implicit from the Temporal Discretisation menu.This is the only option supported for this type of problem.

(d) If a steady-state solution is expected, one can limit the number of outeriterations per time step (see topic “Transient problems” in the STARGUIde on-line Help) to 1, in which case a pseudo-transient marchingtowards the steady state is obtained. This is applicable to both cavitatingand free-surface flows, but one needs to be certain that a steady-statesolution can be reached.

2. Select the Equation Behavior sub-folder and then open the “PrimaryVariables” panel. Make any necessary adjustments to the current or defaultsettings in the Equation Status, Solver Parameters and Differencing Schemes

Page 245: Star CCm Guide

Chapter 11 FREE SURFACE AND CAVITATION

Cavitating Flows

Version 4.02 11-5

tabs.3. In the “Additional Scalars” panel:

(a) Adjust the under-relaxation factor for the VOF scalar, if necessary (thedefault value is 0.8).

(b) Ignore the section concerning the differencing scheme because the latterhas already been set in the free-surface “Controls” panel.

(c) Select an appropriate differencing schemes and other control parametersfor all scalars other than VOF.

(d) Click Apply before changing to another scalar or exiting from the panel.

4. Select the Output Controls sub-folder and use the “Monitor NumericBehaviour” panel to print additional information such as convergenceresiduals and conservation checks (optional).

5. Select the Monitor Engineering Behavior sub-folder and, if you wish, use the“Monitor Cell Behaviour” panel to save selected cell data for subsequentplotting against iteration or time step number.

6. The Analysis Output sub-folder enables you to specify the frequency ofsaving solution results in the .ccm file.

7. Use the “Switches and Real Constants” panel in the Other Controls sub-folderto set switches and constants for any ‘non standard’ practices. Please checkcarefully the meaning of each switch and constant and use it only whenabsolutely necessary.

Step 8: Define the time step size and run duration

There are two ways to define the time step size and the run time length:

1. Go to the Analysis Preparation/Running folder and open the “Set Run TimeControls” panel. Fill in appropriate values for simulation time and time stepsize in the relevant boxes. This is the recommended way of defining timesteps.

2. If your application involves a moving mesh defined by an events file, you willneed to use the Advanced Transients panel by choosing Modules > Transientfrom the main pro-STAR window. In this panel, you can define load steps,each of which contains the time step size and number of time steps to be usedfor each load step. Please note that you need to go through Step 1 to Step 7before defining load steps using the Advanced Transients panel.

Cavitating Flows

The theoretical description of cavitation models is given in Chapter 14 of theMethodology volume. This section contains an outline of the procedure to befollowed when setting up cavitating flow problems. Also included arecross-reference to appropriate parts of the on-line Help system, which containsdetails of the user input required.

Setting up cavitation cases

Step 1: Define the mesh and boundary regions

Set up an appropriate mesh and define its boundary regions in the usual way. Allstandard STAR mesh features are applicable to cavitation but this is not also the

Page 246: Star CCm Guide

FREE SURFACE AND CAVITATION Chapter 11

Cavitating Flows

11-6 Version 4.02

case for all types of boundary region. The boundary types currently supported incavitation problems are:

• Inlet• Slip and no-slip impermeable walls• Symmetry planes• Static and piezometric pressure (with both environmental and mean options

deactivated)• Baffles• Cyclic boundaries (except for partial cyclics in which the mass flow rate is

specified)• Attachment boundaries• Monitoring boundaries

Step 2: Activate the cavitation model

Turn on the cavitation option using the “Select Analysis Features” panel of theSTAR GUIde system:

• Select On from the Cavitation menu• Select option Transient from Time Domain menu. Cavitating flows have to

be computed in a time-marching manner, even if the final solution is steady. Inthe latter case, one can choose larger time steps or only one iteration per timestep to save on computing time, as described in Step 7 below.

• Click Apply. An additional folder called Cavitation will now appear in theNavCenter tree.

Please note:

1. An active scalar named CAV is required for cavitation problems. pro-STARwill automatically define such a scalar (if it has not been defined already) onpressing the Apply button in the Select Analysis Features folder. This scalarstores the volume fraction of vapour generated during the cavitation process(see “Mathematical model” on page 14-6 of the Methodology volume) andrequires definition by the user of appropriate physical properties andboundary conditions.

2. Certain combinations of the cavitation model with other STAR-CD featuresare not currently supported. Such features are:

(a) Eulerian and Lagrangian multi-phase flow(b) Reacting flow(c) Radiative heat transfer(d) Aeroacoustic analysis

pro-STAR will issue a warning message if an attempt is made to switch onany of the above features and the cavitation model will be switched off.

3. Combinations of the cavitation and free surface models are supported. Thistypically occurs in applications requiring resolution of a sharp interfacebetween a cavitating liquid and a gas, in which case you may select both theFree Surface and Cavitation options. If both are selected, a passive scalarcalled VOF is defined automatically by pro-STAR (unless this definitionalready exists in the model).

Page 247: Star CCm Guide

Chapter 11 FREE SURFACE AND CAVITATION

Cavitating Flows

Version 4.02 11-7

4. When the cavitation and free surface options are combined, physicalproperties for the gas component are defined using the “Molecular Properties”panel in the Free Surface folder. You will also need to define the differencingscheme for the VOF scalar, as discussed in Step 3 of the “Free Surface Flows”section.

Step 3: Define material properties

The fluid medium in cavitating flows is defined as a single fluid material consistingof two or three components. Thus, for cavitation without a free surface, there is aheavy component and a vapour component; for cavitation with a free surface, thereis a heavy component, a light component and a vapour component.

• For cases involving cavitation only, go to the Cavitation folder and open the“Molecular Properties” panel. Two tabs labelled Light Fluid and Heavy Fluidwill appear, of which the Light Fluid one is always inactive. Use the HeavyFluid tab to define molecular properties for the cavitating liquid. Please notethat displayed values for surface tension and contact angle will not be used forcases involving only cavitation.

• When cavitation is combined with a free surface, the definition of molecularproperties for the heavy and light fluids is identical to that for free surfaceflows, as described in the previous section.

• Vapour molecular properties are defined using the “Molecular Properties(Scalar)” panel, as for any other active scalar.

Step 4: Define model parameters

Go to the Cavitation folder and open the “Cavitation Model” panel. The STAR-CDdefault is currently the Rayleigh model but you may also define your own model bychoosing the User option from the Model Selection menu.

Three parameters are needed for the Rayleigh model: the Saturation Pressure,Average Nuclear Radius and Number of Nuclei contained in 1 m3 of liquid. Of these,the saturation pressure may be either constant or user-defined in subroutineCAVPRO; the other two parameters are constants.

Please note that the number of nuclei per m3 of liquid has a strong influence onthe amount of vapour generated and therefore requires your own knowledge as toits likely value. Although only limited measurement data are available, it is wellknown that liquid purity (affected by filtering, degassing and possibly othertreatment) strongly affects the cavitation process. The following recommendationscan be used in the absence of more specific information:

• For small-scale, high-pressure systems such as engine injectors, a value in therange 1011 — 1014 was found to be adequate.

• For large-scale, low-pressure systems such as ship propellers and largepumps, smaller values in the range 106 — 1010 may be more appropriate.

However, the best choice is always the one based on your own experience.

Step 5: Define thermophysical models

In the Thermophysical Models and Properties folder:

1. If your application involves solid-fluid heat transfer:

Page 248: Star CCm Guide

FREE SURFACE AND CAVITATION Chapter 11

Cavitating Flows

11-8 Version 4.02

(a) Open the “Thermal Options” panel and then select Heat Transfer On inthe Solid-Fluid Heat Transfer section

(b) Click Apply(c) As a result of the above, a sub-folder called Solids will appear in the

STAR GUIde tree. Use this sub-folder to define solid material properties.More than one solid domains may be defined in such models.

Note that radiative heat transfer is not currently supported in cavitationproblems.

2. If gravitational effects are important in your application, open the “Gravity”panel and define the gravitational acceleration and its direction with respect tothe coordinate system of the solution domain.

3. The overall flow conditions should be specified by entering the Liquid andGases sub-folder. This is designed to supply relevant information for thefollowing aspects of the model:

(a) Open the “Turbulence Models” panel and choose an appropriateturbulence model for your case, or select the Laminar flow option ifapplicable.

(b) If thermal effects are important, open the “Thermal Models” panel andselect the Temperature Calculation On option. In the Show Optionssection, choose the enthalpy formulation and transport equation to besolved for it. Please note that the following are not supported in cavitationcases:

i) Stagnation Enthalpy option in the Conservation menuii) Chemico-Thermal option in the Enthalpy menu

(c) Initialise the flow field and turbulence quantities in the “Initialisation”panel. Only the Constant and User options are supported for cavitationcases.

(d) Use the “Monitoring and Reference Data” panel to specify the locationsof the monitoring and reference cells, as well as the reference pressureand temperature.

(e) Use the “Buoyancy” panel to specify whether buoyancy effects are to beincluded in the calculation. Select the On button if this effect isimportant.

4. Define ‘active’ and ‘passive’ scalars in the Additional Scalars sub-folder. Anactive scalar named CAV should already be present at this stage, definedautomatically by pro-STAR. Note that:

(a) If the Free Surface option is turned On as well (see “Free SurfaceFlows” on page 11-1), a passive scalar named VOF is also definedautomatically by pro-STAR. This tracks the distribution of the‘heavy’ fluid volume fraction.

(b) Apart from CAV, no other active scalar can be defined in cavitationproblems.

(c) The default molecular properties of the CAV scalar are those of watervapour. You may therefore need to define alternative properties ifyour vapour corresponds to a different fluid.

(d) You may define as many ‘passive’ scalars as are necessary for your

Page 249: Star CCm Guide

Chapter 11 FREE SURFACE AND CAVITATION

Cavitating Flows

Version 4.02 11-9

model(e) The diffusion term in the transport equation for all scalars defined in

the cavitation model will be switched off

5. In the Additional Scalars sub-folder, initialize the distribution of the VOFscalar by opening the “Initialisation” panel and choosing one of the availableoptions. In most cases, either Constant values, User coding, or assignmentaccording to cell type is applied. In the latter case, click CTAB on the mainpro-STAR window to open the Cell Table Editor and use it to set the InitialFree Surface Material switch to Light (for those cell types initially occupiedby the ‘light’ fluid) or to Heavy (for cell types initially occupied by the‘heavy’ fluid).

6. For cavitation problems involving porous media, use the Porosity sub-folderto define properties for the porous materials in the normal way.

7. Use the Sources sub-folder to define external source terms for momentum,turbulence, enthalpy and scalars. Note that:

(a) User Coding is the only supported option in this case(b) The VOF transport equation does not accept additional source terms(c) When the default Rayleigh model is used, you cannot define additional

source terms for the CAV scalar.

Step 6: Define boundary conditions

Go to the Define Boundary Conditions folder

• Open the “Define Boundary Regions” panel and specify appropriate boundaryconditions in the usual manner

• Open the “Scalar Boundaries” panel and specify boundary conditions for theCAV and (if applicable) VOF scalars, the latter representing the heavy fluidvolume fraction.

Valid boundary types for cavitation problems are listed under Step 1. If a pressureboundary condition is specified, make sure that both the Envir Press (environmentalpressure) and Mean (pressure profile mean value) options are set to Off.

Step 7: Define analysis control parameters

Go to the Analysis Control folder:

1. Select the Solution Controls sub-folder and then open the “Solution Method”panel to set/adjust the solution algorithm parameters. Note that:

(a) Only the SIMPLE algorithm is applicable to cavitation problems(b) Both CG and AMG solvers are applicable and the desired one may be

selected from the Solver Type menu. AMG is recommended as it usuallyleads to shorter computing times.

(c) For transient cases, select option Euler Implicit from the TemporalDiscretisation menu. This is the only option supported for this type ofproblem.

(d) If a steady-state solution is expected, one can limit the number of outeriterations per time step (see topic “Transient problems” in the STARGUIde on-line Help) to 1, in which case a pseudo-transient marching

Page 250: Star CCm Guide

FREE SURFACE AND CAVITATION Chapter 11

Cavitating Flows

11-10 Version 4.02

towards the steady state is obtained. This is applicable to both cavitatingand free-surface flows, but one needs to be certain that a steady-statesolution can be reached.

2. Select the Equation Behavior sub-folder and then open the “PrimaryVariables” panel. Make any necessary adjustments to the current or defaultsettings in the Equation Status, Solver Parameters and Differencing Schemestabs.

3. In the “Additional Scalars” panel, select a differencing scheme andunder-relaxation parameter for the CAV scalar and for scalars other than VOF(the differencing scheme for the latter is set in the free-surface “Controls”panel; however, you may want to adjust its under-relaxation parameter).

4. Select the Output Controls sub-folder and use the “Monitor NumericBehaviour” panel to print additional information such as convergenceresiduals and conservation checks (optional).

5. Select the Monitor Engineering Behavior sub-folder and, if you wish, use the“Monitor Cell Behaviour” panel to save selected cell data for subsequentplotting against iteration or time step number.

6. The Analysis Output sub-folder enables you to specify the frequency ofsaving solution results in the .ccm file.

7. Use the “Switches and Real Constants” panel in the Other Controls sub-folderto set switches and constants for any ‘non standard’ practices. Please checkcarefully the meaning of each switch and constant and use it only whenabsolutely necessary.

Step 8: Define the time step size and run duration

There are two ways to define the time step size and the run time length:

• Go to the Analysis Preparation/Running folder and open the “Set Run TimeControls” panel. Fill in appropriate values for simulation time and time stepsize in the relevant boxes. This is the recommended way of defining timesteps.

• If your application involves a moving mesh defined by an events file, you willneed to use the Advanced Transients panel by choosing Modules > Transientfrom the main pro-STAR window. in this panel, you can define load steps,each of which contains the time step size and number of time steps to be usedfor each load step. Please note that you need to go through Step 1 to Step 7before defining load steps using the Advanced Transients panel.

Page 251: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Rotating Reference Frames

Version 4.02 12-1

Chapter 12 ROTATING AND MOVING MESHESThe theory behind rotating and moving mesh problems and the manner ofimplementing it in STAR-CD is given in the Methodology volume, Chapter 13. Thepresent chapter contains an outline of the process to be followed when setting up arotating or moving mesh simulation, including details of the user input required andimportant points to bear in mind when setting up problems of this kind.

Rotating Reference Frames

Models for a single rotating reference frame

Step 1

Go to the “Select Analysis Features” STAR GUIde panel and select option On fromthe Rotating Reference Frame Status pop-up menu. This activates an additionalfolder in the NavCenter tree called Rotating Reference Frames.

Step 2

In the above folder, open the “Rotating Reference Frames” panel and select optionSingle Frame. This enables you to define spin parameters for the material in yourmodel. The required parameters are angular velocity and a local coordinate systemwhose Z-axis defines the axis of rotation, see Figure 12-1.

Figure 12-1 Solid body rotation

Useful points on single rotating frame problems

1. The angular velocity can vary with time, with the variation specified in

(a) user subroutine UOMEGA, or(b) a user-defined table, or(c) by giving it a different value at each load step of a transient run (see

Chapter 5, “Load-step based solution mode”).

2. The boundaries of the rotating domain are also assumed to be rotating. Tomodel stationary walls, it is necessary to specify an equal and opposite spinvelocity in the Omega text box of the Boundary Region dialog for walls (seethe STAR GUIde “Wall” Help topic). Similarly, to model axial inflow, it isnecessary to specify a spin velocity in the dialog for Inlet regions.

3. When a stagnation boundary condition is used, an option is provided tospecify whether the direction cosines are based on relative or absolutevelocities. Stagnation quantities are also defined using either relative or

ω = 200 rpm

Page 252: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Rotating Reference Frames

12-2 Version 4.02

absolute velocities.4. When turbulence is specified as an intensity (at inlet or pressure boundaries),

the turbulence kinetic energy is computed on the basis of static coordinateframe velocities. For stagnation boundaries, the specified intensity uses thesame velocity as the stagnation quantities.

5. Boundary velocities are computed in the local rotating coordinate system.This is important in interpreting the information passed to the usersubroutines.

6. When post processing results, you may view velocities in either the relative orthe absolute reference frame (see the “Coord System tab”, located in the“Load Data” STAR GUIde panel).

Models for multiple rotating reference frames (implicit treatment)

Step 1

Go to the “Select Analysis Features” STAR GUIde panel and select option On fromthe Rotating Reference Frame Status pop-up menu. This activates an additionalfolder in the NavCenter tree called Rotating Reference Frames.

Step 2

• Decide how many reference frames are required to model the problemadequately. For example, the two-dimensional mixer problem shown inFigure 12-2 requires two rotating frames.

• Generate the mesh.

Figure 12-2 Multiple rotating frame illustration

Baffle

Baffle

r = 15 cm

r = 5 cm

r = 10 cm

Sub-domain 2Spin index = 2

Sub-domain 1Spin index = 1

ω = 0 rpm

ω = 500 rpm

Page 253: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Rotating Reference Frames

Version 4.02 12-3

Step 3

Display the Cell Table Editor by clicking the CTAB button on the main pro-STARwindow. Define cell index numbers to correspond to each of the rotating meshblocks (sub-domains) (see “The Cell Table” on page 3-1). Assign different spin andcolour table indices to each cell type, as shown below, for the two rotatingsub-domains of Figure 12-2. Note that the table entries for both sub-domains havethe same material property reference number since the sub-domains belong to thesame fluid domain.

Sub-domain 1

Sub-domain 2

Page 254: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Rotating Reference Frames

12-4 Version 4.02

Step 4

Assign all cells within a sub-domain in turn to each of the cell types created above(see “Cell indexing” on page 3-3).

Step 5

In the Rotating Reference Frames folder, open the “Rotating Reference Frames”panel and select option Multiple Frames - Implicit. This enables you to specify spinparameters (angular velocities and axes of rotation) for each of the spin indicesalready defined. In terms of the example of Figure 12-2, zero rotational speed needsto be assigned explicitly to sub-domain no. 2 since its local coordinate system isused in transforming velocities across the sub-domain interface.

Useful points on multiple implicit rotating frame problems

1. When modelling multiple rotating reference frame (m.r.f.) problems, it isadvisable to check the results carefully and see if they are reasonable andwithin the limitations of this approach. If this is not the case, one may need toresort to moving mesh methods, such as those described in the section on“Regular sliding interfaces”.

Note, however, that a result obtained via the m.r.f. method can always beused as an initial field for a transient moving mesh simulation. This willreduce the time needed to reach a periodic state solution.

2. It is important to ensure that the interface between the different m.r.f.sub-domains is a smooth surface (i.e. a constant-radius surface). This pointneeds particular attention in all-tetrahedral mesh cases.

3. An angular velocity can vary with time, with the variation specified in

(a) user subroutine UOMEGA, or(b) a user-defined table, or(c) by giving it a different value at each load step of a transient run (see

Chapter 5, “Load-step based solution mode”).

4. The boundaries of a rotating domain are also assumed to be rotating. Tomodel stationary walls, it is necessary to specify an equal and opposite spinvelocity in the Omega text box of the Boundary Region dialog for walls (seethe STAR GUIde “Wall” Help topic). Similarly, to model axial inflow, it isnecessary to specify a spin velocity in the dialog for inlets.

5. When a stagnation boundary condition is used, an option is provided tospecify whether the direction cosines are based on relative or absolutevelocities. Stagnation quantities are also defined using either relative orabsolute velocities.

6. When turbulence is specified as an intensity (at inlet or pressure boundaries),the turbulence kinetic energy is computed on the basis of static coordinateframe velocities. For stagnation boundaries, the specified intensity uses thesame velocity as the stagnation quantities.

7. In cases where the mesh structure changes across the interface between twosub-domains (for example, between two axial turbomachinery stages, with theblades swept in opposite directions):

(a) Build each sub-domain separately with its own ‘best fit’ mesh structure,and cell types with different spin indices

Page 255: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Rotating Reference Frames

Version 4.02 12-5

(b) Create a continuous mesh by coupling together the cells layers on eitherside of the interface using the Couple tool (Create Couples option; seealso Chapter 3, “Couple creation” in the Meshing User Guide).

(c) Use the Couple tool’s Couple Transform option to replace the coupledcells with polyhedral cells that have a one-to-one cell facecorrespondence at the interface.

8. Boundary velocities are computed in the local rotating coordinate system.This is important in interpreting the information passed to the usersubroutines.

9. When post processing results, you may view velocities in either the relative orthe absolute reference frame (see the “Coord System tab”, located in the“Load Data” STAR GUIde panel).

10. The present version of STAR-CD does not support the use of rothalpy (see“Rothalpy” on page 1-5 of the Methodology volume) in combination with theimplicit solution technique.

Models for multiple rotating reference frames (explicit treatment)

Step 1

Go to the “Select Analysis Features” STAR GUIde panel and select option On fromthe Rotating Reference Frame Status pop-up menu. This activates an additionalfolder in the NavCenter tree called Rotating Reference Frames.

Step 2

• Decide how many rotating frames of reference are required to model theproblem adequately, and the locations of the interfaces.

• Generate the mesh. The interface between adjacent rotating mesh blocks isdefined by pairs of adjacent (but spatially coincident) boundaries, as shown inFigure 12-3. The coincident boundaries are first defined as independentboundary regions using separate sets of vertices and then coupled together asdescribed in Step 7 below. Note that the interface must be either a planeperpendicular to the axis of rotation or a conical section, i.e. a surfacegenerated by rotating a straight line around that axis.

Page 256: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Rotating Reference Frames

12-6 Version 4.02

Figure 12-3 Coupled boundary illustration

Step 3

Display the Cell Table Editor by clicking CTAB on the main pro-STAR window.Define cell index numbers to correspond to each of the rotating domains (see “TheCell Table” on page 3-1). Assign different material property and colour tableindices to each cell type but ignore the spin index. In the above example, cell andmaterial indices 1, 2 and 3 are defined to correspond to each domain.

Step 4

Assign all cells within a domain in turn to each of the cell types created above (see“Cell indexing” on page 3-3). Also ensure that separate monitoring cell andreference pressure locations are specified for each domain.

Step 5

Go to panel “Create Boundaries” in STAR GUIde, open tab “Regions” and use itsfacilities to create separate boundary regions at either side of each interface betweendomains, as shown in Figure 12-3.

Step 6

Specify boundary conditions for both sides of an interface using panel “DefineBoundary Regions” (only inlet and pressure boundary types are allowed). Exampledialog boxes for boundary regions 5 and 6, making up the first interface in the aboveexample, are shown below:

4

3

2

1

36

35

34

33

40

39

38

37 61

62

63

64

65

66

67

68

97

98

99

100

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

IMAT = 1 IMAT = 3IMAT = 2

ω = 100 rpm ω = 500 rpm ω = 1000 rpm

cell number boundary number

circumferentialdirection

Boundary Regionsno. 5

(pressure)no. 7

(pressure)no. 6(inlet)

no. 8(inlet)

(a)

33 37

1134 1135

134 135

1034 1035

34 35

(b)

Page 257: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Rotating Reference Frames

Version 4.02 12-7

Step 7

Go back to panel “Create Boundaries” and use tab “Couples” to join the interface

Page 258: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Rotating Reference Frames

12-8 Version 4.02

boundaries together. In doing so, you also need to:

1. Specify whether to join individual boundaries from each region on aone-to-one basis, or to couple the two regions to each other as a whole. If thelatter is chosen, the value to be imposed on the couple’s pressure boundary isfound by an averaging process. For example, the average of the valuesassigned to boundary region no. 5 in Figure 12-3 is

(12-1)

where p is the pressure and s the area of each boundary face.2. If necessary, place region couples (as defined above) into separate groups.

This enables you to identify boundary faces across which mass must beconserved and is only necessary in problems that have only inlet boundarycouples. Such domains are recommended for solving closed loop problemswhere the flow rate needs to be determined as part of the solution. The groupsto balance are specified in the “Rotating Reference Frames” panel (see Step 8below).

Step 8

In the Rotating Reference Frames folder, open the “Rotating Reference Frames”panel and select either option “Multiple Frames - Explicit” or option “MultipleFrames - NR-Explicit”. This enables you to specify:

1. Spin parameters (angular velocities and axes of rotation) for each of the meshdomains already defined. In the above example, domains 1, 2 and 3 haveangular velocities of 100, 500 and 1000 r.p.m., respectively. The spin axis isnormally common to all domains.

2. Control parameters required by the explicit solution algorithm and, ifrequired, the coupled region groups mentioned in Step 7 above.

Useful points on multiple explicit rotating frame problems

1. When modelling multiple rotating reference frame (m.r.f.) problems, it isadvisable to check the results carefully and see if they are reasonable andwithin the limitations of this approach. If this is not the case, one may need toresort to moving mesh methods, such as those described in the section on“Regular sliding interfaces”.

Note, however, that a result obtained via the m.r.f. method can always beused as an initial field for a transient moving mesh simulation. This willreduce the time needed to reach a periodic state solution.

2. It is important to ensure that the interface between the different m.r.f. domainsis a smooth surface (i.e. a constant-radius surface). This point needs particularattention in all-tetrahedral mesh cases.

3. An angular velocity can vary with time, with the variation specified in

(a) user subroutine UOMEGA, or(b) a user-defined table, or(c) by giving it a different value at each load step of a transient run (see

Pregion 5 pi sii 5=

8

∑⎝ ⎠⎜ ⎟⎛ ⎞

sii 5=

8

∑⎝ ⎠⎜ ⎟⎛ ⎞

⁄=

Page 259: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Moving Meshes

Version 4.02 12-9

Chapter 5, “Load-step based solution mode”).

4. The boundaries of a rotating domain are also assumed to be rotating. Tomodel stationary walls, it is necessary to specify an equal and opposite spinvelocity in the Omega text box of the Boundary Region dialog for walls (seethe STAR GUIde “Wall” Help topic). Similarly, to model axial inflow, it isnecessary to specify a spin velocity in the dialog for inlets.

5. When a stagnation boundary condition is used, an option is provided tospecify whether the direction cosines are based on relative or absolutevelocities. Stagnation quantities are also defined using either relative orabsolute velocities.

6. When turbulence is specified as an intensity (at inlet or pressure boundaries),the turbulence kinetic energy is computed on the basis of static coordinateframe velocities. For stagnation boundaries, the specified intensity uses thesame velocity as the stagnation quantities.

7. Interfaces between differentially-rotating mesh domains are best placed atpositions that do not lie inside recirculating flow fields.

8. Caution should be exercised when using this approach because of the explicitcoupling at the special boundaries. The method is most suitable for problemsinvolving strong outflow across the coupled interface.

9. The NR-Explicit option should be chosen over the Explicit option forconfigurations where the turbomachinery blades are closely packed and/or if ashock wave is expected to hit either of the two coupled boundaries at theinterface.

10. Boundary velocities are computed in the local rotating coordinate system.This is important in interpreting the information passed to the usersubroutines.

11. When post processing results, you may view velocities in either the relative orthe absolute reference frame (see the “Coord System tab”, located in the“Load Data” STAR GUIde panel).

Moving Meshes

Basic concepts

The moving mesh feature is activated by command MVGRID. Changes in meshgeometry can be specified either by pro-STAR commands (i.e. the Change Gridoperation in the EVENTS command module), or by user coding included insubroutine NEWXYZ. In this subroutine, the user can vary the geometry of a modelby defining vertex coordinates as a function of time. The deformed coordinates arewritten to the transient post data (.pstt) file and can be loaded and plotted duringpost-processing.

As an alternative, the Change Grid (CG) operation can be used to alter the vertexpositions with time. Its distinguishing features are as follows:

• The operation is initiated at an ‘event step’ specified by the user and remainsactive at all subsequent time steps, until the CG operation is explicitly turnedoff by a termination event, or a new set of CG commands are provided as partof another event step.

• The main body of the operation consists of a set of pro-STAR commands that

Page 260: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Moving Meshes

12-10 Version 4.02

are used while STAR is running (as part of a STAR/pro-STAR interactionprocess).

• The above commands utilise a set of both program-defined and user-definedparameters that can store anything that is of relevance to the problemdescription.

The parameters used by the CG command set are:

1. Program-defined

(a) ITER — current time step number(b) TIME — current solution time(c) LSTP — current load step (see Chapter 5, “Load step definition”)(d) EVEX — last executed event number(e) EVNO — event number to be executed next(f) ETIM — time at which the next event is scheduled(g) YPST — piston position; a special parameter for piston engine problems,

calculated on the basis of other parameters supplied by commandEVPARM (see “Setting up models” on page 12-15).

2. User-definedThese are specified by the user in subroutine UPARM to provide additionalparameters. They are of two kinds:

(a) Integer parameters in the range 0-999(b) Real parameters in the range 0-999

Note that pro-STAR restricts the number of active parameters to 99.The CG operation uses all the standard pro-STAR facilities and is therefore more

flexible and powerful for mesh geometry changes than user coding supplied insubroutine NEWXYZ. Note that STAR-CD also provides other special operationsrelated to moving meshes, as follows:

• Cell removal/addition — (see “Cell-layer Removal/Addition” on page 12-14)• Sliding mesh — (see “Sliding Meshes” on page 12-18)• Conditional cell attachment and change of fluid type — (see “Cell

Attachment and Change of Fluid Type” on page 12-22)

Setting up models

The main steps for setting up a moving mesh model are outlined below. For moredetailed information, refer to Tutorial 11 in the Tutorials volume.

Step 1

Generate the mesh at time t = 0 and issue the following command:

followed by either

or

TIME,TRANS (turn on the transient solution option)

MVGRID,ON (turn on the moving-grid option, whenusing subroutine NEWXYZ only)

Page 261: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Moving Meshes

Version 4.02 12-11

Step 2

(Skip this step only if mesh changes are input through the user subroutine NEWXYZ)Define an event step data file, e.g.

The contents of filecase.cgrdmentioned above for the problem shown in Figure12-4 are as follows:

! Comments like this are allowed by starting the line with “!”

Figure 12-4 Moving mesh illustration

MVGRID,ON,EVENT,PROSTAR (turn on the moving-grid option, whenusing the EVENTS command module)

EVFILE,INITIAL,case.evn (initialise the events file)EVSTEP,1,TIME,0.0 (define an event)EGRID,READ,case.cgrd (get the description of mesh operations

from file case.cgrd, in coded form)EVSAVE,1 (save this information as event no. 1)

VSET,NONE (clear the vertex set)VSET,ADD,VRANGE,1,2,1 (add vertices 1 and 2 to the set)*SET,YBOT,TIME (set parameter YBOT equal to the current

time)VMOD,VSET,F,YBOT (change the y-coordinates of the vertex

set so that they follow the bottom bound-ary movement)

VFILL,1,11,4,3,2,2,1 (re-position the mesh vertices betweenthe two boundaries)

Y

X

1 m/s

1

3

5

7

9

11

2

4

6

8

10

12

Page 262: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Moving Meshes

12-12 Version 4.02

Note that:

1. An event step can be

(a) deleted, if necessary, with command EVDELETE and remaining eventsteps re-numbered via command EVCOMPRESS;

(b) modified with command EVGET;(c) listed on the screen with command EVLIST.

2. Command EVUNDELETE restores a previously deleted event step.3. User-specified offsets can be applied to the actual event time via command

EVOFFSET.

Step 3

• If using the method described in Chapter 5, “Load-step based solution mode”,define the load step for the transient run.

• Check the validity of specified events and prepare the events data file forsubsequent use via command EVPREP.

• Save the problem’s data files using commands GEOMWRITE,PROBLEMWRITE, etc. or their equivalent GUI operations accessible from theFile menu.

Note that the events data file can be

• written in coded form to a (.evnc) file with command EVWRITE, typicallyin order to transfer data to another computer

• read in coded form from a (.evnc) file with command EVREAD, typicallywhen transferring data from another computer

Step 4

Exit from pro-STAR and then run STAR from your session’s X-window, asdescribed in Chapter 2, “Running a STAR-CD Analysis”, Step 6.

Step 5

Post-process the data. For example, the commands needed to process time step no.10 are:

SUBTITLEResults at time step 10Velocity fieldEVFI CONN case.evn (connect the event file)TRLOAD case.pstt (load the transient post data file)STORE ITER 10 (the appropriate events are loaded and

executed automatically)GETC ALL (get the cell data)POPT VECTPLTY NORMCSET NEWS FLUIDCPLOTQUIT,NOSAVE

Page 263: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Moving Meshes

Version 4.02 12-13

Be very careful not to save problem information to file case.mdl as the currentgeometry corresponds to the state of the mesh at time step no. 10.

Useful points

1. STAR can be run in ‘mesh preview’ mode only, which is very useful forchecking out the mesh set-up. To do this, a hidden switch has to be set up inpro-STAR as follows:

The message “MESH PREVIEW RUN” should appear both on the screen andin the run-time output (.run) file when running STAR. Note that this facilityis not available for parallel runs.

2. Moving grid events normally describe a continuous motion and will thereforeremain operational throughout the run. If, however, the grid motion needs tobe stopped for whatever reason, this can be done via a termination event asfollows:

EGRID,NONE

3. The transient post data (.pstt) file is usually very large, so care must betaken when specifying the post data output frequency. If the analysis is splitinto several stages, it is also advisable to give the .pstt file produced at theend of each stage a unique filename. This helps to spread the output producedamongst several files and thus ease the data management and manipulationprocesses.

4. Porous media should not be used in areas of the mesh where there is relativeinternal movement (i.e. cell expansion or contraction).

5. You are strongly advised to set the pressure correction under-relaxation factorto a value less than 1.0 (e.g. 0.8) before starting the analysis.

6. Flow boundary conditions on boundaries that have moving vertices may resultin mass flux into / out of the domain, caused by the displacements of theboundaries.

7. The only valid option for restart runs is Standard Restart (see the “Analysis(Re)Start” panel in STAR GUIde.

Automatic Event Generation for Moving Piston Problems

pro-STAR provides a special command, MMPISTON, which may be used in anengine model to automatically generate the moving part of the piston mesh, theChange Grid (.cgrd) command file and the event (.evn) file. More specifically,the moving mesh commands accomplish the following:

Starting from a basic mesh, they create the cells, vertices, boundaries, events andmoving grid commands to completely specify the mesh motion for the STARsolver. These commands are designed to be used in sequence, so that all entities arecreated at the end of the current model and do not compromise earlier events. As theoutput is standard pro-STAR events and EGRID commands, an advanced user canreadily modify these to suit specific problems.

RCONSTANT, 4, 1. (set constant number 4 to 1.)

Page 264: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Cell-layer Removal/Addition

12-14 Version 4.02

Cell-layer Removal/Addition

Basic concepts

A cell is removed by collapsing intervening faces between two opposite sides in agiven direction. This is done by moving together the vertices making up the faces.Cells can be collapsed at the beginning of a given time step or prior to the start ofthe calculations. The latter case is treated as a special mesh set-up operation anddoes not affect the solution in any way. Normally, entire layers of cells are removedat a given event step. However, it is also possible to remove part of a layer, in whichcase cells at the edge of the retained section collapse into prisms. A cell layer (orpartial layer) has the following properties:

• It is defined as a group of cells that is one cell thick in the collapsingdirection.

• The faces which collapse must be quadrilaterals, but those forming the upperand lower surfaces of the layer may be quadrilateral or triangular.

• The collapsing cell faces on the outer perimeter of the group form boundaries.• Either the upper or lower surface of a layer may coincide in whole or part with

a boundary, but not both surfaces simultaneously.• No more than one layer may be removed at each event step.• The layer must not be composed of tetrahedral cells.• Trimmed (polyhedral) cells can only be collapsed if they have been formed by

extruding another cell in the direction of collapse.

The reverse operation, adding a cell layer, is achieved by expanding the removedlayer in the direction it was collapsed. This means that layers to be added must havebeen removed first. Thus, all restrictions on cell removal also apply to cell additionso that:

• Only one entire layer (or partial layer) may be restored at each event step.• When cells are restored, they reappear next to the neighbours they had at the

time of their collapse.• If any of their faces were boundaries, those boundaries are also restored.• Cell layers must be restored in the reverse order in which they were removed.

The cells to be removed or added, and the time at which to do this (i.e. event stepand event time) are specified in the EVENTS command module. A cell removal oraddition event is executed when the current simulation time equals the timespecified by the event step, within a given tolerance.

Note that cell removal or addition changes only the cell connectivity within themesh. The actual change of mesh geometry has to be specified explicitly through amoving mesh operation of the kind described in “Moving Meshes” on page 12-9. Inthe event of cell removal, the user has to ensure that:

• The mesh geometry changes in a way that reflects the fact that cells have beenremoved.

• Cells remain collapsed until they are restored. This means that verticesbelonging to the removed cells must move with the moving boundary for allsubsequent time steps.

Page 265: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Cell-layer Removal/Addition

Version 4.02 12-15

Setting up models

Cell Removal or Addition operations should always be combined with either

• Change Grid operations in the EVENTS command module, or• the user subroutine NEWXYZ.

The main steps for setting up a model of this kind are outlined below.

Step 1

Generate the mesh at time t = 0. The layers to be removed can be given different cellindex numbers using command CTABLE.

.

Figure 12-5 Cell layer removal illustration

Referring to the example of Figure 12-5 the relevant commands would be:

CTAB,1,FluidRP7,1*SET,CTY,1,1*SET,C1,1,3*SET,C2,3,3*DEFINECTYPE,CTYCSET,NEWS,CRANG,C1,C2,1CMOD,CSET*END*LOOP,1,6,1

Step 2

Issue the following commands:

TIME,TRANS (turn on the transient solution option)

Y (2)

X (1)1

3

4

5

6

7

2

Cell index Cell number

1 2 3

4 5 6

7 8 9

10 11 12

13 14 15

16 18

19 20 21

17

Page 266: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Cell-layer Removal/Addition

12-16 Version 4.02

Step 3

• Define an event step data file, e.g.

• Turn on the Change Grid operation at time t = 0

• Specify cell layer removal via the cell type

• Specify cell layer removal via a cell range

EVSTEP,3,TIME,0.08EDDIR,LOCAL,1,2EDCELL,ADD,CRAN,4,6,1EVSAVE,3

• Specify cell layer addition, assuming the last cell layer removed had index no.2

Note that:

1. The event time can also be specified using global parameters. For example

MVGRID,ON,EVENT,PROSTAR (turn on the moving-grid option)

EVFILE,INITIAL,case.evn (initialise the events data file)

EVSTEP,1,TIME,0.0EGRID,READ,case.cgrd (get the description of mesh operations

from file case.cgrd, in coded form)EVSAVE,1 (save this information as event no. 1)

EVSTEP,2,TIME,0.05EDDIR,LOCAL,1,2 (remove cells in direction no. 2 in the

local coordinate system)EDCELL,ADD,CTYPE,1 (remove cells with index no. 1)ECLIST,DEACTIVATED,ALL (list removed cells)EVSAVE,2

EVSTEP,4,TIME,0.2EACELL,ADD,CTYPE,2 (add all cells with index 2)ECLIST,ACTIVATED,ALL (list added cells)EVSAVE,4

EVPARM PISTON 1000. 0.04 0.13 0.015 COMP 0.1015↑ ↑ ↑ ↑ ↑ ↑

pistonengine

rotatingspeed(rpm)

crankradius

lengthof con.

rod

initialpiston

position

pistonlocationat TDC

Page 267: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Cell-layer Removal/Addition

Version 4.02 12-17

2. An event step can be

(a) deleted, if necessary, with command EVDELETE and remaining eventsteps re-numbered via command EVCOMPRESS;

(b) modified with command EVGET;(c) listed on the screen with command EVLIST.

3. Command EVUNDELETE restores a previously deleted event step.4. User-specified offsets can be applied to the actual event time via command

EVOFFSET.

Step 4

• If using the method described in Chapter 5, “Load-step based solution mode”,define the load step for the transient run.

• Check the validity of specified events and prepare the events data file forsubsequent use via command EVPREP.

• Save the problem's data files using commands GEOMWRITE,PROBLEMWRITE, etc. or their equivalent GUI operations accessible from theFile menu.

Note that the events data file can be

• written in coded form to a (.evnc) file with command EVWRITE, typicallyin order to transfer data to another computer

• read in coded form from a (.evnc) file with command EVREAD, typicallywhen transferring data from another computer

Step 5

Exit from pro-STAR and then run STAR from your session’s X-window, asdescribed in Chapter 2, “Running a STAR-CD Analysis”, Step 6.

Step 6

Post-process the data. For example, the commands needed to process time step no.10 are:

EVSTEP 1 PCOMP 0.02↑ ↑ ↑

event step compression stage piston position

SUBTITLEResults at time step 10Velocity fieldEVFI CONN case.evn (connect the event file)TRLOAD case.pstt (load the transient post data file)STORE ITER 10 (the appropriate events are loaded and

executed automatically)GETC ALL (get the cell data)

Page 268: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Sliding Meshes

12-18 Version 4.02

Be very careful not to save problem information to file case.mdl as the currentgeometry corresponds to the state of the mesh at time step no. 10.

Useful points

1. You are strongly advised to identify cell layers intended for removal/additionby assigning a unique cell index to each of them.

2. Cell layers can be removed at negative event times. This is useful, forexample, in reciprocating piston engine models where simulation starts withthe piston at top dead centre. In such cases the previously removed cell layerscan thus be added at positive event times.

3. You are advised to first run the model in ‘mesh preview’ mode in order tocheck whether the intended cell removal/addition and mesh movement arecarried out correctly. This can be done by issuing the following command inpro-STAR:

The message “MESH PREVIEW RUN” should appear both on the screen andin the run-time output (.run) file when running STAR.

4. It is very important to ensure that the locations chosen for reference pressureand field variable monitoring (via commands PRESSURE and MONITOR,respectively) correspond to cells that will never be removed.

5. If the simulation includes combustion modelling and the definition of ignitionregions (see Chapter 8, “Setting Up Chemical Reaction Schemes”, Step 5),make sure that no cells corresponding to these regions have been removedduring the time that ignition takes place.

6. You are strongly advised to set the pressure correction under-relaxation factorto a value less than 1.0 (e.g. 0.8) before starting the analysis.

7. For STAR-HPC runs, you need to ensure that the removed cell layers do notcollapse towards the inter-processor boundaries. In another words, theremoved cell layers and the inter-processor boundaries should always beperpendicular to each other. This can be achieved through manualdecomposition.

Sliding Meshes

Regular sliding interfaces

One way of implementing sliding meshes is the regular sliding interface method.This enables the interface cells to progressively change their connectivity during thesolution.

The change of cell connectivity is activated through a ‘cell attachment’operation. Cell pairs to be attached and the time of attachment (i.e. event step and

POPT VECTPLTY NORMCSET NEWS FLUIDCPLOTQUIT,NOSAVE

RCONSTANT, 4, 1. (set constant number 4 to 1)

Page 269: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Sliding Meshes

Version 4.02 12-19

event time) are specified by the user in the EVENTS command module. The cellattachment event is executed when the current simulation time equals the timespecified by the event step within a given tolerance.

Setting up modelsThe regular sliding interface method combines both the Cell Attachment and theChange Grid operation in the EVENTS command module. The main steps forsetting up a case are outlined below.

Step 1

• Generate the mesh at time t = 0. The sliding interface is defined as twocoincident boundaries, one for the stationary and one for the moving part ofthe mesh. Thus, two sets of coincident vertices must be defined at thatlocation. The two coincident boundaries have to be defined as differentboundary regions and declared as attachment boundaries using the RDEFINEcommand:

RDEF,2,ATTACH1,0

• Issue the following commands:

Step 2

• Define an event step data file.

• Perform an initial attachment operation for the relevant boundary pairs(otherwise they will be treated as detached).

followed by either

RDEF,1,ATTACH (define boundary region no.1 as anattachment boundary)

1 0↑ ↑

local coordinate system alternate wall system(see “Cell Attachment and Change of Fluid Type” on

page 12-22for an explanation of this parameter)

TIME,TRANS (turn on the transient solution option)MVGRID,ON,EVENT,PROSTAR (turn on the moving-grid option)

EVFILE,INITIAL,case.evn (initialise the events data file)

EVSTEP,1,TIME,0.0 (event step 1 occurs at time t = 0.0)

EAMATCH,1,2 (match regions 1 and 2)

Page 270: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Sliding Meshes

12-20 Version 4.02

or

• Turn on the Change Grid operation at time t = 0.

• Specify subsequent attachment operations, e.g.

Note that:

1. The attached boundary set definitions in an event step can be

(a) deleted, if necessary, with command EADELETE and remainingdefinitions re-numbered via command EACOMPRESS;

(b) listed on the screen with command EALIST.

2. An event step can be

(a) deleted, if necessary, with command EVDELETE and the remaining eventsteps renumbered via command EVCOMPRESS;

(b) modified with command EVGET;(c) listed on the screen with command EVLIST.

3. Command EVUNDELETE restores a previously deleted event step.4. User-specified offsets can be applied to the actual event time via command

EVOFFSET.

Step 3

• If using the method described in Chapter 5, “Load-step based solution mode”,define the load step for the transient run.

• Check the validity of specified events and prepare the events data file forsubsequent use via command EVPREP.

• Save the problem’s data files using commands GEOMWRITE,PROBLEMWRITE, etc. or their equivalent GUI operations accessible from theFile menu.

EATTACH,6,1 (attached boundaries 6 and 1)RP5,1,1 (attach the rest of the boundary pairs)EALIST,ALL (list out all attached boundary pairs)

EGRID,READ,case.cgrd (get the description of mesh operationsfrom file case.cgrd, in coded form)

EVSAVE,1 (save this information as event no. 1)

EVSTEP,2,TIME,0.02EATTACH,6,2 (attach boundaries 6 and 2)EAGENERATE,4,1,1,1,1 (EAGENERATE works similarly to

CGENERATE, see “Command-drivenfacilities” on page 2-44 of the MeshingUser Guide)

EATTACH,10,1 (attached boundaries 10 and 1)EVSAVE 2 (save event no. 2)

Page 271: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Sliding Meshes

Version 4.02 12-21

Note that the events data file can be

• written in coded form to a (.evnc) file with command EVWRITE, typicallyin order to transfer data to another computer

• read in coded form from a (.evnc) file with command EVREAD, typicallywhen transferring data from another computer

Step 4

Exit from pro-STAR and then run STAR from your session’s X-window, asdescribed in Chapter 2, “Running a STAR-CD Analysis”, Step 6.

Step 5

Post-processing the data. For example, the commands needed to process time stepno. 10 are:

Be very careful not to save problem information to file case.mdl as the currentgeometry corresponds to the state of the mesh at time step no. 10.

Useful points

1. At time t = 0, cell pairs are detached. They become attached only when anevent containing EATTACH or EAMATCH commands is executed. Onceattached in this way, they remain attached until another EATTACH orEDETACH command references them, or they are deactivated.

2. When the model’s mesh is being created, it is very useful to set up a regularboundary numbering scheme at the interface, because this simplifies thespecification of cell attachment.

3. At the initial stages of the analysis, the solution can be accelerated by usingpure sliding only (i.e. without shearing), which in turn allows larger timesteps. In terms of Figure 15-1 in Chapter 15 of the Methodology volume, thisis equivalent to going from Stage 1 to Stage 4 in a single time step. If this isthe case, the time step dt should be made equal to dtsl, where, for cylindricalsystems

(12-2)

SUBTITLEResults at time step 10Velocity fieldEVFI CONN case.evn (connect the event file)TRLOAD case.pstt (load the transient post data file)STORE ITER 10 (the appropriate events are loaded and

executed automatically)GETC ALL (get the cell data)POPT VECTPLTY NORMCSET NEWS FLUIDCPLOTQUIT,NOSAVE

dtsl cell face angle at interface / rotating speed=

Page 272: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Cell Attachment and Change of Fluid Type

12-22 Version 4.02

In general, the time step dt should equal dtsl divided by an integer.If accuracy is not at a premium, one may also slide the mesh by more than

one cell width (e.g. two cell widths) in a single time step.4. In cylindrical systems, periodic results are usually reached after about seven

revolutions.5. The transient post data (.pstt) file is usually very large, so care must be

taken when defining the output frequency of post-processing data. If theanalysis is split into several stages, it is also advisable to give the .pstt fileproduced at the end of each stage a unique filename. This helps to spread theoutput produced amongst several files and thus ease the data management andmanipulation processes.

6. It is advisable to first run the model in ‘mesh preview’ mode in order to checkwhether the intended cell sliding and mesh movement are carried outcorrectly. This can be done by issuing the following command in pro-STAR:

The message “MESH PREVIEW RUN” should appear both on the screen andin the run-time output (.run) file when running STAR.

7. EATTACH commands are allowed only between active cells.8. All boundaries belonging to a given region must couple only to boundaries

belonging to a (different) unique region. For example, it is illegal for someboundaries from region 1 to couple to boundaries from region 2, while otherboundaries from region 1 couple to boundaries from region 3.

9. If one cell of an attached pair is deactivated, the other side reverts to thealternate wall region.

10. If both cells of an attached pair are deactivated simultaneously and thenreactivated, the EATTACH command must be re-issued.

11. For STAR-HPC runs, you need to ensure that the sliding part of the meshresides completely on one processor. This can also be achieved throughmanual decomposition.

Cell Attachment and Change of Fluid Type

Basic concepts

Cell attachment permits the following situations to be modelled:

1. The connection of unconnected neighbouring cells in different fluid domains,say on the basis of local flow conditions. This can be used, for example, tomodel leaf valves which pop open when the pressure difference across themexceeds a given value.

2. The complete disconnection of neighbouring cells. This situation necessitatestwo kinds of operation:

(a) A ‘Cell Attachment/Detachment’ operation.(b) A ‘Change Fluid Type’ operation.

The latter enables a fluid domain to become completely cut off from the rest of theflow field. Once cut off, the flow solution in such a domain can have its ownreference pressure and temperature. A special type of boundary (‘Attachment’ type)

RCONSTANT,4,1. (set constant number 4 to 1.)

Page 273: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Cell Attachment and Change of Fluid Type

Version 4.02 12-23

must also be declared at the interface where cell attachment and detachment is totake place. STAR performs a cell detachment by connecting the detached cells to anappropriate wall or inlet region.

Cell attachment/detachment operations are specified in the EVENTS commandmodule. The connection/disconnection event is initiated when the currentsimulation time equals the time specified by the event step within a given tolerance.The same also applies to the ‘Change Fluid Type’ operation. However, when thedesignated time for connecting cells is reached, the operation may not necessarilybe carried out immediately. Instead, the precise connection/disconnection time isdetermined by the flow solution. All conditions defined for a particular event aremaintained in the next event unless disabled explicitly. Thus, once a boundary pairis attached, it remains attached until it is explicitly detached.

Setting up models

The main steps for setting up a cell attachment and change of fluid type case areoutlined below.

Step 1

• Generate the mesh at time t = 0. This requires a boundary interface to be setup separating the (presently or potentially) different fluid domains. Theinterface is defined as two coincident boundaries made up of two sets ofcoincident vertices. The two boundaries must be first specified as differentboundary regions and then declared as attachment boundaries (see Figure12-6) using command RDEFINE:

The alternate wall or inlet region is specified in order to enable the code toassign appropriate (wall or inlet) properties to the attachment boundaries, ifthey happen to be detached.

RDEF,2,ATTACH1,8RDEF,3,ATTACH1,8RDEF,4,ATTACH1,8

• Issue the following commands:

RDEF,1,ATTACH (define boundary region no. 1 as anattachment boundary)

1 8 (boundary region no. 8is a dummy region)

↑ ↑local

coordinatesystem

alternatewall or

inlet region

RDEF,8,inlet (could also be of type wall)

Page 274: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Cell Attachment and Change of Fluid Type

12-24 Version 4.02

Figure 12-6 Outline of conditional cell attachment operation

Step 2

• Assign a material property reference no. to each fluid domain using commandCTABLE. For the model shown in Figure 12-6:

For domain no. 1 (IMAT = 1)

For domain no. 2 (IMAT = 2)

TIME,TRANS (turn on the transient solution option)MVGRID,ON,EVENT,PROSTAR (turn on the moving-grid option)

CTAB 1 FLUID 3 0 1 1↑ ↑ ↑ ↑ ↑ ↑

cellindex

celltype

colourindex

porosityreferencenumber

materialpropertyreferencenumber

groupnumber

CSET,NEWS,CRAN,1,100 (collect together all cells with propertyref. no. 1)

CTYPE,1 (change the currently active cell type to1)

CMOD,CSET

CTAB,10,FLUID,4,0,2,2

Y (2)

X (1)

1

2

3

41 23 4

5 67 8

IMAT = 1

IMAT = 2 IMAT = 3

1, 2, 3, 4,5, 6, 7, 8

Boundarynumbers

Cell numbers 151, 15296, 97

1, 2, 3, 4Boundary regionnumbers

Cell numbersIMAT = 1: cells 1-100IMAT = 2: cells 101-150IMAT = 3: cells 151-200

Page 275: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Cell Attachment and Change of Fluid Type

Version 4.02 12-25

For domain no. 3 (IMAT = 3)

• Define the monitoring cell and pressure reference for each material type usingthe MONITOR and PRESSURE commands:

For domain no. 1

For domain no. 2

PMAT 2MONI,120PRES,1.0E05,110STATUS

For domain no. 3

PMAT 3MONI,170PRES,1.0E05,180STATUS

Step 3

• Define an event step data file using the EVFILE command (see Figure 12-6):

• Perform an initial Attachment and Change Fluid operation for relevantboundary pairs (otherwise they will be treated as detached and the attachmentboundary type will become equivalent to a wall). For example, to connectregion nos. 1 and 2:

CSET,NEWS,CRAN,101,150 (collect together all cells with propertyref. no. 2)

CTYPE,10CMOD,CSET

CTAB,20,FLUID,5,0,3,3CSET,NEWS,CRAN,151,200 (collect together all cells with property

ref. no. 3)CTYPE,20CMOD,CSET

PMAT 1MONI,20 (define the monitoring cell)PRES,1.0E05,10 (define the reference cell and reference

pressure)STATUS

EVFILE,INITIAL,case.evn (initialise the event data file)

EVSTEP,1,TIME,0.0 (event step no. 1 occurs at time t = 0)EAMATCH,1,2 (connect regions 1 and 2)

Page 276: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Cell Attachment and Change of Fluid Type

12-26 Version 4.02

• Change the fluid material property reference number in region 2 to that inregion 1

EFLUID,1,ADD,CRANGE,101,150(or EFLUID,1,ADD,CTYPE,10)(or EFLUID,1,ADD,GROUP,2)

• List the latest definitions and save the information supplied

• If, at time t = 1., region no. 2 is to be cut off from the rest of the flow, issue thefollowing commands:

Note that the detached boundary set definitions in an event step can bedeleted, if necessary, with command EDDELETE and remaining definitionsre-numbered via command EDCOMPRESS.

Step 4

• If it is to be assumed that the valve between boundary regions 3 and 4 openswhen the average pressure in region 4 is greater than that in region 3, set up aconditional event as follows:

• Enable conditional attachment in an actual event

Step 5

• Define all other events required. Note that:

1. An event step can be

(a) deleted, if necessary, with command EVDELETE;(b) modified with command EVGET;

ECLIST,CFLUID,ALL (list all cells of type ‘Change Fluid’)EVSAVE,1 (save this information as event no. 1)

EVSTEP,2,TIME,1.EDETACH,ADD,REGION,1 (add region no. 1 to the ‘detach’ set)(or EDETACH,ADD,BRAN,1,2)EDLIST,ALL (list all detached boundary pairs)EFLUID,2,ADD,CTYPE,10EVSAVE,2

EVCND,3EAMATCH,3,4 (attach region nos. 3 and 4)EFLUID,1,ADD,CTYPE,20 (change all cells with cell id. 20 to fluid

no. 1)EVSAVE,3

EVSTEP,4,TIME,2.ECONDITIONAL,3,ENABLE (enable conditional event no. 3)EVSAVE,4

Page 277: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Cell Attachment and Change of Fluid Type

Version 4.02 12-27

(c) listed on the screen with command EVLIST.

2. Command EVUNDELETE restores a previously deleted event step.3. User-specified offsets can be applied to the actual event time via command

EVOFFSET.

Step 6

• If using the method described in Chapter 5, “Load-step based solution mode”,define the load step for the transient run.

• Check the validity of specified events and prepare the events data file forsubsequent use via command EVPREP.

• Save the problem’s data files using commands GEOMWRITE,PROBLEMWRITE, etc. or their equivalent GUI operations accessible from theFile menu.

Note that the events data file can be

• written in coded form to a (.evnc) file with command EVWRITE, typicallyin order to transfer data to another computer

• read in coded form from a (.evnc) file with command EVREAD, typicallywhen transferring data from another computer

Step 7

Exit from pro-STAR and then run STAR from your session’s X-window, asdescribed in Chapter 2, “Running a STAR-CD Analysis”, Step 6.

Step 8

Post-processing the data. For example, the commands needed to process time stepno. 10 are:

Be very careful not to save problem information to file case.mdl as the currentgeometry corresponds to the state of the mesh at time step no. 10.

Useful points

1. At time t = 0, cell pairs are detached. They become attached only when anevent containing EATTACH or EAMATCH commands is executed. Once

SUBTITLEResults at time step 10Velocity fieldEVFI CONN case.evn (connect the event file)TRLOAD case.pstt (load the transient post data file)STORE ITER 10 (the appropriate events are loaded and

executed automatically)GETC ALL (get the cell data)POPT VECTPLTY NORMCSET NEWS FLUIDCPLOTQUIT,NOSAVE

Page 278: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Mesh Region Exclusion

12-28 Version 4.02

attached in this way, they remain attached until another EATTACH orEDETACH command references them, or they are deactivated.

2. When the model’s mesh is being created, it is very useful to set up a regularboundary numbering scheme at the interface as this simplifies thespecification of cell attachment.

Mesh Region Exclusion

Basic concepts

A group of cells can be excluded from the solution domain by defining an ‘exclude’event and issuing command EECELL. Note that:

• This is possible only if the cells in the group are not connected to any othercells in the model. Thus, the group must first be detached from the rest of themodel using a cell detachment event, as described in the section on “CellAttachment and Change of Fluid Type”.

• Only active cells can be excluded.• There are no other restrictions on the cells that may be excluded (e.g. more

than one adjacent layers may be removed at a time).

An important difference with respect to cell deactivation, discussed in the sectionon “Cell-layer Removal/Addition”, must also be noted. The mass contained inexcluded cells is removed from the solution; by contrast, the mass in the deactivatedcells is ‘squeezed out’ into the neighbouring cells.

Moving Mesh Pre- and Post-processing

Introduction

The various mesh motions and connectivity changes caused by the execution ofevent-type commands can be visualised and verified using special pro-STARfacilities. These help both in setting up the events (pre-processing) and in examiningthe results of the analysis (post-processing). The same facilities can also be usedduring the actual solution run, in combination with mesh changes caused by eventexecution. Note that mesh changes can be classified into

• geometry changes• connectivity changes

Geometry changes should occur only as a result of the EGRID event. All otherevents can only cause connectivity changes.

Event processing is useful at three different stages of flow modelling and servesthe following requirements:

1. Pre-processingHere the emphasis is on:

(a) Testing out different event combinations.(b) Checking out commands read in by EGRID.(c) Making corrections as needed and re-executing the events.(d) Working with incomplete events.(e) Testing out parts of events, e.g. to see if cells to be attached are adjacent

Page 279: Star CCm Guide

Chapter 12 ROTATING AND MOVING MESHES

Moving Mesh Pre- and Post-processing

Version 4.02 12-29

to each other.(f) Using events to generate future events, e.g. use EGRID commands to

move the mesh and then EAMATCH to define the attach pairs.

2. Solution runHere, STAR calls up pro-STAR to alter the grid in some way.

3. Post ProcessingBy this stage, the mesh geometry applicable to any given point in time isavailable from the actual solution. Therefore, the goal here is to generatevertex data for various flow variables (via command CAVERAGE), displaythem using the correct surface and edge plotting options and create particletracks. Some error checking capabilities are also needed to detect event errorswhich may have previously gone unnoticed. These detected errors arehighlighted in the plots.

Action commands

Commands EVLOAD and EVEXECUTE belong to this category.EVLOAD is used to ‘load’ all events up to a specified point in time. There are two

basic components involved in this operation:

• Creation of internal tables defining the current status of each cell. These tablescan then be used by command CSET via keywords ACTIVE, DEACTIVE orATTACHED. For example, CSET,NEWSET,ACTIVE creates a cell set of thecurrently active cells.

• Execution of any grid-changing commands read in by EGRID.

Note that, in general, application of EVLOAD results only in changes to the meshgeometry and not to the mesh connectivity. The various options of the EVLOADcommand deal with different ways of specifying the current time. There is also a‘reset’ option which restores the geometry to the ‘original state’, as defined below.

The first time EVLOAD is called, the ‘original state’, i.e. the vertex, cell andboundary definitions of the model, are saved. Command EVLOAD,RESET restoresthe model to this original state. If the model is changed at this point, the nextEVLOAD command will create fresh ‘original state’ files that correspond to thechanges.

Command EVEXECUTE should be used only after a successful EVLOADoperation. This command applies the current status, stored in the internal tablesmentioned above, to the mesh. Thus:

• Cells marked as ‘deactivated’ are deleted (equivalent to command CDELETE)and vertex numbers on adjacent cells are changed to reflect their newconnectivity.

• Cells marked as having changed material type are changed to a different celltype.

• Vertices on the common face between two cells marked as ‘attached’ will bemerged.

The end result of the above is changes to cell connectivity due to cell removal.Using option OFF with command EVEXECUTE restores the model connectivity tothe ‘original state’ defined by EVLOAD. The internal status tables also retain their

Page 280: Star CCm Guide

ROTATING AND MOVING MESHES Chapter 12

Moving Mesh Pre- and Post-processing

12-30 Version 4.02

original setting. A succeeding EVLOAD command also implicitly performs anEVEXECUTE,OFF operation.

Status setting commands

Commands EVFLAG, EVCHECK and PLATTACH belong to this category. EVFLAGand EVCHECK modify the behaviour of EVLOAD. Any subsequent plotting iscontrolled by the PLATTACH options.

Command EVFLAG can be used to selectively turn on or off different types ofevents loaded by EVLOAD. It contains two groups of parameters that can be setindependently, one for pre-processing and the other for post-processing. The optionspecified with command EVCHECK (PREP or POST) determines which of the twogroups is to be set. The EVLOAD components that can be selectively turned on oroff are:

1. COND — executes enabled conditional events2. UPARM — calls user subroutine UPARM3. GRID — processes grid change commands

This option is essential if EVLOAD is to be used for changing the meshgeometry when pro-STAR is called by STAR. For example, suppose thefollowing commands are read in by EGRID:

4. NEWXYZ — calls user subroutine NEWXYZ5. DEACTIVE — checks that deactivated cells have zero volume. If they do not,

the error is reported and EVLOAD is stopped.6. ACTIVE — checks that active cells have non-zero volume. If they do not, the

error is reported and EVLOAD is stopped.7. ATTACH — checks that cell faces to be attached have coincident vertices. If

they do not, the error is reported and EVEXECUTE is stopped. Note that thisparticular option only applies to EVEXECUTE.

8. NEWSET — creates a set of cells which fail any tests during EVLOAD.9. SCDEF — creates scratch files containing the initial mesh state. This option

may be turned off whenever there is no need to backtrack in time, for examplewhen EVLOAD is called from STAR. This saves CPU time and disk space,which may be considerable for large models.

Finally, command PLATTACH controls the plotting of attached faces. When it is setto ON, attached faces are treated like internal faces and thus are not displayed onany surface plots.

.....EVFLAG,PRE,OFF,GRID (if the GRID flag is not set to OFF, the

EVLOAD command that follows willcause EGRID commands to be executedrepeatedly and ad infinitum)

EVLOAD,UPTO,TIME,TIME (Note the use of the predefined parameterTIME)

CSET NEWS ACTIVEVSET NEWS SURFACEVSMOOTH.....

Page 281: Star CCm Guide

Chapter 13 OTHER PROBLEM TYPES

Multi-component Mixing

Version 4.02 13-1

Chapter 13 OTHER PROBLEM TYPES

Multi-component Mixing

The theory behind flow problems of this kind and the manner of implementing it inSTAR-CD is given in the Methodology volume (Chapter 16, “Multi-componentMixing”). The present chapter contains an outline of the process to be followedwhen setting up problems involving multiple species and includes cross-referencesto appropriate parts of the on-line Help system. The latter contains details of the userinput required and important points to bear in mind when setting up problems of thiskind.

Setting up multi-component models

Step 1

Go to the Thermophysical Models and Properties folder in the STAR-GUIdesystem and open the “Additional Scalars” sub-folder. Set up a scalar variable foreach species participating in the fluid mixture. The properties of each scalar arespecified in the “Molecular Properties (Scalar)” panel, in two ways:

1. By choosing option Define scalar material and then typing in valuesyourself. Clicking Defaults instructs pro-STAR to fill the remaining boxeswith default values (those of air).

2. By choosing option Select scalar from database (see topic “Fluid PropertyDatabase”). pro-STAR then fills in all the required values using data stored infile props.dbs.

It is important that definition of all material (stream) properties via panel“Molecular Properties” has already been completed before any scalar properties aredefined.

In multi-stream flow problems, a scalar can be present in some streams but notin others, or it can be present in more than one stream. The allocation of scalarvariables to streams is entirely up to the user, subject to the following conditions:

• Each scalar must be defined only once.• Some scalar physical properties are stream-independent and must be set

when the scalar is first defined. These include molecular weight, specific heat,molecular viscosity and thermal conductivity.

• Other properties such as diffusivity and turbulent Schmidt number arestream-dependent and must be set on a stream-wise basis (see Step 3 below)

Step 2

Once all scalars are defined, scroll through them one by one via the Scalar # scrollbar at the bottom of the panel to

• check all property values in the “Molecular Properties (Scalar)” panel• modify a current value by overtyping in the relevant text box; the change is

made permanent by clicking Apply• delete an unwanted scalar by clicking Delete Scalar.

Step 3

Specify the stream-dependent (or material-dependent) scalar properties using the

Page 282: Star CCm Guide

OTHER PROBLEM TYPES Chapter 13

Multi-component Mixing

13-2 Version 4.02

“Binary Properties” panel. Once the settings for all scalars in a given stream arecomplete, click Apply and then move on to the next stream in your model.

Step 4

Specify values for the initial mass fraction of each scalar in each stream using the“Initialisation” panel.

Step 5

If the stream incorporates porous media sub-domains (see Chapter 6 in thisvolume), specify the effective mass diffusivity and turbulent Schmidt number foreach additional scalar present in your model using the “Additional ScalarProperties” panel (“Porosity” sub-folder).

Step 6

Specify scalar boundary conditions using the “Scalar Boundaries” panel (DefineBoundary Conditions folder).

Step 7

Go to the “Analysis Controls” folder and specify solution control parameters for allcurrently defined scalars using the “Additional Scalars” panel (Equation Behavioursub-folder). In multi-stream problems where each stream has a different scalarcomposition, this panel enables you, in effect, to select which scalars exist in whatstream.

Step 8

If a transient analysis is to be performed, use the “Analysis Output” panel(“Transient tab”) to specify whether cell and/or wall data for selected scalars needto be printed or written to the transient post file.

For transient problems defined in terms of load steps, go instead to the AdvancedTransients dialog (see Chapter 5, “Load step controls”) and click one of the ScalarsSelect buttons. The button to click depends on whether cell or wall data are neededand whether these are to be printed or written to the transient post file. The scalarsto be printed or post-processed are selected in the Transient Scalar Selection dialogshown below, by clicking the option button corresponding to the desired scalarnumber.

Command: SCTRANS

Page 283: Star CCm Guide

Chapter 13 OTHER PROBLEM TYPES

Aeroacoustic Analysis

Version 4.02 13-3

Note that this process should be repeated for every load step in the transient setup.

Step 9

If the stream incorporates additional sources for any of the scalars, specify thesource strength and distribution using the Scalar tab in the “Source Terms” panel(sub-folder Sources).

Useful points on multi-component mixing

1. The under-relaxation factors for all scalar transport equations should be set tothe same value. Note that this factor has no effect for scalars calculated by aninternal method or by user coding.

2. For thermal problems, the scalar under-relaxation factors should equal that forthe energy equation. For combusting or reacting flows, the recommendedrange is 0.3 to 0.7.

3. For efficient utilisation of computer memory, it is recommended that scalarvariable numbers are continuous and start at 1.

4. For problems involving large changes in temperature, it is recommended thatthe specific heat of both background fluid and active species is defined as apolynomial function of temperature (see reference [1]). For scalars, this canbe done in the “Polynomial Function Definition (Viscosity and Conductivity)”dialog that opens from the “Molecular Properties (Scalar)” panel. Apolynomial variation for molecular viscosity and thermal conductivity can bespecified in the same way. An ideal-gas variation for the density is alsorecommended, if necessary with a compressible setting.

5. pro-STAR allows new scalar species to be added to its built-in propertydatabase (see topic “Fluid Property Database” in the on-line Help system).

6. Details of existing scalar definitions can be saved to a file of form case.sclfor use in other problems. To do this, issue command CDSCALAR frompro-STAR’s I/O window. Note that the scalar data are written in the form ofappropriate pro-STAR commands (SC, SCPROPERTIES, SCCONTROL,etc.). Thus, it is possible to read them back into a model by executing anIFILE command (see “File manipulation” on page 17-9).

7. STAR uses default wall functions for calculating heat and mass transfer atwall boundaries. Users can supply alternative expressions for heat and masstransfer coefficients in subroutine MODSWF, activated via the “MiscellaneousControls” STAR-GUIde panel.

Aeroacoustic Analysis

The theory behind aeroacoustic analysis and the manner of its implementation inSTAR-CD is given in the Methodology volume (Chapter 16, “AeroacousticAnalysis”). The present section contains an outline of the process to be followedwhen setting up a problem of this type. Also included are cross- references toappropriate parts of the on-line Help system, containing details of the user inputrequired.

Setting up aeroacoustic models

Step 1

Switch on the aeroacoustic modelling facility using STAR GUIde’s “Select

Page 284: Star CCm Guide

OTHER PROBLEM TYPES Chapter 13

Aeroacoustic Analysis

13-4 Version 4.02

Analysis Features” panel:

• Select On from the Aeroacoustic Analysis menu• If a transient analysis mode has already been selected, a pop-up panel will

appear, warning you that the model must be run in steady-state mode. ClickYes to confirm your choice and proceed with the analysis. Note that thedisplayed option in the Time Domain menu will automatically change toSteady State.

• Click Apply. Note that an additional folder called Aeroacoustic Analysis willnow appear in the NavCenter tree.

Step 2

Open the “Aeroacoustic Analysis” panel. By default, the Aeroacoustic EquationSources switch is turned On. The default control parameters required for thenumerical solution algorithms are also set and are explained by the on-line Helptext. If you wish to make any changes, enter the required values in the panel andthen click Apply.

Step 3

Perform the usual model setup in the Thermophysical Models and Properties folder:In particular, make sure that:

• A density option appropriate to incompressible flow is selected in the“Molecular Properties” panel

• A two-equation, k-ε type turbulence model has been selected in the“Turbulence Models” panel

Step 4

Specify initial conditions, boundary conditions and control parameters and then runSTAR as normal, making sure that the analysis has converged. The aeroacousticresults will be automatically stored in the solution (.ccm) file as an extra scalarvariable called AALS (Aeroacoustic Lilley Source). If the maximum number ofiterations is reached without convergence, it is important to restart the analysis andrun it to convergence.

Step 5

Use the facilities of the Post-Processing folder to load and display the distributionof the AALS variable, using only cell-based or vertex-based values

Useful points on aeroacoustic analyses

1. If you require an initial solution without the overheads of calculatingaeroacoustic source terms at the last iteration, simply turn the AeroacousticEquation Sources switch Off, click Apply, and then perform the analysis asusual. You will then need to restart the analysis, turn the switch On andperform one iteration to obtain the aeroacoustic results.

2. Note that STAR-CD returns the logarithmic values of the aeroacousticsources. If you want to display the actual values, you will first need tocalculate the antilogarithm of the stored scalar using the facilities of the PostRegister Operations dialog (see Chapter 13, “The OPERATE utility” in thePost-Processing User Guide).

Page 285: Star CCm Guide

Chapter 13 OTHER PROBLEM TYPES

Liquid Films

Version 4.02 13-5

Liquid Films

The theory behind the liquid film model and details of its implementation inSTAR-CD is given in Chapter 16, “Liquid Films” of the Methodology volume. Thissection contains an outline of the steps to be followed when setting up a liquid filmsimulation.

Setting up liquid film models

The liquid film model can only be used in transient cases. Simulations employingthis feature typically involve droplet deposition on wall boundaries, formation ofliquid films and film interaction with the surrounding fluid and walls.

The basic steps for setting up such a model are as follows:

Step 1

Open the “Select Analysis Features” panel in STAR GUIde and turn On the LiquidFilms option. A pop-up panel may appear, warning you that the model must be runin transient mode. In such a case, click Yes to confirm your choice. The TimeDomain menu setting will then change to Transient.

Click Apply. The Liquid Films folder will appear in the NavCenter tree,containing the necessary panels for liquid film analysis.

Step 2

If necessary, allow for the presence of droplets in your model by selecting optionLagrangian Multi-Phase from the Multi-Phase Treatment menu and clickingApply. The Lagrangian Multi-Phase folder will then appear in the NavCenter tree,containing panels needed for specifying droplet parameters (see Chapter 9, “SettingUp Lagrangian Multi-Phase Models” in the CCM User Guide). This option shouldbe selected if either

• droplets are injected into the solution domain and their behaviour needs to bemodelled as part of the analysis, and/or

• droplets are generated by the film itself through a stripping process.

Step 3

The Liquid Films folder will contain a set of four panels called Film Controls, FilmPhysical Models and Properties, Film Initialization and Film Boundaries. Note thatfilm property specifications under the second panel of the above set must besupplied even if there are no films initially present in the problem.

• The “Film Controls” panel sets up the basic film modelling parameters. Thepanel also includes a Liquid Film Creation facility that enables you to specifywhich (wall or baffle) boundary regions cannot support liquid films.

• The “Film Physical Models and Properties” panel activates the liquid filmmodel for specified film materials and sets up a property table for each ofthem. Note that:

(a) There is a one-to-one correspondence between film materials defined inthe “Film Models” tab and fluid domain materials defined in the“Molecular Properties” panel. Films created for and corresponding to(gaseous) materials in different domains are topologically separate and

Page 286: Star CCm Guide

OTHER PROBLEM TYPES Chapter 13

Liquid Films

13-6 Version 4.02

their liquid contents do not mix with each other.(b) In the “Film Properties” tab, you can use the Evaporates to Scalar entry

to specify which liquid film component evaporates to/condenses fromwhich gas component. To determine which droplet component becomeswhich liquid film component when a droplet hits a wall, the followingrules are used:

i) If a liquid film component and a droplet component evaporate to thesame scalar, these components are assumed to exchange mass.

ii) If the Evaporates to Scalar setting for a liquid film component isNONE, then this component name is compared against each dropletcomponent name (for single-component droplets, the droplet nameis taken as the component name). If the component names match,the matched components are assumed to exchange mass.

• In multi-component liquid film simulations:

(a) The specified single value of binary diffusivity is assumed to apply to allcomponents in the film mixture

(b) For problems involving evaporation from the film surface, the partialpressure of each component on the gas side of the interface should becalculated using subroutine LQFPRO (see the “Multi Component” on-lineHelp topic)

• The “Film Initialization” specifies film initial conditions for each boundaryregion that can support films. If no initialization is specified, the filmthickness on that region is assumed to be zero.

• The “Film Boundaries” panel sets up film boundary conditions. Eachboundary condition is applied to the edges shared by a film and a non-filmregion. The currently available boundary condition types are Outlet andInlet. In the latter case, if no boundary conditions are specified for a givenvariable, the cell value is used as an inlet value (i.e. a Neumann conditionapplies).

Step 4

Specify initial conditions, boundary conditions and solution control parameters forthe domain material (normally gas) surrounding the film and then run the STARsolver as normal. Due to internal parameter settings and having to work withpossibly very small numbers such as film thickness, it is recommended that thesolver be run in double precision.

Step 5

Analysis results pertaining to films are treated by pro-STAR as wall data. Such dataitems appear in the scroll lists of panel “Analysis Output”, in both the “Post tab” taband the “Transient tab” tab, so that you may select what is to be included in the.ccm and .pstt files, respectively. pro-STAR assigns names such as LFTHK(film thickness) and LFT (film temperature) to film variables. A complete list canbe obtained by issuing the PLIST command from the I/O window. Assuming thatthe contour plot mode is already selected, a typical pro-STAR macro to plot a scalarfilm variable is:

Page 287: Star CCm Guide

Chapter 13 OTHER PROBLEM TYPES

Liquid Films

Version 4.02 13-7

trlo,,store lastclrwgetb lfthkcset news shellcset subs name wallwplot

In conjugate heat transfer cases, the following commands may be useful forselecting only liquid film cells on the fluid side of the interface:

cset newset fluidcset add atshcset subs name wall

To load film velocity components (LFU, LFV, LFW) as a vector, use

getb lu,lv,lw

Film stripping

This process can be modelled in two ways:

1. Via user subroutine FDBRK. If active, the subroutine will be called at all wallfaces containing films, at a point just before the first droplet tracking stage in anew time step. The user code must provide all necessary informationregarding the new (stripped) droplets leaving the film, including initialinjection velocity and global position coordinates.

2. Via an internal stripping model, currently available as a beta feature (seeChapter 13 of the Supplementary Notes volume).

If droplets are generated solely by the stripping process, it is still necessary to definedroplet properties in advance, as for normal injected droplets. The new (stripped)droplets must have a type associated with them, which has previously been definedin pro-STAR. Obviously, droplet properties should be consistent with those of theparent film.

Page 288: Star CCm Guide
Page 289: Star CCm Guide

Chapter 14 USER PROGRAMMING

Introduction

Version 4.02 14-1

Chapter 14 USER PROGRAMMING

Introduction

This chapter describes how the user can modify or supplement some of the standardfeatures and operations of STAR, such as physical properties, boundary conditions,additional sources of momentum, energy, etc. via user-supplied FORTRANsubroutines. The latter are collectively referred to as UFILE routines. The full setof currently available user programming inputs comprises:

1. Boundary conditions2. Density (equation of state)3. Molecular viscosity (including non-Newtonian flow)4. Specific heat5. Temperature to enthalpy conversion and vice versa6. Thermal conductivity7. Molecular diffusivity for chemical species8. Properties of distributed resistance9. Thermal and mass diffusion within distributed resistance sub-domains

10. Effective viscosity and turbulence length scale11. Turbulence model parameters (including two-layer models)12. Turbulence characteristics within distributed resistance sub-domains13. Local injection or removal of fluid14. Momentum, enthalpy and turbulence sources15. Solar and gaseous radiation properties16. Free surface and cavitation models and properties17. Heat, mass and momentum transfer in two-phase Lagrangian flow18. Droplet initial conditions and physical properties19. Droplet behaviour near walls20. Inter-droplet collision modelling21. Eulerian multi-phase drag, turbulence and heat transfer22. Chemical reaction rates and chemical species mass fractions23. Chemical species and thermal NOx sources24. Parameters for sliding mesh and rotating reference frame problems25. Moving mesh coordinates26. Cell layer removal or attachment27. Initial conditions28. Formation and behaviour of liquid films on walls and baffles29. Wall functions for momentum, heat and mass transfer30. Time-step size for transient problems31. Special post-processing32. Variation of blending factor for higher-order discretisation schemes

Subroutine Usage

To use UFILE routines you must execute the following steps:

Step 1

Create a subdirectory called ufile under your present working directory as

Page 290: Star CCm Guide

USER PROGRAMMING Chapter 14

Subroutine Usage

14-2 Version 4.02

follows:

• Choose File > System Command from the menu bar to display the SystemCommand dialog

• Type ufiles in the command text box• Click Apply and then Close

Step 2

Select the User option in the appropriate STAR GUIde panel or pro-STARcommand, depending on the special feature that needs to be modelled, as discussedin “Description of UFILE Routines” on page 14-5.

Step 3

Before a user routine can be used, it must be copied into its own individual filewithin the ufile directory created earlier. If you are doing this from scratch, it isconvenient to start by copying a skeleton (dummy) version of the relevantsubroutine into ufile.

• If you want to do this immediately, click Define user coding in your currentpanel. A file of the right name containing the right dummy subroutine will becreated automatically.

• If you want to inspect the dummy subroutine listing before proceedingfurther, go to the main pro-STAR window and select Utility > UserSubroutines from the menu bar. This activates the User Subroutines dialogshown below. The dialog box is made up of two sub-windows. The lower onelists all subroutine names, their description and the pro-STAR command thatactivates them. Selecting any line with the mouse displays the default(dummy) code for that subroutine in the upper part of the box. The relativesize of the two sub-windows can be adjusted by dragging the control ‘sash’(the small square on the right-hand side) up and down.

Page 291: Star CCm Guide

Chapter 14 USER PROGRAMMING

Subroutine Usage

Version 4.02 14-3

The required subroutine(s) may be copied into the ufile directory in one of thefollowing ways:

1. Automatically — click the Write Auto button. This copies all subroutinesalready selected implicitly via the User option in the various STAR GUIdepanels (or via the corresponding pro-STAR commands). Such subroutines arealso marked in the above list with an asterisk. Note that if more selections aremade after the above dialog box has been opened, it is necessary to update thedisplay of selected routines by clicking the Update List button.

2. Explicitly — click the Write File button. This copies the subroutine that iscurrently on view.

In Unix systems, the subroutine file names are of the form Usubname.f. If a fileof the same name already exists in the ufile subdirectory, a new file will becreated called Usubname.f.new. Note that generating a subroutine file in thisway is necessary only if

• the subroutine is to be set up for the first time, or• an existing subroutine is to be replaced, or• you are updating user code from an earlier version of STAR-CD.

Command: USUBROUTINE

Page 292: Star CCm Guide

USER PROGRAMMING Chapter 14

Subroutine Usage

14-4 Version 4.02

Step 4

Edit the existing or newly-created subroutine file as required, for example by usingpro-STAR’s built-in file editor (see the section on “File manipulation” on page17-9). This is necessary in order to either

• utilise some or all of the existing example coding (by removing the commentcharacter, C, from the beginning of the line), or

• add other coding, as appropriate.

Step 5

The version of a subroutine that is to be used in the current run should always belocated in a file called Usubname.f within the ufile subdirectory. Older filesbearing the same name should either be overwritten or renamed.

Once the above process is complete, the required user routines are automaticallypassed on to the STAR-CD system in source form. They are then compiled andlinked to the main program modules (see Chapter 17, “pro-STAR environmentvariables”). Note that STAR will issue a warning message if it does not find any ofthe required subroutines but will carry on with the run all the same.

Useful points

As a general rule, user routines should be written with due care. You should ensurethat results produced by user code are reasonable and physically meaningful, byimplementing suitable checks and by printing appropriate diagnostic messageswhenever necessary. Default user routines for all modelling functions listed in the“Introduction” are supplied, containing sample coding. It should be noted that:

1. Most routines are called for every cell, boundary, or droplet (as appropriatefor the routine and model in hand), so a penalty is paid in terms of executiontime when they are active. However, the increase in CPU time may beminimised through efficient programming, while keeping the source codingas brief and simple as possible.

2. Each routine has appropriate input data, described in a nomenclature textstored in file nom.inc in the ufile directory.

3. Each routine includes a file called comdb.inc, designed to ensure that theroutine uses the same precision as STAR itself. This is done by exploiting theIMPLICIT typing construct present in FORTRAN. According to this, avariable is given a type based upon its initial letter, those beginning with theletters A through H and O through Z being REAL variables, while thosebeginning with I through N are INTEGER variables. Thus, TIME, ANGLE andSPEED are real but NUMI, IVAL and JUNK are integer.

The IMPLICIT typing above can be overruled by an explicit declarationof type, e.g. REAL ITIME makes ITIME real and INTEGER ZVAL willmake ZVAL an integer. It is also possible to change the scope of theIMPLICIT typing. This is in fact what comdb.inc does:

(a) When STAR is used in single-precision runs, the file contains a single line

C IMPLICIT DOUBLE PRECISION (A-H,O-Z)

Page 293: Star CCm Guide

Chapter 14 USER PROGRAMMING

Description of UFILE Routines

Version 4.02 14-5

which is just a comment, thus preserving the standard implicit typing ofreal and integer variables.

(b) When STAR is used in double-precision runs, the file reads

IMPLICIT DOUBLE PRECISION (A-H,O-Z)

This means that the IMPLICT typing has been overruled to usedouble-precision real variables.

The implication for users is that to make sure a routine works correctly,variables should be named according to the IMPLICT typing shown above.That way the routine will be compiled with the correct precision.

Typical input data for a subroutine includes the following:

• Cell number• Global Cartesian or user-defined local coordinates of the cell centroid• Cell table numbers as defined in pro-STAR• Material numbers• Porous media sub-domain numbers• Iteration number• Time• Nodal values of the field variables

For more information on input data for the UFILE routines, see the nomenclaturefile (nom.inc). The variables in the argument list are never passed uninitialised:they always have a sensible value, which is usually the value from the previousiteration/time step, if applicable, or more generally the “default” value from thepro-STAR panel.

A brief description of each subroutine and how it is activated from pro-STAR isgiven in the next section.

Description of UFILE Routines

Boundary condition subroutines

The first ten of the subroutines listed below (all those with names starting with BCD)are activated from the Options menu in the Define Boundary Regions panel, or bycommand RDEFINE. They specify spatial variations of the boundary conditions atvarious boundary types. In order to use them, the boundaries comprising the regionare first defined in the usual way, including the local coordinate system for thevelocity components, the rotational speed of the coordinate frame and any defaultboundary values that become input values for the subroutines. The coordinatespassed to the subroutine are defined in the local coordinate system of the boundaryand u, v, w are the corresponding velocities. The latter will be in a rotating frame ifthis was originally specified. The transformation to the global Cartesian coordinatesystem is done by STAR.

BCDEFI Specifies distributions for all dependent variables that vary spa-tially over an inlet boundary.

Page 294: Star CCm Guide

USER PROGRAMMING Chapter 14

Description of UFILE Routines

14-6 Version 4.02

Material property subroutines

BCDEFO Can be used to specify variations in flow split or mass outflow atoutlet boundaries (e.g. in a transient run).

BCDEFP Specifies boundary conditions at pressure boundaries, i.e. pres-sure, turbulence intensity, length scale, temperature and speciesmass fractions.

BCDNRP Specifies boundary conditions at non-reflective pressure bounda-ries

BCDEFS Specifies boundary conditions at stagnation boundaries

BCDNRS Specifies boundary conditions at non-reflective stagnation bounda-ries

BCDEFW Specifies variations in wall boundary conditions, including mov-ing wall velocities in local coordinates and in a rotating referenceframe. In addition, wall temperature, chemical species mass frac-tion and heat and mass fluxes, can all be varied over the specifiedregion.

BCDEFF Specifies non-uniform boundary conditions at free-stream trans-missive boundaries, e.g. velocity components, pressure and tem-perature.

BCDEFT Specifies boundary conditions at transient wave transmissiveboundaries, e.g. velocity components, pressure and temperature.

BCDEFR Specifies boundary conditions at Riemann invariant boundaries,e.g. velocity components, pressure and temperature.

ROUGHW Activated from the Roughness menu in the Define BoundaryRegions panel for walls and baffles, or by command RDEFINE. Itspecifies a user-supplied wall roughness model, in problems wherewall functions are used for modelling flow near the wall. STARwill default to the smooth-wall behaviour should you activate thissubroutine but provide no code for it.

CONDUC Activated from the Conductivity menu in the Molecular Properties(Liquids and Gases) panel or Material Properties (Solids) panel,or by command CONDUCTIVITY. It specifies the thermal conduc-tivity within a material in heat transfer problems. The thermal con-ductivity can vary both spatially and with temperature.

Page 295: Star CCm Guide

Chapter 14 USER PROGRAMMING

Description of UFILE Routines

Version 4.02 14-7

CONVET Activated from the Specific Heat menu in the Molecular Proper-ties (Liquids and Gases) panel or by command SPECIFICHEAT.The activation works in an exclusive manner, i.e. choosing thisoption excludes use of subroutines CONVTE, COTEET andSPECHT. It supplies the variation of temperature T with enthalpy hand any other scalar variable, i.e. , in any waychosen by the user (e.g. analytically or by means of a table). Thereturned values are valid over a specified temperature range. If therelationship involves other scalar variables, it is necessary to sup-ply values for the partial derivatives and . STARalso requires the inverse relationship, , for inter-nal calculation purposes and inverts T automatically, using an effi-cient iterative technique.

CONVTE Activated from the Specific Heat menu in the Molecular Proper-ties (Liquids and Gases) panel or by command SPECIFICHEAT.The activation works in an exclusive manner, i.e. choosing thisoption excludes use of subroutines CONVET, COTEET andSPECHT. It supplies the variation of enthalpy h with temperature Tand any other scalar variable, i.e. , in any waychosen by the user (e.g. analytically or by means of a table). Therange of validity of the relationship should be specified in terms ofa corresponding range in the values of T. If enthalpy is dependenton a scalar variable, it is also necessary to supply the relevant par-tial derivatives . STAR needs the inverse relationship,

, for internal calculation purposes and inverts hautomatically using an efficient iterative technique. It is helpful(but not essential) to assist the iteration process by supplying

.

COTEET Activated from the Specific Heat menu in the Molecular Proper-ties (Liquids and Gases) panel or by command SPECIFICHEAT.The activation works in an exclusive manner, i.e. choosing thisoption excludes use of subroutines CONVET, CONVTE andSPECHT. It supplies two relationships:

(a) The variation of enthalpy h with temperature T and any otherscalar variable, i.e. , and

(b) the variation of temperature T with enthalpy h and any otherscalar variable, i.e. .

These should be valid over a given temperature range. Obviously,the two relationships must be consistent. If additional scalar varia-bles are involved, it is also necessary to supply the relevant partialderivatives . The COTEET option should be used if theuser wants to bypass STAR’s internal calculation procedure for theinverse temperature/enthalpy relationship (see the CONVET,CONVTE description above) in favour of a supplied relationship.

T h m1 m2 …,,,( )

T h∂⁄∂ T mk∂⁄∂h T m1 m2 …,,,( )

h T m1 m2 …,,,( )

h mk∂⁄∂T h m1 m2 …,,,( )

h T∂⁄∂

h T m1 m2 …,,,( )

T h m1 m2 …,,,( )

h mk∂⁄∂

Page 296: Star CCm Guide

USER PROGRAMMING Chapter 14

Description of UFILE Routines

14-8 Version 4.02

DENSIT Activated from the Density menu in the Molecular Properties(Liquids and Gases) panel or by command DENSITY. It suppliesequations of state for density calculations that are not included inthe standard options. For compressible flow cases where density isa function of pressure, the routine must also specify the partialderivative and return it in parameter DENDP.

DIFFUS Activated from the Material Mass Diffusivity menu in the BinaryProperties (Additional Scalars) panel or by command DIFFU-SIVITY. It supplies the molecular diffusivity of the backgroundmaterial in multi-component mixing problems.

PORCON Activated from a menu in the Thermal Properties (Porosity) panelor by command POREFF. It supplies functions for the calculationof effective thermal conductivity and turbulent Prandtl numberwithin a distributed resistance sub-domain.

PORDIF Activated from a menu in the Additional Scalar Properties (Poros-ity) panel or by command SCPOROUS. It supplies functions forthe calculation of effective mass diffusivity and turbulent Schmidtnumber within a distributed resistance sub-domain.

PORKEP Activated from a menu in the Turbulence Properties (Porosity)panel or by command PORTURBULENCE. It specifies non-uni-form distributions of turbulence intensity and dissipation lengthscale within a distributed resistance sub-domain.

POROS1 Activated from the Resistance Coefficients menu in the Resistanceand Porosity Factor panel or by command POROSITY. It definesspatially varying coefficients α and β within a distributed resist-ance sub-domain. The user can also specify them in terms of alocal coordinate system.

POROS2 Activated from the Resistance Coefficients menu in the Resistanceand Porosity Factor panel or by command POROSITY. It definesthe resistance components directly instead of via theresistance coefficients α and β. This facility is a useful alternativeway of specifying a non-linear variation of porous resistance withvelocity. For this purpose, the global Cartesian velocity compo-nents are supplied to the subroutine.

ρ p∂⁄∂

k1 k2 k3,,( )

Page 297: Star CCm Guide

Chapter 14 USER PROGRAMMING

Description of UFILE Routines

Version 4.02 14-9

Turbulence modelling subroutines

SPECHT Activated from the Specific Heat menu in the Molecular Proper-ties (Liquids and Gases) panel or Material Properties (Solids)panel, or by command SPECIFICHEAT. The activation works inan exclusive manner, i.e. choosing this facility excludes use ofsubroutines CONVTE, CONVET and COTEET. The subroutine sup-plies the variation of fluid or solid mean specific heat with temper-ature and other quantities, at constant pressure. It is particularlyuseful in modelling combusting or reacting flows exhibiting sub-stantial variation in the value of this property. STAR calculates thetemperature T from the iterative expression

(14-1)

where n is the iteration number and is the mean specific heat.

THDIFF Specifies a user-supplied method of calculating the thermal diffu-sion coefficient for chemical species scalars (see Chapter 5, “Sub-routine THDIFF Set-up” in the Supplementary Notes volume)

VISMOL This subroutine is activated from the Molecular Viscosity menu inthe Molecular Properties (Liquids and Gases) panel or by com-mand LVISCOSITY. It can specify an arbitrary distribution ofmolecular viscosity, but its principal use is for supplying functionsthat describe non-Newtonian viscous behaviour.

LSCALE Activated automatically when the k-l model is selected via menuoption k-l in panel Turbulence Models (Turbulence tab). It can alsobe activated by command TURBULENCE. The subroutine suppliesthe spatial variation of dissipation length scale (l) required by thek-l model.

TWLUSR Activated from the Two-Layer Model menu in the TurbulenceModels panel (Near-Wall Treatment tab) or by commandTLMODEL. It defines the user’s own formulation of turbulentbehaviour in problems using a two-layer model.

VISTUR This subroutine is activated from panel Turbulence Models (Tur-bulence tab) or by command TURBULENCE. The subroutine spec-ifies the turbulent viscosity distribution for a turbulent flowcalculation.

Tn( ) h

cp( ) n 1–( )----------------------=

cp

Page 298: Star CCm Guide

USER PROGRAMMING Chapter 14

Description of UFILE Routines

14-10 Version 4.02

Source subroutines

FLUINJ Activated from the Define Source menu in the Source Terms panel(Mass tab). Alternatively, use command RSOURCE. The subrou-tine initiates fluid injection or removal at specified cells and at aprescribed rate (in units of kg/s/m3). In the case of injection, theproperties of the injected fluid, i.e. velocity components, turbulenceparameters, temperature, etc. must also be prescribed. This is notrequired when fluid is removed.

SORENT Activated from the Define Source menu in the Source Terms panel(Enthalpy tab) or by command RSOURCE. It specifies additionalenthalpy sources or sinks due, for example, to electric or magneticfields, chemical or nuclear reaction and thermal radiation. It canalso fix the temperature value within a cell by makingS1P=GREAT* and S2P=GREAT, where is the desiredfixed temperature value and GREAT is a large number used inter-nally by pro-STAR.

SORKEP Activated from the Define Source menu in the Source Terms panel(Turbulence tab) or by command RSOURCE. It allows the user toredefine the source term components for the k and ε equations, e.g.to account for special effects due to streamline curvature, magneticfields, etc. The subroutine can also be used to fix the value of k.Note that the quantities S1P and S2P in the example code are the‘standard’ source and sink terms given in the Methodology vol-ume. Thus the user, in modifying or supplementing the standardexpressions, effectively replaces the built-in source terms.

SORMOM Activated from the Define Source menu in the Source Terms panel(Momentum tab) or by command RSOURCE. It enables the model-ling of additional momentum source terms, for example due tomagnetic or electric fields. The source terms must be specified perunit volume and linearised as S1P-S2P* , where is the valueof the velocity component in question at node P (see the Method-ology volume for details). The two components S1P and S2P mustbe separately specified for the U, V and W momentum equations.The cells in which to insert these sources can be selected by theirindices IP, global Cartesian coordinates XP, YP, ZP or the celltable number ICTID.

T fix T fix

φP φP

Page 299: Star CCm Guide

Chapter 14 USER PROGRAMMING

Description of UFILE Routines

Version 4.02 14-11

Radiation modelling subroutines

Free surface / cavitation subroutines

SORSCA Specifies additional source terms for the scalar variable equationsand is activated from one of the following locations:

(a) The Define Source menu in the Source Terms panel (Scalartab) or by command SCSOURCE. The source terms mightconsist of, for example, the chemical kinetics and rate expres-sions of a combustion process.

(b) The Model Selection menu in panel Cavitation Model or bycommand CAVITATION. In this case the source terms areused to specify a special cavitation model.

The mass fraction value at selected cells can also be fixed via thesource terms, in the same manner as that described above forenthalpy.

RADPRO Activated from the Radiative Properties menu in panel ThermalModels (Liquids and Gases) when radiation with participatingmedia is turned on. May also be activated from the RadiativeProperties (Solids) panel if solid-fluid heat transfer is turned on.Alternatively, use command RADPROPERTIES. It specifiesnon-uniform distributions of absorptivity and scattering coeffi-cients within the medium filling the space between radiatingboundaries.

RADWAL Specifies a user-supplied method of calculating radiative proper-ties for solid walls (see Chapter 6, “Surface Properties” in the Sup-plementary Notes volume)

USOLAR Activated from the Define Parameters menu in the ThermalOptions panel (Solar Radiation section) or by command SOLAR.In transient problems, it enables specification of solar angle andintensity at every time step of the analysis.

CAVNUC This subroutine is required only in cavitation problems using thebubble two-phase model. It is activated from the Parameters forBTF Model menu in panel Cavitation Model or by commandCAVNUCLEI. It specifies the number of bubble nuclei per cubicmetre and a functional relationship between equilibrium radiusand cell pressure.

Page 300: Star CCm Guide

USER PROGRAMMING Chapter 14

Description of UFILE Routines

14-12 Version 4.02

Lagrangian multi-phase subroutines

CAVPRO This subroutine is needed in cavitation or free surface problemsrequiring variable properties. It is activated from one of the follow-ing locations:

(a) The Saturation Pressure menu in panel Cavitation Model orby command CAVPROPERTY. It then specifies the speed ofsound in the current material (for both the liquid and vapourphases) and the saturation vapour pressure.

(b) The Saturation Property Variation menu in panel Mass Trans-fer (Free Surface folder) or by command VAPORIZATION. Itthen specifies the vaporisation properties of the current mate-rial (saturation temperature and vapour pressure plus latentheat of vaporisation).

COMDEN Calculates species density and its derivative with respect to pres-sure and temperature for compressible free-surface flows (seeChapter 1 of the Supplementary Notes volume)

FSEVAP Activated from the Vaporization Rate menu in the Mass Transferpanel (Free Surface folder). Alternatively, use command VAPOR-IZATION. It calculates the vaporization rate in problems involv-ing mass transfer by evaporation across a free surface.

FSTEN Activated from the Additional Properties menu in the Heavy FluidMolecular Properties panel (Free Surface or Cavitation folders).Alternatively, use command STENSION. It calculates values forsurface tension coefficient and contact angle in free surface andcavitation problems.

COLLDT Activated from the Collision Model menu in panel Droplet Physi-cal Models and Properties (tab Global Physical Models) or bycommand DCOLLISION. It specifies the method of detectinginter-droplet collisions in transient Lagrangian flow problems.

COLLND Activated from the Collision Model menu in panel Droplet Physi-cal Models and Properties (tab Global Physical Models) or bycommand DCOLLISION. It specifies the method of calculatingthe droplet number density used for collision modelling in tran-sient Lagrangian flow problems.

DRAVRG Activated from the Droplet Averaging menu in the Droplet Con-trols panel or by command DRAVERAGE. It supplies informationabout average droplet properties calculated while tracking a drop-let parcel through the solution domain.

Page 301: Star CCm Guide

Chapter 14 USER PROGRAMMING

Description of UFILE Routines

Version 4.02 14-13

DRHEAT Activated from the Heat Transfer menu in panel Droplet PhysicalModels and Properties (tab Droplet Physical Models) or by com-mand DRHEAT. It enables the user to define the heat transfer proc-ess between droplets and the surrounding carrier fluid intwo-phase Lagrangian flow problems.

DRMAST Activated from the Mass Transfer menu in panel Droplet PhysicalModels and Properties (tab Droplet Physical Models) or by com-mand DRMASS. It enables the user to define the mass transferprocess between droplets and the surrounding carrier fluid intwo-phase Lagrangian flow problems.

This subroutine can also be used for specifying mass transferbetween a droplet component and multiple scalars in the surround-ing medium. This is done by first selecting the component in thescroll list of the Droplet Properties tab and then typing the key-word User in the Evaporates to Scalar box. Alternatively, usecommand DRCMPONENT.

DROBRK Specifies a user-supplied droplet break-up model (see Chapter 10of the Supplementary Notes volume)

DROICO Activated from the Droplet User Subroutine (LagrangianMulti-Phase) or by command DRUSER. The subroutine enablesthe user to specify droplet initial conditions for two-phase,Lagrangian flow problems. In transient problems, the subroutinesets the initial conditions for any calculation time step at whichparcels are released.

DROMOM Activated from the Momentum Transfer menu in panel DropletPhysical Models and Properties (tab Droplet Physical Models) orby command DRMOMENTUM. It enables the user to calculatemomentum transfer between droplets and the surrounding carrierfluid in two-phase Lagrangian flow problems.

DROPRO Enables the user to specify any physical property appearing inpanel Droplet Physical Models and Properties (tab Droplet Prop-erties). It is activated by selecting the Subroutine Usage buttonnext to any of the properties displayed on the tab, or by commandDRPROPERTIES.

DROWBC Activated from the Droplet-Wall Interaction menu in panel Drop-let Physical Models and Properties (tab Droplet Physical Models)or by command DRWALL. It enables the user to calculate momen-tum, heat, and mass exchange between droplets and wall bounda-ries.

Page 302: Star CCm Guide

USER PROGRAMMING Chapter 14

Description of UFILE Routines

14-14 Version 4.02

Liquid film subroutines

Eulerian multi-phase subroutines

FDBRK Specifies the method of calculating liquid film stripping by thecarrier fluid. It is activated by selecting User in the Stripping andRe-entrainment menu of the Film Controls panel or by commandLFSTRIP.

LQFBCD Specifies boundary conditions at liquid film inlets. It is activatedby selecting User in the Film Boundaries panel or by commandLQFBC.

LQFINI Specifies initial conditions for all liquid film variables at a givenboundary region. It is activated by selecting User in the Optionsmenu of the Film Initialization panel or by command LQFINI-TIAL.

LQFPRO Specifies liquid film physical properties or liquid film componentpartial pressures. It is activated by selecting the Subroutine Usagebutton next to any of the properties displayed on the Film Proper-ties tab (panel Film Physical Models and Properties), or by com-mand LQFPROPERTY.

LQFSOR Modifies the source terms of the mass, momentum and enthalpyequations for liquid films. It is activated by selecting User in theUser Defined Source Term menu of the Film Controls panel or bycommand LFQSOR.

UEDRAG This subroutine is used in Eulerian multi-phase problems to calcu-late the total drag force, per unit volume of the computational cell.It is activated from the main menu in the Drag Forces panel (Eule-rian Multi-Phase folder) or by command EDRAG.

UETURB This subroutine is employed in Eulerian multi-phase problems tocalculate the response coefficient . The latter is used to derivethe dispersed phase turbulence characteristics from those of thecontinuous phase. It is activated from the Ct Model menu in theTurbulence Models panel (Multiphase Options tab) or by com-mand ETURB. Note that the drag force per unit volume referred toabove is supplied as an input variable since it is often a parameterin formulations.

Ct

Ct

Page 303: Star CCm Guide

Chapter 14 USER PROGRAMMING

Description of UFILE Routines

Version 4.02 14-15

Chemical reaction subroutines

UEHEAT This subroutine is employed in Eulerian multi-phase problems tocalculate the Nusselt number. The latter is then used in the calcula-tion of the mean interface heat transfer coefficient, which in turn isused to compute the interphase heat transfer when solving forenergy for either phase. The subroutine is activated from the Inter-phase Heat Transfer panel (Eulerian Multi-Phase folder) or bycommand EHTRANSFER.

COALC Specifies a user-supplied char combustion model in coal combus-tion cases (see Chapter 3, “User Coding” in the SupplementaryNotes volume)

COALV Specifies a user-supplied volatile evolution model in coal combus-tion cases (see Chapter 3, “User Coding” in the SupplementaryNotes volume)

FULPRO Specifies user-defined fuel physical properties and chemical reac-tion parameters for use with the Shell ignition and knock models.It can be activated in two ways:

(a) From the Ignition Reaction Based On menu in panel Ignition(folder Chemical Reactions). Alternatively, type commandIGNMODEL.

(b) From the Knock Reaction Based On menu in panel Knock(folder Chemical Reactions). Alternatively, type commandKNOCK.

NOXUSR Activated by the Thermal NOx, Prompt NOx, or Fuel NOx menusin panel Emissions (Chemical Reactions folder), or by commandNOX. It contains user coding for the calculation of thermal, promptor fuel NOx sources.

PARUSR Specifies a user-supplied particle component evolution model incoal combustion cases (see Chapter 3, “User Coding” in the Sup-plementary Notes volume)

RATUSR Specifies a user-supplied method of calculating turbulence effectsin complex chemistry models (see Chapter 4, “RATUSR UserSubroutine” in the Supplementary Notes volume)

REACFN Activated from the Rate Model menu in the Reaction System(Chemical Reactions) panel when option Combined/User is cho-sen as the current reaction model. Alternatively, type commandRRATE. It specifies a user-supplied reaction rate for chemicalreactions of any type.

Page 304: Star CCm Guide

USER PROGRAMMING Chapter 14

Description of UFILE Routines

14-16 Version 4.02

Rotating reference frame subroutines

Moving mesh subroutines

REACUL Specifies a user-supplied reaction rate for the Coupled ComplexChemistry model. It is activated from panel Reaction System, hav-ing previously selected option User from the Reaction Rate Calcu-lated by menu in panel Scheme Definition (folder ChemicalReactions). Alternatively, type command CRMODEL.

SCALFN In some circumstances, chemical species mass fractions can becalculated from user-prescribed algebraic relationships, e.g. stoi-chiometric relationships, rather than from finite-volume transportequations. These algebraic relationships can be specified in thisroutine, activated from the Solution Method menu in panel Addi-tional Scalars (Solution Controls > Equation Behaviorsub-folder). Alternatively, use command SCPROPERTIES.

UOMEGA Calculates values of angular velocity (omega) for problems involv-ing rotating reference frames. It is activated by the User Optionmenu in the Rotating Reference Frames panel or by commandSPIN.

UPOSTM Generates post-processing data at coupled boundaries. It is used inproblems with multiple rotating frames of reference that are solvedexplicitly. The subroutine is called automatically in the RotatingReference Frames panel if option Multiple Frames - Explicit isselected from the Reference Frame Treatment menu. Alternatively,use command MFRAME.

NEWXYZ Activated by selecting Modules > Transient from the mainpro-STAR menu to open the Advanced Transients dialog, and thenselecting On in the Moving Grid Option menu. Alternatively, usecommand MVGRID. The subroutine specifies the cell vertex coor-dinates at a new time. The old time level coordinates are availablein the VCORN array and must be overwritten with new coordi-nates. The sample coding supplied describes a moving mesh that islinearly expanding and contracting between a reciprocating pistonand a fixed cylinder head; the piston is driven by a rotating crankmechanism.

UASI Specifies the time-varying offsets used in matching arbitrary slid-ing interface (ASI) boundaries. It is called automatically if amodel employing sliding events is defined using command EVS-LIDE.

Page 305: Star CCm Guide

Chapter 14 USER PROGRAMMING

Description of UFILE Routines

Version 4.02 14-17

Miscellaneous flow characterisation subroutines

UBINIT Specifies initial conditions for cells that are re-incorporated intothe solution domain via an INCLUDE event. It is called automati-cally if command EICOND is issued in a model employing suchcells.

UPARM Generates parameters required for moving meshes. It is calledautomatically if a moving mesh model is defined using commandsin the EVENTS module; i.e. if command

MVGRID,ON,EVENT,PROSTAR

is issued.

INITFI Activated from the Values menu in the Initialization panel (Liquidsand Gases or Solids folders). Alternatively, use command INI-TIAL. It initialises flow field variables to user-specified values.These values override any constant values also appearing in thosepanels. During an initial field restart, the subroutine can also beused to selectively reset some of the variable values in the field.Note that the subroutine returns velocities in a local coordinatesystem. STAR transforms them to a stationary global Cartesiansystem. Velocities in this system will differ from the velocitiesproduced by the subroutine because of this transformation and,when that feature is active, the transformation from a rotating ref-erence frame.

MODSWF Activated by a button labelled Heat and Mass Transfer in the Mis-cellaneous Controls (Other Controls) panel, or by commandHCOEFF. It modifies or supplies new wall functions for heat andmass transfer. This is useful, for example, in problems involvingstrong natural convection where the standard formulae for thetransfer coefficients might be inaccurate. One such example isincluded in the sample coding. Mean temperatures and mass frac-tions for all fluid materials are made available through the parame-ter list.

PORHT2 Specifies user-supplied coefficients for a quasi-linear relationshipbetween porous solid and fluid temperatures in problems involv-ing conjugate heat transfer in porous media (see Chapter 16,“Inter-phase heat transfer term” in the Supplementary Notes vol-ume).

Page 306: Star CCm Guide

USER PROGRAMMING Chapter 14

Description of UFILE Routines

14-18 Version 4.02

Solution control subroutines

VARPRT Enables specification of either a variable Prandtl number forenthalpy or a variable Schmidt number. It can be activated in twoways:

(a) From the Prandtl(Enth). menu in panel Turbulence Models(Turbulence tab). Alternatively, type command COKE.

(b) Via the Schmidt Number pop-up menu in the Binary Proper-ties (Additional Scalars) panel, or by typing commandSCPROPERTIES. In this case, the subroutine should supplyspecial functions for calculating the turbulent Schmidtnumber of chemical species in multi-component mixing prob-lems.

DTSTEP Enables the user to specify a variable time step for transient, sin-gle-transient or pseudo-transient simulations. It can be activated inthree ways:

(a) For single-transient cases, select option User in the Time StepMethod menu of the Set Run Time Controls panel (AnalysisPreparation/Running folder). Alternatively, use commandDELTIME

(b) For pseudo-transient cases, select option User in the TimeStep Option menu of the Set Run Time Controls panel (Analy-sis Preparation/Running folder). Alternatively, use commandTIME.

(c) For transient cases, open the Advanced Transients dialog,select the appropriate load step, and then click the User Flagbutton in front of the time step (Delta Time) box. Alterna-tively, use command LSTEP.

The subroutine can be used, for example, in fire and smoke move-ment simulations that involve a large, concentrated heat source.The time step can be adjusted in terms of the number of PISO cor-rectors and maximum Courant number. Note that STAR does notalter the number of time steps in a load step, so your code mustensure that the time step lengths are such that the length of theload step is correct.

Page 307: Star CCm Guide

Chapter 14 USER PROGRAMMING

Sample Listing

Version 4.02 14-19

Sample Listing

The listing for subroutine CONDUC is given below as an example of the defaultsource code available in STAR-CD. Users wishing to inspect the contents of anyother subroutine should start a pro-STAR session and then activate the UserSubroutines dialog, as explained in “Subroutine Usage” on page 14-1.

C************************************************************************* SUBROUTINE CONDUC(CON,CKNX,CKNY,CKNZ)C ConductivityC*************************************************************************C--------------------------------------------------------------------------*C STAR-CD VERSION 4.00.000 INCLUDE ’comdb.inc’C COMMON/USR001/INTFLG(100)C INCLUDE ’usrdat.inc’ DIMENSION SCALAR(50) EQUIVALENCE( UDAT12(001), ICTID ) EQUIVALENCE( UDAT11(001), CP ) EQUIVALENCE( UDAT11(002), DEN ) EQUIVALENCE( UDAT11(003), ED ) EQUIVALENCE( UDAT11(006), P ) EQUIVALENCE( UDAT11(007), T ) EQUIVALENCE( UDAT11(008), TE ) EQUIVALENCE( UDAT11(009), SCALAR(01) ) EQUIVALENCE( UDAT11(059), U ) EQUIVALENCE( UDAT11(060), V ) EQUIVALENCE( UDAT11(061), W ) EQUIVALENCE( UDAT11(062), VISM ) EQUIVALENCE( UDAT11(063), VIST )

POSDAT Activated by the User subroutine button in the Analysis Output(Output Controls) panel or by command PRFIELD. It performsspecial post-processing operations. For example:

(a) Variable values at several monitoring locations can be writtento user-designated output files for subsequent processing.

(b) A bulk averaging scheme can be prescribed for selected flowvariables and printed at specified intervals.

(c) Calculation of lift and drag coefficients.

This subroutine may be called both at the beginning and at the endof every time step or iteration. The place from which it is called isdistinguished by the value of parameter LEVEL (=1 — beginning,=2 — end)

VARBLN Activated by the Blending Method pop-up menus in the PrimaryVariables panel (Differencing Schemes tab). It can be used to varythe blending factor for higher-order discretisation schemes overthe computational domain. Alternatively, use commandDSCHEME.

Page 308: Star CCm Guide

USER PROGRAMMING Chapter 14

New Coding Practices

14-20 Version 4.02

EQUIVALENCE( UDAT11(067), X ) EQUIVALENCE( UDAT11(068), Y ) EQUIVALENCE( UDAT11(069), Z )CC-----------------------------------------------------------------------CC This subroutine enables the user to specify thermal conductivity.CC CON - Isotropic conductivity or MAX(CKNX,CKNY,CKNZ) if theC conductivity is anisotropicC CKNX - Anisotropic conductivity in x-directionC CKNY - Anisotropic conductivity in y-directionC CKNZ - Anisotropic conductivity in z-directionCCC STAR calls this subroutine for cells and boundaries.CC ** Parameters to be returned to STAR: CON,CKNX,CKNY,CKNZCC-----------------------------------------------------------------------CC Sample coding: To specify thermal conductivity for a group ofC cells with cell table numbers 2 and 11 as a functionC of temperatureCC IF (ICTID.EQ.2.OR.ICTID.EQ.11) CON=4.3+0.001*TC-------------------------------------------------------------------------C

RETURN ENDC

New Coding Practices

Most standard STAR-CD V3.2X user coding will work without any modification.The table below explains the differences between V3.2X and V4.00 user routines.Note that STAR-CD V3.2X / V3.1X common blocks / variable names should notbe used.

User routine Difference

CAVPROFreedom to modify AL, AV, TSAT and HVAPhas been removed

DENSITFor the Free Surface model, freedom to modifythe heavy/light density has been removed.IFLUTYP and DENDT are no longer present

Page 309: Star CCm Guide

Chapter 14 USER PROGRAMMING

New Coding Practices

Version 4.02 14-21

Users are advised to consult subroutine POSDAT to gain familiarity withSTAR-CD’s new face-based data structure. Commonly used V3.2X data items thatare now accessed differently in V4.00 are listed below.

DROWBC

a/ The DRCOMP common block needs to beincluded to the source, e.g.COMMON /DRCOMP/ NDRCOM_maxb/ The DEMUCO array needs to be dimen-sioned as DEMUCO(NDRCOM_max,*)

For more information, please consult thedefault source code for DROWBC suppliedwith the STAR-CD installation.

POSDAT Data structure is different

SPECHTFor the Free Surface model, only the mixtureCp needs to be specified. IFLUTYP is nolonger present

VISMOLFor the Free Surface model, only the mixtureviscosity needs to be specified. IFLUTYP is nolonger present

V3.2X data item Equivalent V4.00 data item

KEYSee material/and loop in posdat.f.doma(nd)%mattyp.eq.FLUID test tellsyou whether you have a fluid or a solid.

LQ, LCU, LCY, LCO, LSI, LX lfc

S, SB, SBSI sv

WF, WFCU, WFCY, WFSI w

VOLF, VOLCU, VOLCY, VOLSI svol

AC, COCU, COCY, COSI,COCO, ACB

af

F, FB, FBSI fl

KEYSUB doma(nd)%sd(nsd)%irot

T(1,IP) t(ip)

T(scalar index +1, IP) c(IP,scalar index), see posdat.f

Page 310: Star CCm Guide

USER PROGRAMMING Chapter 14

User Coding in parallel runs

14-22 Version 4.02

User Coding in parallel runs

If user coding is present in a parallel run, it is possible that some of the requiredoperations need access to flow field values that are distributed throughout thevarious computational domains. In such cases, it is necessary to collect such valuesprior to manipulation and to do this, the supplied coding needs to use specialmessage passing routines.

The example shown below is an extract from user subroutine NEWXYZ and itemploys a parallel function called IGSUM to find the global number of active celllayers in an engine simulation problem.

NLIVE=0 ICELL1=15904 ICELLEND=62209 NCOF=1029 DO I=ICELL1,ICELLEND,NCOF CALL LIVCLL(I,ISTAT) IF (ISTAT.EQ.1) NLIVE=NLIVE+1 ENDDOc. NHPC > 1 if parallel run IF(NHPC.GT.1) NLIVE=IGSUM(NLIVE)

A synopsis of the available message passing-routines is given in Appendix E. Theseroutines should only be called if required; they are not necessary for sequential runs.To aid diagnostics, four variables are provided via file usrdat.inc to usersubroutines:

IHPC — this is the local process number (1 ≤ IHPC ≤ NHPC)IHPC = 1 for a sequential analysisIHPC = 1 for the ‘master’ process in STAR HPCIHPC > 1 for the ‘slave’ process in STAR HPC

NHPC — Number of processes (NHPC = 1 for a sequential analysis)

NHHPC — Number of fluid ‘halo’ cells on the local process

NTHHPC — Total number of ‘halo’ cells on the local process (fluid plus solid)

Page 311: Star CCm Guide

Chapter 15 PROGRAM OUTPUT

Introduction

Version 4.02 15-1

Chapter 15 PROGRAM OUTPUT

Introduction

Run-time screen output from STAR provides a summary of the input specificationfor the problem being solved and also allows monitoring of the calculation progress.It is therefore important for users to understand this information and examine itregularly to ensure that

• the problem has been correctly set up;• the calculations are proceeding satisfactorily.

The amount of information displayed is largely up to the user, apart from a core ofinformation that is always produced. The various checks and outputs which arespecially activated from pro-STAR’s STAR GUIde environment (Output Controlsfolder) are described below, along with the permanent output.

Permanent Output

The core-level screen information from STAR can be divided into two sections:

1. An echo of the input data provided by the user2. A display of analysis results and information on the progress of STAR

calculations

Input-data summary

As can be seen in Table 15-1 on page 15-4, the input summary begins with theSTAR-CD version number and the date and time of the run. This is followed by atable of essential model data for checking that all important user-defined inputs arecorrect. All listed data reflect the values stored in the problem (.prob) file.

The table is divided into distinct sections, as follows:

General DataThis section provides general information on the problem at hand, including:

• The case name• Number of cells• The model’s overall physical dimensions• The run precision (single or double)

This section of the table also summarises:

• The character of the flow (i.e. steady or transient)• The starting iteration number for the calculations• The frequency of solution data and screen output• The solution algorithm and linear equation solver selected• The residual tolerance used for convergence tests• The maximum number of iterations or time steps specified

A sample output can be seen in Section A of Table 15-1.

Page 312: Star CCm Guide

PROGRAM OUTPUT Chapter 15

Permanent Output

15-2 Version 4.02

Fluid PropertiesThis section comprises one or more tables containing the properties of all fluiddomains (streams) included in the model. For each domain, the informationsupplied includes:

• The variables calculated, including the turbulence model selected and theappropriate characteristic length

• The physical properties specified, such as density, viscosity, specific heat, andconductivity

• The pressure/temperature reference locations for the domain• The reference pressure and temperature (when appropriate)• Any fixed boundary fluxes included in the model• The specified initial field values• The specified boundary conditions

An example of the output for a multi-domain case appears in Table 15-1, Section B.This shows data for two fluid domains with different physical properties.

Solid PropertiesThe fluid domain tables are followed, in the case of solid-fluid heat transferproblems, by tables of properties for solid domains such as density, specific heatand conductivity. This can be seen in Table 15-1, Section C. The referencetemperature, initial field values and boundary conditions are also included here.

Additional FeaturesIn this part of the table, information is provided on any additional features that areactive in the model, such as:

• Radiation• Free surface• Run-specific system settings

The sample output of Table 15-1, Section D, indicates use of memory-based scratchfiles and platform-specific solver optimization.

User FORTRAN CodingThis section of the table only appears when user-defined FORTRAN coding isactive during the calculations. The sample case presented in Table 15-1 does not usethis option.

Solution ParametersThis last section of the table deals with the settings for the control parameters usedby the numerical algorithm, such as

• relaxation factors,• type of differencing scheme used,• the corresponding blending factors,• residual normalising factors for each fluid and solid domain,• solver tolerances,• sweep limits.

For transient PISO runs the printout of relaxation factors is suppressed as irrelevant,except for the pressure correction relaxation factor. A typical printout of the above

Page 313: Star CCm Guide

Chapter 15 PROGRAM OUTPUT

Printout of Field Values

Version 4.02 15-3

parameters can be seen in Table 15-1, Section E.

Run-time output

The run-time output that provides information on the progress of the calculations ateach iteration or time step can be seen in Table 15-2 on page 15-6 and is arrangedin two sections:

1. The left-hand section contains the global absolute residual histories for eachgroup of transport equation solved (momentum, mass, turbulence, etc.).

2. The right-hand section contains values of the corresponding dependentvariables (velocity magnitude, pressure, turbulent viscosity, etc.) at apre-defined monitoring location in domain no. 1.

In steady-state runs, satisfactory progress of the calculations should show

• a steady reduction in the global absolute residuals from iteration to iteration;• stabilisation of the values of flow field variables at the monitoring location.

However, residuals do not always decrease from iteration to iteration and, in somecases, oscillations can be observed. These can be ignored as long as the overallresidual levels are reduced over a reasonable number of iterations.

Information on total CPU and elapsed times is also given. This output appears onthe screen during an interactive session and is also saved in the run-time output(.run) file. Any warning messages generated during the course of the calculationsare stored in the run-time optional output (.info) file and should be inspected bythe user separately. The .run file also contains a reminder to the effect thatwarning messages have been produced.

Printout of Field Values

The printout of field values for the solution variables is optional and, if present,follows the analysis history output. The output quantity and frequency is left up tothe user and may be set using various options in the “Analysis Output” STARGUIde panel — see the “Print Cell Range” section for steady-state problems. Thereis also a similar “Print Cell Range” section in the transient-problem version of thispanel (“Post tab”). An example of such a printout can be seen in Table 15-3 on page15-7.

Optional Output

All additional outputs are optional and, if requested, will appear in the .info file.Output of additional data is activated by various options in the “Monitor NumericBehaviour” STAR GUIde panel. Table 15-4 on page 15-8 shows typical informationappearing in this file (in this case up to and including data for iteration no. 1). Notethat velocity component data at the flow field’s extrema are given in the localcoordinate system. This is in contrast to the data described in Chapter 17, “Datarepository file (.ccm)”, which are always stored in the global Cartesian coordinatesystem.

Page 314: Star CCm Guide

PROGRAM OUTPUT Chapter 15

Example Output

15-4 Version 4.02

Example Output

Table 15-1:

|-------------------------------------------| | STAR-CD VERSION 4.00.000 | | THERMOFLUIDS ANALYSIS CODE | | Operating System: Linux | | Stardate: 6-DEC-2005 Startime: 14:32:39 | |-------------------------------------------|

|-----------------------------------------------------------| | STAR Copyright (C) 1988-2005, Computational Dynamics Ltd. | | Proprietary data --- Unauthorized use, distribution, | | or duplication is prohibited. All rights reserved. | |-----------------------------------------------------------|

|-------------------------------------------------------------------------------------------| | ---------------------------- PROBLEM SPECIFICATION SUMMARY ---------------------------- | |-------------------------------------------------------------------------------------------| | CASE TITLE .................. => | | NUMBER OF CELLS ............. => 192 | | MESH DIMENSIONS XMIN XMAX YMIN YMAX ZMIN ZMAX | | (IN METRES) ............ => 0.0E+00 6.0E-01 0.0E+00 8.0E-01 0.0E+00 5.0E-02 | | MESH QUALITY ................ => | | Expansion factor .......... => Aver = 1.00, Max = 1.00 (CVs: 43, 44) | | Non-orthogonality (deg).... => Aver = 0.00, Max = 0.00 (CVs: 0, 0) | | RUN PRECISION ............... => Single | | STEADY ANALYSIS ..............=> START FROM ITERATION = 0 | | INITIALISATION .............. => WILL NOT BE EMPLOYED | | DATA DUMP (FILE.ccm) ........ => EVERY 10 ITERATIONS | | SOLUTION PROCEDURE .......... => SIMPLE | | RESIDUAL TOLERANCE .......... => 1.00E-03 | | MAX. NO. OF ITERATIONS ...... => 100 | | RESTART DATA ................ => WILL BE SAVED ON out.ccm | | SURFACE DATA ................ => WILL NOT BE SAVED | | CONVERGENCE DATA ............ => WILL BE PRINTED ON FILE.info | | FIELD DATA .................. => WILL BE PRINTED | | LIN. ALG. EQU. SOLVER ....... => Conjugate gradient with Incompl. Choleski precond. | |-------------------------------------------------------------------------------------------| |-> DOMAIN 1: FLUID ------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | SOLVE ....................... => U, V, P, TE, ED, | | FLUID FLOW .................. => TURBULENT INCOMPRESSIBLE | | TURBULENCE MODEL ............ => HIGH RE K-EPS MODEL | | CONSTANTS ................. => C_mu=0.09, C_1=1.44, C_2=1.92, C_3=1.44, C_4=-0.33 | | => cappa=0.419, Pr_k=1.00, Pr_eps=1.219, Pr=0.90 | | REFERENCE PRESSURE .......... => PREF = 1.000E+05 Pa | | DENSITY ..................... => IDEAL GAS: MOLW = 2.891E+01 | | MOLECULAR VISCOSITY ......... => CONSTANT - MU = 1.810E-05 Pas | | | | INITIAL FIELD VALUES ........ => u v w p | | => 0.0E+00 0.0E+00 0.0E+00 0.0E+00 | | => Tur.In. Len.Sc. | | => 2.6E-02 1.0E-01 | | BOUNDARY CONDITIONS ......... => | | Reg. 0 Wall: U = 0.000E+00 V = 0.000E+00 W = 0.000E+00 Om = 0.000E+00 in C.Sys. 1 | | Elog = 9.000E+00 | | Reg. 1 Inlet: U = 0.000E+00 V = 5.000E+01 W = 0.000E+00 Om = 0.000E+00 in C.Sys. 1 | | TI = 5.000E-02 TLS = 5.000E-03 | | Reg. 2 Constant piezomet. pressure: P = 0.000E+00 | | TI = 5.000E-02 TLS = 5.000E-03 | | Reg. 5 Symmetry plane | |-------------------------------------------------------------------------------------------| |-> DOMAIN 2: FLUID ------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | SOLVE ....................... => U, V, P, | | FLUID FLOW .................. => LAMINAR INCOMPRESSIBLE | | TURBULENCE MODEL ............ => | | PRESSURE REF. CELL .......... => 145 | | REFERENCE PRESSURE .......... => PREF = 1.000E+05 Pa | | DENSITY ..................... => CONSTANT - RHO = 1.000E+03 kg/m3 |

A

B

B

Page 315: Star CCm Guide

Chapter 15 PROGRAM OUTPUT

Example Output

Version 4.02 15-5

| MOLECULAR VISCOSITY ......... => CONSTANT - MU = 1.000E-03 Pas | | | | INITIAL FIELD VALUES ........ => u v w p | | => 0.0E+00 0.0E+00 0.0E+00 0.0E+00 | | BOUNDARY CONDITIONS ......... => | | Reg. 0 Wall: U = 0.000E+00 V = 0.000E+00 W = 0.000E+00 Om = 0.000E+00 in C.Sys. 1 | | Elog = 9.000E+00 | | Reg. 3 Inlet: U = 0.000E+00 V = 1.000E-01 W = 0.000E+00 Om = 0.000E+00 in C.Sys. 1 | | Reg. 4 Outlet: Flow split = 1.000E+00 | | Reg. 5 Symmetry plane | |-------------------------------------------------------------------------------------------| |-> DOMAIN 3: SOLID ------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | SOLVE ....................... => T | | REFERENCE TEMPERATURE ....... => TREF = 2.730E+02 K | | DENSITY ..................... => CONSTANT - rho = 9.000E+03 kg/m3 | | SPECIFIC HEAT ............... => CONSTANT - c = 3.800E+02 J/kgK | | CONDUCTIVITY ................ => CONSTANT - k = 3.800E+02 W/mK | | INITIAL FIELD VALUES ........ => T | | => 2.9E+02 | | RELAX. FACT. IN SOLID ....... => URF = 1.00 | | BOUNDARY CONDITIONS ......... => | | Reg. 0 Wall: U = 0.000E+00 V = 0.000E+00 W = 0.000E+00 Om = 0.000E+00 in C.Sys. 1 | | Reg. 5 Symmetry plane | |-------------------------------------------------------------------------------------------| |-> ADDITIONAL FEATURES USED --------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | PLUG AND PLAY | | RAMFILES OPTION ENABLED | | TURBO OPTION ENABLED | |-------------------------------------------------------------------------------------------| |-> SOLUTION CONTROL PARAMETERS | |-------------------------------------------------------------------------------------------| | VARIABLE | Mome Mass Turb -- -- -- | |-------------------------------------------------------------------------------------------| | RELA. FAC. | 7.000E-01 2.000E-01 7.000E-01 -- -- -- | | DIFF. SCH. | UD CD UD -- -- -- | | DSCH. FAC. | 0.000E+00 1.000E+00 0.000E+00 -- -- -- | | SOLV. TOL. | 1.000E-01 5.000E-02 1.000E-01 -- -- -- | | SWEEP LIM. | 100 1000 100 -- -- -- | |-------------------------------------------------------------------------------------------|

D

E

C

Page 316: Star CCm Guide

PROGRAM OUTPUT Chapter 15

Example Output

15-6 Version 4.02

Table 15-2:

Iter. I--------------- GLOBAL ABSOLUTE RESIDUAL ------------------I I-------- FIELD VALUES AT MONITORING POINT 63 ----------INo Mome Mass Turb -- -- -- -- Vel Pres TurVis -- -- -- --1 1.00E+00 1.00E+00 9.98E-01 -- -- -- -- 5.66E+01 6.20E-01 1.60E-03 -- -- -- --2 6.78E-02 1.36E-01 3.01E-01 -- -- -- -- 5.46E+01 4.04E+00 8.05E-03 -- -- -- --3 2.36E-02 3.95E-02 1.56E-01 -- -- -- -- 5.38E+01-2.15E+00 1.48E-02 -- -- -- --4 1.26E-02 4.50E-02 9.22E-02 -- -- -- -- 5.32E+01-4.45E+00 1.94E-02 -- -- -- --5 8.15E-03 3.10E-02 5.23E-02 -- -- -- -- 5.25E+01-3.93E+00 2.19E-02 -- -- -- --6 6.02E-03 2.11E-02 2.85E-02 -- -- -- -- 5.18E+01-2.62E+00 2.32E-02 -- -- -- --7 4.54E-03 1.64E-02 1.48E-02 -- -- -- -- 5.11E+01-1.32E+00 2.38E-02 -- -- -- --8 3.41E-03 1.33E-02 7.31E-03 -- -- -- -- 5.06E+01-5.78E-01 2.40E-02 -- -- -- --9 2.56E-03 1.13E-02 3.30E-03 -- -- -- -- 5.01E+01-4.11E-01 2.41E-02 -- -- -- --10 1.90E-03 9.15E-03 1.79E-03 -- -- -- -- 4.98E+01-1.98E-01 2.40E-02 -- -- -- --11 1.39E-03 7.66E-03 1.12E-03 -- -- -- -- 4.96E+01 2.35E-01 2.40E-02 -- -- -- --12 1.00E-03 6.56E-03 7.23E-04 -- -- -- -- 4.94E+01 4.78E-01 2.39E-02 -- -- -- --13 7.22E-04 5.37E-03 5.25E-04 -- -- -- -- 4.94E+01 6.69E-01 2.39E-02 -- -- -- --14 5.25E-04 4.33E-03 3.95E-04 -- -- -- -- 4.93E+01 9.90E-01 2.38E-02 -- -- -- --15 3.83E-04 3.48E-03 2.69E-04 -- -- -- -- 4.93E+01 1.08E+00 2.38E-02 -- -- -- --16 2.81E-04 2.86E-03 1.78E-04 -- -- -- -- 4.93E+01 1.29E+00 2.38E-02 -- -- -- --17 2.09E-04 2.39E-03 1.06E-04 -- -- -- -- 4.93E+01 1.34E+00 2.38E-02 -- -- -- --18 1.56E-04 2.01E-03 6.37E-05 -- -- -- -- 4.92E+01 1.38E+00 2.38E-02 -- -- -- --19 1.18E-04 1.73E-03 3.72E-05 -- -- -- -- 4.92E+01 1.41E+00 2.38E-02 -- -- -- --20 9.05E-05 1.46E-03 2.25E-05 -- -- -- -- 4.92E+01 1.44E+00 2.38E-02 -- -- -- --21 7.07E-05 1.22E-03 1.28E-05 -- -- -- -- 4.92E+01 1.45E+00 2.38E-02 -- -- -- --22 5.52E-05 1.01E-03 8.80E-06 -- -- -- -- 4.92E+01 1.46E+00 2.38E-02 -- -- -- --23 4.36E-05 8.36E-04 5.53E-06 -- -- -- -- 4.92E+01 1.50E+00 2.38E-02 -- -- -- --

&&&& ----------------------------------------------------------------------------------------------------------------------------

************************************************** * THERE ARE WARNINGS IN FILE out.info **************************************************

*** CALCULATIONS TERMINATED - CONVERGENCE CRITERION SATISFIED

Page 317: Star CCm Guide

Chapter 15 PROGRAM OUTPUT

Example Output

Version 4.02 15-7

Table 15-3:I-------------------------------------------- FIELD VALUES AT ITERATION NO 23--------------------------------------------I

CELL NO U VEL V VEL PRESS TUR EN DISSI VISCO DENSI 1 -3.697E-03 5.000E+01 1.635E+01 8.578E+00 8.004E+02 9.818E-03 1.187E+00 11 -1.021E-02 5.018E+01 6.546E+00 4.465E+00 2.369E+02 8.987E-03 1.187E+00 21 -2.619E-02 5.007E+01 1.337E+01 6.329E+00 4.550E+02 9.403E-03 1.187E+00 31 -2.700E-02 5.026E+01 1.697E+00 3.718E+00 1.673E+02 8.825E-03 1.187E+00 41 -4.814E-02 5.015E+01 9.038E+00 5.222E+00 2.980E+02 9.775E-03 1.187E+00 51 -5.854E-02 4.989E+01 1.610E+01 1.116E+01 5.849E+02 2.275E-02 1.187E+00 61 -5.772E-02 4.935E+01 3.980E+00 1.223E+01 6.708E+02 2.381E-02 1.187E+00 71 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 9.000E+03 81 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 9.000E+03 91 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 9.000E+03 101 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 9.000E+03 111 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 9.000E+03 121 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 9.000E+03 131 3.276E-05 9.994E-02 -1.737E-03 0.000E+00 0.000E+00 0.000E+00 1.000E+03 141 2.712E-05 9.966E-02 -1.239E-02 0.000E+00 0.000E+00 0.000E+00 1.000E+03 151 2.454E-05 1.001E-01 -6.395E-03 0.000E+00 0.000E+00 0.000E+00 1.000E+03 161 6.541E-06 1.000E-01 -9.026E-04 0.000E+00 0.000E+00 0.000E+00 1.000E+03 171 1.097E-05 1.001E-01 -9.892E-03 0.000E+00 0.000E+00 0.000E+00 1.000E+03 181 6.675E-06 1.000E-01 -4.241E-03 0.000E+00 0.000E+00 0.000E+00 1.000E+03 191 -1.134E-05 1.001E-01 -9.797E-03 0.000E+00 0.000E+00 0.000E+00 1.000E+03

I--------------------------------------------| Wall data at iteration No 23 |--------------------------------------------I

Region No: 0 Cell No Y-PLUS NORM DIST WALL TEMP HTRAN HFLUX 49 2.858E+03 2.500E-02 2.930E+02 3.047E+01 0.000E+00 50 2.939E+03 2.500E-02 2.930E+02 3.124E+01 0.000E+00 51 2.999E+03 2.500E-02 2.930E+02 3.181E+01 0.000E+00 52 3.043E+03 2.500E-02 2.930E+02 3.223E+01 0.000E+00 53 3.075E+03 2.500E-02 2.930E+02 3.253E+01 0.000E+00 54 3.098E+03 2.500E-02 2.930E+02 3.274E+01 0.000E+00 55 3.114E+03 2.500E-02 2.930E+02 3.289E+01 0.000E+00 56 3.125E+03 2.500E-02 2.930E+02 3.300E+01 0.000E+00 57 3.132E+03 2.500E-02 2.930E+02 3.306E+01 0.000E+00 58 3.136E+03 2.500E-02 2.930E+02 3.311E+01 0.000E+00 59 3.139E+03 2.500E-02 2.930E+02 3.313E+01 0.000E+00 60 3.140E+03 2.500E-02 2.930E+02 3.314E+01 0.000E+00 61 3.140E+03 2.500E-02 2.930E+02 3.314E+01 0.000E+00 62 3.139E+03 2.500E-02 2.930E+02 3.313E+01 0.000E+00 63 3.137E+03 2.500E-02 2.930E+02 3.311E+01 0.000E+00 64 3.135E+03 2.500E-02 2.930E+02 3.310E+01 0.000E+00 129 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 130 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 131 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 132 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 133 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 134 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 135 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 136 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 137 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 138 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 139 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 140 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 141 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 142 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 143 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 144 0.000E+00 2.500E-02 2.930E+02 1.172E+04 0.000E+00 65 0.000E+00 0.000E+00 0.000E+00 1.172E+04 0.000E+00 81 0.000E+00 0.000E+00 0.000E+00 1.172E+04 0.000E+00 97 0.000E+00 0.000E+00 0.000E+00 1.172E+04 0.000E+00 113 0.000E+00 0.000E+00 0.000E+00 1.172E+04 0.000E+00 80 0.000E+00 0.000E+00 0.000E+00 1.172E+04 0.000E+00 96 0.000E+00 0.000E+00 0.000E+00 1.172E+04 0.000E+00 112 0.000E+00 0.000E+00 0.000E+00 1.172E+04 0.000E+00 128 0.000E+00 0.000E+00 0.000E+00 1.172E+04 0.000E+00

END OF EXECUTION - STAR CPU time is 0.36 Elapsed time is 0.92

Page 318: Star CCm Guide

PROGRAM OUTPUT Chapter 15

Example Output

15-8 Version 4.02

Table 15-4:

|-------------------------------------------| | STAR-CD VERSION 4.00.000 | | THERMOFLUIDS ANALYSIS CODE | | Operating System: Linux | | Stardate: 6-DEC-2005 Startime: 14:32:39 | |-------------------------------------------|

CASE NAME : out

*** Warning: Molecular weight of material in domain 2 is set to 28.96.

*** Reduction of solution matrix bandwidth enabled *** ______________________________MEANING OF PRINTOUT QUANTITIES________________________________________ ---- NOMENCLATURE (mass balance) ------- FVIN - total flow in through inlet boundaries, kg/s FVOUT - total flow out through outflow boundaries, kg/s FPIN - total flow in through pressure,stagnation,free-stream and transient-wave boundaries, kg/s FPOUT - total flow out through pressure,stagnation,free-stream and transient-wave boundaries, kg/s FCYIN - total flow in through partial cyclic boundaries, kg/s FCYOT - total flow out through partial cyclic boundaries, kg/s FLOUT - total flow out through outlet boundaries, kg/s SDRDT - mass accummulation by density change in time, kg/s SDVDT - mass accummulation by volume change in time, kg/s FLINJ - mass injection, kg/s MSDRO - mass transfer from dispersed phase (droplets) to continuous phase, kg/s FDIFF - mass balance kg/s SUM - sum of mass sources RESP - sum of absolute mass sources RES0 - starting residual in the solver

ITERATION NUMBER = 1 --------------------------

*** Warning: Residuals in eq. UMOM have reached round-off error limit in iteration 1 and trying to reduce them further can result in the solver divergence. Because of this further iterating is stopped.

______________________________BALANCE DATA________________________________________________

DOMAINWISE MASS BALANCE (kg/s)MAT. NO. PHASE NO. FDIFF TOTAL_FLOW_IN TOTAL_FLOW_OUT MSDRO (FVIN) (FPIN ) (FLOUT) (FVOUT)

(FPOUT) 1 1 1.2811E-03 5.9337E-01 5.9209E-01 0.0000E+00 5.9337E-01 0.0000E+00 0.0000E+000.0000E+00 5.9209E-01 2 1 0.0000E+00 1.0000E+00 1.0000E+00 0.0000E+00 1.0000E+00 0.0000E+00 1.0000E+000.0000E+00 0.0000E+00

------------ BOUNDARY REGIONWISE ------------ REGION NO. TYPE FLOW-IN(kg/s) FLOW-OUT(kg/s) 1 INLET 5.9337E-01 0.0000E+00 2 PRESSURE 0.0000E+00 5.9209E-01 3 INLET 1.0000E+00 0.0000E+00 4 OUTLET 0.0000E+00 1.0000E+00

______________________________FIELD DATA_________________________________________________ *** FOR FLUID STREAM *** 1

Field Extrema: Umax Vmax Wmax VMAGmax Pmax TKEmax EPSmax Tmax RHOmax 4.9233E+00 6.2337E+01 0.0000E+00 6.2349E+01 5.5077E+00 6.5615E+00 2.6307E+02 2.9300E+02 1.1867E+00 Umin Vmin Wmin VMAGmin Pmin TKEmin EPSmin Tmin RHOmin -2.1391E+00 3.5014E+01 0.0000E+00 3.5014E+01 2.2318E-01 3.9212E-02 1.3236E-01 2.9300E+02 1.1867E+00

Field Volume-Averages: Pvav RHOvav Tvav TKEvav EPSvav 2.8710E+00 1.1867E+00 2.9300E+02 1.3542E+00 2.2631E+01

Field Mass-Averages:

Page 319: Star CCm Guide

Chapter 15 PROGRAM OUTPUT

Example Output

Version 4.02 15-9

Pmav RHOmav Tmav TKEmav EPSmav 2.8710E+00 1.1867E+00 2.9300E+02 1.3542E+00 2.2631E+01

Field Totals: Mass Volume TKE EPS 9.4939E-03 8.0000E-03 1.2857E-02 2.1485E-01

*** FOR FLUID STREAM *** 2

Field Extrema: Umax Vmax Wmax VMAGmax Pmax TKEmax EPSmax Tmax RHOmax 1.4449E-02 1.5644E-01 0.0000E+00 1.5644E-01 0.0000E+00 0.0000E+00 0.0000E+00 2.9300E+02 1.0000E+03 Umin Vmin Wmin VMAGmin Pmin TKEmin EPSmin Tmin RHOmin -7.3840E-03 5.7720E-02 0.0000E+00 5.8799E-02 -2.7495E-02 0.0000E+00 0.0000E+00 2.9300E+02 1.0000E+03

Field Volume-Averages: Pvav RHOvav Tvav TKEvav EPSvav -1.4465E-02 1.0000E+03 2.9300E+02 0.0000E+00 0.0000E+00

Field Mass-Averages: Pmav RHOmav Tmav TKEmav EPSmav -1.4465E-02 1.0000E+03 2.9300E+02 0.0000E+00 0.0000E+00

Field Totals: Mass Volume TKE EPS 8.0000E+00 8.0000E-03 0.0000E+00 0.0000E+00

*** FOR SOLID domain *** 3 Temperature data: Tmax = 2.9300E+02; Tmin = 2.9300E+02; Tvav = 2.9300E+02

Field Solver information: NSU = 1 NSV = 2 NSW = 0 NSP = 14 NSTE = 1 NSED = 1 NST = 0 CPU time is 0.13 Elapsed time is 0.33 __________________________________________________________________________________________

Page 320: Star CCm Guide
Page 321: Star CCm Guide

Chapter 16 PRO-STAR CUSTOMISATION

Set-up Files

Version 4.02 16-1

Chapter 16 pro-STAR CUSTOMISATIONpro-STAR provides four means by which users can customise the way they workwith the program:

• Set-up files• Panels• Macros• Function keys

All are geared towards making problem data input faster and more flexible and canbe used in combination with each other. The choice of which ones to use is largelya matter of user preference and the requirements of the model being built.

Set-up Files

These files are read automatically as part of the pro-STAR start-up process and areused in creating a suitable pro-STAR environment for the problem in hand. Thefiles have standard names, given below, and are located in a directory chosen by theuser. On Unix systems, the path to this directory is stored in an environment variable(STARUSR) specified outside pro-STAR using the appropriate Unix environmentsetup command (see Chapter 17, “pro-STAR environment variables”). Theavailable set-up files are as follows:

1. PROINIT — contains pro-STAR commands that are read and executed as thefirst action in the current session. This provides a convenient way of setting up(initialising) pro-STAR in a standard way (regarding, for example, plot type,viewing angle, etc.) every time a session begins. Some pro-STAR commandsare in fact best used from within the PROINIT file. For example:

(a) Command OPANEL — typically used to open a set of tools (standardpro-STAR GUI dialogs or user-defined panels) that the user wants onscreen at the start of every new session.

(b) Command SETFEATURE — reports or changes the byte ordering formatof binary files to suit machines such as the Compaq Alpha range. Thisfacility replaces settings previously made through environmentalvariables.

2. PRODEFS — this file is created automatically if the *ABBREVIATEcommand is used during the session. *ABBREVIATE enables one or morefrequently used commands and their parameters to be joined together andexecuted in sequence, simply by associating them with an abbreviation name.The command group comes into action every time an existing ‘abbreviation’is typed in the I/O window.File PRODEFS stores all current abbreviation definitions and, once created,may be used in all subsequent pro-STAR sessions. The file itself may beedited with any suitable text editor to add/modify/delete any particularabbreviation, as needed.

3. .Prostar.Defaults — a hidden system file containing definitions offunction keys (see “Function Keys” on page 16-9), panel size and location(see “Panel definition files” on page 16-5) and ‘favourite’ panels (see “Panel

Page 322: Star CCm Guide

PRO-STAR CUSTOMISATION Chapter 16

Panels

16-2 Version 4.02

navigation system” on page 2-40).

If the set-up file directory is not defined through STARUSR, pro-STAR createsdefault set-up files automatically in your current working directory.

Panels

Panels are user-definable tools capable of simplifying the use of pro-STARoperations that are either not available in the existing GUI menus and dialog boxesor require additional functionality. Panels are often employed to facilitate the use ofMacros, which are groups of commands that are saved in a separate file (see“Macros” on page 16-6). Macros can be assigned to Panel buttons so that a largenumber of commands can be executed simply by clicking such a button.

Panel creation

Panels can be created or modified by choosing Panels > Define Panel from themain menu bar to display the Define Panel dialog box shown below.

New panels are created by entering a name in the text box of the Define Panel dialogbox and then clicking on the New action button. This results in the panel name beingadded to the list above the text box. Once this is done, the panel itself can be openedby

• double-clicking on its name in the list, or• selecting the name in the list and then clicking on the Open action button, or• clicking on Panels in the main menu bar and selecting the panel name from

the drop-down list.

Any of the above actions will display a panel such as the one shown below.

Page 323: Star CCm Guide

Chapter 16 PRO-STAR CUSTOMISATION

Panels

Version 4.02 16-3

Once the new panel has been opened, the user can specify its layout and define itsbuttons and menu items. The Panel Layout dialog box can be opened by selectingFile > Layout from the panel’s menu bar.

The above dialog box allows definition of the number and layout of the panelbuttons (a maximum of 100).

Users may also specify menus for panels by selecting File > Menus from thepanel’s menu bar. This opens the Define User Menus dialog box, shown below,where one can define up to six menus, their names and the pro-STAR commandsthat will be executed upon selecting a particular menu item. By default, a singlemenu called User 1 is defined containing a single menu item called Replot whichexecutes command REPLOT.

Page 324: Star CCm Guide

PRO-STAR CUSTOMISATION Chapter 16

Panels

16-4 Version 4.02

Panel button names and definitions are assigned by first selecting a button, and thenentering a new name or definition into the appropriate text box. A button’sdefinition is the pro-STAR command(s) that will be executed when the button ispushed.

The following three examples illustrate the way in which frequently repeatedoperations may be simplified by assigning them to panel buttons:

Example 1Select a number of cells with the screen cursor and then refine them by a factor of2 in all directions. Assign to option button CCREF.

Example 2Select a range of fluid cells by drawing a polygon around them, change them to solidcells and then plot the mesh. Assign to option button CZMOD.

Page 325: Star CCm Guide

Chapter 16 PRO-STAR CUSTOMISATION

Panels

Version 4.02 16-5

Example 3Display vertex coordinates in local coordinate system 2 by pointing at the requiredvertex with the cursor. Assign to option button VCOOR2.

To select a button without executing the corresponding button definition, move themouse pointer to the button and press (but do not release!) the mouse button. Next,move the mouse pointer clear of the button and then release the mouse button. Thissequence will set the newly selected panel button as the active button, but will notexecute the button function.

Note that selecting File > Reload from the panel’s menu bar will cancel out anychanges made to the panel definition since it was last saved.

Panel definition files

A panel’s button and menu settings as well as its size and location are saved in apanel definition file when File > Save is selected from the panel’s menu bar. Thisfile is created using the panel name specified by the user in the Define Panel dialogbox and the suffix .PNL. The file location depends on its name. If the name enteredwas prefixed with the letter L or G (note that a space must be typed after each letter),the file will be placed in directory PANEL_LOCAL or PANEL_GLOBAL, otherwiseit will be put in your current working directory.

On Unix systems, the local and global directory names are stored in environmentvariables that can be set outside pro-STAR using the appropriate Unix environmentsetup command (see Chapter 17, “pro-STAR environment variables”). Theenvironment variables can also be set within pro-STAR by selecting Panels >Environment from the main menu bar. This displays the Set Environment dialogbox shown below, which allows entry of local and global directory names in thecorresponding text boxes.

Page 326: Star CCm Guide

PRO-STAR CUSTOMISATION Chapter 16

Macros

16-6 Version 4.02

Note that a list of available panels can be viewed by opening the Define Panel dialogbox. Panels found in your current working directory are shown in the list with a ‘.’before the panel name. Any panel definitions found in the directories specified bythe PANEL_LOCAL and PANEL_GLOBAL variables are shown in the list with an Lor G prefix before the panel name, respectively. Once added to the list, a panel canbe opened in a number of ways, as described in “Panel creation” on page 16-2. Notethat panels can also be opened from the pro-STAR input/output window by typingOPANEL, PANEL but this command is more typically issued from within thePROINIT set-up file (see “Set-up Files” on page 16-1).

In addition to the panel definition file, a panel’s size and location are also savedin a hidden system file called .Prostar.Defaults (see “Set-up Files” on page16-1). Definitions stored there have priority over the size and location informationstored in the panel definition file. This enables you to override such information ifthe panels are located in a directory for which you do not have write permission.

Panel manipulation

The Define Panel dialog box provides additional facilities for manipulating panels,as follows:

• The Re-Scan button recreates the list of available panels. Those that wereremoved from the list will re-appear, while those created via the New buttonbut never saved will disappear.

• The Copy button creates new panels by copying an existing panel definitionfile to another file whose name must be typed in the text box.

• The Rename button changes the name of a panel definition file to anothername typed in the text box.

• The Delete button allows you to remove panels from the list but does notdelete the corresponding definition files. The latter can only be deleted outsidepro-STAR by using the appropriate operating system command.

Macros

A macro is a set of user-defined commands that can be executed at any stage of thepro-STAR session. The constituent commands must be stored in a special file,identified by a ‘.MAC’ extension and included within

Command: SETENV

Page 327: Star CCm Guide

Chapter 16 PRO-STAR CUSTOMISATION

Macros

Version 4.02 16-7

• the current working directory, or• a pre-defined local macro directory, or• a pre-defined global macro directory.

As with panel directories, the local and global directory names are stored inenvironment variables MACRO_LOCAL and MACRO_GLOBAL that can be setoutside pro-STAR using the appropriate Unix environment setup command (seeChapter 17, “pro-STAR environment variables”). The environment variables canalso be set within pro-STAR by selecting Panels > Environment from the mainmenu bar. This displays the Set Environment dialog box which allows entry of localand global macro directory names in the corresponding text boxes.

Macros can be created, renamed, copied, and deleted in the Define Macro dialogbox in the same way that panels are in the Define Panel dialog box. The DefineMacro box, shown below, is opened by choosing Panels > Define Macro from themain menu bar. The name of a new macro must be typed in the text box. An existingmacro can be selected and displayed, by double-clicking its name in the macro list.Several macros can be displayed simultaneously in multiple windows, byhighlighting them in the list with the mouse and then clicking the Open button.pro-STAR looks for macro files in three places. Macros found in the user’s currentworking directory are shown in the list with a ‘.’ in front of the macro name. Thosefound in the directories specified by the MACRO_LOCAL and MACRO_GLOBALenvironment variables are shown with an L or G prefix before the macro name,respectively.

Clicking the Open or New button in the Define Macro box opens a macro editor todisplay the macro file(s) that has been selected in the macro list (or a blank sheet fornew macros), as shown below. The user can then type in the required pro-STARcommands or amend existing ones. Command PROMPT, which displays messagesin the area underneath the plotting window (see “Main window” on page 2-15) isparticularly useful inside a macro as it can prompt the user to, say, supply requireddata or to click an appropriate menu item with the mouse.

Page 328: Star CCm Guide

PRO-STAR CUSTOMISATION Chapter 16

Macros

16-8 Version 4.02

The macro editor facilities are arranged under three menus in the editor’s menu bar:

1. File

(a) Open — open another macro(b) Save — save the current changes(c) Save As — save the current changes to a different macro file(d) Clear All — clear the editor window(e) Quit — terminate the editing session

2. Edit

(a) Find — find a character string typed in the dialog box shown below:

(b) Mark Selection — mark the selected characters for subsequent searches(c) Find Selection — find the selected characters in the macro body(d) Find Again — repeatedly find the selected characters(e) Replace — find a character string and replace it with another string. Both

strings are typed in the dialog box shown below:

Page 329: Star CCm Guide

Chapter 16 PRO-STAR CUSTOMISATION

Function Keys

Version 4.02 16-9

3. Execute

(a) Execute Macro — execute the whole macro(b) Execute Selection — execute only the highlighted lines in the editor

window

As with panels, the Define Macro dialog box provides additional facilities formanipulating macros, as follows:

• The Execute button executes the selected macro.• The Re-Scan button recreates the list of available macros. Those that were

removed from the list will re-appear, while those created via the New actionbutton but never saved will disappear.

• The Copy button creates new macros by copying an existing macro file toanother file whose name must be typed in the text box.

• The Rename button changes the name of a macro file to another name typedin the text box.

• The Delete button allows users to remove macros from the list of availablemacros but does not delete the corresponding files. The latter can only bedeleted outside pro-STAR by using the appropriate operating systemcommand.

Note that panel buttons are often used to execute macros, by setting the buttondefinition to issue command

*macro,exec

This assignment can be made as follows:

• Open the Define Macro dialog box and highlight a macro in the list.• Open the Define Panel dialog box, select a panel from the list and display it by

double-clicking it.• Click on a free button in the panel.• Select Assign from the panel’s Macro menu. This assigns the macro name to

the button and generates the appropriate *MACRO command.• If necessary, select Edit from the panel’s Macro menu to open the macro text

editor discussed above and type in any further changes• Save all changes by selecting Save from the File menus of both macro and

panel editors before closing their corresponding dialog boxes

Function Keys

Users can program the keyboard function keys (F2 - F12) to execute pro-STAR

Page 330: Star CCm Guide

PRO-STAR CUSTOMISATION Chapter 16

Function Keys

16-10 Version 4.02

commands or macros. This is done by choosing Utility > Function Keys from themenu bar to display the Edit Function Keys dialog box shown below.

Any valid pro-STAR command (or set of commands if a $ character is used toseparate them) can be mapped to individual function keys by typing it in theappropriate text box. Command parameters such as ‘VX’ or ‘CX’ may be used andwill be interpreted in the normal way. Command strings are limited to 80 charactersin length.

In addition to standard pro-STAR commands, the function keys can also be usedto repeat the last executed command and to open dialog boxes. Thus:

• Command repeatwill literally repeat the last command executed, includingparameters such as ‘VX’ or ‘CX’.

• Command string open dialog1,dialog2,... will open the dialogboxes or tools specified. Available items are:

Page 331: Star CCm Guide

Chapter 16 PRO-STAR CUSTOMISATION

Function Keys

Version 4.02 16-11

The default function key definitions are:

F5 – repeatF6 – replotF7 – cplotF8 – zoom,off $replot

Note that the F1 key is reserved for displaying context-sensitive, on-line Helpinformation on pro-STAR commands (see “Getting On-line Help” on page 2-35)

Any changes to the function key definitions are saved in a file called.Prostar.Defaults (see “Set-up Files” on page 16-1) at the location specifiedby environment variable STARUSR (or in your current directory, see page 16-1).This file can be modified either through the Function Keys dialog box withinpro-STAR or outside it via any suitable editor. Users may find it useful to keep asingle .Prostar.Defaults file in the STARUSR location so that the particularsetup that they define is available for any pro-STAR session.

Name Description

ANIMBLISBLLIBLOCCELLCHECCHEMCLISCOLOCONTCOUPCSYSDROPFOREGENEGRAPGRDIGRLOGRREPOSTPROPSPLISPLLSTARTRANVERTVLIS

Animation ModuleBoundary ListBlock ListBlock ToolCell ToolCheck ToolChemical ModuleCell ListColour ToolControl Module (unsupported panel)Couple ToolCoordinate Systems panelDroplets panelConvert Foreign Formats panelConvert Generic panelGraph ToolGraph ModuleLoad Graph Registers panelGraph Registers panelPost Register Data ListProperty Module (unsupported panel)Spline ToolSpline ListConvert STAR panelTransient ModuleVertex ToolVertex List

Page 332: Star CCm Guide
Page 333: Star CCm Guide

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

Introduction

Version 4.02 17-1

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

Introduction

This chapter describes some of the less commonly used features and controls inSTAR-CD and covers the following topics:

• File organisation, naming conventions and general utilisation• Special pro-STAR and STAR features and settings• The StarWatch utility• Hard copy production

File Handling

Naming conventions

At every session, pro-STAR creates a set of files whose names are based on auser-supplied model name or case name. Each file name is of the formcase.xxxx, where xxxx is a three- or four-character filename extension. Thus,if the case in question is called test, then all its associated files will be calledtest.ccm, test.mdl, etc. and will be used for the appropriate input/outputoperation during the model building and numerical solution processes. You shouldalways supply a case name at the beginning of a pro-STAR session (see “pro-STARInitialisation” on page 2-12).

A case name may be overridden at any time during a pro-STAR session bychoosing File > Case Name from the menu bar. This displays the Change CaseName dialog shown below:

Supply a new case name (up to 70 characters long) in the text box provided. Thischanges the default file name but does not affect any files that are already open. Italso determines which files will be used during subsequent file operations. Note thatthe names of the input and output restart (.ccm) files will be reset by this operation.

Commonly used files

A few key files are always read and/or written to by pro-STAR, whereas themajority are opened and accessed only in response to a command or a GUIoperation. These key files are described below:

Command: CASENAME

Page 334: Star CCm Guide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 17

File Handling

17-2 Version 4.02

Echo file (.echo)Used exclusively by pro-STAR and is always opened. It holds a copy of everycommand typed by the user or, for GUI operations, their command equivalents, asgenerated automatically by pro-STAR during the session. The file can be:

• Reviewed• Used for recovery purposes (see “Error messages” on page 2-19)• Copied to a temporary file which can be subsequently edited to make changes

to the recorded commands (see item 12 on page 17-10). Once the editingprocess is complete, the modified command file can be replayed intopro-STAR using the editor’s file execution facilities (or by typing commandIFILE).

Model file (.mdl)Used exclusively by pro-STAR. Choosing option File > Save Model from the menubar instructs pro-STAR to write a full description of your model to this file, usingthe specified case name as the file name. It is advisable to save data regularly duringa session so as to minimise the chance of losing large amounts of information dueto user error or system failure. Note that every time you save the model file, itsprevious version (i.e. the model you started out with before making any changes) isalso automatically stored as a backup, in a file of form case.bak

If you need to save the .mdl file under a name other than the case name, chooseoption File > Save As from the menu bar. This displays the Save As dialog, shownbelow, which allows the name to be typed exactly as required. Alternatively, anexisting file may be selected by utilising pro-STAR’s built-in file browser facilities(see page 17-9).

Option File > Resume Model performs the reverse operation, i.e. it instructspro-STAR to read a model description from an existing .mdl file. If you need toresume from a .mdl file that does not have the same name as the case name, chooseoption File > Resume From from the menu bar. This displays the Resume Fromdialog shown below, which allows the name to be typed exactly as required.Alternatively, the file may be selected by clicking the browser button provided andutilising pro-STAR’s built-in file browser facilities (see page 17-9).

Command: SAVE

Page 335: Star CCm Guide

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

File Handling

Version 4.02 17-3

Problem setup (command) file (.inp)Although the model file is normally saved in binary form, there may be occasionswhen you need to write the model data in text (coded) form. Examples of suchinstances are:

• To allow you to quickly produce a set of coded pro-STAR input files that willre-create the case as defined in the model file. This is especially useful if youwant to set up several runs with parametric changes and then submit the job inbatch.

• To enable you to find out which commands would activate certain featurespresent in your model.

• To facilitate testing of models that were created with a previous version ofpro-STAR.

To write model data in text form, choose File > Save As Coded from the menu barto display the CDSave dialog shown below:

The dialog uses default file names with extensions .inp, .cel, .vrt, and .bndfor four files that will contain problem set-up, cell, vertex and boundaryinformation, respectively. Alternative names for any of these files may be enteredin the boxes provided. For moving mesh cases, event definitions (see “MovingMeshes” on page 12-9) can also be written to file .evnc. For cases containingdroplets, an additional droplet data file (.drpc) is created.

Once the files have been copied to a suitable directory, the model may bere-activated by choosing File > Read File from the menu bar. This will display the

Command: RESUME

Command: CDSAVE

Page 336: Star CCm Guide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 17

File Handling

17-4 Version 4.02

Input Coded File dialog shown below:

Check that the file shown in the File Name window is correct and then click Apply.All data in files .cel, .vrt, .bnd, .drpc (if present) and, for moving meshcases, .evnc will be read in automatically.

Transient history file (.trns)This is used exclusively by pro-STAR for transient problems specified by means ofload steps (see “Load-step based solution mode” on page 5-6) and contains alladditional information (changes to boundary conditions, number and length of timesteps, etc.) needed for such problems. You must make this file available to yourcurrent session before changing or adding data concerning the analysis. This is donevia the Advanced Transients dialog (see “Load step controls” on page 5-10), or bytyping command TRFILE.

The file is normally written in binary form but a facility also exists for writing itinstead in text (coded) format and to a file with extension .trnc. This is done byselecting Modules > Transient from the menu bar to display the AdvancedTransients dialog, specifying the file name in the box provided at the bottom of thedialog and then clicking Apply. Alternatively, use command CDTRANS. If anexisting file needs to be used, pro-STAR’s built-in file browser can help locate it.

Plot file (.plot)This is used exclusively by pro-STAR and is always open to receive neutral plotinformation, i.e. machine-independent representations of a set of plots. The file maybe written in either binary or text (coded) format. CD-adapco supply source codefor several decoding programs that drive hard-copy devices in a variety of formats(e.g. Postscript), or screen output devices (e.g. X-window workstations). Theseprograms can also serve as templates for constructing plot drivers for other,unsupported devices. To make use of the neutral plot facility:

• Specify the plot file name (if other than case.plot) and type (if notCODED) using command NFILE.

• Switch the plot output from the terminal or workstation to the plot file bychoosing item Plot > Plot To File from the menu bar (or use commandTERMINAL in the form

TERMINAL,,FILE

• Perform the plotting operations required, as normal. Graphical output is now

Command: IFILE

Page 337: Star CCm Guide

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

File Handling

Version 4.02 17-5

diverted to the file instead of being displayed on the screen.• To restore normal operation, choose option Plot To Screen from the Plot

menu.

Details of data representation in the neutral plot file can be found in thePost-Processing User Guide, Appendix B.

Data repository file (.ccm)This file has a special format that facilitates different sets of information to be storedin it. It is written and read by both pro-STAR and STAR in the following ways:

1. pro-STAR saves all cell topology and model geometry information in the fileonce mesh building is complete. Cells are defined as a collection of faces, i.e.a general polyhedral cell definition is used regardless of the actual cell shape.The file must be rewritten whenever

(a) the mesh geometry is modified(b) boundaries are added, subtracted, or assigned to different boundary

regions(c) the cell type definitions are changed

The file is created by selecting File > Write Geometry File from the menubar to display the Geometry File Write dialog shown below:

The input required is:

(a) File Name — enter a name in the text box provided or click the adjacentbutton to select an existing file using pro-STAR’s built-in file browser(see page 17-9)

(b) File Type — select the file format according to the solver (CCM,CEDRE, BAE) for which the geometry file is intended

(c) Geometry Scale Factor — an optional scale factor applied to alldimensions of the problem’s geometry

(d) Write Backup File — define the action to be taken if the specifiedrepository filename already exists in your current directory:

i) Backup — the existing file is renamed as casename.ccm.bak

Command: GEOMWRITE

Page 338: Star CCm Guide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 17

File Handling

17-6 Version 4.02

(or casename.ccm.bak1 if casename.ccm.bak alreadyexists, or casename.ccm.bak2 if casename.ccm.bak1already exists, etc.).

ii) No Backup — the geometry information is overwritten

2. STAR’s action is one of the following:

(a) For initial runs, STAR reads the geometry information contained in thefile and then appends the solution results at the end of the analysis.

(b) For restart runs, STAR reads in addition the results of a previous (partiallyconverged, interrupted or transient) analysis before starting the newsolution. The new analysis results then overwrite the previous ones at theend of the run.

(c) If solution residual values are required as part of the analysis, STAR alsostores them in this file.

3. Apart from storing problem geometry data, pro-STAR will also

(a) read the file for post-processing purposes, i.e. to make contour, vector orgraph plots of any variable calculated by STAR.

(b) write mapped solution data when an existing mesh is refined (see Chapter5, “Solution Control with Mesh Changes” in this volume)

Each set of data stored in the repository file is called a “state”. The table below liststhe names of the states and the data stored in them. The available states in a givenfile may be displayed using command CCLIST.

Problem data file (.prob)This is written by pro-STAR and read by STAR. It contains information on whatkind of analysis is to be performed and what data are to be printed or saved for postprocessing. It also contains all material property values, solution control settings,boundary conditions and initial conditions. It is written independently of thegeometry file and should be rewritten every time any of the above model parametersis modified.

The file is created by selecting File > Write Problem File from the menu bar todisplay the dialog shown below. Note that a filename other than the default

State name Type of dataSTAR-CD 3.2Xequivalent file

default Problem geometry forsequential runs

.geom

geom_par Problem geometry forparallel runs

.geom(decomposed)

Restart_1 Solution (Restart) data .pst

smap Mapped Solution(Restart) data

.smap

Residue_nn=1,2,3,...

Field residuals .rpo

Page 339: Star CCm Guide

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

File Handling

Version 4.02 17-7

(casename.prob) may be entered if necessary in the text box provided.

Transient post data file (.pstt)This is written by STAR and contains selected transient analysis data at pre-definedpoints in time (see “Output controls” on page 5-12). It is used by a subsequentpro-STAR post-processing run to make contour or vector plots based on theselected data. Note that the file holds only part of the available information on themodel, so it cannot be used for restarting the analysis; that function can beperformed only by using the data repository (.ccm) file.

File relationships

The use and relationship between files in the STAR-CD environment is illustratedby Figure 17-1. Appendix B in this document contains a complete list of all files thatcan be written or read by either pro-STAR or STAR. The same information mayalso be displayed on-line in the Help dialog (choose Help > pro-STAR Help fromthe menu bar, select Misc. from the Module pop-up menu, and then highlightingitem FILE). For the great majority of problems, however, only the files shownbelow are ever needed.

Command: PROBLEMWRITE

Page 340: Star CCm Guide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 17

File Handling

17-8 Version 4.02

Figure 17-1 STAR-CD file use

In addition to solution and transient post data files, pro-STAR provides a utility forconverting solution monitoring and droplet track data files to coded (text) formatand vice versa. This is useful, for example, in manipulating and displaying the dataoutside the pro-STAR environment or for checking the validity of the file contents.The utility allows conversions between a variety of formats and is accessed byselecting Tools > Convert > Post from the menu bar. This activates the PostConvert dialog shown below:

You may then

• select option Solution Monitoring or Particle/Droplet Track depending onthe file type you wish to convert. The first option deals with residual orsolution monitoring data conversion (see Chapter 5, “Output controls”), thesecond with droplet track data conversion (see “Trajectory displays” on page9-8) or particle track data conversion (see “The Particle Track File” on page7-6 of the Post-Processing User Guide)

• enter the name of the file containing the data to be converted (Input File with

Commands: SMCONVERT PTCONVERT

case.trnsTransienthistory data

pro-STAR

STAR

case.mdl

case.echo

case.plot

case.pstt

case.prob

case.ccm

Model data

Commandecho

Neutral plot

Transientoutput data

GeometryBoundary conds.Solution params.

case.ccm

Solution data

Page 341: Star CCm Guide

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

File Handling

Version 4.02 17-9

extension .rsi or .trk) or select it using pro-STAR’s built-in file browser(see page 17-9)

• choose the file type (normally Binary) from the available options in theadjacent pop-up menu

• enter the name of the file that will store the converted data (Output File withextension .rsic or .trkc)

• choose the file type (normally Coded) from the available options in theadjacent pop-up menu

The above operation may also be performed in reverse, i.e. converting the text fileback to binary format, using the same dialog but with Input now being Coded andOutput being Binary, plus a reversal of the file name extensions.

In the course of a session pro-STAR also opens several scratch files. These areopened automatically and deleted at the end of the session. Their use is normallytransparent except when their size exceeds the amount of free space on your disk.While some scratch space is used for hidden-line plotting, the largest amount isneeded while the geometry (.ccm) file is being written. The space used varieslinearly with the number of vertices present and the maximum number of cellsconnected to any single vertex.

File manipulation

The file-manipulation related capabilities of pro-STAR are as follows:

1. Finding files — If you are not sure of the exact location or name of an existingfile, use pro-STAR’s file browser facility. This is activated by clicking thebrowser button

included in numerous GUI dialogs. The button displays the File Selectiondialog shown below:

The scroll lists and filters included in the above dialog allow easy navigationthrough various levels of sub-directories until the required file is located.

Page 342: Star CCm Guide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 17

File Handling

17-10 Version 4.02

2. Switching program input from a terminal (or standard input) to any disk file(of form case.inp) containing pro-STAR commands, and vice versa. Thiscan be done at any time during a session, using either the pro-STAR editor’sExecute menu options (see item 12 below) or by typing command IFILE. Inthe latter case, input switches back to the terminal automatically at the end ofthe specified file. The command also supports a ‘nesting’ capability, i.e. thenew input stream can itself contain IFILE commands that will direct input toyet another source file and so on.

3. Switching output from a terminal screen (or standard output) to a disk file (ofform case.out), and vice versa. This can be done at any time during asession using command OFILE. Using parameter NONE with this commandturns the output off completely. The facility enables you to save lists ofvarious pro-STAR items, for use in other programs or for later review.

4. Writing the geometry file (see “Data repository file (.ccm)” above) bychoosing File > Write Geometry File from the menu bar.

5. Writing the problem data file (see “Problem data file (.prob)” above) bychoosing File > Write Problem File from the menu bar.

6. Restoring a previously created model from a saved model file (see “Model file(.mdl)” above) by choosing File > Resume From... from the menu bar. Whenused for the first time in a pro-STAR session, RESUME will also automaticallyread and execute commands stored in a special file called PROINIT (see“Set-up Files” on page 16-1). This provides a very convenient way of settingup pro-STAR in a standard way (regarding, for example, plot type, viewingangle, etc.) every time a session starts.

7. Saving the current model description in binary format to file .mdl, asdescribed above, by choosing File > Save Model from the menu bar.

8. Saving the model description in text (coded) format, as described above, bychoosing File > Save As Coded from the menu bar.

9. Repositioning a previously used file (including a pro-STAR macro file) to itsstarting point by typing command REWIND.

10. Closing a previously used file by typing command CLOSE. The commandmay also close all currently open files.

11. Printing a summary of all currently open files by typing command FSTAT.12. File editing via pro-STAR’s built-in editor — This is activated by choosing

File > Edit File from the menu bar to display the panel shown below. Filesthat may be conveniently manipulated using this editor are:

(a) Command files — these allow execution of a set of pre-recordedpro-STAR commands. As noted in the section on “Commonly used files”on page 17-1, a common source for them are echo files from previouspro-STAR sessions. To avoid problems, however, an echo file should becopied and renamed before using it as a command file.

(b) User subroutine files — these contain special user-supplied FORTRANcode and are discussed in detail in Chapter 14.

Page 343: Star CCm Guide

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

File Handling

Version 4.02 17-11

The available facilities are arranged under three menus in the editor’s ownmenu bar, as follows:

File

(a) Open — open a specified file. This activates the File Selection dialogshown on page 17-9, enabling the required file to be located.

(b) Save — save the current changes.(c) Save As — save the current changes to a different file. The dialog box

above re-appears to aid specification of the destination file location.(d) Clear All — clear the editor window.(e) Quit — terminate the editing session.

Edit

(a) Find — find a character string, typed in the dialog box shown below.

(b) Mark Selection — mark the selected characters for subsequent searches.(c) Find Selection — find the selected characters in the file body.(d) Find Again — repeatedly find the selected characters.(e) Replace — find a character string and replace it with another string. Both

strings are typed in the dialog box shown below.

Page 344: Star CCm Guide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 17

Special pro-STAR Features

17-12 Version 4.02

Execute (Command files only)

(a) Execute All — execute all commands in the file. This is equivalent totyping command IFILE in pro-STAR’s Input window.

(b) Execute Selection — execute only the highlighted lines in the editorwindow.

In addition, the usual keyboard- or mouse-driven cut, copy and paste functionalityis also available with the editor window.

Special pro-STAR Features

pro-STAR environment variables

pro-STAR uses the values of several environment variables. Some specify the pathto various system directories while others control the operation of the system. Youshould ensure that these values are correctly set before using STAR-CD.

The syntax for setting environment variables depends on the shell program youare using (if in doubt type the command echo $SHELL). The current list of suchvariables is as follows:MACRO_LOCAL and MACRO_GLOBALPaths to the local and global pro-STAR macro directories, respectively (see“Macros” on page 16-6)

PANEL_LOCAL and PANEL_GLOBALPaths to the local and global pro-STAR panel directories, respectively (see “Paneldefinition files” on page 16-5)

STARBROWSER (not needed for Windows ports)Path to the user’s choice of Internet browser (Netscape or IE) that will be launchedfrom the pro-STAR Help menu (see page 2-37). The user’s search path must beamended to include the directory defined by this variable. The default is to runMozilla from your current working directory.

STARFONT0 / starfont0Font name and size to use for plot title, plot legend, graph title and main axes label(see the description of command TSCALE in the Commands volume)

STARFONT1 / starfont1Font name and size to use for the contour and vector scales (see the description ofcommand TSCALE in the Commands volume)

STARFONT2 / starfont2Font name and size to use for the secondary contour and vector scales (for dropletsand particle ribbons; see the description of command TSCALE in the Commandsvolume)

STARFONT3 / starfont3Font name and size to use for entity numbers (NUMBER command), x and y ticklabels on graphs and local coordinate system axes (see the description of command

Page 345: Star CCm Guide

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

Special pro-STAR Features

Version 4.02 17-13

TSCALE in the Commands volume)

Note: Variables STARFONT 0-3 described above apply only to X-windowplotting. They have no effect on OpenGL based plotting as the fonts system there isentirely different.

STAR_TCL_SCRIPTPath to the location of file STARTkGUI.tcl, containing a user-supplied Tcl/Tkscript (see “The Users Tool” on page 2-35)

STARUSRPath to pro-STAR files PRODEFS (abbreviations), PROINIT (initial set up) and.Prostar.Defaults (see “Set-up Files” on page 16-1)

Resizing pro-STAR

pro-STAR is a dynamic-memory executable code and requires a file calledparam.prp to be present in your current working directory. The file contains a listof parameters that determine the data size of the executable on start-up. If this fileis missing, incomplete, or out-of-date, pro-STAR will automatically write a newlocal param.prp based on the values in the model (.mdl) file being read, andalso on any values that could be read from an existing param.prp. This happensthe first time pro-STAR is run using the prostar script described in Chapter 2,“Running a STAR-CD Analysis”.

It is almost always necessary to resize the pro-STAR executable to cater forspecial problems (such as moving mesh problems) or to accommodate cases with alarger number of cells, vertices, etc. (or a smaller number, if you are havingproblems with available memory in your machine).

In any of the above situations, file param.prp should be modified but thisshould never be done using a text editor. Rather, a new version of the file containingparameters of the right magnitude must be created in one of the following ways:

1. By running the prosize script. This is accessed by typing

prosize

The script first asks whether you want to modify some of the parameters inthe current file or create a brand new param.prp. You may also exit herewithout modifying or creating any files. If continuing, prosize asks:

Is your mesh primarily hex or tet? (Answer H or T)(The T option should be chosen for wholly or predominantly tetrahedralmeshes; H is appropriate for all others, including meshes containing trimmedcells)

After this, the script prompts you to specify the values of the parameters to bestored in param.prp. A carriage return instructs the script to use theindicated default value, while entering -1 will terminate the script and use theremaining defaults to write param.prp. The most usual variation from thedefault values is in the maximum number of cells (MAXCEL) and vertices(MAXVRT). Otherwise, the default values suggested by prosize should besufficient for most cases.

Page 346: Star CCm Guide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 17

Special pro-STAR Features

17-14 Version 4.02

2. By issuing command MEMORY from within the pro-STAR session.This command can be used only to increase the parameter sizes. If during thesession it is found that the value of any sizing parameter(s) is insufficient, awarning message will appear in the I/O window. pro-STAR will sometimes beable to adjust the parameter value(s) automatically and then continue.However, in most cases you will be prompted to enter an appropriate newvalue for the indicated parameter(s) using MEMORY, after which you maycontinue as normal. Either way, the parameter values are changed internallywithout changing the param.prp file. To use the new values in futurepro-STAR sessions, you will need to save them explicitly via aMEMORY,WRITE instruction. This will rename the existing param.prp fileas param.bak and write the new parameters into a new param.prp file.

Note that, after running pro-STAR with a given model, it is possible to clear allmodel parameters (i.e. delete all cells, vertices, boundaries, etc.) but leave thecurrent memory size intact. This is done using command WIPEOUT and is useful ifyou want to abandon the current model and start a new one from scratch withoutexiting from pro-STAR. Furthermore, option MEMORY of this command will alsoreset the pro-STAR executable back to the size given in the param.prp file.

Special pro-STAR executables

On occasion, you may need to use a user-defined subroutine file, user1.f. Thisoption refers to subroutines that work in conjunction with pro-STAR, not STAR,and is not supported in Windows ports at present. In such a case, the required specialpro-STAR executable may be created using script prolinkl. This is accessed bytyping

prolinkl

The script looks for a file named user1.f in the current directory. That file willbe compiled into object code (user1.o) and converted into a dynamically-loadedshared object (.so or .sl or .dll depending on the operating system). Thedirectory with the shared object must be added to the shared object library path(usually LD_LIBRARY_PATH) in order to be found and used by any subsequentpro-STAR runs. prolinkl will advise the user on how to create this path for thegiven operating system.

Use of temporary files by pro-STAR

Choosing the location of temporary filesYou can control the location of most pro-STAR temporary files for POSIX-compliant computers. You should ensure temporary files reside where there issufficient capacity and where they can be accessed quickly. In practice, this meanson a fast hard disk on the same computer as that doing the calculations (rather thanon a remote disk accessed through a local area network). Note that the usual locationfor Unix temporary files, a directory called/tmp, often has insufficient capacity forpro-STAR’s temporary files.

You select the location of temporary files by setting an environment variable,named TMPDIR, to the path name of the directory where pro-STAR should writethe temporary files.

Page 347: Star CCm Guide

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

The StarWatch Utility

Version 4.02 17-15

Deleting temporary filesTake care not to delete pro-STAR’s temporary files during a calculation; it willcrash if you do. pro-STAR may leave temporary files behind if it crashes or you haltits execution. For POSIX-compliant systems, the operating system automaticallydeletes most temporary files if pro-STAR halts or crashes. For other systems, youmight have to manually delete abandoned temporary files after a crash or halt.

The StarWatch Utility

This is a free-standing utility that enables you to monitor the progress of a selectedSTAR job running anywhere in your computer network. The monitoring is donefrom a special window opened by StarWatch, as shown below.

Specific advantages of StarWatch are:

• You can monitor progress of a number of separate STAR jobs• The jobs may be running on any machine in your network, including your

own• You may select the variables whose solution progress you wish to monitor• You may adjust the display characteristics (e.g. scaling) of the monitored

variables

Running StarWatch

By default, StarWatch uses ports 6200 to 6206 to establish communication betweenthe STAR executable, the StarWatch daemon (a communication program) andStarWatch, the display program that runs on your screen. If ports 6200 — 6206 areacceptable, then no further setup is required. If they are not, perhaps because they

Page 348: Star CCm Guide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 17

The StarWatch Utility

17-16 Version 4.02

conflict with other programs using those ports, they can be set to any ports that theuser (or more likely) system administrator wants to use. The only proviso is that ifthe ports are changed on one system, the same change must be made for all systemsfor which StarWatch communication is required. If the defaults are not acceptable,then an administrator must edit the /etc/services file and add the followinglines:

star-chartd 6200/tcp # Star/Stripchart client/server daemonstar-chart1 6201/tcp # Local Stripchart 1star-chart2 6202/tcp # Local Stripchart 2star-chart3 6203/tcp # Local Stripchart 3star-chart4 6204/tcp # Local Stripchart 4star-chart5 6205/tcp # Local Stripchart 5star-chart6 6206/tcp # Local Stripchart 6

where port numbers 6200 — 6206 can be replaced by any set of port numbers.

Step 1

If using the STAR GUIde environment to run a numerical analysis interactively,StarWatch will start automatically as soon as STAR itself begins execution and willopen a monitoring window like the one shown above (see Chapter 2, “Running aSTAR-CD Analysis”, Step 6). If you are not using STAR GUIde, or if you want tomonitor the progress of another currently active job, you may open the StarWatchwindow explicitly by following the steps below:

• Open a new window on your computer or go to an existing one• Type starwatch, then send this application to the background also. The

StarWatch application panel should appear on your screen.• Start your STAR job in the same window using the -watch option. Note that

when running a parallel job, the -watch option must precede any otheroptions used.

Note that you may also start STAR first and then StarWatch.

Step 2

Go to the StarWatch panel and select option Host from the Connect menu. Choosethe name of the machine running your job in the Select Host dialog shown belowand click OK.

Note that:

• Only STAR jobs owned by you and only those that have registered with theStarWatch daemon can be selected

• Registration usually takes place roughly at the end of the first iteration• If STAR cannot find the daemon, it will keep trying for a small amount of

time and then continue without trying further contact.

Page 349: Star CCm Guide

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

The StarWatch Utility

Version 4.02 17-17

Now choose the PID of the STAR job you wish to monitor from the list displayedin the Select STAR Job dialog and click OK.

StarWatch should now start displaying the monitored flow variables againstiteration number or time step.

Choosing the monitored values

The following choices are available:

1. Material (stream) numberIn multi-stream applications, select the stream you wish to monitor using theMaterial Number slider control.

2. Field or residual valuesSelect the type of variable to be displayed by clicking the toggle button at thebottom of the Legend section. The button label changes from Plot FieldValues to Plot Residual Values and vice versa, depending on your choice.The labelling and scale of the adjacent graph also changes accordingly.

3. Monitored variableChoose the flow variables to be monitored, in terms of either field or residualvalues, by clicking the option buttons next to the variable names. The latterappear in the Legend section under the Property column and comprise thethree velocity components, turbulence kinetic energy and dissipation rate,pressure and temperature. The colour used to display each variable is shownnext to the name.

It is also possible to monitor changes in scalar variables, if present in yourmodel, by selecting View > Selected Data > Scalar Variables from themenu bar. The contents of the Legend section and the graph labelling willchange accordingly. The method of selecting scalars is the same as for themain (global) variables. Note that since only seven quantities can bemonitored, option View > Select Scalars lets you decide which scalars youwant to look at; by opening a secondary (Select Scalars) dialog in which therequired scalars and the order in which they appear in the StarWatch displaymay be determined.

Controlling STAR

At the beginning of a numerical analysis, STAR reads all files prepared for it bypro-STAR. Many of the parameters set in pro-STAR can be viewed and altereddynamically while the solution is in progress by selecting Settings > STARControl Variables from the StarWatch menu bar. This brings up the Star ControlVariables dialog shown below:

Page 350: Star CCm Guide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 17

The StarWatch Utility

17-18 Version 4.02

The dialog’s purpose is to allow the user to interactively change the values ofseveral STAR solution and output control parameters. These are grouped into sixtabs according to function, as shown above, and all act in the same way. Themeaning of the available parameters is listed in the table below:

Parameter Meaning

General Settings

DT Time step size

MAXCOR Maximum number of correctors for the PISO algorithm

RESOC Residual tolerance for the PISO algorithm

SORMAX Overall convergence criterion

IJKMON Monitoring cell number for fluid domains

File Output

ECHO =.T. Control information will be written to file .info

BOECHO =.T. Boundary data will be written to file .info

ITEST =.T. Write all conservation balance information to file .info

IRESI =.T. Write all solver convergence information to file .info

NDUMP Frequency of writing data to file .ccm

NFSAVE Backup frequency (frequency of saving file .pst_iternum)

NCRPR Number of cell Courant numbers (starting from the largest) tobe printed out

NFRRE Iteration frequency for dumping residuals to file .ccm

Page 351: Star CCm Guide

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

The StarWatch Utility

Version 4.02 17-19

Solution control can then be exercised as follows:

1. During execution, monitor the behaviour of normalised residual sums for eachvariable being solved for, by looking at the displayed values at the end of each

Under-Relaxation Factors

FPCR Under-relaxation factor for pressure correction (PISO)

FUVW Under-relaxation factors for velocities

FP Under-relaxation factor for pressure

FTE Under-relaxation factors for k and εFT Under-relaxation factor for temperature

FTVS Under-relaxation factor for turbulent viscosity

FDEN Under-relaxation factor for density

FLVS Under-relaxation factor for laminar viscosity

FCON Under-relaxation factor for heat conductivity

FR Under-relaxation factor for radiation

Blending Factors

GGUVW Blending factor for velocities

GGKE Blending factor for k and εGGT Blending factor for temperature

GGDEN Blending factor for density

GGSCA Blending factor for scalars

Residual Tolerances

SORU Solver residual for U velocity

SORV Solver residual for V velocity

SORW Solver residual for W velocity

SORP Solver residual for pressure

SORK Solver residual for k

SORE Solver residual for εSORT Solver residual for temperature

Number of Sweeps

NSWPU Total number of solver sweeps for U in one run

NSWPV Total number of solver sweeps for V in one run

NSWPW Total number of solver sweeps for W in one run

NSWPP Total number of solver sweeps for P in one run

NSWPK Total number of solver sweeps for k in one run

NSWPE Total number of solver sweeps for ε in one run

NSWPT Total number of solver sweeps for T in one run

Parameter Meaning

Page 352: Star CCm Guide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 17

The StarWatch Utility

17-20 Version 4.02

iteration or time step. In addition, look at the flow variable values at themonitoring location, as specified in the “Monitoring and Reference Data”STAR GUIde panel.

2. While monitoring this display, you may decide to alter the course of thecalculations by altering a model parameter, e.g. by

(a) re-specifying an under-relaxation factor in order to speed up solutionconvergence

(b) increasing the value of parameter SORMAX to stop the run at an earlierstage

The values currently in use are shown on the dialog. If you want to changeone or more of them, enter the new value in the appropriate box(es) and clickApply. This change is treated as pending. You can now either Cancel thechange and then make others, or click Send to confirm it.

3. In the latter case, the parameter(s) will change inside STAR from thebeginning of the next iteration (or time step) following the Send operationand a marker will be placed on the graph indicating the point at whichsomething was changed.

Note also the following points:

• The colour of marker matches the colour of the tab in which the alteration wasmade and STAR itself will print a message indicating the change

• If you make multiple changes, you can highlight any one line and use thedialog’s Edit menu to copy/paste that line into other boxes and then edit anyof the numbers. If you do not copy a line in, the code assumes that you aremaking changes to the last line.

• StarWatch also keeps a control history file called casename.ctrl.histrecording the changes made during a run. If you re-run a job withoutremoving the control history file, STAR will make the same changes to the jobthat you made during the original run (so you can duplicate and repeat yourchanges to, say, under-relaxation factors).

• You do not have to have StarWatch running for the above changes to takeplace at various iterations. STAR will read the casename.ctrl file andmake the changes to the run at the appropriate iteration. If you do not want therun changed the same way, delete casename.ctrl.hist beforere-running a job.

Manipulating the StarWatch display

The monitored variables chosen in the previous section are continuously displayedin the StarWatch panel as the calculation progresses, in two ways:

• As numerical values in the Iteration / Time Step Data section. The maximumand minimum values reached so far and the change since the previousiteration are also shown.

• As a graph of variable value versus iteration number/time step.

The detailed appearance of this graph may be adjusted as follows:

Page 353: Star CCm Guide

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

Hard Copy Production

Version 4.02 17-21

1. Horizontal scaleUse the H: slider to achieve a reasonable scale, depending on the number ofiterations

2. Vertical scaleUse the V: slider to achieve a reasonable scale, depending on the variablebeing monitored. Note that this scale changes automatically as you switchfrom residual to field values.

3. Horizontal rangeUse the Iteration Number / Time Step slider to move the graph window to therequired iteration range, after the job has finished executing.

4. Vertical rangeUse the vertical slider to move the graph window to the desired variable valuerange. Whether you need to do this or not depends on the vertical scalechosen.

5. Display sizeSelect View > Partial View from the menu bar to reduce the extent of theStarWatch display, which now only shows the graph and associated legend.Selecting View > Full View restores the original display.

Monitoring another job

If you have several STAR jobs running simultaneously and you want to switch yourmonitoring to a different job, follow the procedure below:

Step 1

Select Connect > Disconnect from the menu bar to terminate monitoring of thecurrent job.

Step 2

Select Connect > Host, enter the name of the machine running the job you wish tomonitor in the Select Host dialog and click OK.

Step 3

Choose the job’s PID from the list displayed in the Select STAR Job dialog and clickOK. StarWatch should now start displaying the monitored variables for the newjob.

Alternatively, you may simply open another window and load another StarWatchpanel, as described in “Running StarWatch”. Note that the number of panels thatmay be open simultaneously will depend on the setting specified in file/etc/services.

Hard Copy Production

Neutral plot file production and use

To obtain hard copy of a screen plot, switch the graphical output temporarily to theneutral plot file (see “Plot file (.plot)” on page 17-4). Once the required plot ison-screen, type

TERMINAL,,FILE,RAST(switches to the neutral plot file in raster, i.e. colour-fill, mode)

Page 354: Star CCm Guide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 17

Hard Copy Production

17-22 Version 4.02

or

TERMINAL,,FILE,VECT(switches to the neutral plot file in vector, i.e. line-contour mode)

followed by

REPLOT(sends the picture to this file)TERMINAL,,(switch output back to the screen)

The above process can be repeated as often as is necessary to write all required plotdata to file case.plot.

It is recommended that colour plots destined for a black-and-white printer shouldbe converted to the grey-scale shading scheme (see “Colour settings” on page 4-10)before sending them to the neutral plot file. This can be done either by selecting thePost - Gray option in the Color Tool or by typing command

CLRTABLE,GRAY

To produce the hard copy, process the pictures stored in the neutral plot file outsidethe pro-STAR environment using one of the supplied programs in the PLOT suite.The latter are special graphics post-processors that either

• generate files suitable for plotting on a given type of hard-copy device, or• display the contents of the neutral plot file on your screen (see Appendix B in

the Post-Processing User Guide for more details).

The PLOT programs available on your particular installation are normally accessedby opening a window and typing

plot

This produces a response of the form:

Please enter the required plot driver:Available drivers are:ai fr gif hp ps pst su x xm [xm]

where

ai — Adobe Illustrator file outputfr — Adobe Freehand file outputgif — GIF file outputhp — HP Graphics Language file outputps — PostScript file outputpst — utility for adding an extra title to an existing PostScript filesu — utility for reducing the size of an existing neutral plot file by removinghidden polygonsx — X-windows terminal displayxm — X Motif graphics display

Page 355: Star CCm Guide

Chapter 17 OTHER STAR-CD FEATURES AND CONTROLS

Hard Copy Production

Version 4.02 17-23

Type the desired option and then follow the instructions on your screen, supplyingadditional information as required. Note that options such as xm are suitable forscreen displays while options such as ps are for hard copy production.

Note also that extended mode features such as translucency, layers, andsmooth-shaded contour plots cannot be represented in the neutral plot format. Toproduce high-resolution hard copies in extended mode, use the high-resolutionscreen capture technique described in Chapter 2, “Screen capture”.

Scene file production and use

STAR-CD scene files provide a convenient way to store a fully post-processedmodel in a format that can be subsequently viewed with the lightweight and quickSTAR-View viewer program. A STAR-CD scene file (extension .scn) stores thecurrent state of the extended-mode graphics window, including the current plot andany labels, legends, and other screen information. However, unlike conventionalhard copies produced using pro-STAR’s neutral plot facilities, STAR-CD scenefiles store a full 3-D representation of the current model so the view can be rotated,translated, and zoomed interactively in the STAR-View program.

To produce such a file, first generate the desired plot in extended (OpenGL)mode (see Chapter 2, “Plotting Functions”). This can include any effects availablein extended mode, including multiple layers, translucency, and smooth-shadedcontours. Once the desired plot is achieved, select Utility > Write STAR-CDScene File from the main pro-STAR menu. Select or type the desired scene filename into the File Selection dialog box which appears and press OK to write thefile. Alternatively, pro-STAR command SCENE can be used to record the file.

Once this file is written, simply run the STAR-View program by typing

starview filename.scn

in an X-window, where filename.scn is the file name containing the desiredscene. Once the latter is loaded, the view in the model can be manipulated via themouse in exactly the same way as in pro-STAR.

Page 356: Star CCm Guide
Page 357: Star CCm Guide

APPENDICES

CCM USER GUIDE

STAR-CD VERSION 4.02

CONFIDENTIAL — FOR AUTHORISED USERS ONLY

© 2006 CD-adapco

Page 358: Star CCm Guide
Page 359: Star CCm Guide

Appendix A pro-STAR CONVENTIONS

Command Input Conventions

Version 4.02 A-1

Appendix A pro-STAR CONVENTIONS

Command Input Conventions

1. A single command line may not be longer than 320 characters

2. Input is mostly case-insensitive; both capital and small letters are accepted(arguments such as file names, titles and screen labels are case-sensitive)

3. Command names may be abbreviated by the first four letters (with oneexception: *ENDIF). Argument keywords may also be abbreviated by thefirst four letters (with one exception: parameter arguments for the MEMORYcommand)

4. Fields in a command string must be separated by a comma or by any numberof spaces.

5. Multiple commands may be stacked on a single line, separated by a dollarsign ($).

6. Any command string with an exclamation mark (!) in column 1 is interpretedas a comment (and therefore not executed).

7. Double plus signs (++) at the end of a line indicates that the next line is acontinuation of the current line. Individual arguments are not continued on anew line; the new line will begin a new argument. Any number of lines maybe continued in this manner to form a single command line; however, the totalnumber of characters in a command line formed in this manner may still notexceed 320 characters.

8. Any command may be entered from any module

9. In NOVICE mode (see command EXPERT), the program will prompt forarguments needed to execute the command. Command ABORTmay be used atthis prompt to abort the current command without performing any action.

10. Basic arithmetic is allowed on all command lines. Each operator must beseparated by blanks or a comma from the numbers or parameters on eitherside. For example, the following command

VLIST 10 * 10, A + 7 1000 / B

is interpreted as VLIST 100 to (A+7) by (1000/B), where A and B arenumeric parameters defined by the *ASK, *SET or *GET commands. Allterms are evaluated strictly from left to right.

11. The keyword ‘ALL’ may be used in lieu of any vertex, cell, boundary, etc.range to denote that all items are to be used for the range. (Examples:CLIST,ALL and CTMOD,ALL,,,FLUID)

12. The appropriate item set keyword may be used in lieu of most item ranges todenote that all items in the set are to be used for the range. (Examples:CPDEL,CPSET and VLIS,VSET,,,1)

Page 360: Star CCm Guide

pro-STAR CONVENTIONS Appendix A

Command Input Conventions

A-2 Version 4.02

13. The following keywords may be used in lieu of many item ranges to displaythe crosshair cursor in the plot window so the user may select a set to be usedas the range. (Example: CLIST,CCRS).

14. The following keywords may be used in lieu of entity numbers. (Example:V,MXV,1.0,2.0,3.0)

15. Certain keywords (which may also be used in lieu of entity numbers) willcause pro-STAR to display the crosshair cursor in the plot window and expect

Keyword Item Set

VSET Current vertex set

CSET Current cell set

BSET Current boundary set

SPLSET Current spline set

BLKSET Current block set

CPSET Current couple set

DSET Current droplet set

Keyword Select

VCRS Vertex set

CCRS Cell set

BCRS Boundary set

SCRS Spline set

BLKCRS Block set

DCRS Droplet set

Keyword Interpreted As

MXV Highest numbered vertex + 1

MXC Highest numbered cell + 1

MXB Highest numbered boundary + 1

MXS Highest numbered spline + 1

MXK Highest numbered block + 1

ICUR Currently active coordinate system

Page 361: Star CCm Guide

Appendix A pro-STAR CONVENTIONS

Help Text / Prompt Conventions

Version 4.02 A-3

the user to select an item, as specified by the following description: (Example:STLIST,SXT)

Help Text / Prompt Conventions

1. Words between slashes (e.g. /ANY/ALL/) represent legal alternatives for thefield.

2. Numbers in parentheses represent defaults for the immediately precedingvariable.

3. Variables beginning with ‘NV’ refer to verticesVariables beginning with ‘NC’ refer to cellsVariables beginning with ‘NB’ refer to boundariesVariables beginning with ‘NSPL’ refer to splinesVariables beginning with ‘NBLK’ refer to blocksVariables beginning with ‘NCP’ refer to couplesVariables beginning with ‘NDR’ refer to droplets

Keyword Select Interpreted As

BLKX Block Block number

BX Boundary Boundary number

BXP Boundary Boundary patch number

BXR Boundary Boundary region number

CX Cell Cell number

CXC Cell Cell colour index

CXG Cell Cell group number

CXM Cell Cell material number

CXP Cell Cell porous number

CXS Cell Cell spin index

CXT Cell Cell type number

DRX Droplet Droplet number

DRXT Droplet Droplet type number

SX Spline Spline number

SXC Spline Spline colour index

SXG Spline Spline group number

SXT Spline Spline type number

VX Vertex Vertex number

Page 362: Star CCm Guide

pro-STAR CONVENTIONS Appendix A

Control and Function Key Conventions

A-4 Version 4.02

Control and Function Key Conventions

1. The following short-cuts using the Ctrl key are available:

2. Function key short-cuts can be defined or changed using the Function Keysoption in the Utility menu. The default function key short-cuts are:

File Name Conventions

The default name for any file read or written by the program is casename.ext,where casename is defined by the user and ext is the file name extension. If youenclose the file name in quotes, the extension default will be overridden and theexact name within the quotes will be used.

Control Key Command

Ctrl-a CSET,ALL

Ctrl-e ZOOM,OFF $REPLOT

Ctrl-h Query for help

Ctrl-o ZOOM,OFF $REPLOT

Ctrl-q QUIT

Ctrl-r REPLOT

Ctrl-s SAVE,,

Ctrl-w Zoom out (by a factor of 2)

Ctrl-z Zoom in (by a factor of 2)

Function Key Default Command

F5 Repeat last command

F6 REPLOT

F7 CPLOT

F8 ZOOM,OFF $REPLOT

Page 363: Star CCm Guide

Appendix B FILE TYPES AND THEIR USAGE

Version 4.02 B-1

Appendix B FILE TYPES AND THEIR USAGE

FileExtension Usage

.ani Default input/output for recording animation commands

.anim Default save file for animation options

.bakBackup (i.e. previous version) of the current pro-STAR model file(binary)

.bnd Default input/output for boundary definitions

.btr STAr file used for storing beam tracking data

.ccd STAR file used for storing coal combustion data

.ccm STAR-CD data repository (restart) file (binary/direct access)

.cel Default input/output for cell definitions

.cel Default output for surface cell definitions

.cgns Default input/output for CGNS data files

.cgrd Default input file containing grid change commands

.chm Default output file for chemical scheme definitions (coded)

.cpfzDefault temporary storage of ‘frozen’ vertex data used with theSAVE and MAP options of command CPFREEZE

.cpl Default input/output for coupled cell definitions

.ctrl Editable file for interactive solution control

.dat Tecplot™ post data output file

.div Post data file created when the solution diverges

.domain ICEM CFD™ post data output file

.drpDefault output for droplet definitions (written with commandPROBLEMWRITE)

.drpc Default input/output for droplet data (coded)

.ecd File for storing engineering data for cell monitoring

.ecd2File for storing dispersed-phase engineering data for cell moni-toring

.echo Echo of all input typed by the user

.elem Default input/output for ANSYS™ element definitions

.erd File for storing engineering data for boundary region monitoring

.erd2File for storing dispersed-phase engineering data for boundaryregion monitoring

.evn Default transient event save file (binary/direct access)

.evnc Default input/output for ASCII event data files

.fac File containing cell face definitions

Page 364: Star CCm Guide

FILE TYPES AND THEIR USAGE Appendix B

B-2 Version 4.02

.fvbnd Default input for GRID3D boundary data files

.g3d Default input for GRID3D cell and vertex data files

.gen Default output for GENERIC data

.grf Default graph register data save file

.grf Default graph register ‘GET’ file

.icsDefault combustion data file (binary), used in advanced IC enginemodels

.info Run-time optional output file

.inp Any file containing pro-STAR commands

.inp Default input/output for miscellaneous problem data definitions

.lfb File containing group and colour information for particles

.loop Default save file of current loop information

.mdl Default pro-STAR model file (binary)

.mdl Default input for SMAP-type data

.msh TGRID™ data output file

.nas Default input/output for NASTRAN™ data files

.neu Gambit™ data output file

.node Default input/output for ANSYS™ node definitions

.out Default output file

.pat Default input/output for PATRAN™ data files

.pdftLook-up table file created when using PPDF chemical reactionmodels

.pgr File containing participating media radiation data (binary)

.plot Neutral plot file

.prob Default output for STAR-CD problem data file (coded)

.procFile containing cell-to-processor mapping information used inSTAR-HPC runs

.pstt Default transient solution file (binary/direct access)

.refiRefinement data file used by the adaptive refinement commands(CMREFINE / CMUNREFINE)

.reuResidual history file for phase no. 2 (used in Eulerian two-phaseproblems)

.rsi Default residual history file (binary/direct access)

.rsicDefault input/output of residual histories forBINARY-CODED-BINARY file conversions

.run Standard run-time output file

.scl Default output for scalar variable definitions (coded)

FileExtension Usage

Page 365: Star CCm Guide

Appendix B FILE TYPES AND THEIR USAGE

Version 4.02 B-3

The format for vertex definitions is: (file case.vrt)Vertex number, X, Y, Z (global coordinates) (I9, 3(1X,G21.14))

The format for boundary definitions is: (file case.bnd)Boundary number, cell number, face number, region number, patch number,region type (characters) (5(I9,1X),A)

The format for spline definitions is: (file case.spl)Spline number, number of vertices, spline type (3I9)Up to 100 vertex numbers defining the spline (8I9)

The format for couple definitions is: (file case.cpl)Couple number, number of cells (I8, 1X, I5)Up to MAXNCP cell number/face number combinations 7(I9,I2)

The format for ASCII input to be used as post-processing data is: (file case.usr)Vertex and/or cell number (as appropriate), scalar value (I9, 6X, 6G16.9).

.setDefault output for set definitions (written with the SETWRITEcommand)

.spd File for storing engine data (coded)

.spl Default input/output for spline definitions

.srfDefault output for plotting-surface database (used to skip surfacecreation step in future plots)

.stl Default input for STL data files

.tabl Default input file for droplet spray tables

.tbl Default file for storing general table data

.trk Default input/output for particle/droplet tracks

.trkcDefault input/output of particle/droplet track data forBINARY-CODED-BINARY file conversions

.trnc Default input for transient load data (coded)

.trns Default transient history save file (binary/direct access

.unv Default input/output for IDEAS™ (SDRC) universal file

.uns Fieldview™ data output file

.usr Default input/output for ASCII post data

.vfs STAR file used for storing view factors

.vrml Virtual reality data output file

.vrt Default input/output for vertex definitions

.vrt Default output for surface vertex definitions

FileExtension Usage

Page 366: Star CCm Guide
Page 367: Star CCm Guide

Appendix C PROGRAM UNITS

Version 4.02 C-1

Appendix C PROGRAM UNITS

Property Units (SI) Units (English)

AREA m2 ft2

CONDUCTIVITY W/mK Btu/(hr × ft× F)

DENSITY kg/m3 lbm/ft3

DIFFUSIVITY m2/s ft2/s

DYNAMIC VISCOSITY Pa × s psi × s

FORCE N lb

HEAT FLUX W/m2 Btu/(hr × ft2)

HEAT OF FORMATION J/kg Btu/lbm

HEAT OF VAPOURIZATION J/kg Btu/lbm

LENGTH m ft

MASS kg lbm

MASS FLOW RATE kg/s lbm/hour

MOLECULAR WEIGHT kg/kmol lbm/kmol

PRESSURE Pa (N/m2) psi

SPECIFIC HEAT J/(kg × K) Btu/(lbm × F)

SPEED OF SOUND m/s ft/s

SURFACE TENSION COEFFICIENT N/m lb/ft

TEMPERATURE K (° Kelvin) R (° Rankine)

TIME s s

TURBULENCE KINETIC ENERGY k m2/s2 ft2/s2

TURBULENCE DISSIPATION RATE ε m2/s3 ft2/s3

VELOCITY m/s ft/s

VOLUME m3 ft3

VOLUMETRIC EXPANSION COEFF. 1/K 1/R

Page 368: Star CCm Guide
Page 369: Star CCm Guide

Appendix D pro-STAR X-RESOURCES

Version 4.02 D-1

Appendix D pro-STAR X-RESOURCESThe Motif version of pro-STAR utilises standard X resources for defining the layoutand look of its windows. While default values for these resources are built into theprogram, you can override the defaults in two different ways:

1. The easiest method is to put resource definitions in your .Xdefaults file.This file is read by the Motif window manager when you log in or restart thewindow manager. Any changes made to this file do not take effect until eitheryou log in again or you issue an xrdb command to re-read the X resourcedata base. Typically, you will issue the command as follows:

2. Any file can be used to set X resources. The only significance of the.Xdefaults file is that it is read automatically on start-up. You could, forexample, create a file called PROSTAR.resources and put the resourcedefinitions in that file. In this case, you would have to issue the command:

xrdb -merge PROSTAR.resources

before running pro-STAR in order to activate those definitions

The following describes some useful resource definition commands:

xrdb -merge .Xdefaults include the full path to the.Xdefaults file if you are not in yourhome directory

Prostar*background: The default background colour for allpro-STAR applications

Prostar*foreground: The default foreground colour for allpro-STAR applications

Prostar.geometry: The size and position of the pro-STARgraphics window

Prostar.defaultFontList: The font used for the pro-STAR graph-ics window menus

Prostar.OutputWindow.geometry: The size and position of the pro-STARoutput window

Prostar*cmdForm1Widget.height: The height of the output history por-tion of the pro-STAR output window

Prostar*cmdForm2Widget.height: The height of the input portion of thepro-STAR output text window

Prostar*Prostar_Output_Text.fontList: The font used in the pro-STAR outputwindow

Page 370: Star CCm Guide

pro-STAR X-RESOURCES Appendix D

D-2 Version 4.02

X colour names are usually (but not always) defined in the file:

/usr/lib/X11/rgb.txt

Geometry definitions are in the form of W × H + X + Y where W is the width (inpixels), H the height, X the distance (in pixels) from the left of the screen to the leftside of the window, and Y the distance from the top of the screen to the top of thewindow. Heights are also defined in pixels.

Available font list names can usually be found by issuing the command:

xlsfonts

Prostar*Prostar_Output_Text.foreground: The foreground colour used in thepro-STAR output window

Prostar*Prostar_Output_Text.background: The background colour used in thepro-STAR output window

Prostar*panel_name_B1.background: The background colour of button 1 inthe user panel named panel_name.Buttons in panels are numbered start-ing from zero and are incremented by1 from top to bottom and from left toright. Any panel button can be definedusing the proper panel name and but-ton number.

Prostar*panel_name_B1.foreground: The foreground colour of button 1 inthe user panel named panel_name.

Prostar*panel_name_B1.fontList: The font used for button 1 in the userpanel named panel_name.

Prostar*macro_editor_text.fontList: The font used for the text section of themacro edit dialog

Prostar*macro_editor_text.foreground: The text foreground colour used in themacro edit dialog

Prostar*macro_editor_text.background: The text background colour used in themacro edit dialog

Prostar*GUIde_INDEXCARD.background: The default background colour for allindex cards (tabs) inside a STARGUIde panel

Prostar*GUIde_TABS.background: The default background colour for allsub-index cards (sub-tabs) inside aSTAR GUIde panel

Page 371: Star CCm Guide

Appendix D pro-STAR X-RESOURCES

Version 4.02 D-3

The following shows a sample of resource definitions that could be used withpro-STAR:

Prostar*background: paleturquoise3Prostar*foreground: black

Prostar.geometry: 800x800+480+0Prostar.defaultFontList:-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso8859-1

Prostar.OutputWindow.geometry: 1000x870+0+0Prostar*cmdForm1Widget.height: 700Prostar*cmdForm2Widget.height: 70

Prostar*Prostar_Output_Text.fontList:-adobe-courier-bold-r-normal--18-180-75-75-m-110-iso8859-1Prostar*Prostar_Output_Text.foreground: blueProstar*Prostar_Output_Text.background: gray85

Prostar*new_panel_B1.background: RedProstar*new_panel_B1.fontList:-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1Prostar*new_panel_B2.background: GreenProstar*new_panel_B2.fontList:-b&h-lucida-medium-r-normal-sans-24-*-*-*-*-*-iso8859-1

Prostar*macro_editor_text.fontList:-adobe-courier-bold-r-normal--18-180-75-75-m-110-iso8859-1Prostar*macro_editor_text.foreground: blueProstar*macro_editor_text.background: skyblue

To customise the opening locations of Tools, Lists, etc. in pro-STARIf you run the XMotif version of pro-STAR, it is possible to arrange for tools toopen in repeatable locations. This is especially useful if you have a number offavourite tools that you open each time and can make pro-STAR open them everytime via the PROINIT file.

There are two steps in doing this. The first is finding out where you want the toolto be. To this end, run pro-STAR and then place (and optionally resize) the tool toget the desired effect. Follow this by issuing the xwininfo command from anX-window to get the necessary numbers. For example:

ibm3<68>xwininfo

Page 372: Star CCm Guide

pro-STAR X-RESOURCES Appendix D

D-4 Version 4.02

xwininfo: Please select the window about which you would like information by clicking the mouse in that window.

xwininfo: Window id: 0x54007c2 "Check Tool"

Absolute upper-left X: 587Absolute upper-left Y: 374Relative upper-left X: 0Relative upper-left Y: 0Width: 630Height: 590Depth: 8Visual Class: PseudoColorBorder width: 0Class: InputOutputColormap: 0x3d (installed)Bit Gravity State: ForgetGravityWindow Gravity State: NorthWestGravityBacking Store State: NotUsefulSave Under State: noMap State: IsViewableOverride Redirect State: noCorners: +587+374 -63+374 -63-60 +587-60-geometry 630x590-55-52

This gives us two pieces of information, the name and the location. The name isenclosed in quotes in the first line of output, for this case it is Check Tool. Thelocation is given in the last line, -geometry 630x590-55-52. This gives thewidth and height as well as the location.

The second step is to feed this information to pro-STAR via Xresources. Theusual way is to edit file .Xdefaults in your home directory. In this case, add thefollowing line:

Prostar*CheckTool*Geometry: 630x590-55-52

This line is made up as follows:

Prostar*NAME*Geometry: GEOMETRY

where:

NAME is the name of the window stripped of all spaces; capitalisation mustbe kept.GEOMETRY is the location of the window as found from the previouscommand.

Once this line has been added to the file, pro-STAR should respond correctly. Onsome systems, restarting pro-STAR will suffice. Others may require you to log outand log in again or issue some variant of the xrdb command.

The above has been tested and works so far on SGI and IBM machines. Other

Page 373: Star CCm Guide

Appendix D pro-STAR X-RESOURCES

Version 4.02 D-5

machines may work with minor variations.A suitable PROINIT file will be:

opanel tool$check

Make sure that the PROINIT file is in your current directory or that it is pointed toby the STARUSR environment variable.

Page 374: Star CCm Guide
Page 375: Star CCm Guide

Appendix E USER INTERFACE TO MESSAGE PASSING ROUTINES

Version 4.02 E-1

Appendix E USER INTERFACE TO MESSAGE PASSINGROUTINES

Some user coding might need access to message passing routines when used in aparallel run. This appendix lists the parallel message passing calls that may be usedwithin the user coding.

IGSUM — Global Integer SummationSynopsisINTEGER FUNCTION IGSUM (LOCSUM)ParametersINTEGER LOCSUM — local valueReturns integer sum of LOCSUM

GSUM — Global Floating Point SummationSynopsisREAL1 FUNCTION GSUM (LOCSUM)ParametersREAL1 LOCSUM — local valueReturns floating point sum of LOCSUM

DGSUM — Global Double Precision SummationSynopsisDOUBLE PRECISION FUNCTION DGSUM (LOCSUM)ParametersDOUBLE PRECISION LOCSUM — local valueReturns double precision sum of LOCSUM

LGLOR — Global OR operationSynopsisSUBROUTINE LGLOR (LOC,GLO)ParametersLOGICAL LOC — local value (input parameter)LOGICAL GLO — global value (output parameter)

LGLAND — Global AND operationSynopsisSUBROUTINE LGLAND (LOC,GLO)ParametersLOGICAL LOC — local value (input parameter)LOGICAL GLO — global value (output parameter)

1. Type REAL becomes DOUBLE PRECISION in double precision runs.

Page 376: Star CCm Guide

USER INTERFACE TO MESSAGE PASSING ROUTINES Appendix E

E-2 Version 4.02

GMAX — Global MAX operationSynopsisREAL1 FUNCTION GMAX (LMAX)ParametersREAL1 LMAX — local valueReturns global MAX of LMAX

GMIN — Global MIN operationSynopsisREAL1 FUNCTION GMIN (LMIN)ParametersREAL1 LMIN — local valueReturns global MIN of LMIN

IGMAX — Global MAX operationSynopsisINTEGER IGMAX (ILMAX)ParametersINTEGER FUNCTION IGMAX — local valueReturns global MAX of ILMAX

IGMIN — Global MIN operationSynopsisINTEGER FUNCTION IGMIN (ILMIN)ParametersINTEGER IGMIN — local valueReturns global MIN of ILMIN

1. Type REAL becomes DOUBLE PRECISION in double precision runs.

Page 377: Star CCm Guide

Appendix F STAR RUN OPTIONS

Usage

Version 4.02 F-1

Appendix F STAR RUN OPTIONS

Usage star [options] [node1 [node2 [node3 [...]]]]

Options

-version Show STAR version information, which includes patchnumber.

-abort Send SIGABRT to stop STAR after the current iterationor time step.

-batch Generate script for running batch job. Useful if run is tobe submitted via a batch-queuing system like IBMLoadleveler, LSF, OpenPBS, PBSPro, Sun Grid Engineor Torque. This requires STAR-NET 3.0.3 or later to beinstalled.

-case=casename Select the case name manually. This option is notneeded in general.

-chktime=minutes Enable STAR controlled check-pointing at a regularinterval in minutes for fault tolerance. The default is off.

-chkdir=directory Select directory for storing the check-pointed data. Thedefault is to use a ‘CHECK’ sub-directory.

-chkpnt Perform manual check-pointing of STAR results now.This option may be useful for visualising fields whileSTAR is still executing in parallel, since it will mergethe case’s results.

-collect Collect and save data from previous crashed run only.-dp Make STAR-CD run in double precision arithmetic.

Current default is single precision, with the exception ofcombustion problems which use either STAR/KINeticsor the Complex Chemistry model, in which caseSTAR-CD will execute in double precision.

-devtool="program" Attach a development tool like a debugger to aSTAR-CD run. The use of this option is advised onsequential runs only. For parallel runs only LAM MPIand MPICH are fully supported with Totalview.

-fork Enable the use of fork() for starting local externalmoving mesh codes and NFS-based communications.

-g Compile ufile source code, so that the user may employa debugger to perform a step-by-step analysis of thecoding in the user subroutines. See also option"-devtool".

-kill Send SIGKILL to terminate STAR immediately.

Page 378: Star CCm Guide

STAR RUN OPTIONS Appendix F

Options

F-2 Version 4.02

-nolookahead Disable look ahead for socket-based external movingmesh code communications.

-noramfiles Disable memory based scratch files.-norecalc Disable the recalculation of radiation view factors.-norestart Disable restart (if selected in the problem file) by

resetting the restart flag.-nosave Disable saving of results by using an empty save list.

The "-save=" option can be used to make a new save list.-noskip Forces geometry decomposition (if applicable), events

preparation (if applicable), user coding compilation andcopying of input files (if applicable) before STAR-CDstarts to execute.

-noufile Ignore user coding in the "ufile" directory, i.e. therun’s results will not be influenced by the actual usercoding.

-restart Continue the run from an existing restart file byresetting the restart flag in the problem file.

-save="filelist" Specify additional output files for treatment as results.On a parallel run, these files will be merged into a singlefile. Ideally, these files should be formatted into twocolumns: the first column containing an index numeralthat can be ordered (i.e., pro-STAR cell number), andthe second column containing the physical quantity ofinterest. Files that should not be merged should be leftout from this option. Wildcards “*” and “?” areaccepted.

Example:-save="file1.dat file2.dat" or-save="file1.dat" -save="file2.dat"

-set variable="value" Set environmental variable to a value, especially on aparallel run, where the variable will be set on allprocesses.

Example:star -set MYVAR="on"

-timer Enable printing of detailed timing data. Use this optionto extract execution time information from the run.Please note that the use of this option entails aperformance penalty.

-toolchest Build new STAR toolchest from plug-in tools.-ufile Compile user coding and build new plugable object

only. Useful to verify if user coding compiles, i.e., if itcontains any syntax mistakes.

Page 379: Star CCm Guide

Appendix F STAR RUN OPTIONS

Parallel Options

Version 4.02 F-3

Parallel Options

-uflags="flags" Select additional flags for compiling user coding. Thisoption gives the user added flexibility in using othercompiler options that may not be listed in installationscripts.

-ulib="librarylist" Specify precompiled user coding libraries and/or someadditional dynamic shared objects required by usercoding.

-watch Enable connection to the StarWatch daemon. Thedaemon itself and the StarWatch GUI still need to be runseparately

-copy="filelist" Specify additional input files for copying to domains ona parallel run.

Example:-copy="file1.dat file2.dat" or-copy="file1.dat" -copy="file2.dat"

-decomp Run geometry decomposer only. Useful to check theoutcome of the decomposition if it has to satisfy certaincriteria.

-decomphost=hostlist Selects host(s) for running the decomposer (i.e.host1:host2:…). In particular, for the Parmetisdecomposition option more than two cpu’s (whether ornot on the same machine) should be used. The numberof cpu’s to decompose the mesh can be smaller than thenumber of requested partitions.

Example:-decomphost="host1,2 host2" 5In the above, STAR will decompose the mesh in 5 partsusing 2 cpu’s on machine "host1" and 1 cpu on machine"host2".

Page 380: Star CCm Guide

STAR RUN OPTIONS Appendix F

Parallel Options

F-4 Version 4.02

-decompmeth=method Select one of the decomposition methods listed below.The abbreviations shown in parentheses can be usedinstead. Their individual meanings are:

optimised (o): The decomposition will be read from file<casename>.proc, composed of two columns:first column contains cell numbers, second columncontains the process number to which the cells aregoing to be assigned.

automatic (a): The decomposition will uniformlydivide the number of cells between the intendednumber of processes, based purely on pro-STARcell numbering.

manual (m): The decomposition is done according tocell types, as they have been defined in pro-STAR

sets (s): The decomposition is read from a .set file, asit has been defined in pro-STAR.

metis (x): The mesh will be partitioned with Metis, abuilt-in graph-handling library. By default, eachmaterial domain will be decomposed in turn.

ometis (y): Same as above, but with a lower memoryfootprint and higher execution time.

geometric (g): The entire mesh (i.e., the mesh is treatedas if it was just one single material domain) isdecomposed in a single (Cartesian) direction inwhich the model is largest.

parmetis (p): Parallel version of the Metis family ofalgorithms. Parmetis executes the domain decom-position step in parallel and requires less memorythan the Metis algorithm. Parmetis calculatesdecompositions of similar quality to sequentialMetis. By default, each material domain will bedecomposed in turn. This option is to be used inconjunction with option ‘-decomphost’, above.

The default is ‘metis’ decomposition, except when themodel contains events, in which case the defaultbecomes ‘sets’.

Example:-decompmeth=g

Page 381: Star CCm Guide

Appendix F STAR RUN OPTIONS

Parallel Options

Version 4.02 F-5

-decompflags="flags" Special options for the domain decomposition step:

vcom: Compress vertex indices on each geometry file; ifcompressed, the vertices on each geometry file will benumbered from 1 to the local maximum number; if notcompressed, the vertices will retain their original num-bering from the un-decomposed mesh. The vertex num-bering may be important for the mesh motion operation(e.g. the vertex movement may be specified relative to afixed vertex). The default action is to compress vertices,except for moving mesh and liquid film cases where thedefault is not to compress.

novc: Disable vertex compression.

outproc: If chosen, this option will trigger the creationof a cell assignment file in the case’s directory; this file(<casename>.proc), can be loaded into pro-STARfor the user to visualise the decomposition (with com-mand RDPROC) or it can be used to repeat the samedecomposition with, for example, a different version ofSTAR in conjunction with the ‘-decompmeth=o’decomposition option.

outsets: this option will trigger the creation of a sets filein the case’s directory. In this file(<casename>.sets), each set will contain the cellsthat belong to a certain subdomain; this file can bemanipulated from within pro-STAR in the usual manneror it can be used to repeat the same decomposition with,for example, a different version of STAR in conjunctionwith the ‘-decompmeth=s’ decomposition option.

Example:-decompflags=”outproc”

-distribute Select distributed data parallel runs using local scratchdisks, as set up at the time when STAR-CD wasinitialised. Please see your Systems Administrator fordetails.

-loadbalance Select load balancing taking into account the relativespeeds of the hosts, as set up at the time whenSTAR-CD was initialised. Please see your SystemsAdministrator for details.

-mergehost=hostlist Selects host for merging results (i.e. host1:host2:…).-mpi=auto Automatic selection of the MPI implementation using

the vendor order shown below. This is the defaultbehaviour which can be changed by supplying one ofthe flags below:

Page 382: Star CCm Guide

STAR RUN OPTIONS Appendix F

Resource Allocation

F-6 Version 4.02

Resource Allocation

The user does not select sequential or parallel STAR runs directly. Instead this isautomatically determined from the resources assigned by the user or the resourcemanager. If STAR options are required they need to be specified before the nodeslist.

-mpi=os Select Operating System Vendor’s MPI-mpi=gm Select MPICH-GM (Myricom GM MPI)-mpi=hp Select HP MPI-mpi=intel Select Intel MPI-mpi=ra Select RA-MPICH (Rapid Array MPI)-mpi=scampi Select ScaMPI (Scali MPI)-mpi=score Select SCore MPI-mpi=sgi Select SGI Itanium MPI-mpi=lam Select LAM MPI-mpi=mpich Select MPICH (ANL/MSU MPI)-mppflags="flags" Select additional flags for message passing protocol.

Use this option to supply additional flags as expected bythe MPI implementation. In general, the user should notneed to use it.

-mpphosts Select non-default network for message passingprotocol using alternative host names, as set up at thetime when STAR-CD was initialised. Please see yourSystems Administrator for details.

-nocollect Disable data collection at the end of a distributed dataparallel run. This also disables saving of results. It ispossible to restart using the data already distributed tothe local scratch disks. Please note that any updates tothese files must be performed manually and the data canbe manually collected using the "-collect" option at theend of the runs.

-nocopy Disable copying of input files by using an empty copylist. The "-copy=" option can be used to make a newcopy list.

-nodecomp Do not decompose the computation mesh on a parallelrun and use the last decomposition instead. The usershould not need to use this option in general.

-noshmem Disable shared memory communications for parallelruns on a single node.

-scratch=directory Select the scratch directory path to use on all nodes fordistributed data runs. This over rides HPC_SCRATCHsettings and must be unique for each running case.

Page 383: Star CCm Guide

Appendix F STAR RUN OPTIONS

Default Options

Version 4.02 F-7

Default Options

The environment variable STARFLAGS can be set to include some default STARoptions that will be processed before any command line options. Its value isnormally set in the software initialization file (software.ini) to cater forsite-specific STAR solver options that are always used. Examples are:

STARFLAGS=-dpSTARFLAGS=-set VARIABLE="Some Value"STARFLAGS=-mpi=mpich -noshmem -distribute -timer

The user can reset STARFLAGS manually or use a different .ini file to changeits value.

The options defined in STARFLAGS are always processed first and can beover-written by additional command-line options, but only if an alternative optionexists. Thus, if

STARFLAGS=-mpi=mpich

the user can still use LAM MPI as follows:

star -mpi=lam

However, if

STARFLAGS=-dp

this setting cannot be modified because a single-precision option is not available atthe command line. Another example is:

STARFLAGS=-set GTIHOME=/users/netapps/gt GTISOFT_LICENSE_FILE=27005@heraclitus

Using STARFLAGS, the software administrator can set things up so that ordinary

-mvmeshhost=host Select additional resource for running external movingmesh code. The default is to overload the STAR masterCPU with the external moving mesh code, when one isbeing used.

-nodefile=file Select nodes to use for running STAR in a file. This canbe specified on a single line or multiple lines.

-nooverload Disable overloading of the STAR master processor withthe external moving mesh code. The number of STARdomains plus one extra process is needed in the resourceline.

node1 node2 node3 The nodes to use for running STAR. The node isspecified in the format “hostname,np”, where “np” is thenumber of processes to use. The local host will beassumed if the “hostname” is not specified and a singleprocess will be used if the “,np” parameter is notsupplied.

Page 384: Star CCm Guide

STAR RUN OPTIONS Appendix F

Cluster Computing

F-8 Version 4.02

users need to do less work. Other examples are to make everybody run in doubleprecision, to always use the -distribute option, etc.

Cluster Computing

Cluster computing is widely adopted by STAR-CD users and typically consists ofcomputing nodes connected by network interconnect devices such as GigabitEthernet, Myrinet and InfiniBand. CD-adapco have been actively working withcomputer hardware and software vendors to ensure that STAR-CD takes fulladvantage of progress in cluster technology.

An important aspect of this work is STAR-CD’s integration with MPIs thatsupport various network interconnect devices. Users can type

star -h

to check the available MPI options for the port they are using prior to issuing one ofthe "star -mpi=" commands in their session window. By checking whichnetwork interconnect devices are supported by each MPI, users can determinewhether STAR-CD works with a particular MPI/interconnect combination.

STAR-CD’s performance on a cluster is influenced by numerous factors, such asMPI performance, interconnect latency, interconnect bandwidth and file systemperformance. We have been working with our hardware and software partners toprovide benchmark data on various clusters and such data are available onCD-adapco’s web site.

Due to the extensive range of cluster configurations and the rapid developmentsin cluster technology, it is not possible to test all MPI/interconnect combinationsand to measure their performance. Users are advised to contact the relevant systemvendors to check whether a particular combination of MPI implementation andnetwork interconnects works with STAR-CD.

Batch Runs Using STAR-NET

STAR-NET 3.x is a new, lightweight tool for running applications in sequential andparallel modes under a batch environment using a resource manager. It is acompletely new design, not compatible with the previous STAR-NET 2.0.xversions (which only work with STAR-CD in parallel mode). Currently, the IBMLoadleveler, LSF, OpenPBS, PBSPro, Sun Grid Engine and Torque resourcemanagers are supported through STAR-NET 3.x compliant plug-ins. Therefore,you must install STAR-NET 3.x in order to run in batch mode or to use any of theabove resource mangers. Note also that the PBSPro and Torque are only supportedin OpenPBS compatibility mode.

Concise guidelines for running under each system are given below, assumingprior configuration as detailed in the Installation and Systems Guide.

Running under IBM Loadleveler using STAR-NET

To run STAR-PNP under Loadleveler:

1. Create a batch.sh script by specifying the -batch option:

star -batch <options>

Page 385: Star CCm Guide

Appendix F STAR RUN OPTIONS

Batch Runs Using STAR-NET

Version 4.02 F-9

where <options> represents all the normal STAR-PNP flags for your job,as described in the sections above. Note that you cannot assign a node list forresource allocation in batch mode as this will be performed automatically byLoadleveler.

2. Submit your job using the llsubmit command. For example:

star -batch <options> -chktime=60llsubmit batch.sh

The llsubmit command does not allow any resource selection and so thismust be specified correctly in the batch.sh script. The following shows themost useful settings:

# @ node_usage = shared# @ class =# @ node = 3# @ total_tasks = 8

The above requests 3 nodes and a total of 8 CPUs for running the batch job.3. The llsubmit command does not support automatic restarts and check-

pointing, so you will need to enable application-level check-pointing bySTAR-PNP as follows:

star -batch <options> -chktime=60llsubmit batch.sh

Other useful Loadleveler commands:

• Show all my Loadleveler jobs

llq -u username

• Continuously monitor the output of job number 123

tail -f batch.o123

• Terminate job number 123 under Loadleveler

llcancel 123

• Use the built-in GUI interface for submitting and monitoring jobs

xloadl

Running under LSF using STAR-NET

To run STAR-PNP under LSF:

1. Create a batch.sh script by specifying the -batch option:

star -batch <options>

where <options> represents all the normal STAR-PNP flags for your job,as described in the sections above. Note that you cannot assign a node list for

Page 386: Star CCm Guide

STAR RUN OPTIONS Appendix F

Batch Runs Using STAR-NET

F-10 Version 4.02

resource allocation in batch mode as this will be performed automatically byLSF.

2. Submit your job to the queue using the bsub command. For example:

(a) To submit to queue starnet requesting 2 to 4 processors:

bsub -q starnet -n 2,4 batch.sh

(b) To submit to queue starnet requesting 2 to 4 processors withLSF-controlled automatic restarts and enabling check-pointing every 60minutes:

bsub -q starnet -n 2,4 -r -k "CHECK 60" batch.sh

It is recommended that you always enable check-pointing and automaticrestarts to allow time-windowing/high-load-enforced job migration towork.

(c) To submit to a subset of hosts:

bsub -q starnet -m "host1 host2 host3" -n 2,4 -r -k "CHECK 60" batch.sh

Other useful LSF commands:

• Show all my LSF jobs

bjobs

• Continuously monitor the output of job number 123

peek -f 123

• Terminate job number 123 under LSF

bkill 123

• Use the built-in GUI interface for submitting and monitoring jobs

xlsbatch

Alternatively, command starnet can be used to display a brief summary ofthe current LSF status.

Running under OpenPBS using STAR-NET

To run STAR-PNP under OpenPBS:

1. Create a batch.sh script by specifying the -batch option:

star -batch <options>

where <options> represents all the normal STAR-PNP flags for your job,as described in the sections above. Note that you cannot assign a node list forresource allocation in batch mode as this will be performed automatically byOpenPBS.

2. Submit your job to the queue using the qsub command. For example, to

Page 387: Star CCm Guide

Appendix F STAR RUN OPTIONS

Batch Runs Using STAR-NET

Version 4.02 F-11

submit to queue starnet requesting 3 nodes with 2 processors each:

qsub -q starnet -l nodes=3:ppn=2 batch.sh

3. OpenPBS does not support automatic restarts and check-pointing, so you willneed to enable application-level check-pointing by STAR-PNP as follows:

star -batch <options> -chktime=60qsub -q starnet -l nodes=3:ppn=2 batch.sh

Other useful OpenPBS commands:

• Show all my OpenPBS jobs

qstat -u username

• Continuously monitor the output of job number 123

tail -f batch.sh.o123

• Terminate job number 123 under OpenPBS

qdel 123

• Use the built-in GUI interface for submitting and monitoring jobs

xpbs

Please note that only the OpenPBS features of PBSPro and Torque are supported.

Running under PBSPro using STAR-NET

PBSPro is supported in OpenPBS compatibility mode. This means that onlyOpenPBS features are supported (see the description above).

Running under SGE using STAR-NET

To run STAR-PNP under Sun Grid Engine:

1. Create a batch.sh script by specifying the -batch option:

star -batch <options>

where <options> represents all the normal STAR-PNP flags for your job,as described in the sections above. Note that you cannot assign a node list forresource allocation in batch mode as this will be performed automatically bySun Grid Engine.

2. Submit your job to a queue using the qsub command. For example:

(a) To submit to parallel environment starnet requesting 2 to 4processors:

qsub -pe starnet 2-4 batch.sh

(b) To submit to a subset of queues:

Page 388: Star CCm Guide

STAR RUN OPTIONS Appendix F

Batch Runs Using STAR-NET

F-12 Version 4.02

qsub -pe starnet 2,4 -q queue1,queue2,queue3 -ckpt starnet batch.sh

3. Sun Grid Engine supports automatic restarts but not check-pointing, so youwill need to enable application-level check-pointing by STAR-PNP asfollows:

star -batch <options> -chktime=60qsub -pe starnet 2-4 -ckpt starnet batch.sh

Please note that Sun Grid Engine versions earlier than 5.3 do not supportautomatic restarts when the master host fails.

Other useful SGE commands:

• Show all my Sun Grid Engine jobs

qstat -u username

• Continuously monitor the output of job number 123

tail -f batch.sh.o123

• Terminate job number 123 under Sun Grid Engine

qdel 123

• Use the built-in GUI interface for submitting and monitoring jobs

qmon

Alternatively, command starnet can be used to display a brief summary ofthe current SGE status.

Running under Torque using STAR-NET

Torque is supported in OpenPBS compatibility mode. This means that onlyOpenPBS features are supported (see the description above).

Page 389: Star CCm Guide

Appendix G BIBLIOGRAPHY

Version 4.02 G-1

Appendix G BIBLIOGRAPHY

[1] Kee R.J., Rupley F.M. and Miller J.A. 1990. ‘The ChemkinThermodynamic Data Base’, Sandia Report No. SAND87-8215B.

[2] “CET89 — Chemical Equilibrium with Transport Properties”. 1989.NASA Lewis Research Center.

[3] Liepman H.W. and Roshko A. 1957. “Elements of Gas Dynamics”. JohnWiley & Sons, New York.

[4] Shapiro A.H. 1953. “The Dynamics and Thermodynamics ofCompressible Fluid Flow — Vol. 1 and Vol. 2”. Ronald, New York.

[5] Gordon S. and McBride B. J. 1994. “Computer Program for Calculationof Complex Chemical Equilibrium Compositions and Applications, Part I.Analysis”, NASA Ref. Publ. 1311, NASA Lewis Research Center.

[6] McBride B. J. and Gordon S. 1996. “Computer Program for Calculationof Complex Chemical Equilibrium Compositions and Applications, PartII. Users Manual and Program Description”, NASA Ref. Publ. 1311,NASA Lewis Research Center.

[7] Harten, A., Lax, P.D. and Van Leer, B. 1983. ‘On upstream differencingand Godunov-type schemes for hyperbolic conservation Laws’, SIAMRev., 25, pp. 35-61.

Page 390: Star CCm Guide
Page 391: Star CCm Guide

INDEXCommands are listed in a separate index immediately following this one

Version 4.02 1

Aabbreviations of commands 16-1absorption coefficient 7-4absorptivity

of baffle 4-26thermal 4-25

of wall 4-22solar 4-21thermal 4-20

accuracynumerical 1-5temporal 1-14view factor 7-5

adaptive mesh refinement. See mesh, adaptive refinementadd set selection option 2-21, 4-3aeroacoustics 13-3aerodynamics problems, boundaries for 4-36all set selection option 2-21, 4-3angle

internal 1-5warp 1-5

angular velocity 12-1, 12-8defined by user subroutines 14-16

animation 2-32anode 8-33append mode 2-13aspect ratio

cell 1-5 to 1-6patch 7-6

atomisation models 9-1attachment boundaries. See boundary conditions,

attachmentautoignition (double-delay model) 8-37 to 8-39average nuclear radius 11-7axis of rotation 12-4, 12-8axisymmetric flow. See flow, axisymmetric

Bbackground

colour 2-32material, in chemical reactions 8-17

background fluid 13-3baffle 4-23 to 4-27

conducting 3-18expanding 3-18in restart after mesh changing 5-17porous 4-24, 4-25, 6-5radiation 4-25side numbering 4-24thickness 3-18transparent 4-26

batch mode 2-34beams 7-6black and white printing 17-22

black body 4-20blending factor 14-19, 15-2, 17-19block set 2-21, A-2boiling. See cavitationboundary

cells 1-4defining 4-2layer 1-6

in compressible flow 3-10turbulent 1-7, 3-14

list 4-3location 1-11, 4-1 to 4-5maximum number of 2-18modifying 4-2monitoring behaviour 5-3monitoring regions 4-40notional 1-4region 4-1

changing type 4-2, 5-4, 5-11compress 4-7default (region no. 0) 4-7defining 4-5

set 2-21, A-2selection 4-3

symmetry 1-3types 4-5visualisation 4-41

boundary conditions 1-11attachment 4-38 to 4-39

displaying 12-30baffle 4-23 to 4-27

for solar radiation 4-26cyclic 1-3, 1-12, 4-27 to 4-32

anticyclic 4-29partial 4-30

defined by GT-POWER 4-9defined by tables 2-24, 4-7

baffles 4-27free-stream 4-33inlet 4-10non-reflective 4-19outlet 4-12pressure 4-14Riemann 4-37stagnation 4-16transient wave transmissive 4-35wall 4-22

defined by user subroutines 4-7, 14-5defined using load steps 5-6 to 5-14degassing 4-40, 10-1for cavitating flows 11-5for compressible flow 3-9for free surface flows 11-1for liquid films 13-6for rotating frames 12-6for subsonic compressible flow 3-9

INDEX

Page 392: Star CCm Guide

Index

2 Version 4.02

for supersonic flow 3-9for transonic flow 3-10free-stream 1-12, 4-32 to 4-34, 14-6inlet 4-9 to 4-11, 14-5non-reflective 1-12, 4-16 to 4-19, 14-6outflow 1-11, 4-9, 4-10, 4-12outlet 1-11, 4-11 to 4-12, 14-6plots of 4-8prescribed flow 1-11pressure 1-12, 4-12 to 4-14, 14-6

for cavitating flows 11-9for free surface flows 11-4

radial equilibrium 4-9on pressure boundaries 4-12, 4-14

radiation 4-39 to 4-40, 7-8Riemann 1-12, 4-36 to 4-38, 14-6stagnation 1-12, 4-14 to 4-16, 14-6

for rotating reference frames 12-1, 12-4, 12-9symmetry 1-12, 4-27table input 2-24 to 2-31time-varying 5-4transient wave transmissive 1-12, 4-34 to 4-36, 14-6wall 4-19 to 4-23, 14-6

for solar radiation 4-20in turbulent flow 3-12See also wall

buoyancy 1-9See also density

buoyancy driven flow. See flow, buoyancy drivenbyte ordering 16-1

Ccalculations, checking 1-20catalytic converters 8-1cathode 8-33cavitation 11-5 to 11-10

defined by user subroutines 14-11in free surface flows 11-3, 11-6, 11-8initialisation 11-8solution algorithms 1-13, 11-9steady-state flows 11-6temperature calculation 11-8vapour properties 11-7

CEA (Chemical Equilibrium with Applications)program 8-3

cell 1-2attachment 12-18, 12-23 to 12-28data 17-3detachment 12-23 to 12-28face

boundary 4-1matching 4-29

index 3-3interface 12-18layer

addition 12-14

removal 5-17, 12-14list 2-24, 3-4maximum number of 2-18monitoring behaviour 5-3near-boundary 1-4near-wall 3-12, 3-13, 3-14number of 15-1plot 2-23properties 3-1set 2-21, A-2

volume 3-22shape 1-4shape changing 5-15size 1-6table 3-1 to 3-3

compress 3-3editor 3-1 to 3-3

radiation 7-8number 3-2porosity 6-1

tool 3-3type 3-3

change fluid type 12-23change grid (CG) operation 12-9characteristic

length. See length, characteristicvelocity. See velocity, characteristic

check tool 3-5checking

model and problem data 15-1results 1-20

chemical reaction. See reactionCHEMKIN 8-11clearing entire geometry 17-14coal combustion 8-41 to 8-47

default models 8-42inlet mass fractions 8-44

coal particle size distribution 8-45colour

background 2-32, D-1, D-2foreground D-1, D-2options 2-4palette 3-2table index 3-2

colour tool 17-22combustion. See reaction and coal combustioncommand

abbreviations 16-1arithmetic in A-1conventions A-1help A-3history 2-13, 2-19, 17-2input 2-13

echo 2-19output 2-13

number of lines 2-19commands 2-36, 2-41

Page 393: Star CCm Guide

Index

Version 4.02 3

compressibility 3-9compressible flow

Courant number 5-9model setup 3-9 to 3-11outlets 1-11 to 1-12pseudo-transient approach 5-1stagnation boundaries 4-14transient, boundaries for 4-34

compression wave 4-32condensation to liquid films 13-6conduction thickness 3-19conduction through baffles 4-25conductivity

defined by user subroutines 14-6in chemical reaction problems 8-17in multi-component mixing 13-3

connectivity 12-18control keys A-4controlling STAR with StarWatch 17-17convergence 1-19

in steady-state calculations with SIMPLE 1-16in transient calculations with SIMPLE 1-17rate of 4-13

coordinate systemin attachment boundaries 12-19, 12-23in porous media 6-2 to 6-3

corrector step tolerance 1-14couple set 2-21, A-2couples across cyclic boundaries 4-29Courant number 5-9, 14-18

for Lagrangian multi-phase flow 9-10for LES turbulence models 3-15for pseudo-transient calculations 5-2

crank angle 9-9cursor select 2-19, A-2customisation of pro-STAR 2-18, 16-1cyclic

boundary pair. See boundary conditions, cyclicset list 4-31

Ddeleting entire model 17-14density

at Riemann boundary 4-37calculation 1-9, 3-9defined by user subroutines 14-8in aeroacoustic analysis 13-4in buoyancy driven flow 3-20in free surface flows 11-3in PPDF scheme reactions 8-4, 8-19reference 3-21

in buoyancy driven flow 4-14under-relaxation 1-15, 17-19

dependent variablein tables 2-27initialisation 1-10, 4-42

monitoring 1-19printout 15-3

differencing schemes 15-2for free surface flows 11-2for steady-state runs 5-2for transient runs 5-11for use with DES turbulence models 3-15for use with LES turbulence models 3-15

diffusion reaction system 8-1diffusivity

characteristic 1-14molecular, defined by user subroutines 14-8porous 6-4

directory, working 2-3, 2-9discrete fourier transform (DFT) algorithm 4-18discrete transfer/ordinates radiation. See radiationdiscretisation

error 1-6, 1-21schemes 1-21temporal

for cavitating flows 11-9for DES turbulence models 3-15for free surface flows 11-4for LES turbulence models 3-15with the SIMPLE algorithm 1-18

time 5-11volume 1-3

distance, normal dimensionless. See near-wall,dimensionless normal distance and y+ values

distributed resistance 6-1, 15-2user subroutines 14-8

divergence 2-6, 2-7double precision mode 1-18drag

coefficient 14-19force 14-14

dropletage 9-7collision models 9-1

defined by user subroutines 14-12diameter distribution function 9-1

defined by tables 2-26gravitational effect 3-21information 9-8mass transfer 14-13momentum transfer 14-13number density 14-12positions 9-7reading data 9-5set 2-21, A-2set selection 9-6track list 9-7transfer to/from liquid films 13-5, 13-6, 13-7user subroutines 9-1 to 9-3, 14-12 to 14-13volume 9-10

Page 394: Star CCm Guide

Index

4 Version 4.02

Eemissivity

at escape boundaries 4-39at radiation boundaries 4-39of baffle 4-26

solar 4-26thermal 4-25, 7-1, 7-4

of wall 4-22thermal 4-20, 7-1, 7-4

with FASTRAC 7-2engine data 9-9enthalpy

defined by user subroutines 14-7, 14-10in PPDF scheme reactions 8-19stagnation 3-11temperature dependence 14-7

environment variables 17-12equations of state 1-9error

messages 2-19sweep limits 1-14, 1-15

numerical discretisation 1-6, 1-21recovery 2-20round-off 1-18splitting 1-13

escape surfaces 7-2, 7-4Eulerian multi-phase flow

boundaries 10-1interphase 10-2model setup 10-1 to 10-4phase-escape boundary 4-40response coefficient 14-14user subroutines 14-14

evaporation from liquid films 13-6event steps

cell attachment 12-22cell inclusion/exclusion 12-28cell removal/addition 12-14deleting 12-12listing 12-12modifying 12-12moving mesh 12-9moving pistons 12-13reading 12-12regular sliding 12-18turning off 12-30writing 12-12

exhaust gas recirculation 8-11, 8-17exhaust valve 5-11expansion wave 4-32exposure

of baffle 4-26of wall 4-20, 4-22

Ffacets 1-4

FASTRAC 7-1boundary conditions 7-2escape boundaries 7-5patches 7-2symmetry and cyclic boundaries 7-5user subroutines 7-6view factors 7-3with moving mesh 7-7

favourites menu 2-17file menu 2-16

case name 17-1edit file 17-10model title 2-19resume 17-10resume from 17-2resume model 17-2save as coded 17-3, 17-10save model 17-2, 17-10system command 2-18write geometry file 17-5, 17-10write problem file 17-6, 17-10

files 2-36, 17-1 to 17-12, B-1 to B-3boundary 17-3cell 17-3coded 17-3command 17-10data repository 17-5droplet data 9-5echo 17-2editing 17-11engines 9-9event steps 12-12, 12-19format of B-3geometry 17-5load step 5-9macros 16-6manipulating 17-9mapping 5-15model 2-4, 17-2monitoring engineering data 5-3output 2-7panels 16-5param.prp 17-13plot 17-4problem 2-6, 17-6PRODEFS 16-1PROINIT 16-1reaction mechanism 8-11relationship between 17-7residual 17-6restart 2-7scalar properties 13-3scene 17-23set-up 16-1solution 17-5STAR-CD 3.2x equivalents 17-6temporary 17-14

Page 395: Star CCm Guide

Index

Version 4.02 5

transient 5-5, 5-13, 17-4, 17-7compressing 5-14

vertex 17-3view factors 7-3, 7-6

film stripping 13-5, 13-7flame kernel 8-36flamelet library 8-20flow

axisymmetric 1-12buoyancy driven 1-13, 1-15, 3-20, 5-4

pressure boundaries 4-14under-relaxation 3-21unstable 3-21

cavitating. See cavitationchaotic 5-4compressible. See compressible flowcyclic 5-4free surface. See free surface flowimpingement 3-15inviscid 4-19

enthalpy 3-10non-Newtonian 3-11periodic 5-4prescribed 1-11split 4-11steady 1-10, 1-15 to 1-17

analysis controls 5-1 to 5-4output controls 5-2solution controls 5-1

subsonic 3-9supersonic 1-11, 3-9

mesh at inlet boundaries 4-10transient 1-13 to 1-15

analysis controls 5-4 to 5-14output controls 5-5, 5-12solution controls 5-5, 5-9

transonic 1-11, 3-10residuals 3-10

turbulent 3-12unsteady 1-10

fluidbackground 13-3injection 3-21 to 3-22

defined by user subroutines 14-10mixture 13-1non-Newtonian 3-11properties 13-3, 15-2stream 15-2

multiple 3-5font size 2-33fonts D-1, D-2force, body 1-9FORTRAN conventions 14-4free surface flow 11-1 to 11-5

defined by user subroutines 14-11density 11-3differencing schemes 11-2

initialisation 11-3pseudo-transient approach 5-1solution algorithms 1-13, 11-4steady-state 11-1surface tension 11-2temperature calculation 11-3

free-stream boundary. See boundary conditions, free-stream

function keys 16-9 to 16-11, A-4

Ggas

ideal 3-9law. See ideal gas law

geometry, modifying 5-15graph menu 2-17graphics driver 2-3group number 3-2GT-POWER 4-9

Hhard copy 17-21heat

conductivitydefined by user subroutines 14-6in chemical reaction problems 8-17in multi-component mixing 13-3

transfercoefficient 3-17, 14-17in baffles 3-18in porous media 6-4solid-fluid 3-16 to 3-20solid-solid 3-20

help menu 2-17on-line help 2-2pro-STAR help 17-7

II/O window 2-13IC setup panels 8-23 to 8-37ideal gas 3-9

law 3-20, 8-4ignition 8-10, 8-15, 8-21, 14-15

advanced ICE models 8-24, 8-27, 8-29, 8-31AKTIM 8-33 to 8-36for simulations involving cell layer removal 12-18

imbalance 7-5independent variables in tables 2-27inflow at outlet boundaries 1-11INFO button 2-22initial conditions 1-10, 1-20, 17-6

defined by tables 2-24for liquid films 13-6for transient analyses 1-18

Page 396: Star CCm Guide

Index

6 Version 4.02

initialisation procedurein Lagrangian flow using user coding 14-13in moving meshes 14-17steady-state run 4-42transient run 4-42

injection groups 9-2injection. See fluid, injectioninlet. See boundary conditions, inletinner iterations. See iterations, innerinput/output window 2-13instability

numerical 1-10, 1-14, 4-13physical 1-9

interfacesliding 12-19solid-fluid 3-18

radiative 7-5invert set selection option 2-21, 4-3iterations

inner 1-13number of 15-1outer 1-13, 1-17

iterative calculation 1-19

KKirchoff’s law 4-20, 4-26

LLagrangian multi-phase flow

atomisation models 9-1mesh 9-10model setup 9-1nozzle models 9-1static displays

steady-state 9-5transient 9-8

trajectory displays 9-8user subroutines 9-1 to 9-3, 9-10, 14-12with liquid films 13-5See also droplet

length, characteristic 15-2lift coefficient 14-19lighting material 3-2liquid films 13-5 to 13-7

boundary conditions 13-6boundary regions 13-5evaporation/condensation 13-6film stripping 13-5, 13-7gravitational effect 3-21initial conditions 13-6multi-component 13-6results 13-6velocity 13-7with Largrangian multi-phase flow 13-5

lists

boundaries 4-3cells 3-4cyclic sets 4-31droplet tracks 9-7tracks 9-7

lists menu 2-16load steps 5-6 to 5-14, 14-18

definition 5-8identifying number 5-11in multi-component mixing 13-3

Mmacros 16-6 to 16-9

creating 16-7menus 16-8modifying 16-7

massconservation 8-3, 8-10flow rate

defined by tables 2-26defined by user subroutines 14-10

flux 3-22in excluded cells 12-28transfer

coefficient 14-17droplet 14-13in porous media 6-4

materialnumber 3-2, 3-7properties 3-1

maximum plot screen 2-32memory requirements of pro-STAR 17-13menus 2-16 to 2-17mesh

adaptive refinement 5-17 to 5-19at non-reflective boundaries 4-18block. See block setdistortion 1-5 to 1-6

problems caused by 1-16distribution, near walls 1-7mean dimension of 1-14moving 5-14, 12-9 to 12-13

defined by user subroutines 14-16in porous media 6-5mesh preview mode 12-13, 12-18parameters 12-10post-processing 12-29pre-processing 12-28restoration to original state 12-29with radiation 7-3, 7-5

polyhedralat boundaries

attachment 4-39free-stream 4-33pressure 4-14Riemann 4-37

Page 397: Star CCm Guide

Index

Version 4.02 7

stagnation 4-15supersonic inlet 4-10transient wave transmissive 4-35walls 4-22

refinement 5-15 to 5-17rotating. See rotating reference frames 12-1sliding 12-18 to 12-22

defined by user subroutines 14-16mesh preview mode 12-22parallel processing 12-22regular interface 12-18 to 12-22without shearing 12-21

tetrahedral, at boundariesfree-stream 4-33pressure 4-14Riemann 4-37stagnation 4-15supersonic inlet 4-10transient wave transmissive 4-35walls 4-22

visualisationcolour setting 3-1lighting effect 3-1

message passing routines E-1mixing, multi-component 13-1mixture

fluid 13-1fraction 8-2, 8-3, 8-10, 8-16

modelchecking 1-20title 2-19

modelling strategy 1-1modifying cell type 3-3 to 3-4modules menu 2-16

transient 5-6, 17-4monitoring

engineering data 4-40, 5-3, 5-13boundary behaviour 5-3cell behaviour 5-3

field data 5-12field variables 2-7, 5-13, 14-19, 15-2 to 15-3, 17-18numerical solution 5-3, 17-8, 17-19 to 17-21scalars 5-12

multi-componentliquid films 13-6mixing 13-1setting up models 13-1

multi-phase flow. See Lagrangian multi-phase flow andEulerian multi-phase flow

multiple streams 3-5 to 3-9of fluid mixtures 13-1

Nnatural convection. See flow, buoyancy drivenNavCenter 2-38near-wall

cell 3-12, 3-13, 3-14, 5-18for compressible flow 3-10

dimensionless normal distance 1-7, 3-13See also y+ values

layer (NWL) 1-7, 3-12, 3-14mesh distribution 1-7region 3-13

neutral plot file 2-31, 17-4new set selection option 2-21, 4-3none set selection option 2-21, 4-3non-Newtonian flow. See flow, non-Newtonianno-slip condition 4-19NOVICE mode A-1NOx modelling 8-39

defined by user subroutines 14-15nozzle models 9-1nuclei, number of 11-7numerical discretisation error 1-6Nusselt number 14-15

Oon-line help 2-2operate utility 13-4operating mode 2-18outer iterations. See iterations, outeroutflow. See boundary conditions, outflowoutlet. See boundary conditions, outletoutput

controls 5-2, 5-5, 5-12

Ppanels 16-2 to 16-6

creating 16-2environment 16-7files 16-5manipulating 16-6menus within 16-3modifying 16-2

panels menu 2-17define macros 16-7define panel 16-2

parallel processing 2-5for sliding mesh 12-22run options F-3 to F-7user subroutines 14-22, E-1with cell layer removal/addition 12-18with moving mesh 12-13

parameters 2-36varying during run 17-18 to 17-20

parcels 9-2, 9-6particle radiation. See radiation, coal particlespatch

number 4-4radiation 7-2 to 7-7surface 7-7

Page 398: Star CCm Guide

Index

8 Version 4.02

permeability function 1-10PISO algorithm 1-13 to 1-15

under-relaxation 17-19plot menu 2-17

alternate plot mode 2-31background 2-32cell display 4-41, 7-2, 9-5maximum plot screen 2-32plot to file 17-4standard plot mode 2-31standard plot screen 2-32

plotting hard copies 17-21porous

baffles 4-23, 4-25, 6-5media

in Eulerian multi-phase flow 10-2in moving mesh 12-13in multi-component mixing 13-2user subroutines 14-8

pressure drops 6-5region modelling 6-1 to 6-5

post menu 2-17get droplet data 9-3

post register 13-4post-processor 2-1power law of viscosity 3-11Prandtl number 8-17

defined by user subroutines 14-18precision. See solver, precisionpre-processor 2-1pressure 4-5

boundary. See boundary conditions, pressurecorrection 1-13 to 1-15drop across porous region 6-5prescribed. See boundary conditions, pressuresaturation 11-7

product 8-2prolinkl script 17-14prosize script 17-13pro-STAR 1-2, 2-1

customisation 16-1display D-1 to D-3executables 17-14launching 2-3, 2-10layout D-3 to D-5memory 17-13on-line help 2-36, 17-7quitting 2-21resizing 17-13size 2-18

pseudo-transient calculation 5-1for compressible flow 3-11

Qquitting pro-STAR 2-21

Rradiation 7-1 to 7-8, 15-2

analysis methodsdiscrete ordinates 7-3 to 7-5, 7-7 to 7-8discrete transfer 7-1 to 7-7

at walls 4-20boundaries. See boundary conditions, radiationcell table editor 7-8coal particles 7-5, 8-43cpu time 7-6, 7-7escape boundaries 7-5FASTRAC. See FASTRACin coal combustion 8-44in Eulerian multi-phase flow 10-2on baffles 4-25participating media 7-3patch 7-2 to 7-7properties, defined by user subroutines 14-11solar 7-1

baffle boundary conditions 4-26discrete ordinates 7-8in particpating media 7-3wall boundary conditions 4-20

sub-domains 7-8surface exchanges 7-1transparent solids 7-3 to 7-8user subroutines 7-6with STAR-HPC 7-6

Rayleigh model 11-7reactant 8-2

leading 8-2, 8-18reaction

advanced ICE models 8-22 to 8-39CFM 8-24 to 8-25ECFM 8-26 to 8-27, 8-30ECFM-3Z 8-28 to 8-30

compression ignition 8-29 to 8-30spark ignition 8-28 to 8-29

level set 8-31 to 8-32saving data 8-32

background material 8-17complex chemistry models 8-11, 8-21

coupled 8-16eddy break-up reaction 8-13Landau-Teller reaction 8-12Lindemann fall-off reaction 8-12SRI fall-off reaction 8-13sub-timestep 8-21three-body reaction 8-12Troe fall-off reaction 8-12

conventions 8-18copying 8-17EGR systems 8-17heterogeneous 8-1homogeneous 8-1in Eulerian multi-phase flow 10-2

Page 399: Star CCm Guide

Index

Version 4.02 9

local source model 8-2, 8-16models 8-1NOx formation 8-39partially premixed 8-1PPDF scheme 8-3 to 8-11, 8-18 to 8-19

multi-fuel 8-9single-fuel 8-3

equilibrium models 8-3with dilutants 8-9

premixed 8-1rate, defined by user subroutines 14-15regress variable models 8-10, 8-16

eddy break-up models 8-10flame-area models 8-10

CFM-ITNFS 8-10Weller 8-10Weller 3-equation 8-10

schemes 8-2, 8-14soot modelling. See soot modellingsource term 14-11temperature limit 8-21turning off 8-17types 8-1unpremixed/diffusion 8-1user subroutines 14-15

real constants 5-3recovery 2-20re-executing commands 2-20reference temperature 15-2reflectivity

of baffle 4-26solar 4-26, 7-2thermal 4-25, 7-1, 7-4

of wall 4-22solar 4-21, 7-2thermal 4-20, 7-1, 7-4

regress variable 8-10relaxation factors 1-15, 1-16, 15-2residuals 1-15, 1-19, 2-6, 2-7, 15-3, 17-19

for transonic flow 3-10inner 1-13, 1-15oscillations 1-19, 2-7tolerance 8-16, 10-4, 15-1, 17-19

resistance, distributed 6-1user subroutines 14-8

resizing pro-STAR 17-13resource allocation F-6restart 4-42

aeroacoustic analysis 13-4after mesh changes 5-15coal combustion 8-44data 5-13files 2-7flamelet calculations 8-20Lagrangian multi-phase 9-10moving mesh 12-13multiple runs 5-14

non-reflective boundaries 4-18run options F-2steady-state runs 4-42, 5-4transient runs 4-43, 5-6, 5-10turbulence models 3-16view factors 7-5with INITFI 14-17

restoring sets 2-22results checking 1-20RESULTS sub-directory 2-7resume mode 2-13rotating reference frames

arbitrary interface 12-4coupling 12-8defined by user subroutines 14-16multiple

explicit method 12-5 to 12-9non-reflecting explicit option 12-9

implicit method 12-2 to 12-5single 12-1

rotation 1-9rotational speeds, defined by tables 2-25rothalpy, in rotating reference frames 12-5roughness 14-6run time controls, defined by tables 2-25running simulations 2-2, 2-4, 2-11

in parallel 2-5on other hosts 2-5

SSauter mean diameter 9-9saving

model 2-42screen 2-33sets 2-22

scalarCAV 11-6, 11-8in fluid mixtures 13-1initialisation 4-42numbering 13-3printing 13-2properties, defining 8-15variable 8-16VOF 11-1, 11-6

initialisation 11-4, 11-9scalar solver 1-19scattering coefficient 7-4Schmidt number 6-4, 8-17

defined by user subroutines 14-8, 14-18screen

capture 2-33high-resolution 2-33

display control 2-18dump 2-33size 2-32storage 2-32

Page 400: Star CCm Guide

Index

10 Version 4.02

set active cell type 3-3sets

restoring 2-22saving 2-22

set-up files 16-1shock wave 4-32short cut keys. See function keysshort input history 2-15SIMPLE algorithm 1-13, 1-16 to 1-18single precision mode 1-18sliding mesh. See mesh, slidingsolid regions 15-2

initialisation 4-42solid-fluid heat transfer 3-8, 3-16 to 3-20, 15-2

hints 3-19in free surface flows 11-2radiative 7-3, 7-5

solid-solid heat-transfer 3-20solution

algorithms 1-13 to 1-18for buoyancy driven flow 3-21for cavitating flows 11-9for use with DES turbulence models 3-15for use with LES turbulence models 3-15in free surface flows 11-4

controls 5-1, 5-5, 5-9domain 1-2mapping 5-15, 5-16procedure 15-1

solverconjugate gradient 1-19precision 1-18

for Eulerian multi-phase flow 10-3for liquid films 13-6

tolerances 1-14, 1-15, 1-16, 15-2soot modelling 8-39 to 8-41

flamelet library model 8-39PSDF moments model 8-26, 8-29, 8-40

sound, speed of 14-12source

aeroacoustic 13-4defined by tables 2-24enthalpy 3-9

defined by user subroutines 14-10in cavitating flows 11-9in Eulerian multi-phase flow 10-3in free surface flows 11-4mass 3-8

defined by user subroutines 14-10momentum 3-8

defined by user subroutines 14-10scalar, defined by user subroutines 14-11turbulence 3-9

defined by user subroutines 14-10species

mass fraction 8-4defined by user subroutines 14-16

in coal combustion 8-44reacting 8-2

specific heat 8-17, 8-19, 15-2defined by user subroutines 14-9in multi-component mixing 13-3

spinindex 12-3, 12-6parameters 12-1, 12-4 to 12-8velocity 12-1, 12-4

spline set 2-21, A-2stability

numerical 1-5, 1-10dependence on time step 5-9

stagnation boundary. See boundary conditions, stagnationSTAR 1-2

defaults F-7run options F-1 to F-12running 2-4, 2-5, 2-11switches 2-5, F-1 to F-12

STAR-GUIde 2-38check everything panel 4-6favourites 2-40

STAR-HPC, with radiation problems 7-6, 7-7STAR-Launch utility 2-8 to 2-12STAR-NET F-8 to F-12STAR-View 17-23StarWatch utility 17-15 to 17-21states 17-6steady-state calculation 1-15 to 1-17stoichiometry, checking 8-16strain rate, at inlet 8-20subset set selection option 2-22, 4-3surface

tension 11-2coefficient 14-12

surface set selection option 2-22sweep limits 1-14, 1-15, 1-16, 15-2sweeps 1-13, 17-19switches 5-3

for ‘prostar’ system command 2-4for ‘star’ system command 2-5, F-1 to F-12

symmetry plane. See boundary conditions, symmetrysystem commands, entering in pro-STAR 2-18

Ttables

dependent variables 2-27editor 2-26 to 2-31graphs of 2-29hints 2-31independent variables 2-27title 2-27usage in

boundary conditions 2-24, 4-7baffles 4-27free-stream 4-33

Page 401: Star CCm Guide

Index

Version 4.02 11

inlet 4-10non-reflective 4-19outlet 4-12pressure 4-14Riemann 4-37stagnation 4-16transient wave transmissive 4-35walls 4-22

initial conditions 2-24injectors and sprays 2-26rotational speeds 2-25run-time controls 2-25source terms 2-24

tcl/tk interpreter 2-35temperature

at free-stream boundary 4-33at Riemann boundary 4-37at transient wave transmissive boundary 4-35defined by user subroutines 14-7devolatilisation 8-43distribution 3-17functional dependence 14-7in cavitating flows 11-8in free surface flows 11-3limit on reaction 8-21radiation 7-2, 7-4reference 15-2

in restart runs 5-17stagnation 3-11under-relaxation 17-19

temporal discretisation. See discretisation, temporalthermal

resistance 3-17runaway 1-10

thermal radiation. See radiationtime

characteristic 1-14cpu 2-18, 15-3

reducing 1-16elapsed 2-7elapsed computational 15-3ignition delay 8-37scale 5-9

heat/mass transfer 8-44step 1-10, 5-6, 5-9

adjusting 1-14, 1-18defined by tables 2-25number of 15-1specification 5-11variable 14-18varying during run 17-18See also Courant number

tools menu 2-16cell tool 3-3check tool 3-5colour tool 17-22convert 17-8

users tool 2-35transient calculation 1-13 to 1-15, 3-11

completion 2-7full 5-6 to 5-14single 5-4 to 5-6

transient wave boundary. See boundary conditions,transient wave transmissive

transient waves 4-34transmissivity

at solid-fluid interface 7-5of baffle 4-26

solar 4-26, 7-2thermal 4-25, 7-1, 7-4

of wall 4-22solar 4-21, 7-2thermal 4-20, 7-1, 7-4

turbomachinery, boundaries for 4-16turbulence 3-12 to 3-16

changing model 3-16DES models 3-15hybrid wall functions 3-12, 3-14in aeroacoustic analysis 13-4in ECFM combustion models 8-30in porous media 6-4in rotating reference frames 12-2, 12-4, 12-9initialisation 4-42length scale 14-9LES models 3-15low Reynolds number models 3-12, 3-14models 3-12, 15-2Reynolds stress models 3-15

conditions at boundaryfree-stream 4-33inlet 4-10Riemann 4-37stagnation 4-15transient wave transmissive 4-35

two-layer models 1-8, 3-12, 3-13 to 3-14wall functions 3-12, 3-13

non-equilibrium 3-13tutorials 2-37two-dimensional flow, axisymmetric. See flow,

axisymmetrictwo-phase flow. See Lagrangian multi-phase flow and

Eulerian multi-phase flow

Uunder-relaxation 1-10, 1-15, 3-20

density 1-15for compressible flow 3-10, 3-11for moving mesh 12-13for steady-state calculations with PISO 1-15for steady-state calculations with SIMPLE 1-16for transient calculations with SIMPLE 1-17in buoyancy driven flow 3-21in cell layer removal/addition 12-18

Page 402: Star CCm Guide

Index

12 Version 4.02

in chemical reaction problems 8-16in Eulerian multi-phase flow 10-4in multi-component mixing 13-3pressure 1-16pressure correction 1-14varying 17-19velocity 1-16viscosity 1-15

units 2-36, C-1unselect set selection option 2-21, 4-3unsteady calculation. See transient calculationuser interface 2-35user subroutines 2-4, 2-18, 2-36, 14-1 to 14-22, 15-2

activating 14-2checking 1-20defining material properties 14-6 to 14-9editing 14-4, 17-10for boundaries 4-7, 14-5for chemical reactions 14-15for Eulerian multi-phase flow 14-14for heat and mass fluxes 14-6for heat and mass transfer coefficients 13-3, 14-17for Lagrangian multi-phase flow 9-10, 14-12for moving mesh 12-9, 14-16for porous media 6-4, 14-8for rotating reference frames 12-1, 12-4, 12-8, 14-16for solar radiation 7-6for turbulence 14-9, 14-10in droplet injection 9-1 to 9-3in parallel processing runs 14-22, E-1

users tool 2-35utility menu 2-17

calculate volume 3-22capture screen 2-33count 4-2function keys 16-10save screen as 2-33solution mapping 5-16user subroutines 14-2write STAR-CD scene file 17-23

Vvaporization rate 14-12vapour in cavitating flows 11-7variables 2-36vector solver 1-19velocity

angular. See angular velocityat stagnation boundaries 4-15boundary values 4-27characteristic 1-14in porous media 6-5injection 3-22

defined by user subroutines 14-10of baffles 4-27of liquid films 13-7

of walls 4-22vertex

coordinatein moving mesh 5-14, 12-9

data 17-3, 17-9maximum number of 2-18set 2-21, A-2

view factor 7-3, 7-5viscosity

defined by user subroutines 14-9in chemical reaction problems 8-17oscillations 1-15power law 3-11turbulent 14-9under-relaxation 1-15

viscous sublayer 3-13volume of fluid (VOF) model 11-1volume, of droplet 9-10

Wwall 1-3

boundary layer 1-6data 5-3functions 1-7, 3-12

hybrid 1-8heat flux 5-5

defined by user subroutines 14-17moving 4-19no-slip 4-19patch 7-2radiation 4-20 to 4-22transmissive external 7-5transparent 4-21velocity 4-22See also boundary conditions, wall

wavecompression 4-32expansion 4-32shock 4-32transient 4-34

Yy+ values 1-21, 3-13, 3-15

See also near-wall, dimensionless normal distance

ZZeldovich mechanism 8-39

Page 403: Star CCm Guide

INDEX OF COMMANDSThis User Guide does not contain comprehensive information on all commands used in pro-STAR.The Meshing and Post-Processing Guides and on-line STAR GUIde Help should also be consulted

Version 4.02 1

AABBREVIATE 16-1ABORT A-1

BBATCH 2-18BCROSS 4-2, 7-6BDEFINE 4-2, 7-2BDELETE 4-4BDISPLAY 4-41, 7-2BGENERATE 4-2BLIST 4-4BLKSET 2-24BMODIFY 4-2, 4-4, 7-6BSET 2-24, 4-3, 4-4BSHELL 4-2, 7-2

CCASENAME 17-1CAVERAGE 12-29CAVITATION 14-11CAVNUCLEI 14-11CAVPROPERTY 14-12CBEXTRUDE 3-18, 3-19CCLIST 17-6CCROSS 3-4CDELETE 12-29CDISPLAY 4-41, 7-2, 9-5CDSAVE 17-3CDSCALAR 13-3CDTRANS 5-11, 17-4CFIND 3-4CJOIN 5-19CLOSE 17-10CLRMODE 2-32CLRTABLE 17-22CMODIFY 3-5, 16-5COKE 14-18CONDUCTIVITY 14-6COUNT 4-2CPLOT 12-12CPOST 5-11CPRANGE 5-11CPRINT 5-11CPSET 2-24CREFINE 16-4CRMODEL 14-16CSET 2-24, 12-29CTABLE 3-2, 12-15, 12-24CTCOMPRESS 3-2, 3-4CTDELETE 3-2CTLIST 3-2CTMODIFY 3-2CTNAME 3-2CTYPE 3-4, 16-5CURSORMODE 2-19CYCLIC 4-29CYCOMPRESS 4-31CYDELETE 4-31CYGENERATE 4-29CYLIST 4-31

CZONE 3-4

DDAGE 9-7, 9-8DCOLLISION 14-12DELTIME 14-18DENSITY 14-8DIFFUSIVITY 14-8DLIST 9-8DRAVERAGE 14-12DRCMPONENT 14-13DRHEAT 14-13DRMASS 14-13DRMOMENTUM 14-13DRPROPERTIES 14-13DRUSER 14-13DRWALL 14-13DSCHEME 14-19DSET 2-24, 9-6, 9-8DTIME 9-5, 9-7

EEACELL 12-16EACOMPRESS 12-20EADELETE 12-20EAGENERATE 12-20EALIST 12-20EAMATCH 12-19, 12-21, 12-27, 12-29EATTACH 12-20, 12-21, 12-27ECHOINPUT 2-19ECLIST 12-16ECONDITIONAL 12-26EDATA 5-3EDCELL 12-16EDCOMPRESS 12-26EDDELETE 12-26EDDIR 12-16EDETACH 12-21, 12-28EDLIST 12-26EDRAG 14-14EECELL 12-28EFLUID 12-26EGRID 12-11, 12-13, 12-16, 12-29 to 12-30EHTRANSFER 14-15EICOND 14-17ETURB 14-14EVCHECK 12-30EVCND 12-26EVCOMPRESS 12-12, 12-17, 12-20EVDELETE 12-12, 12-17, 12-20, 12-26EVEXECUTE 12-29 to 12-30EVFILE 12-11, 12-16, 12-25EVFLAG 12-30EVGET 12-12, 12-17, 12-20, 12-26EVLIST 12-12, 12-17, 12-20, 12-27EVLOAD 12-29 to 12-30EVOFFSET 12-12, 12-17, 12-20, 12-27EVPARM 12-10EVPREP 12-12, 12-17, 12-20, 12-27EVREAD 12-12, 12-17, 12-21, 12-27EVSAVE 12-11EVSLIDE 14-16

INDEX OF COMMANDS

Page 404: Star CCm Guide

Index of Commands

2 Version 4.02

EVSTEP 12-11, 12-16EVUNDELETE 12-12, 12-17, 12-20, 12-27EVWRITE 12-12, 12-17, 12-21, 12-27EXPERT A-1

FFSTAT 2-23, 17-10

GGEOMWRITE 12-12, 12-17, 12-20, 12-27, 17-5GETCELL 12-12GETD 8-36

HHCOEF 14-17HISTORY 2-19 to 2-20HRSDUMP 2-33

IIFILE 13-3, 17-2, 17-4, 17-10, 17-12IGNMODEL 14-15INITIAL 14-17ITER 5-14

KKNOCK 14-15

LLFQSOR 14-14LFSTRIP 14-14LQFBC 14-14LQFINITIAL 14-14LQFPROPERTY 14-14LSCOMPRESS 5-11LSDELETE 5-11LSGET 5-11LSLIST 5-10LSRANGE 5-11LSSAVE 5-10LSTEP 5-10, 14-18LVISCOSITY 14-9

MMACRO 16-9MEMORY 17-14MFRAME 14-16MLIST 3-9MMPISTON 12-13MONITOR 12-18, 12-25MVGRID 5-11, 12-9, 12-10, 12-16, 14-16, 14-17

NNFILE 17-4NOX 14-15

OOFILE 17-10OPANEL 16-1, 16-6OPEN 16-10

PPAGE 2-19PATCH 7-7PLATTACH 12-30PLTBACK 2-33PLTYPE 12-12PMATERIAL 12-25POPTION 12-12POREFF 14-8POROSITY 14-8PORTURBULENCE 14-8PRESSURE 12-18, 12-25PRFIELD 14-19PROBLEMWRITE 12-12, 12-17, 12-20, 12-27, 17-7PROMPT 16-7PRTEMP 3-18PTCONV 17-8PTPRINT 9-7, 9-8PTREAD 9-7

QQUIT 2-21, 2-42

RRADPROPERTIES 14-11RCONSTANT 12-18RDEFINE 12-19, 12-23, 14-5, 14-6RECALL 2-20RECOVER 2-20, 2-42REPEAT 16-10REPLOT 16-3RESET 2-32RESUME 2-42, 17-3, 17-10REWIND 17-10RGENERATE 4-7RRATE 14-15RSOURCE 14-10RSTATUS 8-17

SSAFETY 2-20SAVE 2-42, 17-2SC 13-3SCCONTROL 13-3SCDUMP 2-33SCENE 17-23SCPOROUS 14-8SCPROPERTIES 13-3, 14-16, 14-18SCRDELETE 2-33SCRIN 2-32SCROUT 2-32SCSOURCE 14-11SCTRANS 5-11, 13-2SETADD 2-23SETDELETE 2-22

Page 405: Star CCm Guide

Index of Commands

Version 4.02 3

SETENV 16-6SETFEATURE 16-1SETREAD 2-23SETWRITE 2-22SIZE 2-18SMAP 5-15, 5-16SMCONV 17-8SOLAR 14-11SPECIFICHEAT 14-7, 14-9SPIN 14-16SPLSET 2-24STATUS 2-42, 12-25STENSION 14-12STORE 12-12SUCCEED 2-20SYSTEM 2-18

TTBCLEAR 2-28TBDEFINE 2-28TBGRAPH 2-28, 2-30TBLIST 2-30TBMODIFY 2-30TBREAD 2-30TBSCAN 2-31TBWRITE 2-28TDSCHEME 5-11TERMINAL 2-31, 17-4, 17-21TEXT 2-18TIME 12-10, 12-15, 14-18TITLE 2-19TLMODEL 14-9TPRINT 2-18TRFILE 2-42, 5-10, 17-4TRLOAD 12-12TSCALE 2-33TSMAP 5-16TURBULENCE 14-9

UUSER 2-18USUBROUTINE 14-3

VVAPORIZATION 14-12VFILL 12-11VLIST 16-5VMOD 12-11VMODIFY 2-24VOLUME 3-22VSET 2-24, 12-11VSMOOTH 12-30

WWHOLE 2-32WIPEOUT 17-14WPOST 5-11WPRINT 5-11

Page 406: Star CCm Guide