572
USER GUIDE STAR-CD VERSION 3.24 CONFIDENTIAL — FOR AUTHORISED USERS ONLY © 2004 CD adapco Group

Star Uguide

Embed Size (px)

Citation preview

Page 1: Star Uguide

USER GUIDE

STAR-CD VERSION 3.24

CONFIDENTIAL — FOR AUTHORISED USERS ONLY

© 2004 CD adapco Group

Page 2: Star Uguide
Page 3: Star Uguide

Version 3.24 i

TABLE OF CONTENTS

OVERVIEW

1 CFD MODELLING PRINCIPLES

Introduction ............................................................................................................... 1-1

The Basic Modelling Process .................................................................................... 1-1

Spatial description and volume discretisation ........................................................... 1-2

Solution domain definition .............................................................................. 1-3

Mesh definition ................................................................................................ 1-4

Mesh distortion ................................................................................................ 1-6

Mesh distribution and density ......................................................................... 1-7

Mesh distribution near walls ........................................................................... 1-9

Moving mesh features ................................................................................... 1-10

Flow characterisation and material property definition .......................................... 1-10

Nature of the flow .......................................................................................... 1-10

Thermophysical properties ............................................................................ 1-11

Force fields and energy sources .................................................................... 1-11

Initial conditions ............................................................................................ 1-11

Boundary description .............................................................................................. 1-12

Boundary location ......................................................................................... 1-13

Boundary conditions ...................................................................................... 1-13

Numerical solution control ..................................................................................... 1-15

Selection of solution procedure ..................................................................... 1-15

Transient calculations with PISO .................................................................. 1-15

Steady-state calculations with PISO (iterative mode) ................................... 1-17

Steady-state calculations with SIMPLE ........................................................ 1-17

Steady-state calculations with SIMPISO ....................................................... 1-18

Effect of round-off errors .............................................................................. 1-19

Choice of the linear equation solver .............................................................. 1-19

Monitoring the calculations .................................................................................... 1-19

Model evaluation .................................................................................................... 1-20

2 BASIC STAR-CD FEATURES

Introduction ............................................................................................................... 2-1

Running a CFD Analysis .......................................................................................... 2-2

Using the script-based procedure .................................................................... 2-3

Using STAR-Launch ....................................................................................... 2-8

pro-STAR Initialisation .......................................................................................... 2-12

Input/output window ..................................................................................... 2-13

Main window ................................................................................................. 2-15

Page 4: Star Uguide

ii Version 3.24

The menu bar .................................................................................................2-17

General Housekeeping and Session Control ...........................................................2-18

Basic set-up ....................................................................................................2-18

Screen display control ....................................................................................2-19

Error messages ...............................................................................................2-20

Error recovery ................................................................................................2-21

Session termination ........................................................................................2-21

Set Manipulation .....................................................................................................2-21

Table Manipulation .................................................................................................2-25

Basic functionality .........................................................................................2-25

The table editor ..............................................................................................2-27

Useful points ..................................................................................................2-32

Plotting Functions ....................................................................................................2-32

Basic set-up ....................................................................................................2-32

Advanced screen control ................................................................................2-33

Screen capture ................................................................................................2-34

The Users Tool ........................................................................................................2-36

Getting On-line Help ...............................................................................................2-36

The STAR GUIde Environment ..............................................................................2-39

Panel navigation system .................................................................................2-41

STAR GUIde usage .......................................................................................2-42

General Guidelines ..................................................................................................2-42

3 MESH CREATION

Introduction ...............................................................................................................3-1

Basic concepts ..................................................................................................3-1

Meshing techniques .........................................................................................3-3

Other mesh facilities ........................................................................................3-5

Extrusion ...................................................................................................................3-5

Cell-layer Approach ..................................................................................................3-7

Coordinate Systems ...................................................................................................3-8

Local coordinate systems ...............................................................................3-10

Other coordinate system functions .................................................................3-14

Vertices ....................................................................................................................3-14

Command-driven facilities .............................................................................3-14

Vertex set selection facilities .........................................................................3-19

GUI-driven facilities ......................................................................................3-20

Additional considerations ..............................................................................3-26

Splines .....................................................................................................................3-27

Spline tables ...................................................................................................3-27

Page 5: Star Uguide

Version 3.24 iii

Command-driven facilities ............................................................................ 3-28

Spline set selection facilities ......................................................................... 3-30

GUI-driven facilities ...................................................................................... 3-30

Vertex manipulation using splines ................................................................ 3-35

Cells ........................................................................................................................ 3-37

Cell types ....................................................................................................... 3-37

Cell properties ............................................................................................... 3-38

Cell shapes ..................................................................................................... 3-40

Command-driven facilities ............................................................................ 3-44

Cell set selection facilities ............................................................................. 3-46

GUI-driven facilities ...................................................................................... 3-47

Cell numbering .............................................................................................. 3-53

Multi-block Approach ............................................................................................. 3-53

Mesh block generation .................................................................................. 3-54

Multi-block generation .................................................................................. 3-56

Command-driven facilities ............................................................................ 3-57

Block set selection facilities .......................................................................... 3-57

GUI-driven facilities ...................................................................................... 3-57

Multi-block Meshing Using STAR-GUIde Panels ................................................. 3-60

Using the panel .............................................................................................. 3-61

Other panel functions .................................................................................... 3-63

4 OTHER MESH OPERATIONS

Importing Data from other Systems .......................................................................... 4-1

Data exporting ........................................................................................................... 4-2

Mesh Structure .......................................................................................................... 4-2

Regular connectivity ........................................................................................ 4-4

Integral and arbitrary connectivity .................................................................. 4-5

Embedded mesh refinement ............................................................................ 4-7

Cell Couples .............................................................................................................. 4-8

The Couple Tool .............................................................................................. 4-8

Couple properties ............................................................................................. 4-9

Couple creation .............................................................................................. 4-11

Couple set selection facilities ........................................................................ 4-14

Couple manipulation ..................................................................................... 4-15

Other couple functions .................................................................................. 4-22

Useful Points ................................................................................................. 4-22

Mesh Refinement .................................................................................................... 4-23

Mesh and Geometry Checking ................................................................................ 4-26

Macroscopic checking ................................................................................... 4-26

Microscopic checking .................................................................................... 4-27

Page 6: Star Uguide

iv Version 3.24

Mesh Quality Improvement .....................................................................................4-29

5 MESH VISUALISATION

Data Range ................................................................................................................5-2

Plot Characteristics ....................................................................................................5-3

Basic plot type definitions ...............................................................................5-3

Plot orientation .................................................................................................5-5

Additional display options ...............................................................................5-6

Colour settings .................................................................................................5-9

Special lighting effects ...................................................................................5-10

Other special effects .......................................................................................5-12

Mouse operations ...........................................................................................5-15

Keyboard operations ......................................................................................5-16

Plotted Entity ...........................................................................................................5-16

6 MATERIAL PROPERTY AND FLOW CHARACTERISATION

Introduction ...............................................................................................................6-1

Cell Table ..................................................................................................................6-1

Cell indexing ....................................................................................................6-3

Multi-Stream and Conjugate Property Setting ..........................................................6-5

Setting up models .............................................................................................6-6

Compressible Flow ....................................................................................................6-9

Setting up compressible flow models ..............................................................6-9

Useful points on compressible flow ...............................................................6-10

Non-Newtonian Flow ..............................................................................................6-11

Setting up non-Newtonian models .................................................................6-11

Useful points on non-Newtonian flow ...........................................................6-11

Turbulence Modelling .............................................................................................6-12

Wall functions ................................................................................................6-13

Two-layer models ..........................................................................................6-13

Low Re models ..............................................................................................6-14

Hybrid wall boundary condition ....................................................................6-15

Reynolds Stress models .................................................................................6-15

LES models ....................................................................................................6-15

Changing the turbulence model in use ...........................................................6-15

Conjugate Heat Transfer .........................................................................................6-16

Setting up conjugate heat transfer models .....................................................6-16

Conjugate heat transfer in baffles ..................................................................6-18

Useful points on conjugate heat transfer ........................................................6-19

Buoyancy-driven Flows and Natural Convection ...................................................6-20

Setting up buoyancy-driven models ...............................................................6-20

Page 7: Star Uguide

Version 3.24 v

Useful points on buoyancy-driven flow ........................................................ 6-20

Fluid Injection ......................................................................................................... 6-21

Setting up fluid injection models ................................................................... 6-22

7 BOUNDARY AND INITIAL CONDITIONS

Introduction ............................................................................................................... 7-1

Boundary Location .................................................................................................... 7-1

Command-driven facilities .............................................................................. 7-2

Boundary set selection facilities ...................................................................... 7-4

Boundary listing .............................................................................................. 7-5

Boundary Region Definition ..................................................................................... 7-6

Inlet Boundaries ...................................................................................................... 7-10

Introduction ................................................................................................... 7-10

Useful points .................................................................................................. 7-11

Outlet Boundaries ................................................................................................... 7-12

Introduction ................................................................................................... 7-12

Useful points .................................................................................................. 7-13

Pressure Boundaries ................................................................................................ 7-13

Introduction ................................................................................................... 7-13

Useful points .................................................................................................. 7-14

Stagnation Boundaries ............................................................................................ 7-15

Introduction ................................................................................................... 7-15

Useful points .................................................................................................. 7-16

Non-reflective Pressure and Stagnation Boundaries ............................................... 7-17

Introduction ................................................................................................... 7-17

Useful points .................................................................................................. 7-18

Wall Boundaries ...................................................................................................... 7-19

Introduction ................................................................................................... 7-19

Thermal radiation properties ......................................................................... 7-20

Solar radiation properties .............................................................................. 7-21

Useful points .................................................................................................. 7-22

Baffle Boundaries ................................................................................................... 7-23

Introduction ................................................................................................... 7-23

Setting up models .......................................................................................... 7-24

Thermal radiation properties ......................................................................... 7-25

Solar radiation properties .............................................................................. 7-26

Symmetry Plane Boundaries ................................................................................... 7-27

Cyclic Boundaries ................................................................................................... 7-27

Introduction ................................................................................................... 7-27

Setting up models .......................................................................................... 7-28

Page 8: Star Uguide

vi Version 3.24

Cyclic set manipulation ..................................................................................7-31

Free-stream Transmissive Boundaries ....................................................................7-32

Introduction ....................................................................................................7-32

Useful points ..................................................................................................7-33

Transient-wave Transmissive Boundaries ...............................................................7-34

Introduction ....................................................................................................7-34

Useful points ..................................................................................................7-35

Riemann Boundaries ...............................................................................................7-36

Introduction ....................................................................................................7-36

Useful points ..................................................................................................7-37

Attachment Boundaries ...........................................................................................7-38

Useful point ....................................................................................................7-39

Radiation Boundaries ..............................................................................................7-39

Phase-Escape (Degassing) Boundaries ...................................................................7-39

Internal Regions ......................................................................................................7-40

Boundary Visualisation ...........................................................................................7-41

Flow Field Initialisation ..........................................................................................7-41

Steady-state problems ....................................................................................7-41

Transient problems .........................................................................................7-42

8 CONTROL FUNCTIONS

Introduction ...............................................................................................................8-1

Analysis Controls for Steady-State Problems ...........................................................8-1

Analysis Controls for Transient Problems ................................................................8-4

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

Load-step based solution mode ........................................................................8-6

Load step characteristics ..................................................................................8-6

Load step definition .........................................................................................8-8

Solution procedure outline ...............................................................................8-9

Other transient functions ................................................................................8-14

Using Error Estimates .............................................................................................8-15

Steady-state flow ............................................................................................8-15

Transient flow ................................................................................................8-16

Viewing the results ........................................................................................8-16

Solution Control with Mesh Changes .....................................................................8-17

Mesh-changing procedure ..............................................................................8-17

Solution-Adapted Mesh Changes ............................................................................8-19

9 POST-PROCESSING

Introduction ...............................................................................................................9-1

Data Loading and Display Set-up .............................................................................9-1

Page 9: Star Uguide

Version 3.24 vii

Basic Post-processing Displays ................................................................................ 9-9

Plot specification ............................................................................................. 9-9

Plot display .................................................................................................... 9-12

Plot Manipulation .................................................................................................... 9-16

Data Manipulation .................................................................................................. 9-21

The OPERATE utility ................................................................................... 9-21

Other data manipulation utilities ................................................................... 9-24

Data Reporting ........................................................................................................ 9-24

Mapping and Copying Post Data ............................................................................ 9-27

Particle Tracking ..................................................................................................... 9-28

Useful Points ................................................................................................. 9-29

Graph Displays ........................................................................................................ 9-30

Data loading ................................................................................................... 9-30

Graph customization ...................................................................................... 9-31

Data display ................................................................................................... 9-31

Animation ............................................................................................................... 9-32

pro-STAR animation effects .......................................................................... 9-32

Animation sequence definition and display .................................................. 9-34

Storing animations ......................................................................................... 9-46

Movie making ................................................................................................ 9-47

10 POROUS MEDIA FLOW

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

Useful Points ........................................................................................................... 10-4

11 THERMAL AND SOLAR RADIATION

RadiationModelling Using Discrete Beams ............................................................ 11-1

Radiation sub-domains .................................................................................. 11-2

Transparent solids .......................................................................................... 11-3

Useful points .................................................................................................. 11-4

Radiation Modelling Using Discrete Ordinates ...................................................... 11-5

Capabilities and limitations ........................................................................... 11-6

12 CHEMICAL REACTION AND COMBUSTION

Introduction ............................................................................................................. 12-1

Local Source Models .............................................................................................. 12-2

Presumed Probability Density Function (PPDF) Models ....................................... 12-3

Single-fuel PPDF ........................................................................................... 12-3

Multiple-fuel PPDF ....................................................................................... 12-4

Regress Variable Models ........................................................................................ 12-5

Complex Chemistry Models ................................................................................... 12-6

Setting Up Chemical Reaction Schemes ................................................................. 12-9

Page 10: Star Uguide

viii Version 3.24

Useful points for local source and regress variable schemes .......................12-10

Chemical reaction conventions ....................................................................12-11

Useful points for PPDF schemes .................................................................12-12

Useful points for complex chemistry models ..............................................12-15

Useful points for ignition models ................................................................12-15

NOx Modelling ......................................................................................................12-16

Soot Modelling ......................................................................................................12-17

Coal Combustion Modelling .................................................................................12-17

Stage 1 ..........................................................................................................12-17

Stage 2 ..........................................................................................................12-17

Useful points ................................................................................................12-18

13 LAGRANGIAN MULTI-PHASE FLOW

Setting Up Lagrangian Multi-Phase Models ...........................................................13-1

Data Post-Processing ...............................................................................................13-4

Static displays ................................................................................................13-5

Trajectory displays .........................................................................................13-8

Engine Combustion Data Files ................................................................................13-9

Useful Points .........................................................................................................13-10

14 EULERIAN MULTI-PHASE FLOW

Introduction .............................................................................................................14-1

Setting up multi-phase models ................................................................................14-1

Useful points on Eulerian multi-phase flow ..................................................14-4

15 FREE SURFACE AND CAVITATION

Free Surface Flows ..................................................................................................15-1

Setting up free surface models .......................................................................15-1

Useful points on free surface flow .................................................................15-4

Cavitation ................................................................................................................15-5

Setting up cavitation models ..........................................................................15-5

Useful points on cavitation ............................................................................15-7

16 ROTATING AND MOVING MESHES

Rotating Reference Frames .....................................................................................16-1

Models for a single rotating reference frame .................................................16-1

Useful points on single rotating frame problems ...........................................16-1

Models for multiple rotating reference frames (implicit treatment) ..............16-2

Useful points on multiple implicit rotating frame problems ..........................16-4

Models for multiple rotating reference frames (explicit treatment) ...............16-5

Useful points on multiple explicit rotating frame problems ..........................16-8

Moving Meshes .......................................................................................................16-9

Basic concepts ................................................................................................16-9

Page 11: Star Uguide

Version 3.24 ix

Setting up models ........................................................................................ 16-10

Useful points ................................................................................................ 16-13

Cell-layer Removal/Addition ................................................................................ 16-14

Basic concepts ............................................................................................. 16-14

Setting up models ........................................................................................ 16-15

Useful points ................................................................................................ 16-18

Sliding Meshes ...................................................................................................... 16-19

Regular sliding interfaces ............................................................................ 16-19

Arbitrary Sliding Interfaces ......................................................................... 16-22

Automatic Events Generation for Mixing Vessel Problems ....................... 16-24

Cell Attachment and Change of Fluid Type ......................................................... 16-26

Basic concepts ............................................................................................. 16-26

Setting up models ........................................................................................ 16-27

Useful points ................................................................................................ 16-32

Mesh Region Inclusion/Exclusion ........................................................................ 16-32

Basic concepts ............................................................................................. 16-32

Useful points ................................................................................................ 16-33

Moving Mesh Pre- and Post-processing ............................................................... 16-33

Introduction ................................................................................................. 16-33

Action commands ........................................................................................ 16-34

Status setting commands ............................................................................. 16-34

17 OTHER TYPES OF FLOW

Multi-component Mixing ........................................................................................ 17-1

Setting up multi-component models .............................................................. 17-1

Useful points on multi-component mixing .................................................... 17-2

Aeroacoustic Analysis ............................................................................................ 17-3

Setting up aeroacoustic models ..................................................................... 17-3

Useful points on aeroacoustic analyses ......................................................... 17-4

Liquid Films ............................................................................................................ 17-4

Setting up liquid film models ........................................................................ 17-4

Film stripping ................................................................................................ 17-7

Useful points on liquid film analyses ............................................................ 17-7

Unsupported features ..................................................................................... 17-7

18 USER PROGRAMMING

Introduction ............................................................................................................. 18-1

Subroutine Usage .................................................................................................... 18-1

Useful points .................................................................................................. 18-4

Description of UFILE Routines .............................................................................. 18-5

Boundary condition subroutines .................................................................... 18-5

Page 12: Star Uguide

x Version 3.24

Material property subroutines ........................................................................18-6

Turbulence modelling subroutines .................................................................18-9

Source subroutines .......................................................................................18-10

Radiation modelling subroutines .................................................................18-11

Free surface / cavitation subroutines ............................................................18-11

Lagrangian multi-phase subroutines ............................................................18-12

Eulerian multi-phase subroutines .................................................................18-13

Chemical reaction subroutines .....................................................................18-14

Rotating reference frame subroutines ..........................................................18-15

Moving mesh subroutines ............................................................................18-15

Miscellaneous flow characterisation subroutines ........................................18-16

Solution control subroutines ........................................................................18-17

Sample Listing .......................................................................................................18-18

New Coding Practices for Dynamic Memory .......................................................18-19

User defined arrays ......................................................................................18-19

User coding examples ..................................................................................18-21

New Coding Practices for Eulerian Multi-phase Problems ...................................18-22

General principle ..........................................................................................18-22

Example of implementation .........................................................................18-22

E2P-supported subroutines ..........................................................................18-23

User Coding in parallel runs ..................................................................................18-23

19 PROGRAM OUTPUT

Introduction .............................................................................................................19-1

Permanent Output ....................................................................................................19-1

Input-data summary .......................................................................................19-1

Run-time output .............................................................................................19-3

Printout of Field Values ..........................................................................................19-4

Optional Output .......................................................................................................19-4

Example Output .......................................................................................................19-7

20 pro-STAR CUSTOMISATION

Set-up Files ..............................................................................................................20-1

Panels .......................................................................................................................20-2

Panel creation .................................................................................................20-2

Panel definition files ......................................................................................20-5

Panel manipulation .........................................................................................20-6

Macros .....................................................................................................................20-6

Function Keys ..........................................................................................................20-9

21 OTHER STAR-CD FEATURES AND CONTROLS

Introduction .............................................................................................................21-1

Page 13: Star Uguide

Version 3.24 xi

File Handling .......................................................................................................... 21-1

Naming conventions ...................................................................................... 21-1

Commonly used files ..................................................................................... 21-1

File relationships ........................................................................................... 21-8

File manipulation ........................................................................................... 21-9

Special pro-STAR Features .................................................................................. 21-12

pro-STAR environment variables ................................................................ 21-12

Resizing pro-STAR ..................................................................................... 21-13

Special pro-STAR executables .................................................................... 21-14

Use of temporary files by pro-STAR .......................................................... 21-15

The StarWatch Utility ........................................................................................... 21-15

Running StarWatch ..................................................................................... 21-16

Choosing the monitored values ................................................................... 21-18

Controlling STAR ....................................................................................... 21-18

Manipulating the StarWatch display ........................................................... 21-21

Monitoring another job ................................................................................ 21-22

Hard Copy Production .......................................................................................... 21-22

Neutral plot file production and use ............................................................ 21-22

Scene file production and use ...................................................................... 21-24

APPENDICES

A pro-STAR CONVENTIONSCommand Input Conventions .................................................................................. A-1

Help Text / Prompt Conventions ............................................................................. A-3

Control and Function Key Conventions .................................................................. A-4

File Name Conventions ............................................................................................ A-4

B pro-STAR NEUTRAL PLOT FILEC FILE USAGED PROGRAM UNITSE VALID PLOT COMBINATIONSF pro-STAR X- RESOURCESG USER INTERFACE TO MESSAGE PASSING ROUTINESH STAR RUN OPTIONS

Usage ........................................................................................................................ H-1

Options ..................................................................................................................... H-1

Parallel Options ........................................................................................................ H-3

Resource Allocation ................................................................................................. H-7

Default Options ........................................................................................................ H-8

Batch Runs Using STAR-NET ................................................................................ H-9

Running under IBM Loadleveler using STAR-NET ...................................... H-9

Page 14: Star Uguide

xii Version 3.24

Running under LSF using STAR-NET .........................................................H-10

Running under OpenPBS using STAR-NET ................................................H-11

Running under PBSPro using STAR-NET ...................................................H-12

Running under SGE using STAR-NET ........................................................H-12

Running under Torque using STAR-NET ....................................................H-13

I BIBLIOGRAPHY

INDEX

Page 15: Star Uguide

Version 3.24 1

OVERVIEW

PurposeThe Methodology volume presents the mathematical modelling practices embodiedin the STAR-CD code 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 computational fluiddynamics, including an outline of the basic steps involved in setting up and using asuccessful computer model. The important factors to consider at each step aremostly 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 9 provide the reader with detailedinstructions on how to use the basic facilities of the code, e.g. mesh generation,boundary condition specification, material property definition, etc., and anoverview of the GUI panels appropriate to each of them. The description covers allfacilities that might be employed for modelling most common CFD problems.

Chapters 2 to 9 should be read at least once to gain an understanding of 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 10 to 17 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 18 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 19 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 20 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 21 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 16: Star Uguide
Page 17: Star Uguide

Chapter 1 CFD MODELLING PRINCIPLES

Introduction

Version 3.24 1-1

Chapter 1 CFD MODELLING PRINCIPLES

Introduction

The aim of this section is to introduce the most important issues involved in settingup and solving a thermofluids problem using a computational fluid dynamics code.Although the discussion applies in principle to any such code, reference is madewhere appropriate to the particular capabilities of the STAR-CD system. It is alsoassumed that the reader is familiar with the material presented in the Methodologyvolume.

The process of computational flow simulation does not usually start with thedirect use of a CFD code. It is indeed important to recognise that STAR-CD, or anyother CFD, CAD or CAE system, should be treated as a tool to assist the engineerin understanding physical phenomena.

The success or failure of a fluid simulation depends not only on the codecapabilities, but also upon the input data, such as:

• Geometry of the flow domain• Fluid 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 CFD modelling are as follows:

• Pose the flow problem in physical terms.• Establish the amount of information available and its sufficiency and validity.• Assess the capabilities and features of the CFD code, to ensure that the

problem is well posed and amenable to numerical solution by the code.• Plan the simulation strategy carefully, adopting a step-by-step approach to the

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 conditions based on the best available understanding of therelevant 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 18: Star Uguide

CFD MODELLING PRINCIPLES Chapter 1

Spatial description and volume discretisation

1-2 Version 3.24

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 flow model using pro-STARThe main tasks involved at this phase are:

• Creating a computational mesh to represent the flow domain (i.e. the modelgeometry).

• Specifying the thermophysical properties of the fluids and/or solids present inthe simulation 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 unsteady flowsimulation problems, further definition of transient boundary conditions andtime steps.

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

Phase 3 — Performing the flow 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 CFD model is to describe the geometry of theproblem. The two key components of this description are:

• The definition of the overall size and shape of the flow domain. This is oftencalled the solution domain since all the differential equations representingmomentum, heat and mass transfer are solved in this region.

• The subdivision of the domain into a mesh of discrete, finite, contiguousvolume elements or cells, as shown in Figure 1-1.

Page 19: Star Uguide

Chapter 1 CFD MODELLING PRINCIPLES

Spatial description and volume discretisation

Version 3.24 1-3

Figure 1-1 Example of 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.

Arbitrary combinations of these three basic types can also be specified within thesame model, as in conjugate heat transfer analysis. The user’s first task is thereforeto decide which parts of the physical system being modelled need to be included inthe solution domain and whether each part is occupied by a fluid, solid or porousmedium.

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 confine the flow physically.

2. Symmetry boundaries — axes or planes beyond which the flow patternbecomes a mirror image of itself.

3. Cyclic boundaries — surfaces beyond which the flow pattern repeats itself, ina 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 the flow ingreater detail than would have been the case otherwise.

4. Notional boundaries — these are non-physical surfaces that serve to

Page 20: Star Uguide

CFD MODELLING PRINCIPLES Chapter 1

Spatial description and volume discretisation

1-4 Version 3.24

‘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 conditions are known.(b) Flow conditions can be guessed reasonably well.(c) The boundary is far enough away from the main flow region for boundary

condition inaccuracies to have little effect.

Thus, locating this type of boundary may require some trial and error.The location and characterisation of boundaries is discussed further in “Boundarydescription” on page 1-12.

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 CFD model. This process isgreatly facilitated by STAR-CD because of its ability to

• generate a wide selection of basic cell shapes, and• employ them as part of an unstructured mesh.

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

Figure 1-2 Structured and unstructured meshes for a bluff body model

void cells(a) Structured mesh

(b) Unstructured mesh

Page 21: Star Uguide

Chapter 1 CFD MODELLING PRINCIPLES

Spatial description and volume discretisation

Version 3.24 1-5

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-3. These errors diminish as the mesh is refined.

Figure 1-3 Boundary representation by triangular facets

2. The internal characteristics of the flow regime. This is achieved by carefulcontrol of mesh spacing within the solution domain interior so that the meshis finest where the flow characteristics change most rapidly. An example ofthis is shown in Figure 1-2. Near-wall regions are important and a high meshdensity is needed to resolve the flow in their vicinity. This point is discussedfurther in “Mesh distribution near walls” on page 1-9.

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

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

triangular facet

Page 22: Star Uguide

CFD MODELLING PRINCIPLES Chapter 1

Spatial description and volume discretisation

1-6 Version 3.24

Chapter 3 describes several methods available in STAR-CD, some of themsemi-automatic, to help the user achieve this goal. However, even when suitableautomatic mesh generation procedures are available, the user must still draw onknowledge and experience of fluid mechanics and CFD to produce the right kind ofmesh arrangement.

Mesh distortion

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

Figure 1-4 Cell shape characteristics

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

• Aspect Ratio — values close to unity are preferable, but departures from thisare allowed.

• Internal Angle — departures from 90° intersections between cell facesshould be kept to a minimum.

• Warp Angle — the optimum value of this angle is zero, which can occur onlywhen 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-bounds

Aspect Ratio 10Internal angle 45°Warp angle 45°

a

b

b/a = aspect ratio

θ

θ = internal angle

φ

φ = warp angle

Page 23: Star Uguide

Chapter 1 CFD MODELLING PRINCIPLES

Spatial description and volume discretisation

Version 3.24 1-7

values, as discussed in “Mesh and Geometry Checking” on page 4-26.What is really important in this respect is the combined effect of the various

kinds of mesh distortion. If all three are simultaneously present in a single cell, 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’s unstructured mesh and the range of alternativecell shapes employed (illustrated in Figure 1-5) facilitates such selectiverefinement.

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.

Page 24: Star Uguide

CFD MODELLING PRINCIPLES Chapter 1

Spatial description and volume discretisation

1-8 Version 3.24

Figure 1-5 Basic and polyhedral STAR cell shapes

Hexahedron Tetrahedron

Triangular prism Pyramid

Polyhedral Cells

Page 25: Star Uguide

Chapter 1 CFD MODELLING PRINCIPLES

Spatial description and volume discretisation

Version 3.24 1-9

Mesh distribution near walls

As discussed in the section on “Wall Boundary Conditions” in Chapter 6 of theMethodology volume, wall functions are an economic way of representingturbulent boundary layers (hydrodynamic and thermal) in turbulent flowcalculations. These functions effectively allow the boundary layer to be bridged bya single cell, as shown in Figure 1-6(a).

Figure 1-6 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.Alternative treatments that do not require the use of wall functions are also

available. These are:

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

2. Low Reynolds number models, where viscous effects are incorporated in thek 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-6(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.

(b) Two-layer or Low Re models

Outerregion

Innerregion

y

(a) Wall function model

y+

y+

Page 26: Star Uguide

CFD MODELLING PRINCIPLES Chapter 1

Flow characterisation and material property definition

1-10 Version 3.24

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 16-14 and “Sliding Meshes” onpage 16-19; hence they are not repeated here.

Flow characterisation and material property definition

Correct definition of the physical flow 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 flow (e.g. steady/unsteady, laminar/turbulent,incompressible/compressible).

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

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.

y+

Page 27: Star Uguide

Chapter 1 CFD MODELLING PRINCIPLES

Flow characterisation and material property definition

Version 3.24 1-11

Thermophysical properties

The specification of thermophysical properties, such as density, molecularviscosity, thermal conductivity, etc. depends on the nature of the fluids or solidsinvolved and the circumstances of use. For example, STAR-CD contains severalbuilt-in equations of state from which density can be calculated as a function of oneor more of 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 tophysical 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 the

βi K i α i v βi+=

Page 28: Star Uguide

CFD MODELLING PRINCIPLES Chapter 1

Boundary description

1-12 Version 3.24

type of problem being considered:

• In unsteady flow applications, this information has a clear physicalsignificance and will affect the course of the solution. Due care must thereforebe taken in providing it. It sometimes happens that the effects of initialconditions are confined to a start-up phase that is not of interest (as in, forexample, flows that are temporally periodic). However, it is still advisable totake some precautions in specifying initial conditions for reasons explainedbelow.

• In calculating steady flow by iterative means, the initial conditions willusually 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-15. In either case, increased computing times can be anundesirable side effect.

For steady-state and pseudo-transient calculations, the code has a built-ininitialisation procedure that is applied over and above any user-specifiedinitialisation of flow variables. This is discussed in “Flow Initialisation” on page7-10 of the Methodology volume. Most problems can be started up by relyingentirely on this procedure. However, attention should still be paid to the specifiedvalues for characteristic length and maximum expected velocity in the flow field asthese are important for initialisation. The user is advised to run his problem for zeroiterations and then examine the initial velocity and pressure fields predicted bySTAR. Some fine tuning of the characteristic length value may then be necessary.In especially difficult cases, the pressure initialisation or even the entireinitialisation process may have to be omitted by using appropriate solution-controlswitches. The user should then rely on strong under-relaxation or very small timesteps to start up the solution.

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.

Page 29: Star Uguide

Chapter 1 CFD MODELLING PRINCIPLES

Boundary description

Version 3.24 1-13

The above are in turn linked to the decisions on where to place the boundaries in thefirst 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 Chapters 5 and 16 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 stream.

(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 can lead to erroneous results or, 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:

Page 30: Star Uguide

CFD MODELLING PRINCIPLES Chapter 1

Boundary description

1-14 Version 3.24

(a) The need to specify the boundary, where possible, at locations where theflow is everywhere outwardly directed; also to recognise that, if inflowoccurs, it may introduce numerical instability and/or inaccuracies.

(b) The necessity, if more than one boundary of this type is declared, ofprescribing 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 — This condition should be used formodelling only supersonic free streams

9. Transient wave transmissive boundaries — This condition should be usedonly in problems involving transient 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 31: Star Uguide

Chapter 1 CFD MODELLING PRINCIPLES

Numerical solution control

Version 3.24 1-15

Numerical solution control

Proper control of the numerical solution process applied to the flow equations ishighly important, both for acceptable computational efficiency and, sometimes, inorder to achieve a solution at all. By necessity, the means of controlling the processdepend heavily on the particular numerical techniques employed so no universalguidelines can be given. Thus, the recommended settings vary with the particularalgorithm selected and the circumstances of application.

Selection of solution procedure

The basic selection should be based on a correct assessment of the nature of the flowand 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 pattern under a givenset of boundary conditions is arrived at through a number of numericaliterations.

PISO, SIMPLE and SIMPISO are the three alternative solution proceduresavailable in STAR-CD. PISO is mandatory for unsteady calculations and maysometimes be preferred for steady-state ones, in cases involving strong couplingbetween dependent variables such as buoyancy driven flows. SIMPLE is the defaultalgorithm for steady-state solutions and works well in most cases. However, whenthe mesh distortion is especially severe, SIMPISO can sometimes be used to bettereffect.

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 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 andmaximum correctors and sweeps are given in Table 1-1. Normally, these will onlyrequire adjustment by the user in exceptional circumstances, as discussed below.

Page 32: Star Uguide

CFD MODELLING PRINCIPLES Chapter 1

Numerical solution control

1-16 Version 3.24

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 correction 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 consultCD adapco first.

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

Corrector limit = 20

Pressure correction relaxation factor = 1.0

Corrector step tolerance = 0.25

δt

δtc

δtc min δLU------ ρδL

2

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

=

δLδt 50 δtc≈

δt

Page 33: Star Uguide

Chapter 1 CFD MODELLING PRINCIPLES

Numerical solution control

Version 3.24 1-17

Steady-state calculations with PISO (iterative mode)

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.

Steady-state calculations with SIMPLE

As noted previously, the control parameters available for SIMPLE are similar to

Table 1-2: Standard Control Parameter Settings for Iterative 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

Page 34: Star Uguide

CFD MODELLING PRINCIPLES Chapter 1

Numerical solution control

1-18 Version 3.24

those 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 in the pressure relaxation factor is an additionaldevice for overcoming instabilities in the flow field solution. The standard value ofthis factor, it should be noted, is already low (0.3) and fractional reductions of nomore than 50% are recommended. If values less than 0.01 are required due to severemesh distortion, then a better course of action is to either alleviate the distortion oremploy the SIMPISO algorithm.

Steady-state calculations with SIMPISO

The SIMPISO procedure, as outlined in “The SIMPISO algorithm” on page 7-6 ofthe Methodology volume, contains additional corrective measures for the effect ofmesh non-orthogonality on the pressure calculation. These are accompanied by anadditional under-relaxation factor, as indicated in Table 1-4. This should bereduced, when necessary, in decrements of ≈ 0.05. For orthogonal or nearlyorthogonal meshes, SIMPISO reverts to SIMPLE.

Table 1-3: Standard Control Parameter Settings for Iterative 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 35: Star Uguide

Chapter 1 CFD MODELLING PRINCIPLES

Monitoring the calculations

Version 3.24 1-19

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 yourproblem 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 (likeCRAY-YMP), and the second one (called ‘scalar’ solver) is recommended ifSTAR-CD is run on scalar machines (like workstations).

Monitoring the calculations

Chapter 8 and the section on “Permanent Output” on page 19-1 give details of 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-state

Table 1-4: Standard Control Parameter Settings for Iterative SIMPISOCalculations

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

Pressurecorrectionrelaxationfactor

– 0.8 – – –

Page 36: Star Uguide

CFD MODELLING PRINCIPLES Chapter 1

Model evaluation

1-20 Version 3.24

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

• The global rates of change for all equations solved. These are used intransient flow calculations and are not measures of incompleteness of thesolution; rather, they simply provide an indication of the overall rates ofchange of the conserved quantities (mass, momentum, energy, etc.). Theirinterpretation and usefulness will, in general, depend on the particularcircumstances of the application.

Remember that reduction of the normalised residuals to the prescribed tolerance (λ)is a necessary but not sufficient condition for convergence, for two reasons:

1. The normalisation practices used (given in Appendix A of the Methodologyvolume) 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. Moreover, theyhave a clear physical significance. For example, the energy residuals provide a(normalised) measure of the degree to which the prevailing fields satisfy energyconservation. Analogous interpretations apply to the other residuals.

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

Page 37: Star Uguide

Chapter 1 CFD MODELLING PRINCIPLES

Model evaluation

Version 3.24 1-21

(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 runningSTAR for zero iterations/time steps and plotting the relevant field variables.

Checking the calculationsHaving completed the model preparation, the next task is to run STAR and to checkthe results of the numerical calculations. These results are presented in variousways, details of which are given in Chapter 9. Briefly, printouts and/or plots can beproduced 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.• Surface heat and mass transfer coefficients and forces; also values of the

dimensionless coordinate y+ for near-wall mesh nodes.• Global quantities such as total force components (e.g. drag, lift) on

submerged bodies and their dimensionless counterparts, overall 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 the

Page 38: Star Uguide

CFD MODELLING PRINCIPLES Chapter 1

Model evaluation

1-22 Version 3.24

recommended 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 39: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Introduction

Version 3.24 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 fluid dynamics codes, withadvice on effective ways of setting up and running a basic flow analysis model usingSTAR-CD. The reader is, however, expected to have gone through Chapter 1 andthe material in the Methodology volume.

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

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

which uniquely determine the flow 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 40: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Running a CFD Analysis

2-2 Version 3.24

2. A series of process-oriented panels contained within the STAR GUIdewindow. These represent an additional GUI facility, suitable for building CFDmodels from scratch. An outline description is given in the section entitled“The STAR GUIde Environment” on page 2-39. Information on how to usethis environment is provided by an on-line Help system accessed from withinthe 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 the Commands volume, Appendix B. 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 CFD Analysis

A CFD analysis may be performed in one of the following two ways:

• By typing a series of script names in a shell or command prompt, 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 41: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Running a CFD Analysis

Version 3.24 2-3

Using the script-based procedure

To perform a CFD 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 20, “Set-up Files”

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

PANEL_LOCAL and PANEL_GLOBAL — paths to the local and globaluser-defined panel locations (see Chapter 20, “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 Open GL libraries for

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

available in Windows ports)

Page 42: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Running a CFD Analysis

2-4 Version 3.24

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 CFD model, it is advisable to check the filescreated so far in your working directory. These should include:

• File .mdl, containing all user-supplied information about the model• File .geom, containing a full description of the model geometry. At present,

STAR operates only in SI units and all dimensions must therefore be definedin metres. However, it is possible to scale the mesh dimensions by a scalingfactor 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

• parm.inc, containing problem size information such as number of cells,vertices, boundaries, etc. This is created by pro-STAR while writing thegeometry file. The size information helps to create an optimised STARexecutable file for the model in hand.

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 the User Guide dealing withthese topics. A detailed description of all commonly used data files is given inChapter 21, “Commonly used files”.

Step 5

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

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

Page 43: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Running a CFD Analysis

Version 3.24 2-5

Step 6

Based on the geometrical and thermophysical data of the model just created, you arenow in 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 STARexecutable will be run automatically and the analysis results (in terms ofsolution residuals) will be displayed on a separate window; see “TheStarWatch Utility” on page 21-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 CFD 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 H of this manual.

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

Page 44: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Running a CFD Analysis

2-6 Version 3.24

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

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 H 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 the normal solution data (.pst) file and thus enablesyou to inspect the residuals and locate the mesh region where numericalinstability has occurred.

Check the condition under which your run has terminated. The parameters involvedin controlling the CFD simulation are set in pro-STAR using the facilities providedby the “Analysis Controls” folder in STAR GUIde. Additional information, such asprintout of input data, boundary conditions, residual histories of the inner iterativeloops, etc. can also be generated, as described in Chapter 19.

Step 8

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

• case.geom — geometry data• case.prob — problem data

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

• case.pst — solution data (for restart runs)

Page 45: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Running a CFD Analysis

Version 3.24 2-7

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

On completion of the run, additional files will be present in your working directory.These will include:

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

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

• case.rsi— various statistics of the run (solution residuals / rate-of-changevalues) in a form that can be displayed graphically. Statistics are not currentlyavailable for entities V22 and F22 of the V2F turbulence model, nor the sixcomponents of the Reynolds Stress turbulence model.

• case.pst — STAR results in a form suitable for post-processing or forrestarting another STAR run

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 21, “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 19 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 flow field. These should stabilise to the converged solution.

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

Page 46: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Running a CFD Analysis

2-8 Version 3.24

change 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 therelevant 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 CDadapco 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:

Page 47: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Running a CFD Analysis

Version 3.24 2-9

On WindowsDouble-click the appropriate icon on your desktop.

Window layoutThe key parts of the STAR-Launch main window are highlighted below. TheShortcut 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.

Page 48: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Running a CFD Analysis

2-10 Version 3.24

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:

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.

Page 49: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Running a CFD Analysis

Version 3.24 2-11

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 shouldbe 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 Interactively

Page 50: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

pro-STAR Initialisation

2-12 Version 3.24

dialogs. 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 toreflect settings from the new file.

• File > Save Project — This will write a starProject.xml file in thecurrent 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 CFD 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 Enter Case Name text box. Note that:

Page 51: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

pro-STAR Initialisation

Version 3.24 2-13

(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 right one byclicking on the file selection icon next to the Case Name text box. Thisactivates a File Selection browser (see page 2-34) that enables you tochoose the desired model, stored in a file of form case.mdl

2. The Restart 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 21, “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:

Page 52: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

pro-STAR Initialisation

2-14 Version 3.24

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

Page 53: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

pro-STAR Initialisation

Version 3.24 2-15

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 21, “Commonly used files”) or a user macro (see Chapter 20,“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:

Page 54: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

pro-STAR Initialisation

2-16 Version 3.24

• 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 5. Letting the mouse reston top of any button causes a brief explanatory legend to appear in a specialwindow 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 5-3).(b) A clock display showing the current time and date. This may be turned on

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

command, irrespective of whether it was typed in directly or issued via 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

Page 55: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

pro-STAR Initialisation

Version 3.24 2-17

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 21, “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 3. Another type of tool facilitates routinely-used, complex operationssuch as colour selection and mesh surface lighting effects (see Chapter 5,“Colour settings”).

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 modelparameters in connection with

(a) Animation control — see Chapter 9, “Animation”.(b) Transient condition definition — see Chapter 8, “Load-step based

solution mode”.

5. PlotContains most of the facilities and options used for plotting operations — seeChapter 5.

6. PostDisplays the results of a STAR run — see Chapter 9, “Basic Post-processing

Page 56: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

General Housekeeping and Session Control

2-18 Version 3.24

Displays”.7. Graph

Produces various types of graph — see Chapter 9, “Graph Displays”.8. Utility

Provides miscellaneous utility functions designed to aid model control anddevelopment, such as calculation of cell volumes and distance betweenvertices — see Chapter 4, “Mesh and Geometry Checking”. It also supportsspecial user-controlled operations, such as the assignment of user-definedfunctions to keyboard keys.

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

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.

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 prompts

Page 57: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

General Housekeeping and Session Control

Version 3.24 2-19

to 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 21, “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 20, “Set-up Files” and also in Appendix F.

• 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-STARand 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 each

Command: SYSTEM

Page 58: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

General Housekeeping and Session Control

2-20 Version 3.24

plot 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-17)• On the Error/Warning Summary pop-up panel, as in the example shown

below:

Command: TITLE

Page 59: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Set Manipulation

Version 3.24 2-21

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.

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, turningoff 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

Command: QUIT

Page 60: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Set Manipulation

2-22 Version 3.24

• 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

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 3, for each of themesh 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:

Page 61: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Set Manipulation

Version 3.24 2-23

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/Viewand then click the Sets tab to display the dialog shown overleaf:

Commands: SETWRITE SETDELETE

Page 62: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Set Manipulation

2-24 Version 3.24

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 thecurrently active set, instead of on individual objects or a range of them. For

Command: SETREAD

Page 63: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Table Manipulation

Version 3.24 2-25

example:

(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 7, “Boundary Region Definition”, page 7-8. 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 7, or thecorresponding on-line Help topics for STAR GUIde’s “Define BoundaryRegions” panel.

• Initial Conditions — non-uniform initial distributions of field variables; seeChapter 7, “Flow Field Initialisation”. The independent variables may be anycombination of spatial coordinates, for both steady and transient cases. Thepermissible dependent variables for fluid materials are listed under topic“Manual Initialisation”. Scalar variables representing chemical species massfractions may also be initialised as described in topic “Initialisation”. Notethat:

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

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

• Source Terms — a description of mass, heat, momentum or scalar speciessources; see Chapter 6, page 6-8. The independent variables may be anycombination of spatial coordinates and time for transient cases, or iteration

Page 64: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Table Manipulation

2-26 Version 3.24

number 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 stream or 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

In addition, a special table type is used to enter problem data for Lagrangian

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 65: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Table Manipulation

Version 3.24 2-27

Multi-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 via a suitable text editor. Thereare several alternative formats available, described in the Commands volume (seecommand TBREAD). However, unless a specific data ordering is required, theeasiest way of creating or modifying tables is to use pro-STAR’s own GUIfacilities. These are accessible by clicking the special table editor button

at the bottom left-hand side of the main window. The basic functions provided bythe editor are described below.

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

Page 66: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Table Manipulation

2-28 Version 3.24

The required input, reading from left to right along the dialog, is as follows:

1. Table Title — enter a title up to 80 characters long, including spaces. Note,however, that only the 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 3-8). Asearch button is provided for choosing any of the currently defined systemsfrom the Coordinate Systems dialog. Depending on your selection, the threespace 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

Cartesian Cylindrical Spherical Toroidal

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

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

z (Z)

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

φ (PHI)

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

φ (PHI)

Page 67: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Table Manipulation

Version 3.24 2-29

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.

Commands: TBDEFINE TBCLEAR TBWRITE TBGRAPH

Page 68: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Table Manipulation

2-30 Version 3.24

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.

(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 9, “Graph Displays”). 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 the

Page 69: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Table Manipulation

Version 3.24 2-31

versus scroll box. This will be plotted along the graph’s x-axis.(c) The names of the remaining independent variable(s) will also be

displayed in the const boxes. For the purposes of the graph, these will 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.

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)

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

Commands: TBREAD TBLIST TBMODIFY TBGRAPH

Page 70: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Plotting Functions

2-32 Version 3.24

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 21,“STAR geometry file (.geom)”) 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 CFD analysis arealso stored in the STAR control file (see Chapter 21, “STAR control file(.prob)”) so that they are available to STAR during the run. The user specifieswhich tables will be needed as part of the boundary, initial condition or othermodel 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).

• 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 CFD Analysis”, Step 3).

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

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

(a) All hidden-line plot calculations are done by software.(b) Large amounts of time may be required for large models.

Page 71: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Plotting Functions

Version 3.24 2-33

(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 E lists all currently available combinations of plot mode and plotcharacteristics. The same information can also be listed on line by choosing Help >pro-STAR Help from the menu bar and then selecting the COMBINAT item fromthe list shown at the bottom of the pro-STAR Help dialog.

Advanced screen control

Advanced screen control functions are implemented as follows:

• Background/foreground colour reversal — from the menu bar, select Plot >Background > Standard (for white lines and text on a black background) 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.

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

• Customised scaling of text fonts used in pro-STAR — command TSCALE.

Page 72: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Plotting Functions

2-34 Version 3.24

• Image display control — command PLTBACK. This enables images to becreated 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-33), 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 thisoption from the main menu opens the High Resolution Screen Dump dialog shownbelow:

Page 73: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Plotting Functions

Version 3.24 2-35

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

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

Page 74: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

The Users Tool

2-36 Version 3.24

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 75: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

Getting On-line Help

Version 3.24 2-37

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 thermal and solar 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 by

Page 76: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

Getting On-line Help

2-38 Version 3.24

selecting item UserSubs from the Module pop-up menu and then choosing therequired subroutine name from the second scroll list.

Details on the functionality and syntax of every command may be displayed asfollows:

• 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 the User Guide. To view thesedocuments, users must make sure that Adobe’s Acrobat™ Reader is installed ontheir machine. Instructions on how to do this are given in the STAR-CD Installationand Systems Guide. There is also a Help section containing useful information onhow to best use Acrobat for viewing on-line help text corresponding to each panelof the STAR GUIde system described below.

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 77: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

The STAR GUIde Environment

Version 3.24 2-39

The STAR GUIde Environment

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

• dividing the CFD 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 CFD modelling process in a logical sequence sothat no 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 78: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

The STAR GUIde Environment

2-40 Version 3.24

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 CFD simulation can be set up and run by performing theactivities 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 79: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

The STAR GUIde Environment

Version 3.24 2-41

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 80: Star Uguide

BASIC STAR-CD FEATURES Chapter 2

General Guidelines

2-42 Version 3.24

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 81: Star Uguide

Chapter 2 BASIC STAR-CD FEATURES

General Guidelines

Version 3.24 2-43

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-8and 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 82: Star Uguide
Page 83: Star Uguide

Chapter 3 MESH CREATION

Introduction

Version 3.24 3-1

Chapter 3 MESH CREATION

Introduction

The body-fitted meshing capabilities of the STAR-CD system offer a wide choiceof computational cell shapes such as

• hexahedra• prisms• tetrahedra• pyramids• polyhedra

Combined with facilities for creating unstructured non-orthogonal grids, local meshrefinement and arbitrary coupling between mesh blocks, pro-STAR gives usersgreat flexibility in representing highly complex geometries.

Note that pro-STAR works in arbitrary units. However, to avoid numericalproblems, the length units chosen should be such that the model dimensions lie inthe range 0.01 — 104.

This chapter covers only the basic mesh generation facilities available withinpro-STAR. Users wishing to employ pro-am, the advanced meshing module alsoavailable under pro-STAR, should consult the separate manual describing thismodule.

Basic concepts

The first task in the process of flow simulation is the creation of a computationalmesh to represent the flow domain geometry. The basic entities available foraccomplishing this task are as follows:

Vertex: A point in three-dimensional space, defined by a coordinate triplet andpossessing an index number for identification.

Cell: A three-dimensional volume whose shape is defined by vertices locatedat its corners.

Figure 3-1 Cell definition

( 5, 6, 8 )

•101

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

vertexcell

Page 84: Star Uguide

MESH CREATION Chapter 3

Introduction

3-2 Version 3.24

Shell: A two-dimensional surface whose shape is defined by vertices locatedat its corners.

Figure 3-2 Shell definition

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

Figure 3-3 Spline definition

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

Figure 3-4 Patch definition

Block: A three-dimensional volume bounded by smooth, curved or flatsurfaces, whose edges consist of eight splines and/or straight lines (defined bytheir end points, as above). Block edges consisting of discontinuous splines(e.g. combinations of straight-line and smooth-curve segments) areacceptable.

shell

vertex

vertexspline

Shells Patch

Splines

Page 85: Star Uguide

Chapter 3 MESH CREATION

Introduction

Version 3.24 3-3

Figure 3-5 Block definition

Meshing techniques

The most appropriate initial step when building a mesh is to decide on the numberand distribution of cells to be used. The amount of time spent on the planning ofmesh generation is usually dependent on the complexity of the flow domaingeometry. For less complex cases, where the grid is more or less regular, gridplanning becomes less important. It is nevertheless advisable to always have a wellvisualised mesh in mind before building a model. This can usually be achieved byroughly sketching the desired mesh and working out a mesh generation strategybefore using pro-STAR. Initial planning also involves choosing between thedifferent mesh generation techniques and tools available.

pro-STAR offers five basic methods for setting up a mesh and the user is free tochoose any one or a combination of them, depending on the geometrical complexityof the model and his own preferences:

1. Extrusion — this technique permits the extrusion of a three-dimensionalmesh from an existing surface, as shown in Figure 3-6.

Figure 3-6 Mesh generation by extrusion

Straight line

Continuous spline

Block

Discontinuous spline

Starting cell surface

Page 86: Star Uguide

MESH CREATION Chapter 3

Introduction

3-4 Version 3.24

2. Using cell layers — this is a bottom-up approach that builds the solutiondomain up from its constituent cells, layer by layer, on the basis of awell-defined meshing strategy (see Figure 3-7). Given the wide variety ofbuilding blocks (cell shapes) available, this can be a very flexible technique,well-suited to constructing complex model geometries. Its main disadvantageis that the overall geometry is entirely dependent on individual cell shapes andhow these are put together. It can also be highly time-consuming andinvolved.

Figure 3-7 Cell-layer mesh generation

3. Using multiple blocks — this is a top-down approach that requiressub-division of the solution domain into a series of conveniently shapedblocks (or just a single block for simple geometries) that define the geometryof the model (see Figure 3-8). Sub-division of each block into individual cellsin an automatic fashion is then possible. A particular advantage of thismethod is that the overall model geometry definition is decoupled from thecomputational mesh definition.

Figure 3-8 Multi-block mesh generation

4. Using pro-am — this is a special advanced meshing module residing underthe pro-STAR interface. It contains powerful facilities for generating complexmeshes in an easy-to-use manner and is supplied with its own separatedocumentation.

5. Data import — this relies on an external CAD package to perform the basicgeometric modelling and/or meshing operations. pro-STAR providesinterfaces that can re-arrange and translate the external data into pro-STARnotation. The imported data can be in two basic forms:

Cells acting asbuilding blocks

Block 1

Block 2

Page 87: Star Uguide

Chapter 3 MESH CREATION

Extrusion

Version 3.24 3-5

(a) Entire meshes that have been generated by a different CAD/CAE systemsuch as ICEM CFD™, PATRAN™, ANSYS™, etc.

(b) Geometric definitions of models, in the form of surfaces, splines or pointsgenerated by an external CAD/CAE system in IGES or VDA format.Such data can be used by pro-STAR as a starting point for creating a mesh(see Figure 3-9).

Figure 3-9 Mesh generation by data import

pro-STAR offers a mixture of facilities for creating a mesh, some GUI-driven (butalways with a corresponding command-based facility) and others command-drivenonly. The facilities of the latter category are grouped within the MESH commandmodule (for local mesh generation) or the CONVERT module (for mesh dataimport/export capabilities), as described in the pro-STAR Commands volume.

Other mesh facilities

Numerous facilities are provided for checking the model being constructed. Theseinclude:

• Visual checking, using the options in the drop-down list of the Plot menu,accessible from the main menu bar, to plot the mesh and model geometry (seeChapter 5).

• Numerical checking, accessed by selecting Tools > Check Tool from themain menu bar to audit detailed mesh characteristics such as internal anglesand deformations. In addition, various items in the drop-down list of theUtility menu, accessible from the main menu bar, will check the overall modelgeometry using area and volume calculations (see “Mesh and GeometryChecking” on page 4-26).

Extrusion

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

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

Imported points

Surface data

Imported spline

Page 88: Star Uguide

MESH CREATION Chapter 3

Extrusion

3-6 Version 3.24

definition on page 3-2) using the PATCH command.• Shells making up the extrusion surface can also be created individually from a

pre-defined set of vertices (see “Command-driven facilities” on page 3-44) orby adding them to faces of existing cells selected via the graphics cursor (seepage 3-48). Also, command LIVE offers a convenient way of creating shellsthat define the surface of the current cell set. The command can also storesuch shells in .cel, .vrt files.

Figure 3-10 Starting surfaces for extrusion

• The extrusion operation is executed by typing command VCEXTRUDE.• VCEXTRUDE generates a three-dimensional mesh by allowing the cells to

grow from the base surface (see Figure 3-11). In so doing, new vertices andcells are normally created simultaneously. However, there is also a choice ofcreating only new vertices or only new cells (assuming the vertices have beencreated already by a previous use of the command).

Figure 3-11 Cell growth from original starting surface

• The extrusion can be either normal to the starting surface [Figure 3-11(a)] oralong a given direction in a pre-defined local coordinate system [Figure

(a) (b)

Page 89: Star Uguide

Chapter 3 MESH CREATION

Cell-layer Approach

Version 3.24 3-7

3-11(b)].• The extruded cell layers may have either uniform or non-uniform spacing, the

latter controlled by the magnitude of the fill ratio parameter. Values less than 1will concentrate the cell layers on the far end, while values greater than 1 willhave the same effect on the inner end. A value of 1 will result in uniformspacing.

• Although VCEXTRUDE is most commonly employed for creating 3-D meshblocks from 2-D surfaces, as described above, the command may also be usedto generate 2-D structures (shells) from 1-D line cells or 1-D structures(curves) from point cells (see “Visualisation cells” on page 3-38).

• A special, extrusion-type operation that creates solid cells only (see “Celltypes” on page 3-37) is available via command CBEXTRUDE. This creates asingle layer of solid cells centred on a given shell or baffle set that acts as thestarting surface. The boundaries of any fluid cells touching this surface aremoved back to accommodate the new cell layer. This command is designedfor use in heat transfer problems, see Chapter 6, “Conjugate heat transfer inbaffles”.

• Another extrusion-type operation is available for the purpose of adjusting thethickness and ratio of previously extruded cell layers, as shown in theexample of Figure 3-12. This is implemented via command REEXTRUDE.The re-extrusion operation may be performed in a direction normal to thestarting shell layer, or along a direction determined by a local coordinatesystem, or in the direction of the original extrusion.

Figure 3-12 Example of mesh re-extrusion

Cell-layer Approach

The functions discussed in the section on “Mesh block generation” generallyprovide for easy and flexible meshing. However, there are many cases where thecomplexity of the flow domain geometry dictates a manual approach to meshcreation, i.e. building the mesh up from its constituent cells. This constitutes thecell-layer approach whose principal features are:

1. Reliance on the initial creation of a set of vertices, which constitute the cornerpoints of the cells (see Figure 3-13).

Before After

Page 90: Star Uguide

MESH CREATION Chapter 3

Coordinate Systems

3-8 Version 3.24

Figure 3-13 Creation of cells from vertices

2. The model geometry is generated as a result of the creation and manipulationof individual vertices and the attachment of cells to them.

3. The method consists of two stages as follows:

(a) Creation of vertices and possible subsequent manipulation (moving themaround in space) so that they take up the shape of the model’s geometricalfeatures.

(b) Attachment of cells to these vertices to define the volume elementsconstituting the model.

Points to remember when using this approach are as follows:

• It relies heavily on vertex manipulation.• Cells cannot exist without vertices but vertices can exist on their own.• The user is free to create a complete vertex latticework first and define cells

afterwards, or define cells as soon as sufficient vertices are created.

Within pro-STAR, cells are created and manipulated using various operationsdescribed in “Cells” on page 3-37. The constituent vertices are defined usinganother set of operations, described in “Vertices” on page 3-14. Vertex generationis greatly aided by built-in facilities for setting up a wide variety of coordinatesystems, as described below.

Coordinate Systems

pro-STAR allows the use of a number of different coordinate systems, whoseprincipal function is to aid the positioning and manipulation of vertices. The maincharacteristics of these systems are as follows:

1. They act like drawing instruments, enabling the user to specify the location ofa point in space in the most convenient way.

2. Different types of coordinates are provided, like different instruments, to suitthe requirements of a particular geometry. Thus, just as it is very difficult todraw a circle with a ruler, it would be very time-consuming to define andmanipulate points around a circular arc by using only Cartesian coordinates.

3. In the interests of even greater flexibility, there is a choice between two kindsof coordinate system:

(a) Global systems, possessing a pre-defined origin and axis orientation.Global systems cannot be altered by the user and can be one of three

Page 91: Star Uguide

Chapter 3 MESH CREATION

Coordinate Systems

Version 3.24 3-9

types:

i) Cartesian (see Figure 3-14)ii) Cylindrical (see Figure 3-15)

iii) Spherical (see Figure 3-16)

(b) Local systems, possessing a user-defined origin and axis orientation.These can be one of four types:

i) Cartesianii) Cylindrical

iii) Sphericaliv) Toroidal (see Figure 3-17)

The available coordinate system types are illustrated below:

Cartesian

Figure 3-14 Cartesian coordinate system

Cylindrical

Figure 3-15 Cylindrical coordinate system

Y

X

Z

0

M y

xz

M(x,y,z)

Y

X

Z

0

M

rzθ

M(r,θ,z)

Underlying Cartesian system

Page 92: Star Uguide

MESH CREATION Chapter 3

Coordinate Systems

3-10 Version 3.24

Spherical

Figure 3-16 Spherical coordinate system

Toroidal

Figure 3-17 Toroidal coordinate system

Local coordinate systems

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

Z

M

r

0 X

M(r,θ,φ)

θ

φ

Underlying Cartesian system

Y

R M

r

Z

0

YUnderlying Cartesian system

M(r,θ,φ)Parameter = R

φ θ

Page 93: Star Uguide

Chapter 3 MESH CREATION

Coordinate Systems

Version 3.24 3-11

On opening the dialog, the three default global coordinate systems (Cartesian,cylindrical and spherical) are displayed at the top, followed by any local onesdefined by the user. The currently active system, whether global or local, isindicated by an asterisk. pro-STAR automatically sets the global Cartesian systemas the default active system for new problems.

To create a local system, the user has to highlight an unoccupied referencenumber on the list and then specify the origin location and axis orientation of anunderlying Cartesian system. The desired local coordinates are then definedrelative to this underlying system, as shown in Figure 3-14 to Figure 3-17. Theunderlying system definition can be accomplished in two ways:

1. Explicitly, via specified translations , , and right-handed rotations, , (in degrees) about each axis (i.e. re-positioning and

re-orientation in space). The required translations and rotations must be typedin the corresponding text boxes underneath the list, plus the major radiusvalue for toroidal systems. The type of coordinate system is selected from thepop-up menu on the left. To apply these definitions:

(a) Click on the New (Global) button if the desired translations and rotationsare with respect to the global Cartesian system, as shown in Figure 3-18.

(b) Click on the New (Local) button if they are with respect to the currentlyactive coordinate system Thus, one local system can be defined in termsof another.

Commands: LOCAL VLOCAL CLOCAL PLLOCALCOORCSLIST CSYS CSDELETE

X c Y c ZcRxy Ryz Rzx

Page 94: Star Uguide

MESH CREATION Chapter 3

Coordinate Systems

3-12 Version 3.24

Figure 3-18 Local coordinate translations and rotations

2. Implicitly, with respect to three pre-defined vertices, as shown in Figure 3-19.Vertex NVORIG defines the origin of the coordinate system. In combinationwith vertex NV1, it also defines the first axis of the coordinate system, .Vertex NV2 defines the – plane. Axis itself is automatically setup by the system so that it is at right angles to . The third axis, is alsoset up automatically so that it is at right angles to the – plane.

The required vertices can be specified by clicking on the New button,choosing an – plane from the displayed drop-down list (X-Y, Y-Z, orZ-X) and then selecting the three required vertices with the mouse,i.e. NVORIG, NV1, NV2 and in that order.

Y′Y″

Y″′ ,YL

XL

X″,X″′

X′1

2

3

O′

Z′,Z″ZLZ″′

YG

ZG

O

TRANSLATIONO

(XG,YG,ZG)O′

(X′,Y′,Z′)to

ROTATION1 ROTXY about Z′2 ROTYZ about X″3 ROTZX about Y″′

Final local Cartesiancoordinates XL, YL, ZL

X LX L Y L Y L

X L Z LX L Y L

X L Y L

Page 95: Star Uguide

Chapter 3 MESH CREATION

Coordinate Systems

Version 3.24 3-13

Figure 3-19 Local coordinate definition using three vertices

Figure 3-20 shows an example of a two-block mesh created by commandVC3DGENusing two local coordinate systems. You may display or hide the local coordinatesystem triads shown in the figure by clicking on the Show Triad or Hide Triadbuttons, respectively (see also page 5-7). Note that it is possible to define and storeup to 99 local systems.

Figure 3-20 Example use of local coordinate systems

Axis 1 = XL

Axis 2 = YL

Axis 3 = ZL

NV2

NV1

NVORIG

YG

XG

ZG Axis 3 = Axis 1 × Axis 2

YL

XL

ZL

YL

XL

ZL

Block 1

Block 2

Cylindricalcoordinatesystem

Cartesiancoordinatesystem

Page 96: Star Uguide

MESH CREATION Chapter 3

Vertices

3-14 Version 3.24

Other coordinate system functions

The available functions are:

• Changing the active coordinate system to a different system (local or global)— select the desired system in the Coordinate Systems list and then click onthe Set Active button.

• Deleting a given set of coordinate systems — select the system(s) on the listand then click on the Delete button. Note that global coordinate systemscannot be deleted.

Additional points to bear in mind about coordinates are:

• When a new system is defined, it becomes the currently active system.• Local coordinate systems are not only used in mesh manipulation but also for

boundary definitions and post-processing operations, as discussed in Chapter7 and Chapter 9.

Vertices

As mentioned in the “Introduction” on page 3-1, vertices are points that have aunique identifier (vertex number) and a physical location in pro-STAR’sthree-dimensional global Cartesian coordinate system. On account of theirimportance as a fundamental entity of the STAR mesh, the system providesnumerous command-driven and GUI-driven facilities for their creation andmanipulation. These are described in the next three sections.

Command-driven facilities

• Creation, using local coordinates to define the vertex position — command V.A GUI implementation of this command is available in the Vertex List dialog(see page 3-24); also in the “Vertices tab” of the Create Geometric EntitiesSTAR-GUIde panel.

Figure 3-21 Vertex creation using command V

• Set generation, starting from a pre-defined vertex set — commandVGENERATE. Specified increments in a local coordinate system are used toposition the new set. The vertex numbers of this set are calculated from agiven vertex offset (see Figure 3-22). Note that if the offset is 0, the startingvertex set will simply be moved to the new location.

( 5, 6, 8 )

•101

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

Command: V,101,5,6,8

Page 97: Star Uguide

Chapter 3 MESH CREATION

Vertices

Version 3.24 3-15

Figure 3-22 Vertex set generation using VGENERATE

• Filling additional vertices in between two previously defined ones, accordingto a specified pattern (see Figure 3-23) — command VFILL. The vertices canbe specified numerically or using the terminal cursor.

Figure 3-23 Additional vertex filling using VFILL

• Switching the direction of angular change when filling vertices innon-Cartesian coordinate systems — command CSDIR. The effect oncommand VFILL is to switch the direction of filling from –180° → 180° to 0°→ 360°, as shown in Figure 3-24. The fill arc for some coordinate systemsmay pass through both the θ=0° and θ=180° axes, in which case option BOTHshould be used.

11

1213

14

1

2 3

4

2 my

r

x

θ

Command: VGEN, 2 , 10 , 1 , 4 , 1 , 2 , 0 , 0

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

θ

y

x

r1

5

10

20 30

40

50

1

5

1020

3040

50

(a) Filling in Cartesian coordinates (b) Filling in cylindrical coordinates

Page 98: Star Uguide

MESH CREATION Chapter 3

Vertices

3-16 Version 3.24

Figure 3-24 Switching the direction of angular change via CSDIR

• Filling vertices along the perimeter of a cross-sectional cut through thecurrent cell set — command VSECTION (see also the description ofcross-sections in Chapter 5).

• Filling vertices along the perimeter of the intersection of the current cell setwith a given shell type — command VINTERSECT. The action is very similarto VSECTION, except that the cut is made by a shell rather than across-sectional plane.

• Defining a vertex at the centroid of a user-defined collection of other vertices(command VVERTEX) or cells (command VCELL). These can be useful indefining sensor points for interpolation and display of post data (see thediscussion on page 9-26) or particle track starting points (see Chapter 9,“Particle Tracking”).

• Reflection, which generates a new, mirror-image vertex set that issymmetrically disposed with respect to a local coordinate axis (see Figure3-25) — command VREFLECT. Note that what needs to be specified is thedirection of the reflection, not the axis about which the vertices are reflected.

Figure 3-25 Vertex reflection using VREFLECT

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

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

θ

y

x

r2

1

10

20 30

40

50θ = 0

CSDIR , 0

θθ = 180

2

110

20

30 40

50

y

x

r

CSDIR , 180

Command: VREF , 11 , 2 , 100 , 10 , 40 , 10

Y

X Coordinate system no. 11

1020

3040

110120

130140

Page 99: Star Uguide

Chapter 3 MESH CREATION

Vertices

Version 3.24 3-17

Figure 3-26 Vertex centring using VCENTER

• Moving vertices from their position in one coordinate system to a newlocation in a different coordinate system (see Figure 3-27) — commandVMOVE.

Figure 3-27 Moving vertices using VMOVE

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

Command: VCEN , 20 , 5 , 15 , 10 , 3.5

5

10

15

20

r = 3.5

Command: VMOVE , VSET , 11 , F , V , F , 12 , 5 , V , V , 1.E-4

Local Cartesian system 11Local cylindrical system 12Vertex set 20 to 22

r = 5

20 21 22

Y

X

Z

Page 100: Star Uguide

MESH CREATION Chapter 3

Vertices

3-18 Version 3.24

Figure 3-28 Moving vertices using VEQUAL

• Changing the coordinates of a given vertex range to a different coordinatesystem (with optional vertex number offsetting), in preparation for furthervertex operations — command VTRANS.

• Scaling of the coordinates of a given vertex set by given factors in eachcoordinate direction — command VSCALE.

• Projection of a vertex set onto a shell surface — command VPROJECT (seeFigure 3-29).

Figure 3-29 Projecting vertices onto a surface using VPROJECT

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

10

20

Z

Y

Fixed vertex 10

Command: VEQUAL , 10 , 20 , X

X

1 2 3

11

12

13

Command: VPROJ , 1 , 3 , 1 , 10 , CSET ,,, NORM (CSET is the target shell surface)

Page 101: Star Uguide

Chapter 3 MESH CREATION

Vertices

Version 3.24 3-19

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

• Replacement of a given set of vertices by a subset — command VREPLACE.The vertices that are eliminated are related to the ones that are kept via aspecified vertex-number offset.

• Renumbering of all vertices associated with a given cell set — commandVRENUMBER. The operation is performed sequentially, starting from aspecified vertex number.

• Reordering of vertices in a given cell set on the basis of cell connectivity —command RESTRUCTURE. This creates a structured vertex numberingscheme reflecting the structure of the cell set to which it is applied. Therenumbering scheme works in terms of local mesh directions I, J and Kdefined via command CDIRECTION.

• Counting the currently defined vertices — command COUNT. Alternatively,execute this operation by choosing Utility > Count > Vertices from the menubar.

• Finding gaps (unused vertex numbers) within a given vertex range —command VGAP.

Vertex set selection facilities

Vertices need to be grouped together, thus defining a vertex set, for the purposes ofmass manipulation or plotting. This is done by selecting one of the list optionsprovided by the V-> button in the main pro-STAR window. The available optionsare as follows:

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

unselected vertices4. New — replaces the current set with a new set of vertices5. Add — adds new vertices to the current set6. Unselect — removes vertices from the current set

Before After

Vertex set

Shell surface

Page 102: Star Uguide

MESH CREATION Chapter 3

Vertices

3-20 Version 3.24

7. Subset — selects a smaller group of vertices from those in the current set

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

• Cursor Select — click on the desired vertices with the cursor, complete theselection by clicking the Done button on the plot.

• Zone — use the cursor to draw a polygon around the desired vertices.Complete the polygon by clicking the last corner with the right mouse button(or click Done outside the display area to let pro-STAR do it for you). Abortthe selection by clicking the Abort button.

• Cell Set — select vertices attached to cells in the current cell set.• Cell Set Surface — select vertices on the surface of the current cell set.• Cell Set Edge — select vertices along the edges of the current cell set. Edges

are defined by adjacent faces whose normals differ by an amount that exceedsa user-specified ‘feature angle’.

• Boundary Set — select vertices attached to boundaries in the currentboundary set.

• Spline Set — select vertices attached to splines in the current spline set.• Block Set — select vertices attached to blocks in the current block set.• Couple Set — select vertices attached to cell faces in the current couple set• Couple Set Masters — select vertices attached to master cell faces in the

current couple set• Couple Set Slaves — select vertices attached to slave cell faces in the current

couple set• All Initial Particle Positions — select all vertices corresponding to initial

particle positions (see “Particle Tracking” on page 9-28)• All Sensors — select all sensor vertices (see “Data Reporting” on page 9-24)

More vertex set operations are available in the Vertex List dialog box (see “Listing”on page 3-24) or by typing command VSET (see the pro-STAR Commands volumefor a description of additional selection options).

GUI-driven facilities

These are accessed via the Vertex Tool, shown overleaf, which is activated bychoosing Tools > Vertex Tool from the main window menu bar.

Page 103: Star Uguide

Chapter 3 MESH CREATION

Vertices

Version 3.24 3-21

The available facilities are:

1. Vertex-related graphical operationsThese require a mesh plot on the pro-STAR graphics window for properoperation (see “Plotted Entity” on page 5-16) and are performed by clickingon one of the blue-coloured buttons on the tool, as follows:

(a) Plot centring — Center at Vertex or Auto Center, see “PlotCharacteristics” on page 5-3 for a discussion.

(b) Mapping, i.e. placing a vertex onto the plane of a cell face — Move (onFace) for moving existing vertices or New (on Face) for creating newones. The desired location is found by projecting the vertex indicated bythe screen cursor along the viewing direction onto the cell face. Therelevant face is the one that surrounds the indicated vertex on the currentplot, as shown in Figure 3-31. For a new vertex, its number is generatedautomatically by incrementing the existing total and the vertex is thenadded to the current set.

Commands: VMAP VCROSS VUNDO VLISTCENTER VDELETE VCOMPRESS VPLOT

Page 104: Star Uguide

MESH CREATION Chapter 3

Vertices

3-22 Version 3.24

Figure 3-31 Projecting vertices onto a cell face

(c) Creation or repositioning of vertices using the cursor to mark the desiredlocation on the screen — Move (in Plane) for moving an existing vertexin the plane of the screen or New (in Plane) for creating a new one. Thelatter’s number is generated automatically by incrementing the existingtotal and the vertex is then added to the current set.

(d) Cancelling out the result of the last vertex addition/deletion/modification/etc. operation — Undo. If necessary, this facility can be deactivated usingcommand SAFETY with parameter STATUS set to OFF.

(e) Identification of a vertex in terms of its number and coordinates in thecurrently active coordinate system — Identify Vertex. The vertex inquestion is indicated via the cursor and the required information appearsin the pro-STAR output window.

2. DeletionThis is performed by clicking one of the red-coloured buttons on the tool to

(a) delete vertices in the current mesh plot by pointing at them with thecursor (Delete Vertex) or

(b) delete only those collected in the current vertex set (Delete Vertex Set).

Further vertex deletion options are also available via the Vertex List dialogbox, see “Listing” on page 3-24.

3. Import/ExportVertex definitions may be imported into pro-STAR by reading in theircoordinates from a .vrt file — click button Vertex Read to display thedialog box shown below. The information required is:

Terminal cursor

Indicated point

Surrounding cell face

Page 105: Star Uguide

Chapter 3 MESH CREATION

Vertices

Version 3.24 3-23

(a) The input file name. pro-STAR’s built-in file browser may be used to helplocate it

(b) An offset to be added to vertex numbers upon input(c) The vertex range, in terms of the first and last vertex number to read(d) The input file format — either Coded or Binary

The reverse operation, exporting vertices by writing their coordinates to a.vrt file is performed by clicking button Vertex Write. The dialog boxdisplayed is shown below. The information required is:

(a) The output file name. An existing file may be located using pro-STAR’sbuilt-in file browser.

(b) An offset to be added to vertex numbers upon output.(c) The vertex range, in terms of the first and last vertex number to write.(d) The output file format — either Coded or Binary.

Command: VREAD

Command: VWRITE

Page 106: Star Uguide

MESH CREATION Chapter 3

Vertices

3-24 Version 3.24

4. ListingThis is performed by clicking the Vertex List button to activate the VertexList dialog shown below. Alternatively, select Lists > Vertices from the mainmenu bar. Vertex definitions in terms of X, Y, Z coordinates are displayed inthe scroll list in the upper half of the box, in numerically ascending order.There is also a choice of listing all vertices or just the current set (marked byasterisks in the Vset column). The choice is made simply by clicking theShow All Verts or the Show Vset Only option button, respectively. The usercan choose the coordinate system in which the vertices are listed by draggingthe Coordinate System slider at the bottom of the box (or clicking the bar tothe right or left of the slider with the mouse to change the coordinate systemnumbers one at a time). To select vertices from the list:

(a) For single items, click the required vertex on the list.(b) For a group of two or more contiguous items, click the first vertex you

want to select, press and hold down the Shift key, and then click the lastvertex in the group.

Once the desired vertices are selected, the following operations are possible:

(a) Addition to (or removal from) the current set — click the Add toSet/Remove from Set button.

(b) Deletion — click the Delete Vertices button.(c) Modification of coordinates for multiple vertices — type the new

coordinate value in the appropriate text box underneath the list, then clickthe Modify X, Modify Y, or Modify Z button below the box to changethe coordinate value for all the vertices selected.

(d) Creation or modification of a single vertex — a new vertex can be added

Commands: VLIST VDELETE V VMODIFY VSET

Page 107: Star Uguide

Chapter 3 MESH CREATION

Vertices

Version 3.24 3-25

to the model by typing its number in the Vertex Number box, itscoordinate values in the X, Y, Z boxes underneath the list and then clickingthe Add/Modify Vertex button. To modify an existing vertex, select itwith the mouse (or type its number in the Vertex Number box), type thenew coordinate value(s) in the appropriate text box underneath the list,then click the Add/Modify Vertex button.

Note that the currently active coordinate system may need to be changed as aresult of performing items c) and d) above. This change is retained afterexiting from the dialog box. Also note that all the above operations have animmediate effect on the vertex definitions, reflected by immediate changes towhat is displayed in the list. However, any subsequent vertex changes madeoutside this dialog box, e.g. by issuing commands via the pro-STAR I/Owindow, will not be listed. To display these changes, click the Update Listbutton.

5. MergingCoinciding vertices are merged by eliminating either the higher- or lower-numbered vertices that occupy the same position in space. The operation isperformed by clicking button Vertex Merge to display the VMerge dialogshown below.

The information required is:

(a) The vertex range, in terms of the first and last vertex number to check forcoincidence.

(b) The merging tolerance, typed in the Vertex Tolerance text box. Thisquantity is used to force nearly-coincident vertices to coincide preciselyin space.

(c) Three geometric ranges, pertaining to the x-, y- and z- directions of thecurrently active local coordinate system, respectively. This is an

Command: VMERGE

Page 108: Star Uguide

MESH CREATION Chapter 3

Vertices

3-26 Version 3.24

alternative means of delimiting the range of vertices to be checked.(d) A specification of whether the lowest- or highest-numbered coincident

vertices are to be retained after merging, selected by an option in theCoincident Set to keep pop-up menu.

(e) A choice of whether to keep or delete the vertices that are not retainedafter merging.

6. CompressionThis involves the elimination of all unused vertex numbers corresponding tonon-existent (e.g. deleted) vertices — click Vertex Compress to display theVCompress dialog shown below:

Text boxes are provided to enable specification of a vertex range on which thisoperation is to be performed. Note that, on completion, the operationproduces continuous, sequentially-numbered vertices throughout the mesh.Any existing cell, boundary, block, spline and post-processing data definitionsare renumbered accordingly.

7. Cell shape improvementButton Unwarp — This is discussed under “Mesh Quality Improvement” onpage 4-29.

8. PlottingThis is performed by clicking on the Vertex Plot or Replot button. pro-STARplots vertices in the current set in accordance with the relevant plottingparameters (see “Plot Characteristics” on page 5-3). Alternatively, select Plot> Vertex Plot from the main menu bar.

Additional considerations

The following additional points should also be born in mind:

• Vertices can be created in any order.• All the manipulation facilities listed above can be applied to vertices of all

mesh types, irrespective of their method of creation or origin.• If any of the vertices generated by a command such as VFILL, VGENERATE,

etc. already exists, the effect of the command is to reposition the vertex inspace according to the latest command parameters.

• Although the user can model in any coordinate system or scale, the STAR-CDcode works in SI units. The user must therefore ensure that the vertex

Command: VCOMPRESS

Page 109: Star Uguide

Chapter 3 MESH CREATION

Splines

Version 3.24 3-27

coordinates are in meters before geometric data are passed on to STAR. Thiscan be achieved by scaling the geometry either before writing the geometryfile (using command VSCALE mentioned above under “Command-drivenfacilities”) or while writing the geometry file (via the GEOMWRITEoperation, see Chapter 21, “File manipulation”).

• Given that pro-STAR is a single-precision program, it is very important toavoid using very large or very small coordinate values when specifying thelocation of vertices. Following on from the point made above, models shouldbe built in reasonable units (i.e. using coordinate values in the range 0.001 to10000 if at all possible) and then scaled to meters for STAR. This requirementcan be met more easily if the origin of the global coordinate system is situatedwithin or near the model.

Splines

As mentioned in the “Introduction” on page 3-1, splines are general-purpose,smooth, one-dimensional shapes that

• are specified in terms of vertices situated along their length;• can be defined as continuous or discontinuous combinations of curves and

lines.

Splines can be thought of as sophisticated drawing tools that help the user describecomplex geometrical features in the model. They are therefore commonly used for

• defining edges of blocks (i.e. they act like wire frames, see Figure 3-32);• defining edges of patches, as shown in Figure 3-32;• complex paths along which vertices can be projected, generated or filled.

Figure 3-32 Use of splines for patch and block definition

Spline tables

Splines can be indexed and differentiated in various ways by means of the so-calledspline table. The latter allows splines used for a common purpose (or derived froma common source) to be grouped together and assigned a common spline identity.

Patch Block

Page 110: Star Uguide

MESH CREATION Chapter 3

Splines

3-28 Version 3.24

This identity is expressed in terms of a spline type index. The common attributesdistinguishing a spline type are:

• Colour, specified by a colour index.• Group, specified by a group index. This identifies an ‘object’ (shell surface,

cell range, etc.) within the mesh that is associated with this spline type insome way. Splines imported from IGES files (see topic “IGES Data File” inthe STAR GUIde system) are very often collected together into groups.

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

Current table entries are displayed in the scroll list in numerically ascending indexnumber. New entries can be generated by highlighting an unoccupied spline typenumber with the mouse and then typing the colour and group indices in the textboxes provided under the list. Note that:

• Any additions or modifications to the table can only be made permanent byclicking on the Modify Table button.

• Newly created splines can be given a different type by changing the currentlyactive spline type prior to their creation. This is done by clicking on the SetActive Type button. The selection is indicated in the list by a letter A againstthe active type.

• Spline table entries can be deleted by typing command STDELETE. Note thatall splines indexed to this entry must be deleted or changed to a differentindex before the table entry itself can be deleted.

pro-STAR also provides numerous command-driven and GUI-driven facilities forspline generation and manipulation. These are discussed in the next three sections.

Command-driven facilities

• Creation, i.e. specification of a spline that passes through a given set ofvertices in a continuously- or discontinuously-curving fashion (see Figure3-33) — command SPL. As shown in Figure 3-33(b), a discontinuous splineconsists of a series of sub-splines. The end of one sub-spline and thebeginning of the next is marked by a minus sign attached to the appropriatevertex number.

Options CHASE or MESH of this command enable specification of only a

Commands: STLIST STABLE STYPE

Page 111: Star Uguide

Chapter 3 MESH CREATION

Splines

Version 3.24 3-29

very limited number of vertices. The remaining vertices along the spline curveare filled in automatically by following the surface of the current cell set.

A full GUI implementation of this command is available in the “Splinestab” of the Create Geometric Entities STAR-GUIde panel.

Figure 3-33 Spline creation using SPL

• Generation, starting from an existing base set of splines — commandSPLGENERATE. The new splines are created by offsetting the constituentvertices of the base set (see Figure 3-34). All vertices for the new set shouldalready exist.

Figure 3-34 Spline set generation using SPLGENERATE

• Adding splines along the perimeter of

(a) a cross-sectional cut through the current cell set — command VSECTION(see also the description of cross-sections in Chapter 5, “Additionaldisplay options”);

(b) the intersection of the current cell set with a given shell type — commandVINTERSECT.

• Counting the currently defined splines — command COUNT. Alternatively,this operation can be executed by choosing Utility > Count > Splines fromthe menu bar.

Command: SPL , 1 , VRAN , 10 , 60 , 10 Command: SPL , 2 , VLIST , 1 , –2 , –3 , 4 , 5 , 6 , –7 , 8

1

2

34

5

6

7

8(a) (b)

10 2030

4050 60

Command: SPLGEN , 3 , 1 , 5 , 5 , 1 , 10

Spline 7

Spline 6

Spline 5

21 2223

2425 26

11 1213

14

1516

1 23

45 6

Page 112: Star Uguide

MESH CREATION Chapter 3

Splines

3-30 Version 3.24

Spline set selection facilities

Splines need to be grouped together, thus defining a spline set, for plotting orgeneration purposes. This is done by selecting one of the list options provided bythe S-> button in the main pro-STAR window. The available options are as follows:

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

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

For the last four options, the required splines are collected by choosing an item froma secondary drop-down list, as follows:

• Cursor Select — select the desired splines with the screen cursor, completethe selection by clicking the Done button on the plot window

• Zone — use the cursor to draw a polygon around the desired splines.Complete the polygon by clicking the last corner with the right mouse button(or click Done outside the display area to let pro-STAR do it for you). Abortthe selection by clicking the Abort button.

• Type (Active) — select all splines of the currently active type (see “Splinetables” on page 3-27 for a definition of spline types).

• Type (Current) or Type (Cursor Select) — select all splines whose typeindex is currently highlighted in the spline table. Alternatively, select the typeby clicking on a representative spline with the cursor.

• Color (Current) or Color (Cursor Select) — select all splines whose colouris currently highlighted in the spline table. Alternatively, select all splineshaving the same colour by pointing at a representative spline with the cursor.

• Group (Current) or Group (Cursor Select) — select all splines that belongto the same group as the one currently highlighted in the spline table (see“Spline tables” on page 3-27 for a definition of spline groups). Alternatively,select the group by pointing at a representative spline with the cursor.

• Vertex Set (Any) — select splines with at least one constituent vertex in thecurrent vertex set.

• Vertex Set (All) — select splines with all constituent vertices in the currentvertex set.

More spline set operations are available in the Spline List dialog box (see “Listing”on page 3-33) or by typing command SPLSET (see the pro-STAR Commandsvolume for a description of additional selection options).

GUI-driven facilities

These are accessed via the Spline Tool shown below. The tool is activated bychoosing Tools > Spline Tool from the main window menu bar.

Page 113: Star Uguide

Chapter 3 MESH CREATION

Splines

Version 3.24 3-31

The available facilities are:

1. Spline table operationsThese are performed by buttons Modify Table, Set Active Type and aredescribed on page 3-28.

2. Spline-related graphical operationsThese require both a spline and a vertex or mesh plot on the main pro-STARwindow for proper operation (see “Plotted Entity” on page 5-16). They areperformed by clicking one of the blue-coloured buttons on the tool, asfollows:

(a) Creation of a new spline, using the screen cursor to choose its constituentvertices — New Spline. The spline number is generated automatically byincrementing the existing total and the spline is then added to the currentset. If you click on the same vertex twice, pro-STAR changes the sign ofthe vertex, indicating a break in slope continuity at that location (seeFigure 3-33 on page 3-29 for an illustration).

(b) Addition of vertices — Add to Spline. This uses the cursor to first choosea spline and then add a number of selected vertices at the end of it.

(c) Modification of an existing spline — Modify. This operation requires aspline plot (and in some cases also a vertex plot) on the main pro-STARwindow. The effect of the operation can be one of the following,

Commands: SPLCROSS SPLDELETE SPLOT SPCOMPRESSVSPCROSS SPLMODIFY SPCHECK

Page 114: Star Uguide

MESH CREATION Chapter 3

Splines

3-32 Version 3.24

depending on the item selected from the drop-down list. In all cases, thedesired spline(s) must first be indicated with the cursor:

i) Reverse the vertex order in the spline definition — Reverse.ii) Split a spline into two at the indicated vertex — Split.

iii) Join two splines together — Join. The last vertex of the first splinebecomes the first vertex in the second spline, therefore thepreviously specified starting vertex of the second spline is notincluded in the new spline.

iv) Delete an indicated vertex from the spline definition — DeleteVertex.

v) Insert an indicated vertex into the spline definition — InsertVertex.

vi) Use the spline as a means of re-positioning a vertex in space —Move Vertex on Spline. Use the graphics cursor to mark thedesired vertex location on the spline.

vii) Change the spline type index to the one that is currently active —Spline Type. Note that it is also possible to change the type of allcurrently defined splines (option Spline Type (All)) or just of thosein the current spline set (option Spline Type (Spline Set)).

Further spline modification options are also available in the Spline List dialogbox, see “Listing” on page 3-33.

3. DeletionThis is performed by clicking one of the red-coloured buttons on the tool to

(a) delete splines in the current spline plot by pointing at them with thecursor (Delete Spline), or

(b) delete only those collected in the current spline set (Delete Spline Set).

Further spline deletion options are also available in the Spline List dialog box,see “Listing” on page 3-33.

4. Import/ExportSpline definitions may be imported into pro-STAR by reading them from a.spl file — click button Spline Read to display the dialog shown below.The information required is:

(a) The input file name. pro-STAR’s built-in file browser may be used to helplocate it

(b) An offset applied to vertex numbers upon input.(c) The spline range, in terms of the first and last spline number to read.(d) An option to either Add the input splines to the end of the current list,

disregarding spline numbers read from the file, or to use these numbersfor overwriting current spline numbers (Modify).

(e) The input file format — either Coded or Binary.

Page 115: Star Uguide

Chapter 3 MESH CREATION

Splines

Version 3.24 3-33

The reverse operation, exporting spline definitions by writing them to a .splfile is performed by clicking button Spline Write. This displays the dialogshown below. The information required is:

(a) The output file unit number. An existing file may be located usingpro-STAR’s built-in file browser.

(b) An offset applied to vertex numbers upon output.(c) The spline range, in terms of the first and last spline numbers to write.(d) The output file format — either Coded or Binary.

5. ListingThis is performed by clicking the Spline List button to activate the Spline Listdialog shown below. Alternatively, select Lists > Splines from the menu bar.Spline definitions in terms of type index (see “Spline tables” on page 3-27)and number of constituent vertices are displayed in the scroll list in the lefthalf of the box, in numerically ascending order. There is also a choice oflisting all splines or just the current set (marked by asterisks in the Setcolumn). The choice is made simply by clicking the Show All Splines or the

Command: SPLREAD

Command: SPLWRITE

Page 116: Star Uguide

MESH CREATION Chapter 3

Splines

3-34 Version 3.24

Show Spline Set Only option button, respectively. To select splines from thelist:

(a) For single items, click the required spline.(b) For two or more items in sequence, click the first spline you want to

select, press and hold down the Shift key, and then click the last spline inthe group.

Once the desired splines are selected, the following operations are possible:

(a) Addition to (or removal from) the current set — click the Add toSet/Remove from Set button.

(b) Deletion — click the Delete Spline button. Note that any splines thathave been deleted up to a given point can be reinstated, provided thespline Compress operation (see “Compression” on page 3-35) has notbeen performed. To reinstate all currently deleted splines, click theUndelete Spline button.

If only one spline is selected, the following spline modification operations arepossible, depending on the button clicked:

(a) Change the spline definition by:

i) Inserting additional vertices — Insert Vertices. The insertionlocation is immediately after the point highlighted in the vertexscroll list. The inserted vertex number is typed in the text boxunderneath.

ii) Deleting one or more vertices highlighted in vertex scroll list —

Commands: SPLLIST SPLDELETE SPLMODIFYSPLUNDELETE SPLSET

Page 117: Star Uguide

Chapter 3 MESH CREATION

Splines

Version 3.24 3-35

Remove Vertices.iii) Modifying some of the constituent vertices (see Figure 3-35) —

Replace Vertices. The new vertex number must be typed in the textbox below the list.

(b) Split a spline into two, at the location of the vertex highlighted in the list— Split Spline.

(c) Reverse the order of the constituent vertices — Reverse Order.(d) Inserting slope discontinuities at specified points on a spline, in the

manner illustrated by Figure 3-33(b) — Change Signs. The discontinuityis indicated in the vertex list by a negative sign.

Figure 3-35 Spline modification by vertex replacement

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

6. CheckingThis checks for splines that cross over themselves — click the Spline Checkbutton. The command version of this operation (SPCHECK) can also searchfor duplicate splines.

7. CompressionThis involves the elimination of all deleted splines and renumbering of thoseremaining in a continuous and sequential fashion — click the SplineCompress button. Note that if you also want to eliminate the verticesbelonging to the deleted splines, you will need to issue a separate command,SPVCOMPRESS, via the I/O window.

8. PlottingThis is performed by clicking on the Spline Plot or Replot button. pro-STARplots splines in the current set in accordance with the relevant plottingparameters (see “Plot Characteristics” on page 5-3). Alternatively, select Plot> Spline Plot from the main menu bar.

Vertex manipulation using splines

As already mentioned, splines can be used for manipulation of vertices in space.The relevant vertex functions are as follows:

Command: SPLMOD , 3 , MODIFY , 14 , 24 , 25 , 26

11 12

13

1415 16

24 25 26Spline 3

Page 118: Star Uguide

MESH CREATION Chapter 3

Splines

3-36 Version 3.24

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

Figure 3-36 Vertex creation on a spline using VSPDEFINE

• Creation via the cursor, as above but using the graphics cursor to mark thedesired vertex location on the spline — command VSPCROSS.

• Vertex set generation, starting from an existing arbitrary base set. Each newset is generated as if the original set had been dragged along the spline (seeFigure 3-37) — command VSPGENERATE.

Figure 3-37 Vertex set generation using a spline as a coordinate system

• Filling additional vertices along the spline in between two previously-definedvertices, according to a specified pattern (see Figure 3-38) — commandVSPFILL. The end vertices plus the ones in between can also be specifiedgraphically using the terminal cursor.

Figure 3-38 Vertex filling between two points on a spline

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

Command: VSPDEF , 4 , 60 , PERC , 0.6

Spline 4

1 23

4 560

Command: VSPGEN , 7 , 3 , 10 , 10 , 12 , 1 , ABSA , 0.2 , 0.0 , 1.0

Spline 7

10

11

12

20

21

22

3031

32

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

Spline 8

10 23

420

Page 119: Star Uguide

Chapter 3 MESH CREATION

Cells

Version 3.24 3-37

Figure 3-39 Intersection of a spline and a local coord. system

• Projection of a set of vertices onto a curve defined by a spline set —command VSPPROJECT.

• Listing of spline coordinates for a given range of vertices — commandVSPLIST.

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

Cells

Cells are basic building blocks of the mesh. Their properties and various alternativemethods used for their creation are discussed in this section.

The basic properties of cells are as follows:

• They are finite volumes or surface elements defined by a number of verticessituated at their corners.

• They cannot exist independently of vertices.• They change shape and/or position as their vertices move, as shown in Figure

3-40.

Figure 3-40 Cell dependence on vertices

Cell types

Every cell has an associated type. At present, pro-STAR offers six cell types that

Command: VSPMOVE , 7 , 47 , 23 , V , V , 3.0

YL

XLZL

Spline 7

Vertex 47

Z = 3.0

1 2

34

5 6

78on movingvertex no. 6 1 2

34

5

6

78

Page 120: Star Uguide

MESH CREATION Chapter 3

Cells

3-38 Version 3.24

can be grouped into two major categories, computational cells and visualisationcells.

Computational cellsThese are needed for CFD calculations and can be one of the following types:

• Fluid — used to fill those parts of the model occupied by liquids, gases, orporous media.

• Solid — used in those parts occupied by solids. Such cells are ignored forcalculation purposes except in conjugate heat transfer problems, i.e. whenconduction through solids is taken into consideration.

• Baffle — these are effectively zero-thickness, two-dimensional cells.Otherwise, their properties are similar to solids. Baffles may be placedbetween any two fluid or solid cells, as shown in Figure 3-41, where they actlike solid or permeable walls, depending on the properties assigned to them.

Figure 3-41 Example model with baffles: duct bend with turning vanes

Visualisation cellsThese are used for visualisation (see Chapter 5) and mesh generation purposes only(see “Extrusion” on page 3-5) but are otherwise ignored during the flow analysis.The available types are:

• Shells — two-dimensional surfaces similar to baffles that can be locatedanywhere within the mesh.

• Point and line cells — these are effectively zero- and one-dimensionalentities. They are particularly useful for importing and interpreting geometricdetails from external systems (see “Importing Data from other Systems” onpage 4-1).

Cell properties

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

• Cell type — determines the cell type, as described above.• Cell material — assigns a given set of fluid or solid material properties to the

cells (see “Cell Table” on page 6-1).• Cell colour — determines the colour used when the cells are displayed (see

Baffles

Page 121: Star Uguide

Chapter 3 MESH CREATION

Cells

Version 3.24 3-39

also “Cell Table” on page 6-1).• Cell porosity — assigns a given set of porous properties to cells occupying a

porous region (fluid cells only; see also Chapter 10).• Spin index — used in cases involving multiple rotating reference frames (see

“Models for multiple rotating reference frames (implicit treatment)” on page16-2) to assign an axis of rotation and rotation speed to cells occupying therotating region.

• Group number — identifies an ‘object’ (shell surface, cell range, etc.) withinthe mesh that is associated with this cell type in some way. Cells importedfrom IGES files (see “IGES Data File” in the STAR GUIde system) are veryoften grouped together in this way.

• Surface lighting index — determines the light-reflecting (shading) propertiesof cells when they are illuminated on a screen display (see “Special lightingeffects” on page 5-10).

• Processor number — identifies the processor (cpu) number to which the cellsare allocated. This property is used only in STAR-HPC, the distributedmemory, parallel-processing version of the code, for situations where the userwishes to perform a ‘manual’ solution domain decomposition; see “” inAppendix H.

• Conduction thickness — an optional property used in conjugate heat transfercases. It applies only to solid-type cells that have been created by extrudingbaffle-type cells to a finite thickness (see “Alternative treatment for baffle heattransfer” on page 6-18)

• Radiation switch — used to specify radiative heat transfer within transparentsolids (see “Transparent solids” on page 11-3) or to omit radiationcalculations in part of the solution domain (see “Radiation sub-domains” onpage 11-2)

• Initial free-surface identifier — determines the initial light and heavy fluiddistribution in free-surface and/or cavitation problems (see Chapter 15, page15-3 and 15-6)

• Cell name — optional alphanumeric label, used as additional cell identifier.

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

Page 122: Star Uguide

MESH CREATION Chapter 3

Cells

3-40 Version 3.24

Figure 3-42 Example of possible cell classification

All the above cell identity parameters can be tabulated using various pro-STARoperations, discussed in more detail in Chapter 6.

Cell shapes

To provide further flexibility in generating complex meshes, STAR accepts fourbasic fluid or solid cell shapes plus six trimmed (polyhedral) cell shapes normallygenerated by pro-am. In addition, there is a variety of ‘degenerate’ shapes formedby collapsing various cell edges.

The four basic shapes are as follows:

• hexahedra,• triangular prisms,• pyramids,• tetrahedra.

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

Porous region

Fluid 1

Fluid 2Solid 1

Solid 2

Baffle

Page 123: Star Uguide

Chapter 3 MESH CREATION

Cells

Version 3.24 3-41

Figure 3-43 Basic fluid or solid cell shapes

Figure 3-44 illustrates the six types of trimmed cells currently available. These arenormally created by means of the pro-am module but may also be freely usedelsewhere in pro-STAR. Referring to the identification numbers shown in Figure3-44, the trimmed cells are formed as follows:

(1) a hexahedron with a corner cut off(2) a hexahedron with an edge cut off(3,4,5) hexahedral cells cut in such a way that the exposed face is either a

five or six-sided polygon(8) a hexahedron with all its corners cut off (used to extrude six-sided

faces to the surface of the model — see the pro-am documentation)

Trimmed cells may be deleted and redefined at will in order to make furtherrefinements to the shape of the mesh, see “Command-driven facilities” on page3-44.

12

3

4

56

78

1

2

5

3

6

4

1Hexahedron ( = face number)

1

2

3

4

5,5,5,5

Pyramid

x

y

z

1

2

3,3

56

7,7

Triangular prism

1

2

3,3

5,5,5,5

Tetrahedron

Page 124: Star Uguide

MESH CREATION Chapter 3

Cells

3-42 Version 3.24

Figure 3-44 Allowable trimmed cell shapes

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

2

35

4

6 710

1

8

9

2

3

54

6 710

1

8

9

2

3

54

6

7

1

8

23

5 46

7

1

89

1011

12

2

35

4

6

7

10

1

892

3

5

4

6

7 10

1

8 9

(1) (2)

(3) (4)

(5) (8)

Page 125: Star Uguide

Chapter 3 MESH CREATION

Cells

Version 3.24 3-43

Figure 3-45 Allowable degenerate cell shapes

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

Figure 3-46 Basic baffle or shell shapes

2

3,4

5,6 7,8

1

2,6

3

5

4,8

1

7

2

3

5

4

6

1

782,6

3

5

4

1

78

Vertices must benumbered as shown

1 Collapsed

Edge

2 Collapsed Edges

3 Collapsed Edges

1 2

3

4

1 2

3,3

Quadrilateral Triangle

Pentagon Hexagon

1

2

3 4

5

1

2

3

4

5

6

Page 126: Star Uguide

MESH CREATION Chapter 3

Cells

3-44 Version 3.24

pro-STAR’s capabilities regarding cell generation and manipulation can besub-divided into command-driven and GUI-driven ones, described in the followingsections.

Command-driven facilities

• Creation, using a number of vertices appropriate to the cell type — commandC. This is illustrated in Figure 3-48 in terms of an arbitrarily-shapedhexahedral cell.

• Trimmed cell creation — command CTRIM. This performs the same functionas command C, but for trimmed (polyhedral) cells.

• Creation via the cursor, using the graphics cursor to pick vertices on thescreen — command CDX. Note that this command can be used for creatingboth ordinary and trimmed cell shapes. CTRIM and CDX are the onlycommands capable of creating trimmed cells within the standard version ofpro-STAR.

• Generation of new sets of cells starting from an existing set — commandCGENERATE. The numbers of the constituent vertices for the new cells aredetermined by offsetting the vertex numbers of the base set (see Figure 3-47).Note that you can create the vertices for the new cells before or afterexecution of the command (but before any further plotting or manipulation ofyour model). Alternatively, vertices can be created by the command itselfusing VGENERATE or VREFLECT internally.

Figure 3-47 Cell set generation using CGENERATE

12

34

56

78

910

1112

12

34

5

67

89 10

11

1213

14 15

16

1718

1920

105

110

115

120

117118

119

116

Generated sets

Starting set

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

Page 127: Star Uguide

Chapter 3 MESH CREATION

Cells

Version 3.24 3-45

• Generation of cells by reflecting a set of vertices about a given localcoordinate axis — command CVREFLECT. This is an extension of commandVREFLECT in that the mirror-image vertices form the basis for new,automatically created cells. Cell couples (see Chapter 4, “Couple creation”)are also created automatically, if necessary.

• Modification of cell shapes by modifying one or more vertex numbers —command CMODIFY.

• Adding line cells (see “Cell shapes” on page 3-40) along the perimeter of

(a) a cross-sectional cut through the current cell set — command VSECTION(see also the description of cross-sections in Chapter 5);

(b) the intersection of the current cell set with a given shell type — commandVINTERSECT.

Line cells can also be added at the location of one or more splines, asspecified by command CSPLINE.

• Counting the currently defined cells — command COUNT. Alternatively, thisoperation can be executed by choosing Utility > Count > Cells from themenu bar.

• Listing of the vertices making up a cell face — command FLIST. Thiscommand is particularly useful when manipulating trimmed cells.

• Saving cell face definitions to a .fac file for use by other programs —command FWRITE. The information written for each face consists of cell,face and constituent vertex numbers.

For further details on the function and application of cell commands, refer to thepro-STAR Commands volume.

Cell orientation and correction

Figure 3-48 Right-handed cell definition

The manner in which cells are defined is important. The constituent vertices mustbe specified in the correct order so as to obey the right-handed rule. This is

Command: C , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8

1

2

34

5

6

78

I

J

K

Page 128: Star Uguide

MESH CREATION Chapter 3

Cells

3-46 Version 3.24

illustrated in Figure 3-48 in terms of an arbitrarily-shaped hexahedral cell. Thevertices also define a cell coordinate system, unique to each cell, whose I, J and Kdirections are also shown in that figure. The numerical scheme used to label verticesin Figure 3-43 and Figure 3-46 illustrates the correct right-hand-rule ordering ofvertices for all basic cell and baffle/shell shapes. Also shown is the face numbering,which follows the same convention.

Note that definition of the basic non-hexahedral cells, degenerate cells andtriangular baffles requires repetition of some vertex numbers, in the mannerillustrated in Figure 3-43, Figure 3-45 and Figure 3-46. The reason for this, in thecase of cells, is that all the basic cell shapes can be regarded as degeneratehexahedra formed by collapsing cell faces to lines and/or points (note that onlyfaces 4 and 2 are treated in this manner). The coincident vertices produced by thisprocess are identified by assigning them the same indices. Thus, in Figure 3-43, theprism cell is produced by collapsing face 4 to a line and, in the indexing conventionadopted, the two vertex pairs so formed are labelled (3,3) and (7,7). Otherwise, thenumbering follows the usual right-hand convention. The pyramidal cell is formedby collapsing face 2 to a point, labelled (5,5,5,5) to indicate the four coincidentvertices. The tetrahedron is constructed by a combination of the practices for theother two shapes, i.e. by reducing face 4 to a line and face 2 to a point. Theorientation of collapsed cell faces is important in the vicinity of boundaries, asdiscussed in the description of the “Import Grids” STAR GUIde panel.

Although pro-STAR can in principle handle meshes containing cells of arbitraryorientation, uniform or near-uniform alignment of the constituent cells can be veryimportant in reducing the memory and computer time requirements of the final CFDmodel. This is particularly the case for meshes that are entirely or predominantlytetrahedral. A special command, TETALIGN, is therefore provided that will reorderthe vertex numbering in such meshes in order to achieve the greatest possible degreeof uniformity in cell orientation.

If the cell orientation, as defined by the user, is not correct, there are automaticfacilities for rectifying it. These are provided within the STAR GUIde environment(“Fix Grid Problems” panel).

Cell set selection facilities

Cells need to be grouped together, thus defining a cell set, for the purposes of massmanipulation or plotting. This is done by selecting one of the list options providedby the C-> button in the main pro-STAR window. The available options are asfollows:

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

unselected cells4. Surface — selects all cells lying on the surface of the most recent plot and

makes them the current set5. New — replaces the current set with a new set of cells6. Add — adds new cells to the current set7. Unselect — removes cells from the current set8. Subset — selects a smaller group of cells from those in the current set

Page 129: Star Uguide

Chapter 3 MESH CREATION

Cells

Version 3.24 3-47

For the last four options, the required cells are collected by choosing an item froma secondary drop-down list, as follows:

• Type (Current) — select all cells whose cell type index is currentlyhighlighted in the cell table.

• Type, Group, Color, Material, Porosity, Spin — select all cells of a giventype or specific identity parameter (colour, porosity, material, spin, group).The required type or property is selected by clicking on a representative cellwith the cursor.

• Zone — use the cursor to draw a polygon around the desired cells. Completethe polygon by clicking the last corner with the right mouse button (or clickDone outside the display area to let pro-STAR do it for you). Abort theselection by clicking the Abort button.

• Attach Shell — select all shells or baffles attached to the current cell set. Thelatter may consist of fluid/solid cells to which shells or baffles have beenattached explicitly via one of the operations described on page 3-48. Note thatthe required shells may also have been created automatically by pro-STAR asa result of a GETBOUNDARY/ GETWALL operation (see page 9-7).

• Vertex Set (All) — select cells with all constituent vertices in the currentvertex set.

• Vertex Set (Any) — select cells with at least one constituent vertex in thecurrent vertex set.

• Vertex Set (Face) — select cells that have all vertices making up any of theirfaces in the current vertex set.

• Cursor Select — click on the desired cells with the cursor, complete theselection by clicking the Done button on the plot.

• Fluid, Solid, Baffle, Shell, Line, Point — select all cells of the type chosen.• Block — select all cells contained in the current block set.• Hexahedron, Prism, Pyramid, Tetrahedron — select all cells of the shape

chosen.• Trimmed Type — select either all trimmed cells (sub-option All) or only

those that correspond to the type chosen in the drop-down list.• Couples — select cells that are part of a couple (Chapter 4, “Integral and

arbitrary connectivity”). The secondary drop-down list enables all couplemembers (Both), the master cells only (Master), or the slave cells only(Slave) to be selected.

• Couple Set — select cells that are part of a couple that is included in thecurrent couple set. The secondary drop-down list enables all couple members(Both), the master cells only (Master), or the slave cells only (Slave) to beselected.

More cell set operations are available in the Cell List dialog (see “Listing” on page3-51) or by typing command CSET (see the pro-STAR Commands volume for adescription of additional selection options).

GUI-driven facilities

These are accessed via the Cell Tool, shown overleaf, which is activated bychoosing Tools > Cell Tool from the main window menu bar.

Page 130: Star Uguide

MESH CREATION Chapter 3

Cells

3-48 Version 3.24

The available facilities are:

1. Cell table operationsThese are performed by buttons Edit Types, Set Active Type and aredescribed in Chapter 6, “Cell Table”.

2. Modification, Addition, DeletionThese are performed by clicking one of the red-coloured buttons on the tool.Cell type modification is discussed in detail in “Cell indexing” on page 6-3.Regarding the other buttons:

(a) Add Shells or Add Baffles causes shells or baffles to be added to theindicated faces of selected cells. The required shell or baffle type mustalso be selected by highlighting it in the cell table list at the top of the CellTool. The face selection is performed in one of the following ways:

i) Enclosing the required cell faces within a polygon drawn on thescreen with the cursor (option Zone). The action is terminated byclicking on

– the last corner with the right mouse button to complete thepolygon;

Commands: CFIND CCROSS CDELETE CTCOMPRESSCPLOT CZONE CCOMPRESS

Page 131: Star Uguide

Chapter 3 MESH CREATION

Cells

Version 3.24 3-49

– the Done button displayed outside the display area to letpro-STAR complete the polygon;

– the Abort button to abort the selection operation.

ii) Clicking on the required cell faces with the screen cursor (optionCursor Select). The action is terminated by clicking the Donebutton displayed on the plot.

iii) Selecting all faces located on the surface of the displayed mesh.The process, illustrated by Figure 3-49, starts at surface facesconnected to a given ‘seed vertex’ and radiates outwards. The‘seed’ vertex is selected with the screen cursor. The operation thusprovides a useful alternative to picking faces with the cursor whenworking with intricate geometries that are not easy to display intheir entirety on the screen. The selection process stops at thevertices contained in a vertex set, VSET, that is chosen in one of thefollowing two ways:

– If Surface (Current Vertex Set) is selected, the currentlydefined set is used.

– If Surface (New Edge Vertex Set) is selected, pro-STARperforms operation V-> > New > Cell Set Edge automatically inorder to assemble the new set.

In the example shown below, seed vertex number 100 is used to add ashell of type 8 onto the inner surface of the mesh, where it is difficult touse options Zone or Cursor Select.

Figure 3-49 Surface cell manipulation using a ‘seed’ vertex

(b) Delete Cells causes the selected cells to be deleted. The selection isperformed using the methods described above for shell and baffle

VSET selected

Seed vertex 100

Shell created

Commands: VSET , NEWS , EDGECFIND , SHELL , 8 , 100

Page 132: Star Uguide

MESH CREATION Chapter 3

Cells

3-50 Version 3.24

addition, only this time the cursor is used to indicate cells rather than cellfaces. Note that:

i) Option Zone selects cells along the full depth of the plot and doesnot act on surface cells alone.

ii) The drop-down list provides an additional facility for deleting allcells in the currently defined cell set (option Cell Set).

More cell deletion options are also available in the Cell List dialog, see“Listing” on page 3-51.

3. Import/ExportCell definitions are imported into pro-STAR by reading them from a .celfile — click button Cell Read to display the dialog shown below. Theinformation required is:

(a) The input file name. pro-STAR’s built-in file browser may be used to helplocate it

(b) An offset to be added to vertex numbers upon input(c) The cell range, in terms of the first and last cell number to read(d) An offset to be added to cell numbers upon input(e) An offset to be added to cell type indices upon input(f) Options to either Add the input cells to the end of the current list,

disregarding cell numbers read from the file, or to use these numbers foroverwriting current cell numbers (Modify)

(g) The input file format — either Coded or Binary

The reverse operation, exporting cell definitions by writing them to a .celfile is performed by clicking button Cell Write. This displays the dialogshown below. The information required is:

(a) The output file name. An existing file may be located using pro-STAR’s

Command: CREAD

Page 133: Star Uguide

Chapter 3 MESH CREATION

Cells

Version 3.24 3-51

built-in file browser.(b) An offset to be applied to vertex numbers upon output(c) The cell range, in terms of the first and last cell number to write(d) An option to save only cells of a specified type (Cell Table Number

required)(e) The output file format — either Coded or Binary

4. ListingThis is performed by clicking the Cell List button to activate the Cell Listdialog shown below. Alternatively, select Lists > Cells from the main windowmenu. Cell definitions in terms of constituent vertices, cell type and cell tableindex are displayed in a scroll list in numerically ascending order. Note that:

(a) For trimmed cells, the eight nodes of the underlying hexahedral cell arelisted on the first line (where the cell number appears), with a zero placedin any column which corresponds to a ‘missing’ vertex. Extra lines listingthe special vertices are displayed after this line.

(b) For shells and baffles, the list displays the three-dimensional cell numberand relevant face number to which the shell or baffle is attached. Thisinformation appears in the columns where the seventh and eighth cellvertices would normally be listed.

The dialog contains option buttons that offer the following listing choices:

(a) Show All Cells(b) Show Attached Cells on Shells/Baffles.(c) Show Cset Only

Whatever the type of listing, cells included in the current set are marked byasterisks in the Cset column.

To select specific cells from the list:

(a) For single items, click the required cell on the list.(b) For two or more items in sequence, click the first cell you want to select,

Command: CWRITE

Page 134: Star Uguide

MESH CREATION Chapter 3

Cells

3-52 Version 3.24

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

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

(a) Addition to (or removal from) the current set — click the Add toSet/Remove from Set button.

(b) Deletion — click the Delete Cell button.(c) Modification of cell index — click the Change Type button. This

operation is covered in detail under “Cell indexing” on page 6-3.

Note that:

(a) Any cells that have been deleted up to this point can be reinstated,provided the Cell Compress operation has not been performed in themeantime. To reinstate all currently deleted cells, click the Undelete Cellbutton.

(b) All operations performed within the Cell List dialog have an immediateeffect on the cell definitions, reflected by immediate changes to what isdisplayed in the list. However, any subsequent cell changes made outsidethis dialog box, e.g. by issuing commands via the pro-STAR I/O window,will not be listed. To display these changes, click the Update List buttonat the top of the box.

5. CheckingClicking Cell Check opens the Check Tool where a variety of checks on thevalidity of the current cell set may be performed (see Chapter 4, “Microscopicchecking”).

Commands: CLIST CDELETE CUNDELETE CSET

Page 135: Star Uguide

Chapter 3 MESH CREATION

Multi-block Approach

Version 3.24 3-53

6. Cell number compressionThis involves the elimination of all unused cell numbers corresponding tonon-existent (e.g. deleted) cells and renumbering of the remaining cells —click button Cell Compress. Note that any existing cell couple andpost-processing data are renumbered accordingly.

7. Cell table compressionClicking button Cell Table Compress cleans up the cell table of any deletedor undefined entries (see also Chapter 6, page 6-3).

8. Cell refinementClick button Cell Refine to perform a cell refinement operation, as discussedin Chapter 4, “Mesh Refinement”.

9. PlottingThis is performed by clicking on the Cell Plot or Replot button. pro-STARplots cells in the current set in accordance with the relevant plottingparameters (see “Plot Characteristics” on page 5-3). Alternatively, select Plot> Cell Plot from the main window menu bar.

Cell numbering

Cell numbering is performed automatically as each cell is created and bears norelation to the associated cell vertex numbers. STAR-CD works in an inherentlyunstructured fashion, i.e. no particular ordering and numbering of cells is required.The only constraint imposed on the pattern of cell numbering is that the sequencemust be continuous. However, it is possible to instruct the code to renumber a givencell range by sorting the coordinates of their centroids in a specified local coordinatesystem (command CREORDER). This results in cells being numbered according totheir position in space, which may sometimes confer benefits such as ease of cellgeneration and alteration. The command is likely to be most useful for meshesimported from other CAD/CAE packages (see “Importing Data from otherSystems” on page 4-1) that may generate cell numbering in a highly irregularmanner.

Command RESTRUCTUREwill also achieve the same effect as it will optionallyrenumber cells as well as their constituent vertices. However, the command canonly be applied to a set of cells already possessing a reasonable spatial structure.

Multi-block Approach

This approach relies on separating the overall geometry of the model from its mesh,with the latter being generated automatically for individual blocks. Users aretherefore advised to take full advantage of these capabilities, especially in caseswhere the flow domain shape is

• relatively simple to define, or• can be readily divided into several constituent blocks.

There are two ways of employing block meshing:

1. The mesh block generation method (mesh block in a pre-defined coordinate

Page 136: Star Uguide

MESH CREATION Chapter 3

Multi-block Approach

3-54 Version 3.24

system).2. The multi-block generation method (mesh blocks forming complex volumes).

Their principal characteristics, advantages and disadvantages are as follows:

Mesh block generation

• The method is implemented as two separate panels in the STAR-GUIdesystem. The first generates three-dimensional meshes directly (see “Create3-D Grids using Simple Shapes”). The second generates two-dimensionalmeshes consisting of shell or baffle cells and optionally expands them in thethird direction to create a single-layer, 3-D mesh (see “Create 2-D Grids usingSimple Shapes”).

• Its application is limited to standard coordinate systems, as shown in Figure3-51.

• It is one of the fastest modes of mesh generation.• As a consequence of the above, it is well-suited to testing and familiarisation

with STAR-CD facilities.• It can also be used to build up more complex models by changes to the origin

location, coordinate axis orientation and type of coordinate system employed(see Figure 3-50).

Figure 3-50 Local coordinate system usage

Co-ord C

Co-ord B

Co-ord A

Page 137: Star Uguide

Chapter 3 MESH CREATION

Multi-block Approach

Version 3.24 3-55

Figure 3-51 Coordinate systems used with command VC3DGEN

Cylindrical

Cartesian Spherical

Toroidal

Page 138: Star Uguide

MESH CREATION Chapter 3

Multi-block Approach

3-56 Version 3.24

Multi-block generation

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

Figure 3-52 Block representation of model geometry

The main features of the block generation process are as follows:

• The model geometry and its associated mesh distribution definition are storedindependently of each other.

• Mesh generation for individual blocks is performed separately from the aboveoperations. The meshing process may also be applied repeatedly on the sameblock to implement successive meshing alternatives.

• In multi-block models, the number and distribution of cells (i.e. the meshspacing) for each block may be defined separately. Alternatively, the spacingin a given direction can be defined for one block to start with and thenreplicated for a group of blocks. This requires the prior creation of a block set(see “Block set selection facilities” below) to collect the required blockstogether.

• The block-meshing technique can utilise imported geometric data such asvertex coordinates and splines.

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

(a) Single block (b) Multi-block

Page 139: Star Uguide

Chapter 3 MESH CREATION

Multi-block Approach

Version 3.24 3-57

Command-driven facilities

1. Generation of a single block — command BLK2. Generation of additional blocks by

(a) applying an offset to the vertices of an existing set — commandBLKGENERATE

(b) creating blocks for each cell in a specified range — command BLKCELL.

3. Counting the currently defined blocks — command COUNT. Alternatively,this operation can be executed by choosing Utility > Count > Blocks fromthe menu bar.

Block set selection facilities

Blocks may be grouped together, thus defining a block set, for manipulation orplotting purposes. This is done by selecting one of the list options provided by theBk-> button in the main pro-STAR window. The available options are as follows:

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

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

For the last four options, the required blocks are collected by choosing an item froma secondary drop-down list, as follows:

• Cursor Select — click on the desired blocks with the cursor, complete theselection by clicking the Done button on the plot window.

• Zone — use the cursor to draw a polygon around the desired blocks.Complete the polygon by clicking the last corner with the right mouse button(or click Done outside the display area to let pro-STAR do it for you). Abortthe selection by clicking the Abort button.

• Vertex Set (Any) — the selected blocks must have at least one constituentvertex in the current vertex set.

• Vertex Set (All) — all constituent vertices of the selected blocks must be inthe current vertex set.

More block set operations are available in the Block List dialog (see “Listing andfurther manipulation” on page 3-58) or by typing command BLKSET (see thepro-STAR Commands volume for a description of additional selection options).

GUI-driven facilities

These are included in the Block Tool, shown below, which is accessed by choosingTools > Block Tool from the main window menu bar.

Page 140: Star Uguide

MESH CREATION Chapter 3

Multi-block Approach

3-58 Version 3.24

The available functions are:

1. DeletionThis is performed by clicking one of the red-coloured buttons on the tool to

(a) delete all blocks (Delete All Blocks), or(b) delete only those collected in the current block set (Delete Block Set).

Further block deletion options are also available via the Block List dialog box,see “Listing and further manipulation” below.

2. PlottingThis is performed by clicking the Block Plot or Replot button. pro-STARplots blocks in the current set in accordance with the relevant plottingparameters (see “Plot Characteristics” on page 5-3). Alternatively, select Plot> Block Plot from the main window menu bar.

3. Listing and further manipulationThis is performed by clicking the Block List button to activate the Block Listdialog shown below. Alternatively, select Lists > Blocks from the main menubar. Block definitions in terms of block numbers and constituent vertices aredisplayed in the scroll list in the upper half of the box. There is also a choiceof listing all blocks or just the current set (marked by asterisks in the Setcolumn). The choice is made simply by clicking either the Show All Blocksor the Show Block Set Only option button, respectively.

To select blocks from the list:

(a) For single items, click the required block on the list.(b) For a group of two or more contiguous items, click the first block you

want to select, press and hold down the Shift key, and then click the lastblock in the group.

Commands: BLKDELETE BLKPLOT

Page 141: Star Uguide

Chapter 3 MESH CREATION

Multi-block Approach

Version 3.24 3-59

Once the desired blocks are selected, the following operations are possible:

(a) Addition to (or removal from) the current set — click the Add toSet/Remove from Set button.

(b) Deletion — click the Delete Blocks button.(c) Modification of a block’s shape by re-defining its constituent corner

vertices — type the new vertex number(s) in the appropriate text boxunderneath the list, then click the Modify Block button.

(d) Specification (or re-specification) of a block’s mesh size and distribution.The following parameters can be typed in the appropriate text boxes:

i) Cell index to assign to all cells in the block (see “Cell Table” onpage 6-1 for a definition of cell indices).

ii) Starting vertex and cell numbers — use a non-zero number only tooverride the system defaults.

iii) Number of cells in each coordinate direction.iv) Vertex increments and mesh spacing factors in each coordinate

direction.

These parameters are translated into block fill factors by clicking the DefineFactors button. The actual cells and vertices are generated in a separateoperation, by clicking the Create Cells and Vertices button.

4. Projection (mapping) of one or more block faces onto pre-defined shells. Theblock volume expands or contracts to accommodate the face movement. Theshell number corresponding to the face that is to be mapped (in the sequence 1to 6) should be typed in the appropriate text box at the bottom of the dialog

Commands: BLKLIST BLKDELETE BLKMODIFY BLKSETBLKFACTORS BLKEXECUTE BLKWALL

Page 142: Star Uguide

MESH CREATION Chapter 3

Multi-block Meshing Using STAR-GUIde Panels

3-60 Version 3.24

box.

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

At the interface between two adjacent blocks whose meshes match each otherstructurally, there will be multiple vertices occupying an identical position in space.To ensure mesh continuity, it is important to merge such vertices with commandVMERGE before proceeding further.

Multi-block Meshing Using STAR-GUIde Panels

pro-STAR provides a special panel, called Create Grids with Blocks (FittedShapes), for the purpose of mesh generation through the STAR-GUIde system. Thephilosophy behind this panel is based on multi-block mesh generation and relies onbasic descriptions of the target model geometry being available in one form oranother. The order in which all panel operations work is as follows:

• Specify the operation you want to perform• Select all items involved in the operation• Execute the operation

The minimum geometric information needed is the position of the vertices locatedon the corners of the target block(s). For complex shapes, detailed surface data inthe form of shells and splines would also be provided.

The steps involved in creating a multi-block mesh are as follows:

Stage 1: Subdivide the model geometry into blocksStep 1

Define the edges of the blocks by fitting appropriate splines. If the block edges arestraight lines, the position of corner points should be sufficient.

Step 2

Create the blocks by specifying the eight corner points. Make sure that the verticesmarking the block corners lie on the splines forming the edges.

Step 3

If the block faces are to be mapped onto another surface, select the shells definingthese surfaces and associate them with the appropriate block faces.

By this stage, all geometric details of the model will have been captured as one ormore pro-STAR block definitions.

Stage 2: Identify and store all mesh-related parameters for the blockStep 1

Specify the number of cells in the local I, J, K directions for each block,remembering that individual blocks can only be meshed in a structured way.

Page 143: Star Uguide

Chapter 3 MESH CREATION

Multi-block Meshing Using STAR-GUIde Panels

Version 3.24 3-61

Step 2

Define the mesh distribution for each of the three local block directions.

Stage 3: Create the mesh using data specified during Stages 1 and 2

The three stages outlined above and their associated steps are accessible through theCreating Grids with Blocks panel and its three tabs. Before attempting to use thepanel, you should make sure that you have at least a set of vertices or surface shellsfrom which the required entities (such as splines and block corner points) can bedefined. The set of shells determining the model’s surface geometry may be eithercreated internally using pro-STAR or imported from external CAD packages usingthe “Import CAD/Surface Information” STAR GUIde panel.

Using the panel

This section gives further details of the steps above in terms of actually using theCreating Grids with Blocks panel. It is assumed that you are familiar with selecting,displaying and manipulating various entities such as vertices, splines, shells, cells,etc.

The geometry of the example model given in this section is represented bysurface shells (see Figure 3-53). The manner of subdivision of this geometry intoblocks is up to you. In this case, it was decided to use three blocks (see Figure 3-54).

Stage 1Step 1

In order to fit splines to the edges of the constituent blocks, you need to selectvertices for these splines. The vertex selection is accomplished as follows:

• Select the Splines tab• Choose option Vertex of Cell from the Select Items button group• Select the manner of picking items from the graphics window via the Locate

Items pop-up menu; in this case the choice can be closest to cursor• Click the Create Spline button• Move the cursor to the graphics window and mark the appropriate vertices

using the left mouse button (see Figure 3-55). A list of these vertices shouldappear in the Located or Selected Items scroll list. To remove one or more ofthem from the selection, mark the list item(s) with the cursor and remove itwith the Clear List Item button.

• When satisfied with the vertex selection, click the Done button to create anddisplay the current spline (see Figure 3-56)

This process is repeated for all splines that will eventually form the block edges.Figure 3-57 shows the 24 splines that will be used to define the blocks whichconstitute the two arms of the model.

Step 2

Display the splines using the spline selection facilities provided in the mainpro-STAR window so as to confirm that the correct vertices have been chosen tomark the spline end-points. This is particularly important since these vertices alsomark the block corners. To create a block:

Page 144: Star Uguide

MESH CREATION Chapter 3

Multi-block Meshing Using STAR-GUIde Panels

3-62 Version 3.24

• Select the Blocks tab• Click the Create Block button• Choose option Vertex of Spline from the Select Items button group• Use the cursor to mark the appropriate vertices at the eight corners of each

block (see Figure 3-58). A list of these vertices should appear in the Locatedor Selected Items scroll list.

• When satisfied with the vertex selection, click the Done button to create anddisplay the current block.

This process should be repeated for all blocks in the model.

Step 3

To ensure that the block surfaces coincide with the shell surfaces defining the modelgeometry, it is sometimes necessary to map the block faces onto the shell surfaces.This is particularly important in this example, as the various blocks will be joinedtogether along faces that need to be perfectly coincident (to avoid problems witharbitrary cell matching in the final mesh, see “Couple creation” on page 4-11). Tomap a block face to a shell surface:

• Select the Mesh tab• Click the Map Face to Shells button. Note that option Block Face in the

Select Items group is automatically selected.• Mark the target block face with the cursor. Note that to pick the face furthest

away from you, it is necessary to choose option furthest from you in theLocate Items pop-up.

• Choose option Cell Type ID from the Select Items group• Mark the target shell surface with the cursor• When satisfied with your selections, click the Done button to perform the

mapping (see Figure 3-59)

This process must be repeated for all block faces that may participate in interfaceswith arbitrary connectivity, or for any other block-face surface whose shape is notsufficiently well defined by the block-edge splines alone.

By this stage, the full geometry of the model will have been stored in threepro-STAR block definitions. The next stage is to specify the mesh spacing alongeach individual block edge.

Stage 2Step 1

Select and display one of the blocks on the screen using the block selection facilitiesprovided in the main pro-STAR window. Given the structural nature of the mesh,only three edges need to be marked for each block. Specify the number of cellsalong each edge as follows:

• In the Mesh tab, click the Number of Cells button• Note that option Block Edge in the Select Items group is automatically

selected. Mark the edge in question with the cursor.• Enter the number of cells along that edge (also called the ‘meshing number’)

in the Numeric Parameter text box• Match the edge with its corresponding meshing number by clicking the Done

Page 145: Star Uguide

Chapter 3 MESH CREATION

Multi-block Meshing Using STAR-GUIde Panels

Version 3.24 3-63

button.

This process needs to be repeated for the remaining blocks.Alternatively, you may first select all edges, irrespective of block, that share the

same number of cells in a given direction; they will be displayed in the Located orSelected Items scroll list. Typing the meshing number and clicking Done will thenassign that number to all of them (see Figure 3-60).

Step 2

If non-uniform mesh spacing is required for any of the blocks:

• In the Mesh tab, click the Space Factor button• Select the appropriate edge as described in Step 1 above• Enter the required spacing factor in the Numeric Parameter box• Match the edge with the spacing factor by clicking Done

By this stage, all geometry and mesh-related parameters will have been stored (seeFigure 3-61). The next and final stage consists of generating the calculation mesh.

Stage 3Step 1

To choose the cell type for the cells to be created:

• In the Mesh tab, click the Cell ID button. This displays automatically the CellTable Editor and the currently defined blocks

• Make your choice of cell type by highlight it in the editor’s scroll list andclicking Apply

• Close the Cell Table Editor• Note that option Block in the Select Items group is automatically selected and

that the cursor is active in the main window• Select the block(s) to be meshed using the cursor. The block will be displayed

in the Located or Selected Items scroll list• Click the Done button to assign the chosen cell type to the selected blocks

This process should be repeated for all blocks.

Step 2

To create the mesh:

• Put all the blocks in a set by choosing Bk > All in the main window• Click the Generate Mesh button. This will automatically select the

appropriate cell type for each block and will produce a mesh matching thegeometric and parametric values specified in Stages 1 and 2. The resultingmesh for all three blocks is shown in Figure 3-62.

Other panel functions

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

Page 146: Star Uguide

MESH CREATION Chapter 3

Multi-block Meshing Using STAR-GUIde Panels

3-64 Version 3.24

Splines tab

• Once created, splines may be modified in a number of ways, includinginserting additional vertices in them (Modify Spline), splitting a spline intotwo (Split Spline), joining two splines together (Join Spline) and finallydeleting splines (Delete Spline).

• Splines can be chased across surfaces or through meshes. These functionsrequire that the current cell set consists of shells. Chase Spline creates aspline with control points on the shell surface whilst Mesh Chase Splinekeeps the control points on existing cell vertices. These functions areequivalent to command SPL,CHASE.

• Move Vertex allows a vertex (the first in the list) to be moved to a newlocation or on top of an existing vertex (the second in the list).

Blocks tab

• When using the Modify Block button, option Block Vertices in the SelectItems group is selected automatically. In this way, clicking on a block loads itseight defining vertices into the Located items list. They can then be selectedand new vertices substituted in their place to change the block definition.

• The Block Plot button plots all blocks in the current set• Using the Delete Block button automatically selects the Block option in the

Select Items group. In this way, the block(s) to be deleted can be picked on thescreen with the cursor.

Mesh tab

• Where blocks share common faces, the block factors from one block can betraced onto adjacent blocks using the Block Trace button. The mesh factorsare traced through the current block set. This is equivalent to commandBLKTRACE.

• Generate Factors is a composite operation combining the functionality ofthe Number of Cells and Block Trace buttons. The meshing numberappropriate to the selected edge(s) is calculated by pro-STAR by dividing theedge length by the nominal cell size along that edge, typed in the NumericParameter box. All meshing numbers thus calculated are propagated throughthe current block set.

• The mesh factors (i.e. number of cells and face mapping) for a block can beset back to the default values with the Reset Factors button

• All cells in a given block can be deleted using the Delete Block Cells button

Page 147: Star Uguide

Chapter 3 MESH CREATION

Multi-block Meshing Using STAR-GUIde Panels

Version 3.24 3-65

Figure 3-53 Surface shells from CAD package

Figure 3-54 Blocking strategy

Page 148: Star Uguide

MESH CREATION Chapter 3

Multi-block Meshing Using STAR-GUIde Panels

3-66 Version 3.24

Figure 3-55 Vertices picked for spline

Figure 3-56 Spline created

Page 149: Star Uguide

Chapter 3 MESH CREATION

Multi-block Meshing Using STAR-GUIde Panels

Version 3.24 3-67

Figure 3-57 Splines defining block edges

Figure 3-58 Selecting corner vertices

Page 150: Star Uguide

MESH CREATION Chapter 3

Multi-block Meshing Using STAR-GUIde Panels

3-68 Version 3.24

Figure 3-59 Mapping block faces to shells

Figure 3-60 Defining block factors

Page 151: Star Uguide

Chapter 3 MESH CREATION

Multi-block Meshing Using STAR-GUIde Panels

Version 3.24 3-69

Figure 3-61 Block structure

Figure 3-62 Resultant mesh

Page 152: Star Uguide
Page 153: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Importing Data from other Systems

Version 3.24 4-1

Chapter 4 OTHER MESH OPERATIONSIn Chapter 3 the basics of creating a mesh were presented. This chapter rounds offthe description of mesh-related operations by introducing some additionalpro-STAR functions concerned with

• mesh and geometry data importing from external CAD/CAE systems• connecting together separately-created mesh blocks• checking the mesh for ill-shaped or inappropriately defined cells• improving the quality of the mesh

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

Importing Data from other Systems

This feature has been designed as a means of communication with other CAD/CAEpackages. Its main functions are:

• To facilitate the integration of STAR-CD into an existing CAD/CAEenvironment where other packages are in use.

• To provide interfaces with widely-used packages. Those presently catered forare:

ICEM CFD™IDEAS™ANSYS™PATRAN™NASTRAN™PLOT3D™CGNS

• To provide the means of importing both geometric and mesh data intopro-STAR. Geometry importing operations are available for the followingtypes of data:

IGESVDASTL (stereolithographic)

Mesh data are imported using the “Import Grids” STAR GUIde panel. Surface dataare imported using the “Import CAD/Surface Information” panel. There are alsothree command-driven utilities for reading mesh and geometry information fromthe following data visualisation systems:

Ensight™Gambit™TGRID™

The commands for reading such data are ENSIGHT, GAMBIT and TGRID,respectively, and are described fully in the Commands volume.

Where mesh data are involved, the imported entities are vertices (nodes), cells(elements) and, sometimes, boundary definitions. The imported mesh can be used

Page 154: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Data exporting

4-2 Version 3.24

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

Data exporting

pro-STAR also provides facilities for exporting data to other CAD/CAE orvisualisation systems. Those presently catered for are:

ANSYS™PATRAN™NASTRAN™IDEAS™Ensight™Fieldview™CGNSTecplot™ICEM CFD™

Mesh data are exported using the “Export Grids” STAR GUIde panel.Post-processing data from a STAR analysis are exported using the “ExportResults”panel. Command VRML is also available for writing a virtual reality(.vrml) file containing a specified range of shells already defined in your model.If vertex post-processing data exist in post register 4, they are written out for use incontouring; otherwise, only geometry data are written.

For systems where no specific pro-STAR link is provided, it is still possible toexport data, by selecting either option Generic in the “Export Results”panel orTools > Convert > Generic from the main menu. This displays the Generic dialogshown below:

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

Mesh Structure

The STAR-CD code places very little restriction on the structure of meshes that aresuitable for thermofluid simulations. This flexibility is achieved through:

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

Command: GENERIC

Page 155: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Mesh Structure

Version 3.24 4-3

• the unstructured character of the mesh;• the ability to cope with mesh discontinuities across common interfaces

(i.e. arbitrary interfaces and embedded mesh interfaces, discussed in thissection).

A combination of the above features allows the most appropriate mesh structure,cell distribution and cell type to be used in a particular problem, to suit both flowconditions and the solution domain geometry.

For arbitrary interfaces, the time and effort needed to mesh complex geometriesis greatly reduced, thanks to the lack of restriction on mesh structure andconnectivity on common faces of adjacent mesh blocks. This is illustrated in Figure4-1, showing several mesh blocks of dissimilar and non-conformant mesh structurebeing joined together via arbitrary interfaces.

Figure 4-1 Mesh blocks joined by arbitrary interfaces

Furthermore, embedded meshing allows selective local refinement of the mesh inareas judged by the user to require higher computational resolution, due to thenature of the flow.

The mesh connectivities allowed in STAR-CD can be classified under threeheadings:

1. Regular connectivity — arises from a one-to-one correspondence betweenadjacent faces of neighbouring cells (see Figure 4-2(a)).

2. Integral connectivity — arises at the interface between a finely-spaced meshand a coarser mesh, often as a result of embedded mesh refinement. Theinterface is defined in such a way that an integral number of small cell facesconnect to one large face (see Figure 4-2(b)).

Page 156: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Mesh Structure

4-4 Version 3.24

3. Arbitrary connectivity — arises at the interface between two mesh regionsthat possess non-matching cell spacing and cell face shape (see Figure4-2(c)).

Each of the above cases is described below.

Figure 4-2 Two-dimensional examples of mesh connectivities

Regular connectivity

This is the most common connectivity and arises naturally as a result of the meshbuilding operations described in Chapter 3. If the mesh is generated using extrusionor cell-layer methods (see “Meshing techniques” on page 3-3), no special action isrequired to establish the connectivity between adjacent cells.

If the mesh is generated using a multi-block method, blocks are not automaticallyconnected to each other. An example of such a case is shown in Figure 4-3(a) wherethe mesh was generated as three separate blocks, resulting in the discontinuitiesindicated in Figure 4-3(b). Such discontinuities need to be removed by mergingcoincident vertices at the interfaces between adjacent blocks (see “Merging” onpage 3-25).

Note that the above considerations also apply if a mesh is imported from anexternal system and then joined on to an internally-generated mesh, assuming ofcourse that there is a one-to-one correspondence between cell faces in the adjacentcell blocks.

(a) Regular

(c) Arbitrary

(b) Integral

Page 157: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Mesh Structure

Version 3.24 4-5

Figure 4-3 Three-block mesh and inter-block discontinuities

Integral and arbitrary connectivity

This is typically encountered at the interface between blocks of differing meshdensity, as shown in the examples of Figure 4-4 (for integral connectivity) andFigure 4-5 (for arbitrary connectivity). Models with this kind of connectivity exhibitthe following characteristics:

• The meshes on either side of the interface are created independently and thenexplicitly joined together in a separate matching operation.

• Cell faces on one side of the interface are distinguished from those on theother by designating the former as ‘master’ and the latter as ‘slave’ faces. Formaximum computational efficiency, the side with the larger faces (and hencecoarser grid spacing) should be designated as the master side.

• The placement of the blocks may be such that each master cell face isconnected to a number of complete slave faces, as in Figure 4-4, or to parts ofseveral slave faces, as in Figure 4-5. The number of such faces to which asingle master face can be connected is arbitrary, but user-controlled.

• The matching (or joining) operation mentioned above creates specialgroupings of cells, called couples. Each couple consists of a master cell onone side of the interface plus its associated slave cells on the other side.

(a) Overall mesh (b) Inter-block discontinuities

Page 158: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Mesh Structure

4-6 Version 3.24

Figure 4-4 Illustration of integral mesh connectivity

Figure 4-5 Illustration of arbitrary mesh connectivity

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

Partialboundary

Page 159: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Mesh Structure

Version 3.24 4-7

Figure 4-6 Non-conformant master and slave faces

Note that in adjoining-block cases, the mesh connectivity is established solely bythe matching operation. Merging of vertices should therefore not be attempted, evenif some vertices in one block coincide with others in the neighbouring block. Themesh connectivity is established solely by the matching operation mentioned above(see also “Couple creation” on page 4-11).

Embedded mesh refinement

As discussed in “Mesh distribution and density” on page 1-7, there is often arequirement for improved numerical accuracy over a given region of the solutiondomain. This requirement can be met by creating a finely-spaced mesh within oradjoining a coarser outer mesh and directly connected to it. Creating a fine mesh byinternal subdivision of a coarser mesh is called embedded mesh refinement, anexample of which is shown in Figure 4-7. The figure also illustrates the fact thatmultiple levels of refinement are possible (see “Other couple functions” on page4-22).

Because of the way they are created, embedded meshes fall naturally within theintegral connectivity category. Therefore, an explicit coupling operation is neededto connect the refined portion to the rest of the mesh. However, there is now no needto define master and slave faces and the coupling can be done automatically, asdescribed on page 4-24. Note that merging of coincident vertices at the coarse/finemesh interface is optional; the code does not rely on vertex merging to establishmesh connectivity.

Page 160: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Cell Couples

4-8 Version 3.24

Figure 4-7 Illustration of embedded meshing

Cell Couples

The Couple Tool

Most GUI facilities relating to couples are performed using pro-STAR’s CoupleTool. This is accessed by selecting Tools > Couple Tool from the main windowmenu and displaying the dialog shown below. The tool then acts as the starting pointfor subsequent operations.

Page 161: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Cell Couples

Version 3.24 4-9

Couple properties

Couples may be grouped together on the basis of common properties. The latter arespecified in terms of couple identity parameters, a concept entirely analogous tothat for cells (see “Cell properties” on page 3-38).

The couple tableAs with cells, the couple identity parameters need to be tabulated into couple tables.A couple table can be defined using pro-STAR’s Couple Table Editor, shown belowand accessed from the Couple Tool by clicking Edit Types.

Commands: CPTYPE CPDISPLAY CPDELETECPMODIFY CPMERGE CPCOMPRESS

Page 162: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Cell Couples

4-10 Version 3.24

A selected set of couples can be indexed and differentiated in various ways with theaid of an entry in the couple table. The latter enables the user to specify thefollowing parameters:

• Couple Index• Group Number — identifies an ‘object’ (shell surface, cell range, etc.) within

the mesh that is associated with this kind of couple in some way• Master Color — determines the display colour of master cell faces• Slave Color — determines the display colour of slave cell faces• Overlap Color — determines the display colour of areas where master and

slave faces overlap• Partial Boundaries — switch determining whether partial boundaries are

allowed for the current couple type• Tolerance — partial boundary tolerance value (see below)• Name — an identifying name for the current couple type

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

1. All entries in the table are identified by an index, displayed under the Table #heading in the editor’s scroll list. A new entry is set up by selecting the nextavailable number in the list and then specifying the couple properties.

2. Every couple in the model is associated with a couple table index.3. One may use multiple couple types to differentiate between couples created in

different parts of the mesh or that have different properties. A key propertyrelates to Partial Boundaries and is selected by the editor’s Off / On buttons.These control the calculation and display of the exposed portions of partialboundaries, i.e. cell faces that are partly within the solution domain and partlyexposed to the outside world (see the example of Figure 4-5 on page 4-6). Ifoption Off is selected, partial boundaries are treated as ordinary boundaries,i.e. the exposed areas are not displayed, calculated or stored and the entire cellface area is considered to be a boundary. If option On is selected:

Commands: CPTABLE CPTMODIFY CPTLIST CPTNAME CPTDELETE

Page 163: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Cell Couples

Version 3.24 4-11

(a) Exposed areas are calculated and stored in the problem geometry(.geom) file

(b) Boundary displays show partial boundaries correctly (see the discussionon couple displays on page 4-20)

(c) pro-STAR uses a user-specified fractional tolerance (typed in theTolerance box) to determine whether differences in face area betweenarbitrarily-matched couples should give rise to partial boundary creationat the appropriate locations. Fractional differences less that the giventolerance are ignored and the relevant boundaries are treated as ordinaryboundaries. Note that setting the tolerance to 1.0 is equivalent to disablingthe partial boundary capability for that type of couple.

4. Another possibility for classifying couples is to index them on the basis of acommon group number, typed in the Group Number text box. This groupstogether all couples belonging to a particular ‘object’, e.g. a distinct portion ofthe mesh.

5. The various kinds of couple created may be distinguished visually from eachother by the colour index specified for master faces (Master Color), slavefaces (Slave Color) and areas of overlap between master and slave faces(Overlap Color); see also the couple display options discussion on page 4-20.

6. Colour selection is facilitated by clicking the multi-coloured buttons next tothe Master, Slave and Overlap Color boxes. These open a Color Palette panelwhere the desired colour is selected by simply clicking the appropriate square.The corresponding colour number is then automatically entered into the box.

A couple table definition is confirmed by clicking the Apply button.Couple table entries may be displayed at any stage of the pro-STAR session, by

opening the Couple Tool and inspecting the contents of the Couple Table scroll list.Any couple table setting may be changed to a different value simply by clickingEdit Types and then making the required changes within the Couple Table Editor.

Couple table entries may also be deleted by clicking the Delete button. Note thatall couples indexed to this entry must be deleted or changed to a different indexbefore the table entry itself can be deleted.

Couple indexingCouples are assigned an identity (couple table index) in one of the following ways:

1. Implicitly, by taking on the index that is active at the moment of theircreation. The active couple type can be changed at any time, by selecting thetype required in the Couple Tool’s scroll list and then clicking Set ActiveType. The selection is confirmed on the list by a letter A against the activetype.

2. Specifying an identity explicitly (see “Couple creation” below)3. Collecting a set of couples (as described under “Couple set selection

facilities”) and then changing their identity to the currently-active type. Thisis done by selecting Modify Type > Cpset in the Couple Tool

Couple creation

The coupling operation needed to join cell faces on each side of an interfacebetween cell blocks is initiated by clicking Create Couples on the Couple Tool.

Page 164: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Cell Couples

4-12 Version 3.24

This opens the Create Couples dialog shown below:

The panel’s operation depends on the method of selecting the cells that should becoupled together. The choice is made through one of the options in the Choose Cellsmenu, as follows:

1. Cursor Select — define a single couple, in terms of the master cell and itscorresponding slave cells:

(a) Specify the type of couple to be created by entering a couple table indexin the box provided (see “Couple indexing” above). The currently activecouple type is used as default. Alternatively, click Edit Types to enter theCouple Table Editor and then define and use a couple of the desired type.

(b) Click Apply(c) Use the cursor to pick a master cell from the mesh displayed on the main

pro-STAR window, followed by up to 17 slave cells.

Note that using the command form of this operation (CP) allows the additionof slave cells to an existing couple definition, as well as enabling you to createa new couple.

2. Cell Range — create multiple couples over a specified cell range. Therequired input is:

(a) The type of couples to be created, as indicated in the Couple Type box(see “Couple indexing” above). The currently active couple type is usedas default. Alternatively, click Edit Types to enter the Couple TableEditor and then define and use a couple of the desired type.

(b) The range of cells that are candidates for coupling, in terms of the startingand finishing cell numbers and a cell number increment between the endpoints of the range.

Click Apply to confirm your settings and start off the coupling process.

Commands: CPCREATE CP CPTYPE

Page 165: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Cell Couples

Version 3.24 4-13

3. Cell Set — create multiple couples over a part of the mesh occupied by aspecified cell set or subset. The required input is as follows:

(a) Choose an option from the Master/Slave menu to indicate how the masterand slave cells are to be selected:

i) Search Entire Cell Set — this is equivalent to the Cell Rangeoption described above, except that the entire cell set is considered

ii) Choose Cell Types — assumes that all master cells are of acommon type and all slave cells of a common (but different) type.The type corresponding to each category is indicated by

– using the screen cursor to select a representative member on themesh plot (Cursor Select)

– entering the appropriate cell table index in the box provided(Specify). Note that all indices must refer to either fluid or solidcells.

iii) Choose Cell Groups — similar to the previous option, only thistime the distinguishing feature is the group number (see page 6-2)

iv) Choose Attached Shell Types — this assumes that separately-indexed shells covering the slave and master faces have alreadybeen created using one of the shell addition options described onpage 3-48. If the shells in question have not been created inpro-STAR but have been imported from external sources, it isimportant to associate them first with their adjacent fluid cells. Theassociation operation may be performed using command CSHELL.

(b) Specify the type of couples to be created in the Couple Type box (see“Couple indexing” above). The currently active couple type is used asdefault. Alternatively, click Edit Types to enter the Couple Table Editorand then define and use a couple of the desired type.

Couple tolerancesFor all operations described above, pro-STAR determines the validity of potentialcouples using three user-definable tolerance values. These may be specified inadvance via the Global Couple Tolerance dialog shown below. The dialog isaccessed from the Couple Tool by clicking Couple Tolerance.

The tolerance values appearing in the dialog are used by the code when checking

Command: CPTOLERANCE

Page 166: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Cell Couples

4-14 Version 3.24

whether:

• Slave face vertices fall within the bounds of the master face (Vertex FaceTolerance box), as shown in Figure 4-8.

Figure 4-8 Illustration of vertex tolerance checking

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

The user may type alternative values for any of the tolerances or restore a previouslyaltered value by clicking its Default button. The current choice is confirmed byclicking Apply.

Couple set selection facilities

Once the desired couples have been created, they may need to be grouped togetherfor the purposes of mass manipulation or plotting. This is done by selecting one ofthe list options under the Cp-> button in the main pro-STAR window, thus defininga couple set. The available options are:

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

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

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

1. Partial Boundaries On — select all couples whose partial boundary switchhas been turned on

2. Partial Boundaries Off — select all couples whose partial boundary switchhas been turned off

3. Cell Set — select couples based on the current cell set. If this option ischosen, the target couples are assembled by choosing a condition from atertiary drop-down list as follows:

(a) Any — at least one couple member (master or slave cell) included in thecurrent cell set

Cells 1 and 2 (slaves)

Cell 3 (master)

1

2

Page 167: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Cell Couples

Version 3.24 4-15

(b) All — all members are in the current cell set(c) None — no members are in the current cell set(d) Master — the master cell is in the current cell set(e) No Master — the master cell is not in the current cell set(f) Any Slave — at least one slave cell is in the current cell set(g) All Slaves — all slave cells are in the current cell set(h) No Slaves — no slave cells are in the current cell set

More couple set operations are available in the Couple List dialog box (see“Listing” on page 4-17) or by typing command CPSET (see the pro-STARCommands volume for a description of additional selection options).

Couple manipulation

In addition to the functions described under “Couple creation”, the followingadditional couple operations are available in the Couple Tool:

1. DeletionSelect Delete Couples > Cpset to delete all couples in the current set. Thisoperation may be reversed using command RECOVER.

2. ImportingCouple definitions may be imported into pro-STAR by reading them from a.cpl file — click Couple Read to display the dialog shown below:

The information required is:

(a) File Name — enter the input couple file name in the box provided or usepro-STAR’s built-in browser to locate an existing file

Command: CPREAD

Page 168: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Cell Couples

4-16 Version 3.24

(b) Couples To Read — select one of

i) All — all stored couplesii) Range — enter the desired couple range, in terms of the first and

last couple number to read

(c) Cell Number Offset — an offset to be added to cell numbers upon input(d) Couple Option — select one of

i) Add — add the input couples to the end of the current list,disregarding couple numbers read from the file

ii) Modify — use the stored numbers to overwrite current couplenumbers and add an optional Couple Number Offset to them

(e) File Format — the input file format, either Coded or Binary(f) Read Couple Type — whether to read the couple type number from the

file, either No or Yes. In the latter case, you may also add an optionalCouple Type Number Offset to these numbers upon input.

Note that there is no automatic check that the cells of a couple overlap or thatthe couples read in are unique. It is therefore important to use the merging andvalidation operations described further down in this section to check that theimported couples are correct.

3. ExportingCouple definitions may be exported by writing them to a .cpl file — clickCouple Write to display the dialog shown below:

The information required is:

(a) File Name — enter the output couple file name in the box provided or usepro-STAR’s built-in browser to locate an existing file

(b) Minimum/Maximum Couple Number — enter the couple rangeconcerned, in terms of the first and last couple number to write. Keywordall will write all currently defined couples

(c) Couple Number Offset — an offset to be added to couple numbers upon

Command: CPWRITE

Page 169: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Cell Couples

Version 3.24 4-17

output(d) Cell Number Offset — an offset to be added to cell numbers upon output(e) File Format — the output file format, either Coded or Binary

4. ListingCouple information is displayed by clicking Couple List which activates theCouple List dialog shown below. Alternatively, select Lists > Couples fromthe main window menu bar.

Couple definitions are shown as two separate scroll lists, one for the masterand one for the slave cells. The MASTER list contains:

(a) The couple number, in numerically ascending order. There is a choice ofshowing:

i) Couples in the current couple set — click Show Cpset Only. Itemsin this category are marked by asterisks in the Cpset column.

ii) Couples with at least one member (master or slave cell) included inthe current cell set — click Show Couples with Cells in Cset Only

iii) All couples — click Show All Couples

(b) The couple type index(c) The number of slave cells in the couple(d) The master cell number. Any master cells included in the current cell set

Command: CPLIST CPSET CSET CPDELETE CPMODIFY

Page 170: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Cell Couples

4-18 Version 3.24

are marked by asterisks in the Cset column(e) The master cell face number participating in the couple

The SLAVE list contains:

(a) The slave number, in numerically ascending order. Any slave cellsincluded in the current cell set are marked by asterisks in the Csetcolumn.

(b) The slave cell number(c) The slave cell face number participating in the couple

To select couples from the list:

(a) For single items, click the required couple number.(b) For two or more items in sequence, click the first couple you want to

select, press and hold down the Shift key and then click the last couple inthe group

Once the desired couple(s) is selected, the following additional operations arepossible:

(a) Addition to (or removal from) the current couple set — click Add toCpset/Remove from Cpset

(b) Deletion — click Delete Couple(c) Addition of a slave cell to an existing (selected) couple — click Add

Slave to Couple. The user has a choice of picking the slave on the screenwith the cursor (Cursor Select) or typing its cell number in the text boxprovided (Text Input)

(d) Removal of a slave cell from an existing (selected) couple — clickRemove Slave from Couple. The slave cell to be removed must beselected first in the SLAVE list.

(e) Addition of a slave cell to (or removal from) the current cell set — clickAdd Slave to Cset/Remove Slave from Cset. The slave cell to be addedor removed must be selected first in the SLAVE list.

(f) Addition of a master cell to (or removal from) the current cell set — clickAdd Master to Cset/Remove Master from Cset. The master cell to beadded or removed must be selected first in the MASTER list.

In all couple modification operations above, the validity of the new couple isdetermined using the tolerances specified in the Global Couple Tolerancedialog (see “Couple tolerances” on page 4-13).

5. Validation — click Couple Check to display the Couple Check dialog shownbelow. This checks that:

(a) All cells in a given couple range exist and are either fluid or solid.Depending on the option chosen in the Couples to Check pop-up menu,the couples examined may be:

i) All — all couplesii) CPset — the currently defined couple set

iii) Range — an explicitly specified range of couples. If this option is

Page 171: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Cell Couples

Version 3.24 4-19

chosen, the first and last couple number plus an increment must betyped in the text boxes provided

(b) All fluid cells in a couple have the same porosity and spin index(c) A master face of a couple is not also a slave face in another couple(d) A master cell of a couple is not also a slave cell in the same couple(e) All slave faces in a couple overlap the master face to some extent.

pro-STAR will calculate and display (in the I/O window) the total master,slave and overlap areas for all correctly matched couples in the range.

In performing the above, pro-STAR checks whether slave face vertices fallwithin the bounds of their master face, to a tolerance supplied in the VertexTolerance box. The default value for this quantity is set in the Global CoupleTolerance dialog (see “Couple tolerances” on page 4-13). pro-STAR can alsoperform the following tasks:

(a) Build (for further examination) a separate set containing all couples thatfailed any of the above criteria — choose option Yes from the pop-upmenu supplied for this purpose.

(b) Look for invalid partial boundaries (see Figure 4-9), by checking the ratioof uncovered area to total area in couples that do not allow suchboundaries — choose On from the Partial Boundary Check menu. Awarning is issued if this ratio exceeds the value specified in the PartialBoundary Area Tolerance box.

(c) Remove from the couple definition any slave cells whose faces do notoverlap at all with their master cell faces — choose Yes from the RemoveNon-Overlapping Slaves menu. If this option is not used, the slave cells inquestion are flagged as errors.

Command: CPCHECK

Page 172: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Cell Couples

4-20 Version 3.24

Note that:

(a) Selecting Utility > Couples on Cell from the main menu bar produces alist of couples associated with each cell in a given cell range (commandalternative CPCELL). This may be useful for validation exercises.

(b) It is best to perform the merging operation (see item no. 6 below) beforethe check operation, as this will identify and fix some couple problems(such as duplicate couple and slave cell definitions)

6. Merging, i.e. elimination of redundant couples — click the Couple Mergebutton. This eliminates couples with identical master cell faces and removesduplicate couples. It also removes duplicate slave faces within a couple andfaces that are defined as both slave and master within the same couple.

7. Compression — click the Couple Compress button. This involves theelimination of all deleted couples and renumbering of the remaining ones.

8. Display — choosing an item from the Couple Display drop-down list offersan alternative, purely visual means of checking whether the couples have beengenerated correctly. The command adds a representation of couples to cellfaces on top of the current mesh plot. The best Cell Plot Type option to use forthis purpose is Wire (Surface) or Hidden Line. The plot may be produced ina number of different ways, depending on the option chosen from thesecondary drop-down list:

(a) Off — turn the couple display off(b) Masters Last — plot slave faces followed by master faces and then

colour the overlap areas in the overlap colour(c) Masters Only — plot master faces only(d) Slaves Last — plot master faces followed by slave faces and then colour

the overlap areas in the overlap colour(e) Slaves Only — plot slave faces only

Note that the above options are also available from the main window menu bychoosing Plot > Couple Display and then selecting one of the five options(Slave, Master / Master / Master, Slave / Slave / None) in the drop-downmenu. Furthermore, options a, b and d above are also available from the mainwindow menu by choosing Plot > Cell Display > Couple Masters or CoupleSlaves. The master, slave and overlap colours used for plotting are as definedin the “The couple table” on page 4-9. Note that only couples included in thecurrent couple set and having faces in the current cell set will be displayed.

When couples are created, some of the participating cell faces may bepartly within the solution domain interior and partly exposed to the outsideworld, where they essentially constitute boundary surfaces. An example ofthis situation is shown in Figure 4-5. Such surfaces are called partialboundaries. The calculation and display of the exposed portions of such facesis controlled by a choice made in the Couple Table Editor dialog, as discussedon page 4-10. The editor is activated either from the Couple Tool, or bychoosing Plot > Partial Boundaries from the main menu bar.

If option Off is selected in this dialog, faces containing partial boundaries

Page 173: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Cell Couples

Version 3.24 4-21

are not plotted, resulting in the jagged edge effect shown in Figure 4-9(a). Ifoption On is selected, mesh displays show partial boundaries correctly, as inFigure 4-9(b).

Note that because of the computational effort involved in identifyingpartial boundaries, the Off button should be selected if such boundaries areknown to be absent. A convenient way of checking whether partialboundaries have been generated correctly is to use commandLIVE,PARTIAL. This creates surface shells on the exposed parts of partialboundary faces that can be plotted on the screen for visual inspection.

Figure 4-9 Partial boundary illustration

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

This dialog must be used as part of the following three-stage process:

(a) Calculate and store the location of each slave-face vertex relative to theappropriate master-face vertices — select Save from the Option menu,specify the name of the storage (.cpfz) file and click Apply.

Command: CPFREEZE

Partialboundary

(a) Partial boundaries off (b) Partial boundaries on

Page 174: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Cell Couples

4-22 Version 3.24

(b) Relocate the master-face vertices to new positions, using any of theavailable vertex manipulation functions.

(c) Move the slave-face vertices so that they lie in the same positions, relativeto the master-face vertices, that they occupied originally — select optionMap from the pop-up menu and click Apply. Vertices that are very closeto an edge or corner will be moved so that they lie exactly on that edge orcorner, depending on the value entered in the Tolerance box.

Other couple functions

A number of additional capabilities exist in connection with couple generation andmanipulation, as follows:

• Generation a single couple, in terms of the master cell and its correspondingslave cells, while also specifying the face numbers of the cells to be coupled— command CPFACE. This is useful in situations where the normal cellcoupling algorithm does not work correctly, e.g. for highly irregular meshesinvolving abrupt changes in cell size and/or very warped cell faces.

• Multiple generation of additional couples, starting from a pre-defined rangeand offsetting the cell numbers in the starting range — commandCPGENERATE.

• Modification of a couple definition via changes to the master and/or slave cellnumbers participating in the couple — command CPMODIFY. The commandmay also be used to modify the particular cell faces that are to be coupled, orto swap the master and slave cell designations.

• Collecting together a given range of couples using the CPRANGE option ofcommand CSET.

• Counting the currently defined couples — command COUNT. Alternatively,this operation can be executed by choosing Utility > Count > Couples fromthe main menu bar.

Useful Points

Points to note about coupling operations are:

1. Command CPFACE does not check the geometrical constraints discussed in“Integral and arbitrary connectivity” on page 4-5. The user is therefore free inprinciple to connect non-adjoining cell faces. Also, there is no check that acouple is unique, so it is important to use the merging and validationoperations described under “Couple manipulation” to check that the couple inquestion is correct.

2. Any mesh smoothing operations (e.g. by command MORTHO) performedafter a coupling operation can in principle invalidate the geometrical criteriaon which the original coupling was based. The user is therefore advised tocomplete all smoothing and orthogonalisation operations before doing the cellcoupling.

3. Vertices belonging to master and slave cells remain distinct from each other,even when they occupy the same physical position. Unlike regular meshes,only the cell connectivity is established by the “Couple creation” operationsdescribed earlier.

4. Coupled cell interfaces can normally coincide with fluid/solid interfaces.

Page 175: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Mesh Refinement

Version 3.24 4-23

However:

(a) It is possible to prevent the creation of couples across such interfacesusing command CPFLAG. This may be useful if, for example, conjugateheat transfer is not going to be switched on during the analysis.

(b) Conjugate heat transfer is not available at coupled cell interfaces forwhich the partial boundary option (see page 4-20) has been enabled.

5. Coupled cell interfaces must not coincide with

(a) cyclic boundaries (see “Cyclic Boundaries” on page 7-27);(b) baffles (see “Baffle Boundaries” on page 7-23);(c) porous/non-porous material interfaces (see Chapter 10).

Mesh Refinement

pro-STAR offers numerous facilities in the area of embedded mesh refinement,mostly in the form of commands. These may be put into three categories:

1. Subdivision into an arbitrary number of cells — commands CREFINE (forhexahedral meshes) and TETREFINE (for tetrahedral meshes). Of these:

(a) Command CREFINE performs the sort of cell subdivision illustrated inFigure 4-10. Pyramidal, tetrahedral and trimmed (polyhedral) cells cannotbe subdivided with this command. Any such cells found in the range to berefined will simply be ignored. Refinement for prismatic cells is possiblebut only for a uniform, even-numbered refinement factor. If anodd-numbered factor is specified and a prismatic cell is encounteredwithin the refinement range, the nearest even-numbered factor is choseninstead and then applied uniformly in all local directions of that cell.

Figure 4-10 Local mesh refinement using the CREFINE operation

Commands: CREF , 3 ,,, 2 , 3 , 1 , MERGECREF , 3 , 3 , 4 , 6 , 7 , 1 , MERGE

1 2 3 4

5 6 7 8

9 1011 12

Page 176: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Mesh Refinement

4-24 Version 3.24

Note that:

i) It is possible to join up selected cells in order to coarsen a(structured) mesh along a given direction using CJOIN. Thiscommand performs the opposite function to that of CREFINE andis only valid for hexahedral cells. A similar command, CRSE,performs a mesh coarsening operation on the current cell set bygrouping hexahedral cells into larger ones wherever possible. It alsoworks for both structured and unstructured meshes.

ii) The CREFINE function works best if the cells to be refined areoriented the same way (see Figure 3-48 on page 3-45 for anillustration of cell orientation). If this condition does not apply, it isadvisable to use command CDIVIDE instead. CDIVIDE onlyrequires that the (hexahedral) cells in question are part of astructured mesh and that they are already placed in a cell set by theuser. The refinement algorithm works in terms of local meshdirections I, J and K defined via command CDIRECTION.Connection of the newly created cells to the adjoining/surroundingmesh can be performed automatically by using option COUPLE.

iii) CREFINE is also available as a GUI function, accessible from theCell Tool by clicking button Cell Refine. This displays the dialogshown below:

The information required in the above dialog is:

i) The number of cell subdivisions in each local mesh direction I, J, Kii) Cells to Refine — choose the current cell set (Cset), all available

cells (All) or cells selected with the cursor (Ccross)iii) Vertex Merge Option — select Merge to merge coincident vertices

within the coarse and refined meshes or None to suppress thisoperation

iv) Couple Option — selecting

– None prevents the formation of cell couples at the interface

Command: CREFINE

Page 177: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Mesh Refinement

Version 3.24 4-25

between coarse and refined meshes, so the two remainunconnected. If the refinement includes either the master or allslave cells in any existing couples, these couples will be deleted.

– Couple automatically creates couples at the coarse / refinedinterface. If the refinement includes cells participating in anyexisting couples, these couples will first be deleted and thenrecreated. All newly-created couples will be of the type shown inthe Couple Type Number box (the currently active type bydefault).

The desired mesh refinement is effected by clicking the Apply button.

(b) Command TETREFINE performs subdivision of tetrahedral cells in orderto create embedded refinement for tetrahedral meshes, as shown in Figure4-11. Given the shape of the cells concerned, the only practicalsubdivision factor along each edge of the tetrahedra is 2 and this (fixed)factor is in fact employed here. Note that the command still provides thenormal option of merging coincident vertices to create mesh continuity.The creation of couples between the embedded mesh and its surroundingsmust be done separately by the user.

Figure 4-11 Local refinement for tetrahedral meshes using TETREFINE

2. Mid-point subdivision of arbitrary meshes — commands CMREFINE (forcell division) and SHREFINE (for shell division). Of these:

(a) Command CMREFINE can perform only mid-point (2 × 2 × 2)subdivision but is very flexible in most other ways. Thus, it will

i) refine cells of any typeii) perform the refinement in one, two or three directions, depending

Page 178: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Mesh and Geometry Checking

4-26 Version 3.24

on the option chosen by the user in command CMROPTIONiii) automatically create new couples and boundaries as necessaryiv) write a new restart file in preparation for resuming the CFD analysis

with the refined mesh that has just been created (see also Chapter 8,“Solution Control with Mesh Changes”)

v) check whether the additional cells and vertices to be created canstill be accommodated within pro-STAR’s current memory limits

Note that the result of this operation is reversible, by using commandCMUNREFINE, provided the cell, vertex and boundary numbers have notbeen compressed or otherwise renumbered. Also note that CMREFINEand CMROPTION are central to the operation of STAR GUIde’s adaptiverefinement facilities (panel “Refine”, see also Chapter 8,“Solution-Adapted Mesh Changes”)

(b) Command SHREFINE performs a 2 × 2 mid-point subdivision onsurfaces composed of shells. The refinement algorithm ensures that thenew shell set gives a smoother representation of the underlyingcontinuous surface. This command is therefore useful for creating asuitable shell density for the surface being modelled before extruding itinto a 3-D mesh (see “Extrusion” on page 3-5).

Mesh and Geometry Checking

The calculation mesh needs to be checked in order to ascertain whether

• cells are smoothly distributed;• cells are of acceptable shape;• cells follow the STAR requirements, especially the right-hand rule;• the overall problem geometry is well represented by the mesh;• the overall mesh dimensions and volume are correct.

Thus checking is performed at two different levels:

• At the macroscopic level, covering the overall geometry and dimensions.• At the microscopic level, covering individual cell deformity and

non-compliance with STAR’s requirements.

Macroscopic checking

At the macroscopic level, pro-STAR’s checking facilities can be accessed from theUtility menu in the main window. The following quantities can be checked:

1. The area of a surface — select Utility > Calculate Area and then one of thefollowing items to identify the surface in question (command alternatives —ACROSS, AZONE, AREA):

(a) Cell Faces — select cell faces individually with the cursor on the currentmodel geometry plot. The action is terminated by clicking on the Donebutton that is also displayed on the plot.

(b) Cell Faces in Zone — the cell faces making up the surface are those

Page 179: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Mesh and Geometry Checking

Version 3.24 4-27

included within a user-specified polygon, drawn on the screen with thecursor. The action is terminated by clicking on

i) the last point with the right mouse button to complete the polygon;ii) the Done button to let pro-STAR complete the polygon;

iii) the Abort button to abort the selection operation.

(c) Vertices — the surface is that of polygon defined by a number of vertices(minimum 3). These are selected with the cursor in order around thepolygon and may be located anywhere in the mesh (but should all lie inthe same plane). The selection is terminated by clicking Done.

(d) Boundaries — select boundaries individually with the cursor on thecurrent model geometry plot. The selection is terminated by clickingDone.

(e) Boundary Set — use the current boundary set(f) Boundary Region — pick the required region with the cursor(g) Boundary Patch — pick the required patch with the cursor

Note that a running total of area is kept. This can be reset by selectingCalculate Area > Clear.

2. The volume of part of the mesh — select Utility > Calculate Volume andthen one of the following items to identify the volume in question (commandalternative — VOLUME):

(a) Cell — select cells individually with the cursor on the current geometryplot

(b) Cell Set — use the current cell set(c) All Cells — use all currently defined cells

As with area calculations, a running total of volume is kept. This can be resetby selecting Calculate Volume > Clear.

3. The distance between two vertices — option Vertex Distance. The requiredvertices must be selected with the cursor from the current plot. pro-STAR alsocalculates the components of the distance vector in the local and globalcoordinate systems (command alternative — VDISTANCE).

4. The geometric range covered by a given set of cells (options Cell Set, AllCells), vertices (Vertex Set, All Vertices), boundaries (Boundary Set, AllBoundaries) or splines (Spline Set, All Splines). The displayed informationconsists of the minimum and maximum coordinate in each direction and theidentifying numbers of the cells, vertices, etc. located at the end points(command alternative — RANGE).

For proper operation of the above functions, some form of surface plot (see “PlotCharacteristics” on page 5-3) must be currently on display in pro-STAR’s mainwindow. The numerical values of the desired quantities (area, volume, distance,etc.) are displayed in the Output window.

Microscopic checking

At the microscopic level, things to check for are:

Page 180: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Mesh and Geometry Checking

4-28 Version 3.24

1. Correct mesh connectivity — select Utility > Cells on Vertex. This finds allcells attached to a specific vertex, chosen with the cursor, and is thus useful inverifying that, say, two mesh blocks have been properly joined together(command alternative — CVERTEX).

2. The extent of cell deformity and non-compliance with STAR requirements —select Tools > Check Tool to display the Check Tool dialog shown below.

The CHECK function examines a number of cell properties, chosen from the CheckOption pop-up menu at the top of the dialog box. The same checks may also beperformed from within the STAR GUIde environment (“Check Grid” panel) and aredescribed fully in the on-line Help system.

The range of cells to be checked is selected from the adjacent pop-up menu(either All cells or only those in the current Cset). The CHECK function also allowsall cells that do not pass any of the above tests to be automatically collected in a cellset, using the New Set option from the Set Option menu. The locations of such cellsare also placed automatically in the post-processing registers (see “DataManipulation” on page 9-21 for a description of registers) so they are available forplotting. Note that:

• The tetrahedral check does not carry any ‘acceptable’ limit on the tetrahedralquality and therefore no cell set of the above kind is produced. However, thequality factors are still written automatically to post register no. 4, hence theycan be plotted like any other cell property distribution.

• The connectivity check works in a similar fashion, in that a group ofconnected cells may be given its own individual colour and displayed in a

Commands: CHECK SORT CFLIP

Page 181: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Mesh Quality Improvement

Version 3.24 4-29

contour plot. Thus, if the overall mesh in your model is properly connected,all cells should be displayed in a single colour.

The following points should also be borne in mind:

1. A given type of check is performed by choosing it from the Check Optionpop-up menu and then clicking the Apply button.

2. The kind of information that is subsequently displayed in the scroll list iscontrolled by the following option buttons:

(a) Show All Calculations shows the values of the property checked for theentire cell range under consideration.

(b) Show Set Only shows only values belonging to cells that have failed thetest (and are collected in a cell set). It is therefore important to select theNew Set option mentioned above if anything is to appear in the scroll list.

3. The scroll list items can be sorted on the basis of the actual value of theproperty tested — click on Sort. Note that this button is active only for checkoptions Aspect Ratio, Face Warpage, Internal Angle, Area of Face andNegative Volume. The effects of the sorting operation can be undone byclicking on Unsort.

4. Cells with fundamental problems, i.e.

(a) double vertices,(b) negative volumes,(c) overlaps,(d) left-handed definitions,(e) collapsed cell faces,

need to be corrected before proceeding further with the analysis. This is trueboth for imported meshes and for those created using pro-STAR. Left-handedcells can be corrected by the Check Tool by clicking the Fix Left-Handedbutton. More correction facilities are provided within the STAR GUIdeenvironment (“Fix Grid Problems” panel). Command CFIX can also correctsome of the above problems by re-defining cells through re-ordering of theirconstituent vertices.

Mesh checking functions are very important, but overall checking may also be donequite effectively by visualising the mesh. This is achieved through the interactiveplotting capabilities of pro-STAR, described in Chapter 5.

Mesh Quality Improvement

Some of the problems encountered during the mesh checking stage, i.e. thoserelated to aspect ratio, internal angle or warpage, will not necessarily prevent STARfrom running successfully, as the code is capable of dealing with highly deformedcells. It is nevertheless advisable to avoid extremely deformed cells, if at allpossible, because they can at best delay numerical convergence and at worst causenumerical instability. Thus, the user should always attempt to improve the meshquality using one of the following operations:

1. Orthogonalisation of a block’s constituent cells through the solution of elliptic

Page 182: Star Uguide

OTHER MESH OPERATIONS Chapter 4

Mesh Quality Improvement

4-30 Version 3.24

equations — command MORTHO. This improves internal angles and/or warpangles but tends to flatten out non-planar surfaces. Therefore, all vertices thatshould stay fixed, such as those on a curved surface, must be collectedtogether in a vertex set (see Chapter 3, “Vertex set selection facilities”) priorto using the MORTHO command on a target block. MORTHO can only be usedon sections of a model that are block structured with uniform vertexincrements in all three directions.

2. Smoothing of the vertices connected to the current set of cells in a given shellor 3-D mesh via algebraic smoothing (see Figure 4-12) — commandVSMOOTH. The effect of this operation is to move vertices so that distancesbetween them are as equal as possible. All vertices that should stay fixed mustbe collected together in a vertex set prior to using this command. CommandVELLIPTIC performs a similar function, except that the smoothingalgorithm is adjusted to take abrupt changes in curvature on the boundary intoconsideration. A GUI implementation of both commands is available in the“Fix Grid Problems” STAR-GUIde panel. Note that, for this operation, thecell set to be smoothed should not contain trimmed (polyhedral) cells.

Figure 4-12 Vertex smoothing using VSMOOTH

3. Improving the cell shape — commands VADJANGLE and UNSKEW. Theirfunctionality is similar to that of command UNWARP (see below) except thatthey work on a cell-by-cell basis rather than on all cells simultaneously.VADJANGLE repositions vertices to minimise warpage, and to reduce the

maximum internal angle to a user-specified value. Vertex movement is alsorestricted to a user-specified value.UNSKEW is used to decrease the internal angles of cells, by moving a

vertex in the vicinity of the most flattened part of the cell by a given distance.Since it is possible that by improving one cell one may inadvertently distortsome of its neighbours, this command is best suited to improving cells next tofree surfaces.

A GUI implementation of both commands is available in the “Fix GridProblems” STAR-GUIde panel.

4. Cell shape improvement — command UNWARP. This attempts to improve theshape of cells within a given cell range by moving vertices so as to reduce thewarpage of non-planar cell faces (see “Microscopic checking” on page 4-27for a discussion of this concept). The process is time and memory intensive,

Before After

Page 183: Star Uguide

Chapter 4 OTHER MESH OPERATIONS

Mesh Quality Improvement

Version 3.24 4-31

so the cell set to be worked on should be kept as small as possible.A GUI dialog for this operation, shown below, may be accessed from the

Vertex tool (option Other > Unwarp):

The required input is:

(a) A warp angle limit, above which corrective action is taken.(b) The maximum number of iterations to be performed by the smoothing

algorithm.(c) A perturbation limit, below which vertices are not in fact moved.(d) An under-relaxation factor for the smoothing algorithm.(e) The maximum number of cell faces attached to any single vertex. If more

faces are attached, the user will be prompted to repeat the operation witha greater value. Note that using a large value from the beginning of thisoperation can be very time-consuming computationally.

(f) Normally, vertices on faces that satisfy the warp-angle criterion are notmoved. However, selecting the Yes option from the Move Vertices pop-upmenu overrides this and all vertices are moved until all faces satisfy thecriterion.

(g) All vertices that should remain fixed should be collected together in avertex set (VSET) before the UNWARP operation begins. Typically, suchvertices are on the surface of the model. It is possible to instructpro-STAR to create such a surface-vertex set automatically by selectingoption Surface Vertices from the Fixed Vertices pop-up menu beforeclicking the Apply button. If for any reason this is not desirable, createthe required set explicitly before entering the Unwarp dialog, selectoption Current Vertex Set from the menu and then click Apply.

Command: UNWARP

Page 184: Star Uguide
Page 185: Star Uguide

Chapter 5 MESH VISUALISATION

Version 3.24 5-1

Chapter 5 MESH VISUALISATIONA system that allows the creation and use of complicated model geometries andmeshes needs to be able to display these entities in a quick and clear manner.pro-STAR provides a large range of flexible and efficient tools for this purpose,showing the current state of the model at all stages of the modelling process. Thedisplay functions can be classified into the following groups:

• Range of data to be plotted• Plot characteristics• Entity to be plotted

Therefore, before a picture can be displayed on the screen, the above three attributeshave to be specified. This may be done in one of the following ways:

• By clicking one of the buttons located along the top and left-hand-side of themain pro-STAR window, shown below. This method is especially convenientwhen generating successive mesh plots with different display attributes.

• By choosing options from the Plot menu• By using one of the three mouse buttons (mainly for common plot-positioning

and display operations)

Page 186: Star Uguide

MESH VISUALISATION Chapter 5

Data Range

5-2 Version 3.24

Data Range

The extent and range of data to be viewed or manipulated requires a certain amountof control since, for large models and data sets, there is normally no need to workon the entire model all at once. For this reason, pro-STAR provides a group ofso-called database functions which allow selection of a subset of the available datafor the purposes of

• model display• use within other pro-STAR operations.

The types of entities for which subsets can be selected are accessed via colouredbuttons on the left-hand-side of the main pro-STAR window:

• Cells — button marked C –>• Vertices — button marked V –>• Splines — button marked S –>• Blocks — button marked Bk –>• Boundaries — button marked B –>• Couples — button marked Cp ->

For each of the entities above:

1. The required data are selected via options in a button’s drop-down list or bymeans of the special set (green) buttons in the appropriate tool — see Chapter3 for a description of the Vertex, Cell, Block and Spline Tools and Chapter 4for a description of the Couple Tool. Common selection methods are

(a) numeric range,(b) geometric range,(c) terminal cursor selection (i.e. graphically),(d) reference to another set already selected for a different entity,(e) a property that is unique to the current entity (e.g. the material type filling

a particular cell — see Chapter 6).

2. Several selection methods are provided because it is not always possible orconvenient to define a set in terms of a single criterion.

3. The coloured buttons on the main window provide the same selectionfacilities as the corresponding entity tool and are therefore quicker and moreconvenient for assembling an entity set.

4. Although most commonly used for plotting, sets are also very useful whenworking in command mode. Thus, the selection can be employed by variouscommands that need to refer to a pre-defined set, e.g.

VLIST,1,5,1,5

can be replaced by

VSET,NEWS,VRAN,1,5,1VLIST,VSET,,,5

Page 187: Star Uguide

Chapter 5 MESH VISUALISATION

Plot Characteristics

Version 3.24 5-3

Plot Characteristics

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

Basic plot type definitions

The available facilities are described below in terms of Plot menu choices and,where appropriate, button clicks or pop-up menu selections on the margin of themain window:

1. Plot type — select Type to specify whether the output is:

(a) A complete wireframe (see-through) plot — option Normal. Note thatline and point cells (see “Cells” on page 3-37) can be displayed only withthis plot type.

(b) A section cut through the model — option Section.(c) A surface (hidden-line) plot — option Qhidden or Ehidden. The first

option displays only forward-facing cell faces, whereas the secondproduces a proper surface plot. The Qhidden plot type is likely to befaster than Ehidden on vector-type display devices but provides little

Commands: PLTYPE SURFACE EDGE PLMESH PLFACEAXISUP PAN ZOOM OVERLAY NUMBERCDISPLAY SHRINK MULTISEC PLDISPLAY VSTYLELSWITCH WINDOW CLEAR

Page 188: Star Uguide

MESH VISUALISATION Chapter 5

Plot Characteristics

5-4 Version 3.24

advantage on raster devices. The various graphical, Zone-type operationsfor quickly identifying cell faces (implemented as green-button options inthe various tools) work as if the current plot is of type Qhidden regardlessof the actual on-screen cell face visibility.

(d) A clipped plot — option Chidden. This is a combination of options (b)and (c), whereby a surface plot is clipped beyond a section plane cuttingthrough the model. The portion of the model’s surface that is actuallyclipped is determined by the orientation of the normal to the section plane(see “Additional display options”, item no. 5). It is possible to reverse thisorientation quickly and thereby display the surface that lies on the otherside of the clipping plane by using command SNORMAL,REVERSE

(e) A partial surface plot — option Ihidden. This plots only the surfaceswhose vertices lie entirely within the current vertex set. This is useful, forexample, in displaying some of the interior features of a complex surface.

2. Surface plotting — selecting Display > Surface displays only exteriorsurfaces of the cells making up the mesh. It can be very usefully employed inconjunction with Type > Normal to improve the legibility of a wireframe plot(it is turned on automatically for Qhidden/Ehidden plot types). If used inconjunction with Type > Section (see page 5-6) it hides the structure of themesh along the cross-section being employed.

3. Combined Surface and Plot Type specification. The options described so farcan also be selected from the Cell Plot Type pop-up menu in the main windowas follows:

(a) Wire (All) — equivalent to Plot > Type > Normal plus Display >Surface > Off

(b) Wire (Surface) — equivalent to Plot > Type > Normal plus Display >Surface > On

(c) Section (All) — equivalent to Plot > Type > Section plus Display >Surface > Off. Note that the section plot parameters must be selected, asexplained in page 5-6, before this plot type is chosen

(d) Section (Surface) — equivalent to Plot > Type > Section plus Display >Surface > On. Note that the section plot parameters must be selected, asexplained in page 5-6, before this plot type is chosen

(e) Quick Hidden Line — equivalent to Plot > Type > Qhidden(f) Hidden Line — equivalent to command term,,,vect (see Chapter 2,

“Plotting Functions”) plus Plot > Type > Ehidden(g) Hidden Surface — equivalent to command term,,,rast plus Plot >

Type > Ehidden(h) Clipped Hidden — equivalent to Plot > Type > Chidden(i) Interior — equivalent to Plot > Type > Ihidden

4. Edge plotting — select Display > Edge or click on the edge plotting button

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

Page 189: Star Uguide

Chapter 5 MESH VISUALISATION

Plot Characteristics

Version 3.24 5-5

edges (Type > Ehidden). This is a useful tool for checking discontinuitieswithin the mesh since they often manifest themselves as edges.

5. Mesh plotting — select Display > Mesh or click on the mesh plotting button

in the main window to display mesh lines. When operating in extendedgraphics (Open GL) mode (see Chapter 2, “Plotting Functions”), there is alsoan option for setting the thickness of the displayed mesh lines. However, thisfacility is accessible only via command PLMESH.

6. Face plotting — select Display > Faces to plot cell (or block) faces withcolours keyed to the face numbers (face 1 is shown red, face 2 green, etc.).

7. Face shrinkage — select Display > Shrink to shrink cell faces by a specifiedpercentage of their original size (default 80%). This allows each cell to beviewed separately from its neighbours.

8. Number plotting — selecting Number plus an option button from itsdrop-down list displays numbers relevant to the entity being plotted (vertex,cell, spline, etc.). The size of the font used for these numbers can be set usingcommand TSCALE (see Chapter 2, “Advanced screen control”).

Plot orientation

The orientation and position of the plot can also be adjusted by specifying:

• The axis orientation — selecting Up Axis plus an option button (X, Y, or Z)from its drop-down list defines the initial orientation of the axes and hence ofthe plotted object itself relative to the screen.

• A plot-centre position in terms of global coordinates — command CENTERtranslates the plot around the screen. If no arguments are specified, the plotwill be auto-centred.

• Command DISTANCE — this will alter the size of the plot by changing theviewing distance from the displayed object.

Note that most of these operations can be performed more easily by using one of themethods below:

1. The View pop-up menu in the main window. This enables direct selection ofthe most common plot orientations via the following options:

(a) Isometric — viewing directions (1, 1, 1), (-1, 1, 1), (1, -1, 1), (1, 1, -1)(b) Axis — viewing directions +X (1, 0, 0), -X (-1, 0, 0), +Y (0, 1, 0), -Y (0,

-1, 0), +Z (0, 0, 1), -Z (0, 0, -1)(c) REVERSE — reverses the viewing direction specified in (a) or (b) above(d) SNORMAL — defines the viewing direction as being perpendicular to a

previously defined section through the model (used in conjunction withsection plotting, see page 5-6)

2. The mouse buttons, discussed in “Mouse operations” on page 5-15

Page 190: Star Uguide

MESH VISUALISATION Chapter 5

Plot Characteristics

5-6 Version 3.24

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

To rotate your model around the X, Y, and Z axes, move the sliders below andto the right of the guide cube shown above. After each rotation, a REPLOToperation is performed automatically to display the model from the newviewpoint. This facility is an alternative to command-driven model rotationfunctions (provided by commands VIEW, ANGLE and ROTATE) and isparticularly useful with large models that are very slow to manipulate directly.

Additional display options

Extra plot manipulation options are also provided for the following:

1. Plot-centre translation — item Pan enables you to shift (pan) the plot usingthe cursor to define the new plot centre.

2. Plot enlargement — selecting Zoom > On or clicking the Zoom In button inthe main window enlarges a portion of the plot indicated with the cursor.Repeated zooming operations are possible. Plotting at the previously-selectedmagnification is done using option Back or by clicking the Zoom Backbutton. Selecting Off or clicking the Zoom Off button restores the plot to itsoriginal state.

3. Plot superposition — selecting Display > Overlay enables superposition ofmultiple plots. It is also possible to superpose vertex, spline, couple (master orslave cell faces), block, block fill factor, patch or boundary plots on each otheror on cell plots. This is done by selecting Cell Display plus the appropriateoption button from its drop-down list. Note that this operation does notrequire prior selection of the Overlay option.

Plot superposition may also be obtained by clicking the appropriate optionbutton in the Cell Plot Display Options group on the main window.

4. Plot fixing at the location and viewing distance defined by the previous plot— command PLFIX.

5. Section plotting — section displays (usually planar) cut through the modelcan be produced by selecting Type > Section, as mentioned above. Thesection is defined by:

(a) A point through which the section plane passes — command SPOINT.Non-planar sections (e.g. a cut made at constant radius in a localcylindrical coordinate system) are also possible using the SPOINT,LOCAL form of the command.

(b) A normal to the section plane — command SNORMAL.

Alternatively, the section plane can be specified directly by clicking the

Page 191: Star Uguide

Chapter 5 MESH VISUALISATION

Plot Characteristics

Version 3.24 5-7

Section Slice button in the main window (or by typing command SPOINT,CURSOR). This invites the user to draw a straight line on top of the currentplot with the cursor. The section plane is then defined as being perpendicularto the screen plane and the line drawn represents the intersection between thetwo planes.

Other points regarding this type of plot are as follows:

(a) Multiple section planes may be created and displayed in quick successionusing special facilities in the STAR GUIde system (see the “Create Plots”panel, “Multiple Plane Plot” tab). Note that in order to view the resultingplot properly, it may be necessary to turn on/off various display optionsand/or change the view.

(b) Multiple sections can be automatically scaled for plotting eitherindividually or as a group, depending on the setting chosen for commandSECSCALE. Note, however, that direct user specification of the displayattributes (see “Plot orientation” on page 5-5) will override the setting ofthis command.

(c) If the Display > Surface option is currently active, the section plot willshow only the cut through the perimeter of the current cell set rather thanall interior lines. Furthermore, that cut can be turned into a tangiblepro-STAR entity via command VSECTION. The latter creates a series oflinked line cells all around the perimeter.

(d) A section definition may be ‘stored’ as a named collection of shells andvertices using command PSCREATE. Such a definition may then berecalled for different purposes, e.g.

i) in order to be light shaded (see “Special lighting effects” on page5-10)

ii) used for plotting multiple hidden-line surfaces (see “Basic plot typedefinitions” on page 5-3)

iii) used as a platform on which to map currently stored post data (seeChapter 9, “Mapping and Copying Post Data”)

If necessary, the shells may be subsequently deleted using commandPSDELETE.

6. Plot enhancement — this is a collection of facilities to add various graphicalelements to the plot, such as:

(a) Individually selected items (border, plot title, date, etc.) making up thestandard pro-STAR legend — select Legend and then click theappropriate option button in the drop-down list. The most common plottypes either include all legend items or none of them. These can beselected directly, by clicking on the ‘Plot with/without legend’ buttons

in the main window, as required. Command PLDISPLAY allows the plotscale, title and coordinate system triad to be placed at a user-specifiedlocation using the screen cursor.

Page 192: Star Uguide

MESH VISUALISATION Chapter 5

Plot Characteristics

5-8 Version 3.24

(b) User-defined alphanumeric labels at specified locations — commandPLLABEL. The size of the font used for these labels can be set usingcommand TSCALE (see Chapter 2, “Advanced screen control”).

(c) User-defined pointer arrows at specified locations — commandPLARROW.

(d) Local coordinate triads showing the position and orientation of localcoordinate systems — command PLLOCALCOOR. Alternatively, you mayuse the Coordinate Systems tool (see page 3-13)

(e) A superimposed multi-dimensional grid in the global Cartesian.coordinate system — command TICMARK. This is useful in, for example,selecting a cell range with the cursor on the basis of the cells’ geometriclocation.

(f) Special symbols that mark the location of vertices in vertex plots — selectVertex Style > Color (or Size or Style) to choose the symbol’s colour,size and appearance (i.e. solid dot, open dot, solid square, etc.). In eachcase, the choice is made in terms of a secondary drop-down list thatdisplays the available options for the symbol property in question.

7. Plot window manipulation — menu item Window repositions and re-sizesthe plot window, or splits it into a specified number of sub-windows. Used incombination with Display > Overlay, this allows the production of amulti-window image on the screen. The available options are:

(a) Default — the normal setting, corresponding to the plotting window sizeillustrated in Appendix B.

(b) Full — expands the window to its maximum size. Note that displayparameters are still shown at the bottom, next to the date and time display.

(c) Pick — permits selection of the desired size via the cursor.(d) Divide 1 × 1 — resets the window division parameters.(e) Divide 1 × 2 (or 2 × 1 or 2 × 2) — automatically divides the window into

the selected number of sub-windows.(f) Activate 1 — after a Divide operation, selects the first sub-window for

plotting. The Overlay option is turned on automatically.(g) Activate Next — selects the next available sub-window.(h) Clear — clears the entire graphics area.

An additional option of automatically splitting the plot window into foursub-windows, each displaying a view of the mesh from a different direction,is provided by the ‘Plot 4 views’ button in the main pro-STAR window.

This can provide a very useful, quick evaluation of the mesh created so far.

8. Coordinate display — choosing Utility > Screen Locate from the main menubar turns on the graphics cursor and gives a continuous read-out of its positionin screen, global and local coordinates (equivalent to command SCLOCATE).Click a displayed cell face to print the coordinates of that face on pro-STAR’sI/O window, or terminate the action by clicking the Done button.

Page 193: Star Uguide

Chapter 5 MESH VISUALISATION

Plot Characteristics

Version 3.24 5-9

Colour settings

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

This box performs the following functions:

1. Displays a palette of all colours currently in use for model geometry orpost-processing plots. The colours are identified by index numbers runningfrom 0 to 40. Colour numbers 0 and 1 are the pro-STAR window backgroundand foreground colours, respectively. Colours 2 through 20 show the range ofcolours used for geometry plots while colours 21 through 40 show the rangefor post-processing plots. Such a separation of colour indices means that it ispossible to overlay analysis results on top of geometry plots.

2. Allows colour changes by clicking on any index box on the palette. Thisselects the corresponding colour, uses it to fill the large rectangle on the leftand also displays the RGB (Red, Green, Blue) colour components as numericvalues on the three RGB slider scales. You can modify any RGB componentby dragging the appropriate slider until the desired effect is achieved. Thedesired changes are made permanent by clicking the Apply button at thebottom left-hand-side of the dialog box. Alternatively, colour componentvalues can be altered simultaneously for a whole range of colour indices byusing command CLRFILL. pro-STAR varies the component values so as toproduce a smooth colour variation between the two end indices in the range.The fill can be performed in a number of different colour space models withdifferent effects (i.e. filling from blue to red in RGB space gives shades of redthrough purple to blue but in HLS space it gives a rainbow effect).

Commands: CLRTABLE CLRLIST CLRPENS

Page 194: Star Uguide

MESH VISUALISATION Chapter 5

Plot Characteristics

5-10 Version 3.24

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

4. Sets all colours back to the original definitions supplied by pro-STAR —select option Use Defaults from the pop-up menu.

5. Sets the post colours to a smooth scale ranging from red to blue — selectoption Post - Smooth from the pop-up menu. The post scale depends on thenumber of colours specified under 3. above.

6. Sets the post colours to a smooth grey scale — select option Post - Gray fromthe pop-up menu. The post scale depends on the number of colours specifiedunder 3. above.

7. Sets the post colours to an alternate 20-colour scale — select option Post -Alternate from the pop-up menu. This option is useful in situations wheremore than 14 colours have been chosen under 3. above.

8. Plot the current colour map — click on the Plot Color Table action button.The red, green, and blue values (in that order) for each geometry and postcolour is also shown on the plot.

Note that the X-Motif version of pro-STAR automatically searches for the highestdepth pseudo colour, direct colour or true colour visual that exists for your screenand uses it. This may be overridden by specifying option -c when starting uppro-STAR (see Chapter 2, “Running a CFD Analysis”, Step 3).

Special lighting effects

These are used to apply light and shade effects on a model’s surface. The facilitiesprovided work only in raster-type workstations that can display more than 16colours; this is true for most modern workstations (see also “Plotting Functions” onpage 2-32). The available functions are as follows:

1. Define the total number of colours available to the output device (screen orhard copy) and the number of colour shades. The relevant values are enteredin the text boxes labelled Total number of pens and Number of shades,respectively. The maximum number of pens available will be limited by the

Command: CSCALE

Page 195: Star Uguide

Chapter 5 MESH VISUALISATION

Plot Characteristics

Version 3.24 5-11

hardware you are using and it is possible to balance the number of colours ineach shade with the number of different shades you need. This means that ifyou have a model with just one colour shade you can get a very smooth shade,but if you want many colour shades you will have a less smooth gradation.The light shades correspond to the geometry colours; if you have less shadesthan the 19 different geometry colours (2 through to 20) then they cyclethrough. Clicking the Apply button implements the values chosen and plotsthe colour shading scheme in the main pro-STAR window.

2. Define the number and properties of the light sources that will illuminate themodel — click the Light Source button in the Color Tool to display the LightSource dialog shown below:

To define a light source:

(a) Select a light number in the scroll list(b) Enter the x-, y- and z-coordinates of a point defining the direction from

which the light is coming from. The coordinates are entered in the firstthree text boxes underneath the scroll list. Alternatively, enter a keywordin the first text box to define the light source direction in terms of thecurrently-defined viewing direction for the model. The availablekeywords are TOP, TOPLEFT, TOPRIGHT, LEFT, CENTER, RIGHT,BOTTOM, BOTLEFT and BOTRIGHT.

(c) Enter the light source intensity number (range 0 – 1) in the fourth box.(d) Set the light source status (On / Off / Reverse) via the pop-up menu

provided. Option Reverse reverses the light source direction.

3. Alter the active light shading effects, if required, by selecting an option fromthe Light Switch pop-up menu. The available options are:

(a) Shade — turns on Phong-style shading. The same effect can be obtainedby clicking the light shading button in the main window

(b) Smooth — adds Gouraud smoothing for more realistic lighting effects(c) Off — turns off light shading on a global basis

Commands: LIGHT LSWITCH

Page 196: Star Uguide

MESH VISUALISATION Chapter 5

Plot Characteristics

5-12 Version 3.24

When the Smooth light shading effect is on, it is possible to make plotsappear crisper at the model’s edges by selecting option Edge from the pop-upmenu provided for this purpose.

Note that light shading can also be activated from the main pro-STARmenu by choosing Plot > Light followed by one of items i – iii above. Anadditional item, Follow View, automatically changes the light direction sothat it always follows the viewing direction selected. This is useful whenviewing the model interactively.

4. Define various surface lighting properties for cell types possessing a givensurface lighting index — click the Light Material button in the Color Tool todisplay the Light Material dialog shown below.

The surface lighting index is assigned in the Cell Tool, as discussed in Chapter6. As can be seen above, all available indices are pre-set to the sameproperties by default. To change any of these properties, select the requiredindex in the scroll list and then enter values for the percentage of light energydue to ambient, diffuse and specular light (plus a specular lighting exponent)in the text boxes provided.

Other special effects

The Layer Tool and the LAYER command provide a powerful mechanism forbuilding complex post-processing pictures by overlaying any combination ofplotting elements. This tool is available only in OpenGL extended mode (seeChapter 2, “Plotting Functions”) and can be considered a replacement for the plotsuperposition facility and corresponding OVERLAY command described on page5-6. As opposed to the latter’s overlaying of fixed 2-D plots to create an assembledimage, the layer mechanism produces fully 3-D objects that can be viewed from anyangle.

To create a layer, first generate any type of plot (contour, vector, particle track,isosurface, etc.) in the main pro-STAR graphics window as usual. Continue byselecting Tools > Layer Tool from the main menu to open the Plot Layers dialogshown below:

Command: LMATERIAL

Page 197: Star Uguide

Chapter 5 MESH VISUALISATION

Plot Characteristics

Version 3.24 5-13

In the above dialog, type a name for the new layer into the leftmost text box, thenclick the Store button to store the layer. Once a layer is stored, it is completelydetached from the model. Subsequent changes to the cell set, post registers, andeven the mesh itself will not change any stored layers. Thus, you can repeat theprocess of creating a plot and storing it in a layer to build complex overlays ofmultiple types of plots.

Once a layer is stored, it can be manipulated using the above dialog or commandLAYER. Specifically, the layer can be made visible or invisible or have its opacitychanged by selecting it from the list, choosing the Visible or Invisible option fromthe pop-up menu and clicking the Apply button. Once a layer is no longer ofinterest, it can be deleted by selecting it from the list and clicking the Delete button.

An example showing the overlay of three different objects is shown below. Thefirst image shows a layer created with a standard geometry plot with the layeropacity set to 0.25:

Next, an isosurface layer is added:

Command: LAYER

Page 198: Star Uguide

MESH VISUALISATION Chapter 5

Plot Characteristics

5-14 Version 3.24

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

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

Page 199: Star Uguide

Chapter 5 MESH VISUALISATION

Plot Characteristics

Version 3.24 5-15

Command RENDEROPT provides additional flexibility when using extended modeplotting, by hiding or displaying non-cell features such as particle tracks, droplets,etc. if they happen to be behind a solid-shaded surface. It also controls the use ofyour machine’s memory for graphical operations and hence the speed of plotting.

Mouse operations

Special functions are assigned to the three mouse buttons upon entry into pro-STARas an aid to plotting operations. These are as follows:

Note that the above special functions can be disabled at any time by choosing File> Disable Mouse from the menu bar.

Left mouse button down and drag Rotates your model around an axis in the screenXY plane

Double-click left mouse button,hold down and drag

Rotates the model around the screen Z-axis

Centre mouse button down anddrag

Zoom the model in or out. Pulling the mousetowards you (mouse cursor moves down thescreen) zooms in while pushing it away from youzooms out

Double-click centre mouse but-ton, hold down and drag

Makes a zoom box from your initial position fol-lowing the mouse cursor until you release thebutton. This puts you in interactive zoom modeand nothing else can be done in pro-STAR untilyou either accept the zoom box (by clicking theleft button inside the box) or you reject it (byclicking inside the NO box). Holding down theright button inside the zoom box and moving themouse pans the box. Holding down the centrebutton and moving the mouse resizes it.NOTE: The zoom box always has the sameaspect ratio as the current display window.

Right mouse button down anddrag

Pans the model

Double-click right mouse button Centres the mouse location in the plot window

Page 200: Star Uguide

MESH VISUALISATION Chapter 5

Plotted Entity

5-16 Version 3.24

Keyboard operations

For the user’s convenience, a number of plotting-related operations are alsoprovided as keystroke sequences. The available operations are accomplished bytyping the following control-key combinations:

Control-r— issues a REPLOT command.Control-e or Control-o — issues a ZOOM,OFF $REPLOT commandControl-s— issues a SAVE,casename.mdl commandControl-q— brings up the Quit pro-STAR dialog boxControl-a— issues a CSET,ALL commandControl-z— zooms in by a factor of 2, centring on the current cursor positionControl-w— zooms out by a factor of 2Control-h— activates the Help pointer for context-sensitive help

Plotted Entity

When both range and plot characteristics have been set, a mesh entity can bedisplayed on the screen using one of the following options in the Plot menu:

• Cell Plot for cells (alternatively, click the Cell Plot button in the mainwindow)

• Vertex Plot for vertices• Spline Plot for splines• Block Plot for blocks• Wall Plot for wall data, discussed in Chapter 9 as part of the post-processing

operations

The above operations can also be performed by issuing commands CPLOT, VPLOT,SPLOT, BLKPLOT and WPLOT, respectively. Note that an additional command,TPLOT, can be used for moving mesh displays based on the user-supplied codingin subroutine NEWXYZ. This enables you to check the subroutine action withoutrunning STAR itself.

Cell plots, in particular, are frequently drawn in several different ways. Thedefault is to show all cells in the current set in a hidden-surface type of plot (see page5-4). In order to speed up cell plotting, the following operations are recommended:

1. Click the Replot button in the main window (or choose option Replot fromthe Plot menu) to skip some of the time-consuming steps of the cell plottingoperation. Replot is also used to speed up plotting in general by re-drawingthe last plot, say, from a different angle or with different characteristics. Thisworks as long as the set of items to be plotted remains unchanged.

2. Use the ‘QuickDraw’ (QD) button on the main window when performingdynamic (mouse driven) rotations/translations/zooms of the on-screen mesh(see “Mouse operations” above)

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

Page 201: Star Uguide

Chapter 5 MESH VISUALISATION

Plotted Entity

Version 3.24 5-17

achieve the desired position, viewpoint and magnification. The full picture isre-drawn when the mouse button is released. The QD button gives access tothe following options:

(a) Box — During dynamic movement, only a simple rectangular boxencompassing the mesh is displayed

(b) Edge — During dynamic movement, only a mesh-edge outline isdisplayed

(c) Off — The facility is turned off; the full mesh is drawn at all times

The above options may also be selected via command QDRAW3. Save the surface database used by the plotting operations to make hidden-line

displays and read it back when necessary.

(a) To perform a ‘save surface’ operation, select INFO > StoreSet/Surface/View and then click the Surfaces tab to display the dialogshown below:

The input required is as follows:

i) Surf-File — The name of the surface (.srf) file that will store thesurface definition. If such a file already exists, pro-STAR’s built-infile browser may be used to help locate it.

ii) Name — An identifier for the surface being saved, up to 80characters long.

Click Write to save the surface definition.

(b) To delete a surface definition previously stored, use the same dialog asabove and specify the following information:

i) Surf-File — The name of the surface (.srf) file containing thedefinition to be deleted. pro-STAR’s built-in file browser may beused to locate it.

ii) Select Entry — The location of the surface data to be deleted, asselect from the list.

Commands: SRFWRITE SRFDELETE

Page 202: Star Uguide

MESH VISUALISATION Chapter 5

Plotted Entity

5-18 Version 3.24

Click Delete to delete the surface definition.

(c) To perform a ‘restore surface’ operation, select INFO > RecallSet/Surface/View and then click the Surfaces tab to display the dialogshown below:

The required input is as follows:

i) Surf-File — The name of the surface (.srf) file containing thesurface definition. pro-STAR’s built-in file browser may be used tohelp locate it.

ii) Select Entry — Select the particular surface data required by namefrom the list

Click Recall to recall the surface definition.

Note that a summary of surface data may be produced with command FSTAT.

4. Save the current plot’s attributes (i.e. viewpoint, distance, colour scale, size,etc.) into a plot table and read them back when necessary. This information isstored in pro-STAR’s save (.mdl) file when the current session is terminated.

(a) To perform a ‘save view’ operation, select INFO > StoreSet/Surface/View and then click the Views tab to display the dialogshown below:

Commands: SRFREAD

Page 203: Star Uguide

Chapter 5 MESH VISUALISATION

Plotted Entity

Version 3.24 5-19

Select an empty location in the Select Position list, type a name (nospaces or commas) identifying the plot attributes being saved and thenclick Write.

(b) To delete a view definition previously stored, use the same dialog asabove. This time, select the definition by name from the Select Positionlist and then click Delete.

(c) To perform a ‘restore view’ operation, select INFO > RecallSet/Surface/View and then click the Views tab shown below:

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

Commands: PLSAVE

Commands: PLRECALL

Page 204: Star Uguide
Page 205: Star Uguide

Chapter 6 MATERIAL PROPERTY AND FLOW CHARACTERISATION

Introduction

Version 3.24 6-1

Chapter 6 MATERIAL PROPERTY AND FLOWCHARACTERISATION

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 can analyse problems containing arbitrarycombinations of

• multi-stream fluids, where there is no mixing of fluid streams,• porous materials,• solids (conjugate heat transfer).

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 3-37. The cell table can be defined using pro-STAR’s Cell TableEditor, accessed by clicking the CTAB button on the left-hand side of the mainpro-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 page3-38.

Page 206: Star Uguide

MATERIAL PROPERTY AND FLOW CHARACTERISATION Chapter 6

Cell Table

6-2 Version 3.24

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 6-1 there is a single material number (no. 1),corresponding to the one and only stream in the model, but the cells can beindexed to different colours or different types of surface shading (see Chapter5). This is done by typing different values in the Color Table Index orLighting 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 207: Star Uguide

Chapter 6 MATERIAL PROPERTY AND FLOW CHARACTERISATION

Cell Table

Version 3.24 6-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 4-1).

• 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 6-1 Cell indexing to implement differentiation by cell colour

Cell table entries may be displayed at any stage of the pro-STAR session by 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;ii) the Close button displayed, to let pro-STAR complete the polygon;

Cell index 1 Cell index 2 Cell index 3

Colour 2

Colour 3

Colour 4

Page 208: Star Uguide

MATERIAL PROPERTY AND FLOW CHARACTERISATION Chapter 6

Cell Table

6-4 Version 3.24

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 3-49). Thiscan be done by choosing option Modify Type > Surface (New EdgeVertex Set) (or Surface (Current Vertex Set)). The ‘seed’ vertex isselected 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 behighlighted with the mouse. To change the cell type, click Change Type, choose adifferent cell table index on the displayed Change Cell Table box and then clickApply.

Commands: CTYPE CCROSS CFIND CZONE CTCOMPRESS

Page 209: Star Uguide

Chapter 6 MATERIAL PROPERTY AND FLOW CHARACTERISATION

Multi-Stream and Conjugate Property Setting

Version 3.24 6-5

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

Multi-Stream and Conjugate Property Setting

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

Figure 6-2 Multi-stream flow with solid material regions

Command: CMODIFY

Stream 1

Stream 2

Metal plate

Page 210: Star Uguide

MATERIAL PROPERTY AND FLOW CHARACTERISATION Chapter 6

Multi-Stream and Conjugate Property Setting

6-6 Version 3.24

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 “Cell Table” on page 6-1. Theappropriate settings to be supplied via the Cell Table Editor for the example shownin Figure 6-2 are as follows:

Stream 1

Metal plate

Page 211: Star Uguide

Chapter 6 MATERIAL PROPERTY AND FLOW CHARACTERISATION

Multi-Stream and Conjugate Property Setting

Version 3.24 6-7

Stream 2

The Material Number indices 11, 12 and 13 above refer to the physical property setsassociated with each stream and with the metal plate region. Note that different celltable indices 1, 2 and 4 are also assigned to each of these because each cell tableindex can only refer to one material number. In cases with multiple streams it isrecommended that each stream is given a separate material number, even if streamshave identical physical property sets. This is to allow each stream to have its owninitialisation, 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 conjugate 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 stream 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 6-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 6-11 of this chapter.

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

Page 212: Star Uguide

MATERIAL PROPERTY AND FLOW CHARACTERISATION Chapter 6

Multi-Stream and Conjugate Property Setting

6-8 Version 3.24

Step 4

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

Step 5

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

Step 6

For thermal problems, turn on the enthalpy equation solver in all fluid streams usingthe “Thermal Models” panel. The enthalpy equation solver for solid materials isactivated simply by selecting option Conjugate Heat Transfer in the “ThermalOptions” panel. Special considerations regarding the use of this option arediscussed in “Conjugate Heat Transfer” on page 6-16 of this chapter.

Step 7

Specify initial values for the flow variables in each fluid stream using the“Initialisation” panel (Liquids and Gases folder). The temperature 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 stream 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 6-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 6-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 213: Star Uguide

Chapter 6 MATERIAL PROPERTY AND FLOW CHARACTERISATION

Compressible Flow

Version 3.24 6-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 thermophysical model settings in your problem may be inspectedby selecting the relevant panels in the Thermophysical Models and Propertiesfolder. In sub-folders Liquids and Gases and Solids, open each constituent panel inturn and scroll through the available materials. Alternatively, type commandMLIST to display a brief or comprehensive listing of properties for any material inthe Output window.

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 stream via the slider at the bottom of the panel.

Step 2

Declare the flow as (ideal gas) compressible by selecting option Ideal-f(T,P) 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 214: Star Uguide

MATERIAL PROPERTY AND FLOW CHARACTERISATION Chapter 6

Compressible Flow

6-10 Version 3.24

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 Figure7-7 on page 7-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 8, “Output controls”,this is based on the magnitude of the normalised residuals). In this situation, itcould be more appropriate to inspect the convergence history of, say, massand enthalpy and terminate the solution process after a sufficiently largenumber 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 215: Star Uguide

Chapter 6 MATERIAL PROPERTY AND FLOW CHARACTERISATION

Non-Newtonian Flow

Version 3.24 6-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 streamcontaining 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.

II s

Page 216: Star Uguide

MATERIAL PROPERTY AND FLOW CHARACTERISATION Chapter 6

Turbulence Modelling

6-12 Version 3.24

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 6-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-19), (6-20) and (6-21) 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 6-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 is thereforerequired (see also Chapter 6, “Low Reynolds number turbulence models”).Both low Re and wall function treatments may be used in the same problem,but only if they apply to separate streams.

4. Hybrid wall boundary condition, which offers a special wall treatment 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 217: Star Uguide

Chapter 6 MATERIAL PROPERTY AND FLOW CHARACTERISATION

Turbulence Modelling

Version 3.24 6-13

Figure 6-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 6-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 218: Star Uguide

MATERIAL PROPERTY AND FLOW CHARACTERISATION Chapter 6

Turbulence Modelling

6-14 Version 3.24

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 stream in question (i.e. the switching locationbetween high and low Re regions shown in Figure 6-3 lies outside the NWLin some places), the switching location there is assumed to be at the edge ofthe NWL and a warning message is issued on file case.info. In suchcases, it is possible to increase the NWL thickness to a more suitable valueand 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. Note that solution convergence for the mixing length (zero-equation) modelcan be very slow in problems containing very low velocity regions near thewall, i.e. separated flow.

6. The normal distances from the wall within which the two-layer model appliesare written to file casename.ndt

7. If you switch from a serial to a parallel (STAR-HPC) run, or if you change thenumber of processors employed in the parallel run, you will need to discardany existing file with extension .ndt. STAR should then be instructed tore-calculate the file contents for each processor.

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

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

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

4. Normal distances from the wall for all cells in the stream where the low Remodel applies are calculated and written to file casename.ndtIt is important to note that files of this type, produced by the Low Re andTwo-layer calculations, are not interchangeable.

f µ

y+ 40≤ y+

Page 219: Star Uguide

Chapter 6 MATERIAL PROPERTY AND FLOW CHARACTERISATION

Turbulence Modelling

Version 3.24 6-15

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

LES models

1. The current implementation in STAR-CD is limited to incompressibleisothermal flows. A transient analysis setting is also required, although theproblem being modelled may in reality be a steady-state one.

2. The recommended discretisation practices are as follows:

(a) Temporal discretisation should preferably be of the Crank-Nicholson type(see “Crank-Nicholson scheme” on page 4-5 of the Methodology manual)

(b) The time step for the calculation should be selected so that the maximumCourant number is of the order of 0.5

(c) The convection differencing scheme for the momentum equation shouldideally be CD, MARS or Blended Differencing (see “Higher-order spatialdiscretisation schemes” on page 4-6) with a high blending factor (greaterthan 0.9).

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, but note that this option is feasible only for solution(.pst) files created by STAR-CD Version 3.2.

y+

y+

Page 220: Star Uguide

MATERIAL PROPERTY AND FLOW CHARACTERISATION Chapter 6

Conjugate Heat Transfer

6-16 Version 3.24

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

Conjugate Heat Transfer

The theory behind conjugate heat transfer models and the manner of implementingit in STAR-CD is given in Chapter 16, “Conjugate Heat Transfer” of theMethodology volume. This section contains an outline of the process to be followedwhen setting up this type of model and includes cross-references to appropriateparts of the STAR GUIde 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 conjugate heat transfer models

Step 1

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

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 221: Star Uguide

Chapter 6 MATERIAL PROPERTY AND FLOW CHARACTERISATION

Conjugate Heat Transfer

Version 3.24 6-17

Figure 6-4 Simple heat exchanger

In terms of the heat exchanger example shown in Figure 6-4, this requires thefollowing actions (see also “Multi-Stream and Conjugate Property Setting” on page6-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 6-3.• Specify the physical properties of each material

Step 2

Turn on Conjugate Heat Transfer in the “Thermal Options” STAR-GUIde panel.Note that this also has the effect of switching on the temperature solver in 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 commandPRTEMP 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).

Material 1 — steam

Material 2 — hot gas

Heat flow

Material 3 — steel

Page 222: Star Uguide

MATERIAL PROPERTY AND FLOW CHARACTERISATION Chapter 6

Conjugate Heat Transfer

6-18 Version 3.24

Conjugate 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 3, “Extrusion”). The surrounding mesh isautomatically adjusted to make room for the solid cells, as shown in Figure 6-5.

Figure 6-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 6-5. This bringsthe baffle thickness down to zero and avoids the need to create coupled cellsin those regions.

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

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

Ordinary baffle Fully-conducting baffle

Before After

Page 223: Star Uguide

Chapter 6 MATERIAL PROPERTY AND FLOW CHARACTERISATION

Conjugate Heat Transfer

Version 3.24 6-19

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 Conjugate Heat Transfer in the “Thermal Options” STAR-GUIde panel.

Step 6

Apply the appropriate wall boundary condition to the solid cells created in Step 3.If none is specified, the default wall boundary condition for region number 0 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 conjugate heat transfer

1. The On button in the Conjugate 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 conjugate 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. Thechoice of single or double precision mode can be made when running STAR(see Chapter 2, “Running a CFD Analysis”, Step 6).

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

Page 224: Star Uguide

MATERIAL PROPERTY AND FLOW CHARACTERISATION Chapter 6

Buoyancy-driven Flows and Natural Convection

6-20 Version 3.24

4. In some situations the energy under-relaxation factor in fluid regions has to bereduced 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 4, “Couple creation”.

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 thegravitational 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 the

Page 225: Star Uguide

Chapter 6 MATERIAL PROPERTY AND FLOW CHARACTERISATION

Fluid Injection

Version 3.24 6-21

round-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 creating the STAR-CD executable code (see Chapter 2, “Running aCFD Analysis”, Step 6).

3. In multi-stream problems, the reference density and datum location should bedefined stream-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 “Relaxation and Solver Parameters” inSTAR GUIde. This measure often helps to stabilise the solution and promoteconvergence.

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 8, “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 befollowed 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.

Page 226: Star Uguide

MATERIAL PROPERTY AND FLOW CHARACTERISATION Chapter 6

Fluid Injection

6-22 Version 3.24

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 “Cell Table” onpage 6-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 18, “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 227: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Introduction

Version 3.24 7-1

Chapter 7 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) fluid/solid interface boundaries in conjugate 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 7-1 showsa boundary region made up of nine cell faces.

Figure 7-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 3-37. In the exampleshown in Figure 7-2, boundary nos. 1 to 9 are assigned to region 1.

Page 228: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Boundary Location

7-2 Version 3.24

Figure 7-2 Boundary cell face indexing

Thus, each boundary in the model is identified by a region number (user-defined)and composed of boundary cell faces that are automatically numbered 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 individual boundaries to a region using the screen cursor tomark the vertices of the target cell face — command BDX. This is similar tocommand CDX used for cell generation.

• Assignment of boundaries to a region using the keyboard — commandBDEFINE. This requires input of the region number and the vertex numberslocated at the corners of the target cell face, as shown in Figure 7-3.pro-STAR generates the boundary number automatically.

• Further boundaries can be created individually or generated from an existingset, using command BGENERATE. This creates additional boundaries byapplying an offset to the vertices of the previously-defined set, as shown inFigure 7-4.

1 2 3

4 5 6

7 8 9

Page 229: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Boundary Location

Version 3.24 7-3

Figure 7-3 Boundary assignment for a single cell face

Figure 7-4 Boundary assignment for multiple cell faces

• Modification of the constituent vertices of the 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.

Command: BDEF ,

12 3 4 5

67 8 9 10

1112 13

14 15

5↑

Region no. 5

, 1 , 2 , 7 , 6

12 3 4 5

67 8 9 10

1112 13

14 15

Commands: BGEN ,BGEN ,

↑Setsto be

created

Vertexoffset

42

,,

15

,,

1 , 1 , 11 , 4 , 1

Page 230: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Boundary Location

7-4 Version 3.24

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

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 11, 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, Internal,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(“Boundary listing” below) or by typing command BSET (see the pro-STARCommands volume for a description of additional selection options).

Page 231: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Boundary Location

Version 3.24 7-5

Boundary listing

This is included in the Boundary List dialog shown below and is obtained byselecting Lists > Boundaries from the main menu bar. Boundary definitions interms of constituent vertices, boundary type and region number are displayed in ascroll list in numerically ascending order. There is also a choice of listing allboundaries or just the current set (marked by asterisks in the Bset column). Thechoice is made by simply selecting the Show All Boundaries or Show Bset Onlyoption, 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 232: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Boundary Region Definition

7-6 Version 3.24

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. Internal17. 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 233: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Boundary Region Definition

Version 3.24 7-7

• 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:

Page 234: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Boundary Region Definition

7-8 Version 3.24

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.

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 18):

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”) and

Page 235: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Boundary Region Definition

Version 3.24 7-9

may 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 ofvalid 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 STAR during theCFD analysis stage. 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 7-5 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 7-5 Mapping and interpolation of table data onto a boundary

Please also note the following:

i) It is possible to produce contour or vector plots of the boundary

AB

C DEF

G H

1

2

Boundaryface centre

Table data nodeTable data map Boundary mesh

Page 236: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Inlet Boundaries

7-10 Version 3.24

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

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

(c) GT-POWER — set up a link with the GT-POWER engine systemsimulation tool (see Chapter 10 in 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 7-6).

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 237: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Inlet Boundaries

Version 3.24 7-11

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 streams 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 Figure7-7 on page 7-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 7-8), the permissiblevariable names that may appear in the table and their meaning is as follows:

(a) U — U-component of velocity

Page 238: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Outlet Boundaries

7-12 Version 3.24

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

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 stream should

sum to unity, i.e.

(7-1)

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

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

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.

f s

f s∑ 1=

mout

Page 239: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Pressure Boundaries

Version 3.24 7-13

Useful points

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

2. For solution stability and accuracy, outlet boundaries should be used only fardownstream of strong recirculation regions, where it is reasonable to expecttrue outflow 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 7-8), 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.

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 radialequilibrium. 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 or mass fraction, it is possible toselect in advance the way in which these quantities will be determined. The choicesare made in the “Define Boundary Regions” panel for pressure boundaries, asshown in the example below, and are fully described in the “Pressure Boundary”

Page 240: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Pressure Boundaries

7-14 Version 3.24

on-line Help topic.

Useful points

1. For a given fluid stream, 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 10bars. 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 “Flow Field Initialisation” on page 7-41).

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 GUIde

Page 241: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Stagnation Boundaries

Version 3.24 7-15

panel) is recommend.9. Any type of mesh may be used for problems containing radial equilibrium

boundaries but only one such region must be employed in the model. 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 7-8), 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. Do not use tabular input together with the Mean On option (see the “PressureBoundary” STAR GUIde panel) as this will overwrite the table data.

Stagnation Boundaries

Introduction

This condition is typically used on a boundary lying in a large reservoir where 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 242: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Stagnation Boundaries

7-16 Version 3.24

Useful points

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

2. Boundary values for turbulence in streams 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 “Flow Field Initialisation” on page 7-41). Thiswill ensure that the calculations start with a reasonable initial velocity field.

4. For a given fluid stream, 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 7-7 on page 7-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. If boundary conditions are set using a table (see page 7-8), the permissiblevariable names that may appear in the table and their meaning is as follows:

(a) DCX — Direction cosine for U-component of velocity

Page 243: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Non-reflective Pressure and Stagnation Boundaries

Version 3.24 7-17

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

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

Figure 7-6 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 dependentvariable values that need to be satisfied by the CFD simulation and is supplied inthe “Define Boundary Regions” panel. The relevant form of this panel for

Wall

Wall

Circumferentialdirection

Flow (axial)direction

Cyclicboundary

Cyclicboundary

Page 244: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Non-reflective Pressure and Stagnation Boundaries

7-18 Version 3.24

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

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

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

2. Such conditions cannot be assigned to boundary region no. 0.

Page 245: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Wall Boundaries

Version 3.24 7-19

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

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

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

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

(a) Chemical reactions and scalar variables(b) Radiation(c) Reynolds Stress and V2F turbulence models(d) Two-phase flow(e) Moving meshes(f) Liquid films(g) Free surface and cavitation

7. If boundary conditions are set using a table (see page 7-8), 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.

Wall Boundaries

Introduction

STAR’s implementation of wall boundaries involves a generalisation and extensionof the no-slip and impermeability conditions commonly used at such surfaces. Thus,

Page 246: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Wall Boundaries

7-20 Version 3.24

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 three methods, as discussed in Chapter 6,“Multi-Stream and Conjugate Property Setting”, Step 5.

• Smooth or rough.• Moving or stationary. A wall may move within the surface it defines. If

motion normal to that surface is desired, use the moving mesh featuresdiscussed in Chapter 16, “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 11).

As with other boundaries, wall boundary values are needed only for variablespertinent to your problem (see also “Boundary Region Definition” on page 7-6).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 surface emissivity, reflectivity and transmissivity [dimensionless]are required (see also Chapter 11). These should be typed in the text boxes

Page 247: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Wall Boundaries

Version 3.24 7-21

provided.2. The 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 for an opaque, grey diffuse surface) is notenforced by the solver. For your wall boundary condition to obey Kirchoff’s law,you must enter the condition:

reflectivity = 1-emissivity

Solar radiation properties

In solar radiation problems:

1. A wall can be declared as Exposed or Unexposed to incident radiation, byselecting the appropriate option from the Solar Heating pop-up menu. Notethat this option does not apply to internal ‘walls’ (i.e. baffles and solid/fluidinterfaces).

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)

iii) No other user input is required.

(b) If both thermal and solar radiation are switched on

i) The code treats the two radiation components separatelyii) The transmissivities of the thermal and solar components are

assumed to be equaliii) For the thermal component, the reflectivity is supplied in the text

box provided and the thermal absorptivity calculated as (1 –reflectivity – transmissivity)

iv) For the solar component, the value of solar absorptivity is specified.The reflectivity for diffuse solar radiation is calculated as (1 –absorptivity – transmissivity) and it can be different from thethermal radiation reflectivity.

The user input required under the variou™êmbinations of thermal and/or solar

Page 248: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Wall Boundaries

7-22 Version 3.24

radiation conditions may be conveniently summarised in the table below:

.

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 7-7 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 7-8), 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.

Table 7-1: Summary of thermal radiation property requirements

ConditionProperty

Emissivity Reflectivity Absorptivity Transmissivity Exposure

Thermal Y Y N (=1-R-T) Y N

Thermal& Solar

Y Y Y Y Y

Solar N (=0) N (=0) N (=1-T) Y Y

Page 249: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Baffle Boundaries

Version 3.24 7-23

Figure 7-7 Example of tetrahedral plus layered mesh structure

Baffle Boundaries

Introduction

Baffles are zero-thickness cells within the flow field. They represent solid or porousregions whose physical dimensions are much smaller than the local meshdimensions, as shown in the example of Figure 7-8.

Figure 7-8 Example model with baffles: duct bend with turning vanes

Baffle ‘cells’ are normally defined via the Cell Tool, as described in Chapter 3, page3-46. 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 250: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Baffle Boundaries

7-24 Version 3.24

The discussion of porous media in Chapter 10 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 7-9.

∆p

Page 251: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Baffle Boundaries

Version 3.24 7-25

Figure 7-9 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 calculates the one-dimensional heat transfer across the baffle basedon the local temperature and flow conditions on either side. This choice ofboundary condition naturally excludes a different choice for Side 2 andtherefore the Wall Heat pop-up menu is deactivated for that side. Anexception to this rule occurs when thermal radiation is switched on, inwhich case radiation properties for both sides of the baffle need to besupplied.

(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 surface emissivity, reflectivity and transmissivity [dimensionless]are required (see also Chapter 11). 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 252: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Baffle Boundaries

7-26 Version 3.24

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 (see also Chapter 11,“Transparent solids”).

Note also that Kirchoff’s law (emissivity = absorptivity for an opaque, greydiffuse surface) is not enforced by the solver. For your baffle boundary conditionto obey Kirchoff’s law, you must enter the condition:

reflectivity = 1-emissivity.

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 switched on

(a) A value of absorptivity [dimensionless] is supplied for the solar radiationcomponent

(b) Values for emissivity, reflectivity and transmissivity [dimensionless] aresupplied for the thermal radiation component

The user input required under the various combinations of thermal and/or solarradiation conditions may be conveniently summarised in the table below:

.

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 7-8), the permissible

Table 7-2: Summary of thermal radiation property requirements

ConditionProperty

Emissivity Reflectivity Absorptivity Transmissivity Exposure

Thermal Y Y N (=1-R-T) Y N

Thermal& Solar

Y Y Y Y N

Solar N (=0) N (=0) N (=1) N (=0) N

Page 253: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Symmetry Plane Boundaries

Version 3.24 7-27

variable 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

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 Figure7-10. Selected scalar variables are forced to be equal at corresponding faces on thetwo regions. As shown in Figure 7-10, 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 7-11, showing a cascade of repeating baffles.

Page 254: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Cyclic Boundaries

7-28 Version 3.24

Figure 7-10 Cyclic conditions defined using a local coordinate system

Figure 7-11 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 255: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Cyclic Boundaries

Version 3.24 7-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 7-11) or ananticyclic pair (as in Figure 7-12). 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 7-12.

Figure 7-12 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 7-11 andFigure 7-12. 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 7-13), the system requires anarbitrary matching operation. The latter is similar to matching cell faceson either side of an interface between mesh blocks (see Chapter 4,“Integral and arbitrary connectivity”). It thus involves matching ofso-called master boundary faces on one side of the cyclic pair with slavefaces 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 256: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Cyclic Boundaries

7-30 Version 3.24

Figure 7-13 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 7-12. For thermal problems, the bulk mean temperature on theinflow side of the cyclic pair is also required.

Note that:

(a) PROSTAR distinguishes between the inlet and outlet sides of a partiallycyclic pair by assigning a pressure drop or flow rate to one member that is

Page 257: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Cyclic Boundaries

Version 3.24 7-31

equal in magnitude but of opposite sign to that for the other member. Thesign convention is as follows:

i) Pressure Drop+ Inlet– Outlet

ii) Flow rate+ Outlet– Inlet

(b) Partial cyclic conditions can only be applied to boundaries matched inCartesian coordinates

(c) Such conditions are not available for chemical species mass fractions andcannot be used in variable-density flows

(d) Arbitrary cyclic matching (see page 7-29 above) is not allowed for partialcyclic conditions

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

Commands: CYLIST CYDELETE CYCOMPRESS

Page 258: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Free-stream Transmissive Boundaries

7-32 Version 3.24

• Compression — click on the Compress button. This involves the eliminationof 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 region (free stream) 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 259: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Free-stream Transmissive Boundaries

Version 3.24 7-33

STAR calculates the magnitude and direction of the flow at the boundary as part ofthe 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 streams 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 7-7 on page 7-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 7-8), the permissiblevariable names that may appear in the table and their meaning is as follows:

Page 260: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Transient-wave Transmissive Boundaries

7-34 Version 3.24

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

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 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 261: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Transient-wave Transmissive Boundaries

Version 3.24 7-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 streams 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 7-7 on page 7-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 7-8), the permissible

Page 262: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Riemann Boundaries

7-36 Version 3.24

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.

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 263: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Riemann Boundaries

Version 3.24 7-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 stream to which such a boundary belongs is setto Ideal-f(T,P)

2. Boundary values for turbulence in streams 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 7-7 on page 7-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 264: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Attachment Boundaries

7-38 Version 3.24

will not be used.6. If boundary conditions are set using a table (see page 7-8), the permissible

variable names that may appear in the table and their meaning is as follows:

(a) 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.

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 16, “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” on page16-19 and “Arbitrary Sliding Interfaces” on page 16-22).

Two input parameters are needed:

• A local coordinate system in which the boundaries are to be matched• An alternate boundary region number

The second parameter is required for cell layer attachment cases and serves tomaintain appropriate boundary conditions in the solution domain if the cells oneither side of the interface become disconnected. The alternate boundary regionmust be of ‘wall’ or ‘inlet’ type. Examples of cases requiring attachment boundariesare given in Chapter 16.

Page 265: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Radiation Boundaries

Version 3.24 7-39

Useful point

1. To obtain a stable/convergent solution for meshes containing trimmed(polyhedral) cells, it is necessary to create at least two cell layers immediatelynext to the boundary (see Figure 7-7 on page 7-23). If Pro*am is employed,use its built-in mesh generation capabilities for this purpose. If the mesh isimported from a package that lacks such 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.

Radiation Boundaries

Radiation boundaries are used for the purpose of separating a region of your modelwhere radiation effects are important from other regions 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 11):

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 region where it emanated. The escaped radiationshould be low enough not to influence the outside regions.

• 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 theradiative sub-domain.

Phase-Escape (Degassing) Boundaries

This type of boundary appears exclusively in Eulerian multi-phase problems (seeChapter 14 of this volume) and represents a degassing free-surface bounding atwo-phase system of gas bubbles in a liquid, corresponding to the dispersed and

Page 266: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Internal Regions

7-40 Version 3.24

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

Internal Regions

These are arbitrary surfaces, defined in the same way as ordinary boundaries butplaced on any cell faces within the solution domain so as to form internal surfaces.They are used purely for monitoring engineering data such as mass flux (see panel“Monitor Boundary Behaviour”) so no further user input is required on the “DefineBoundary Regions” panel.

Internal regions do not affect the flow field in any way; STAR simply calculatesthe monitored data values at the specified region’s surface and stores them forsubsequent display as a function of time or number of iterations (see panel“Engineering Data”). The same monitored data values are available at internalregions as at an open boundary region, except that:

• Item Heat Flux is not available• Field values are taken from the neighbouring cell centres and are not

interpolated to the boundary• Item Enthalpy In/Out is based on convection only, so it will be zero in solid

materials

Each face of an internal region “belongs” to a neighbouring cell, such that the massflux is defined as being positive when it leaves this cell through the face. This inturn determines the face’s orientation and, for consistent calculation of the totalmass flux through the region, it is important that all its faces are oriented the sameway.

The choice of which cell an internal 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 internal region faces as they do not involve the explicit selection of a cellface and hence the orientation of the internal region face is indeterminate. Cautionshould also be exercised when generating internal regions automatically, forexample by cell refinement. When visualising internal regions, their orientation isindicated using an arrow normal to the boundary and whose direction indicates thedirection of positive flux, as shown in Figure 7-14 below.

Page 267: Star Uguide

Chapter 7 BOUNDARY AND INITIAL CONDITIONS

Boundary Visualisation

Version 3.24 7-41

Figure 7-14 Internal region display

Boundary Visualisation

As described in “Boundary set selection facilities” on page 7-4, 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.

Flow Field 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 Gases sub-folder. Depending on the problem, youmay also need to use panel “Initialisation” in the Additional Scalars sub-folder (forinitial chemical species mass fractions) or another panel also called “Initialisation”in the Solids sub-folder (for initial solid temperatures in conjugate heat transferproblems).

Page 268: Star Uguide

BOUNDARY AND INITIAL CONDITIONS Chapter 7

Flow Field Initialisation

7-42 Version 3.24

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 in combination with one of the CodeInitialization options in the “Initialisation” panel, the built-in procedure onlycorrects the mass fluxes to satisfy continuity. The Initial Field Restart optionshould be chosen if any change has been made to the boundary conditions orreference quantities (pressure and/or temperature).

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 8, “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 Manual Initialization in theInitialization panel and option Constant in the Values pop-menu of eachrelevant tab. Type values for each variable in the text boxes provided.

2. Set values through a user-supplied subroutine — select option ManualInitialization in the Initialization panel and option User in the Valuespop-menu of each relevant tab. Specify the required distributions insubroutine INITFI.

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 Restartshould be chosen to start the analysis from a previously computed steady-statesolution. This option must also be used for all moving mesh cases.

Page 269: Star Uguide

Chapter 8 CONTROL FUNCTIONS

Introduction

Version 3.24 8-1

Chapter 8 CONTROL FUNCTIONS

Introduction

At this stage of modelling, the following tasks should have been completed:

1. Mesh set up2. Fluid property and thermofluid 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 calculating steady-state solutions:

• Conventional approach — uses an iterative method employing under-relaxation factors

• Pseudo-transient approach — under-relaxation is replaced by time marchingto the converged solution in fixed-length time steps. Note, however, that anunder-relaxation factor (default value 0.2) is still used on the pressureequation. The pseudo-transient solution mode can be usefully employed incases such as high-speed compressible flow where STAR-CD’s built-ininitialisation procedure fails to produce a good initial flow field. It issometimes necessary to solve such problems using a truly transient solutionmethod, in which case the “Default (single-transient) solution mode”approachdescribed later in this chapter should be adopted.

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:

Page 270: Star Uguide

CONTROL FUNCTIONS Chapter 8

Analysis Controls for Steady-State Problems

8-2 Version 3.24

• 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. Select the numerical algorithmto be used (see topic “Pseudo-Transient Solution”), plus any additionalparameters required by the algorithm you have chosen. The maximumresidual error tolerance (i.e. maximum acceptable level of remaining error inthe solution) should also be specified; the normalised residuals are displayedon the screen and also saved on file case.run, as in ordinary steady-stateruns.

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 “Relaxation and Solver Parameters” (under-relaxation factors, number ofcalculation sweeps and residual error tolerances for each solution variable).

Step 5

Choose one of the available “Differencing Schemes”. Note, however, that inSTAR-HPC runs the QUICK and SFCD differencing schemes revert by defaultback to UD at the inter-processor boundaries. This means that results will be slightlydifferent as compared with those from a sequential run. It is suggested that other,more suitable higher-order differencing schemes now available in STAR-CD, suchas LUD and MARS, should be used with STAR-HPC if high spatial discretisationaccuracy 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 stepsbelow:

Step 6

Consider whether detailed printout on the solution progress is required and ifnecessary specify the appropriate settings in the “Monitor Numeric Behaviour”panel. If you wish to use the alternative residual normalisation method described inthe Methodology volume (Chapter 7, “Completion tests”) issue command ANORMfrom the pro-STAR I/O window.

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 and

Page 271: Star Uguide

Chapter 8 CONTROL FUNCTIONS

Analysis Controls for Steady-State Problems

Version 3.24 8-3

the type of monitoring information to be generated for them• “Monitor Cell Behaviour” — select one or more sub-domains, defined in

terms 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 (.pst) 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(or calculation loops, see “Steady state problems”).

• For pseudo-transient runs, specify the time step size and the maximumnumber 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.

Page 272: Star Uguide

CONTROL FUNCTIONS Chapter 8

Analysis Controls for Transient Problems

8-4 Version 3.24

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 6,“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.

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. Selectappropriate parameters for the PISO numerical solution algorithm (this is the onlyalgorithm available in this case, see topic “Transient problems”). Also select thetime differencing scheme required.

Page 273: Star Uguide

Chapter 8 CONTROL FUNCTIONS

Analysis Controls for Transient Problems

Version 3.24 8-5

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, consult“Transient calculations with PISO” on page 1-15 of this volume for information andadvice.

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

Go to the Output Controls sub-folder and open the “Monitor Numeric Behaviour”panel. Select an option for displaying and storing information on the solutionprogress in the form of either global rates of change of flow variables or normalisedresiduals. The latter is appropriate when analysing problems that are essentiallysteady-state in character. Therefore, the solution is deemed to have reached a steadystate and the analysis stops if the residuals are to fall below the specified maximumresidual error tolerance (see also Chapter 7, “Completion tests” in the Methodologyvolume).

Step 5

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 (.pst) 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 (.pst) file is as follows:

i) File case.pst only contains analysis results for the last time step.These form a complete set of all cell data relevant to the 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 lengthytransients, 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 files

Page 274: Star Uguide

CONTROL FUNCTIONS Chapter 8

Analysis Controls for Transient Problems

8-6 Version 3.24

and thus eases the data management and manipulation processes.

Step 6

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 7

Specify any other necessary controls in the Sources and Other Controls sub-folders,in the same manner as for steady-state problems.

Step 8

Go to the “Set Run Time Controls” panel (Analysis Preparation folder) and specify:

1. The analysis run time2. The method of calculating the time step size and the total number of time

steps, see “Transient problems”

Step 9

To complete the controls specification, you need to decide whether the analysis 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 16, “Moving Meshes”)

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.

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 8-1(a).

Page 275: Star Uguide

Chapter 8 CONTROL FUNCTIONS

Analysis Controls for Transient Problems

Version 3.24 8-7

2. Ramp — where the values change linearly between the state at the beginningof the load step to that at the end, see Figure 8-1(b).

3. Function of time — where the variation is arbitrary and is prescribed via auser subroutine.

Any combination of load step types can be specified, as shown in Figure 8-1(c)–(d).

Figure 8-1 Representation of boundary value changes by load steps

The difference between the available alternatives is illustrated in Figure 8-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 8-2.

(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 8-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 276: Star Uguide

CONTROL FUNCTIONS Chapter 8

Analysis Controls for Transient Problems

8-8 Version 3.24

Figure 8-2 Types of change in boundary conditions

Some examples of different load step sequences are shown in Figure 8-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 8-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 twotargets:

(a) Stability of the numerical solution algorithm, by minimising thecumulative error in the numerical solution.

Boundary condition value

Time

Load step n–1

Load step n

Load step n+1

A

B

User coding

Ramp

Step

DT

Page 277: Star Uguide

Chapter 8 CONTROL FUNCTIONS

Analysis Controls for Transient Problems

Version 3.24 8-9

(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

(8-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 Method” panel (Solution Controls folder) and select appropriateparameters for the PISO numerical solution algorithm (this is the only algorithmavailable in this case, 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, consult“Transient calculations with PISO” on page 1-15 of this volume for information andadvice. Note that this information is stored for each load step in file case.trns.Therefore, if any changes are needed to these parameters after your load steps havebeen defined, you will need to retrieve the load step information, make the changesand then save the information back in the .trns file (see the description of Step 5and Step 6 below)

Co v ∆tl

-----------=

vv v c+

v

v

Page 278: Star Uguide

CONTROL FUNCTIONS Chapter 8

Analysis Controls for Transient Problems

8-10 Version 3.24

Step 4

In the “Monitor Numeric Behaviour” panel (Output Controls sub-folder), select anoption for displaying and storing information on the solution progress in the formof either global rates of change of flow variables or normalised residuals. The latteris appropriate when analysing problems that are essentially steady-state incharacter. Therefore, the solution is deemed to have reached a steady state and theanalysis stops if the residuals are to fall below the specified maximum residual errortolerance (see also Chapter 7, “Completion tests” in the Methodology volume).

Load step controlsStep 5

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.

Page 279: Star Uguide

Chapter 8 CONTROL FUNCTIONS

Analysis Controls for Transient Problems

Version 3.24 8-11

Step 6

Select a time differencing scheme from the Temporal Discretization pop-up menu.Option Implicit selects the (default) fully implicit first order scheme whileCrank-Nicholson selects the Crank-Nicholson second order scheme. The lattergives more accurate solutions but requires more memory and smaller time steps. Ifa blended scheme is required, select the Crank-Nicholson option and then type anappropriate blending factor (in the range ) in the text box provided (seealso Chapter 4, “Crank-Nicholson scheme” in the Methodology volume). Finally,your choice of time differencing scheme should be confirmed by clicking Apply.

Step 7

Supply in a sequential manner all information needed to completely define 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:

Commands: TRFILE LSTEP LSLIST LSSAVELSCOMPRESS LSRANGE LSGET LSDELETEMVGRID CPRINT CPRANGE WPRINTTDSCHEME CPOST SCTRANS WPOSTCDTRANS

0 γ 1≤ ≤

Page 280: Star Uguide

CONTROL FUNCTIONS Chapter 8

Analysis Controls for Transient Problems

8-12 Version 3.24

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

3. Modification of selected boundary values, without changing the boundarytype, as shown in Figure 8-1 — see page 7-8 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 7-8.The desired variation should be calculated in the appropriate user subroutine(BCDEFI, BCDEFO, BCDEFS, BCDEFP, BCDEFF, BCDEFT, or BCDEFW, see“Boundary condition subroutines” on page 18-5). These routines 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 thestart 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 8

Decide whether printed output is required. If so, specify:

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

Page 281: Star Uguide

Chapter 8 CONTROL FUNCTIONS

Analysis Controls for Transient Problems

Version 3.24 8-13

value in the Print Freq. text box.• The cell variables (e.g. velocities, pressure, temperature, etc.) to be printed —

click the appropriate Cell Print selection button underneath the 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 17, “Multi-component Mixing”, Step 9).

Step 9

Decide whether post-processing information is required. If so, specify:

• The output frequency (in terms of a time step interval) by typing a 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 17, “Multi-component Mixing”, Step 9).

All the above information is written to a special transient post data (.pstt) file.The difference between this and the usual solution (.pst) file is as follows:

• File case.pst contains the calculation results of only the last time step.These form a complete set of all cell data and the 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.

Page 282: Star Uguide

CONTROL FUNCTIONS Chapter 8

Analysis Controls for Transient Problems

8-14 Version 3.24

Other load step and general solution controlsStep 10

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 11

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 12

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.

Step 13

Specify any other necessary controls in the Sources and Other Controls sub-folders,in the same manner as for steady-state problems.

Step 14

The total number of time steps for the run is normally equal to the sum of all timesteps in each load step, as defined in Step 7. However, this total may be setindependently via command ITER, which may effectively stop the run in themiddle of a load step.

Step 15

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:

Page 283: Star Uguide

Chapter 8 CONTROL FUNCTIONS

Using Error Estimates

Version 3.24 8-15

• 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 8-10,Step 5 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 16, “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.

Using Error Estimates

STAR-CD’s built-in error estimation method (see Chapter 4, “Error Estimation” inthe Methodology volume) may be used in the following ways:

Steady-state flow

Error estimation may be turned on either before starting the analysis or aftercompleting it. In the former case, you will need to open the “Monitor NumericBehaviour” panel (Output Controls sub-folder) and select one or both of the errorestimation option buttons. To estimate errors after completing the analysis:

Step 1

Go to the Output Controls sub-folder and open the “Monitor Numeric Behaviour”panel. Select one or both of the error estimation option buttons.

Step 2

Go to the Analysis Preparation/Running folder and open the “Set Run TimeControls” panel. Set the number of iterations to 1.

Step 3

Open the “Analysis (Re)Start” panel and choose option Standard Restart.

Page 284: Star Uguide

CONTROL FUNCTIONS Chapter 8

Using Error Estimates

8-16 Version 3.24

Step 4

Save file case.prob and then exit from pro-STAR

Step 5

Re-run STAR. The run will finish after only one iteration.

Whichever way you do it, the estimation process will always write a file calledcase.err. This contains the spatial error estimate for all flow variables beingsolved apart from pressure.

Transient flow

In this case, one should ideally activate the error estimation process before startingthe analysis, since the error accumulates as the analysis advances in time. To do this,go to the Output Controls folder, open the “Monitor Numeric Behaviour” panel and

• select one or both of the error estimation option buttons;• specify the frequency with which error estimates will be saved by entering an

appropriate value in the Write Frequency for Residuals box.

Note that this must be done before writing file case.prob. In transient flow thereare two types of error present, those resulting from spatial discretisation, as insteady flow, and those resulting from temporal discretisation.

On completion of the run, the spatial errors will be stored in file case.err andthe total (spatial + temporal) errors in file case.terr. Both are written in thesame format as transient post data files. The spatial errors may then be used to aidgrid refinement (see “Solution-Adapted Mesh Changes”).

Spatial error estimates may also be produced by a restart run at the end of theanalysis, as described in the section on “Steady-state flow”, but remembering to setthe Write Frequency for Residuals value to 1.

Viewing the results

To view the estimated spatial errors, return to pro-STAR, go to the Post-Processingfolder in the STAR GUIde system and follow the steps below:

Step 1

Open the “Load Data” panel. In the “File(s) tab”:

• Select option Transient (this is because both .err and .terr files areformatted like transient post files)

• In the File Name box, specify the error file to be searched• Click Add File to List and Open Transient Post File to load the file• Choose the time step to be examined (or last iteration performed for

steady-state runs) in the Select Time Step list and click Store Iter/Time

Step 2

In the “Data tab”, select data type Cell or Cell & Wall/Bound to access the errorestimates for the desired solution variables. Note that:

• If you need to look at velocity errors, it is advisable to load the velocitymagnitude (stored in the Pressure variable) rather than individualcomponents

Page 285: Star Uguide

Chapter 8 CONTROL FUNCTIONS

Solution Control with Mesh Changes

Version 3.24 8-17

• There are no separately available pressure error estimates

Step 3

Go to the “Create Plots” panel and display the error distribution using one of theavailable plot types.

The total error estimate for transient cases may be inspected in a similar manner.

Solution Control with Mesh Changes

The discussion so far in this chapter assumes the usual condition of identical 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 (.pst) file to create a new data file with extension .smap thatcorresponds to the re-defined mesh. STAR reads this new file to restart the analysis.

Mesh-changing procedure

A description of the steps necessary for performing a mesh-changing 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 cell 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 (.mdl) file and a STAR solution (.pst) file exist. Save these bycopying them into other files of your choosing, say case.mdl tocase-coarse.mdl and case.pst to case-coarse.pst.

Step 2

Start a pro-STAR session and read in the coarse-mesh model. Perform whatevermesh refinement operations are necessary (see, for example, “Other couplefunctions” on page 4-22).

Step 3

Signal to STAR that the next run will restart from a special, mapped data file that isstill to be created. To do this, go to the Analysis Preparation/Running folder in theSTAR GUIde system and display the “Analysis (Re)Start” panel. Select optionsInitial Field Restart and Restart (Smapped) from the Restart File Option andInitial Field Restart pop-up menus, respectively.

Step 4

Save all information for the refined mesh, including the restart mode specificationabove. The files to be saved are:

Page 286: Star Uguide

CONTROL FUNCTIONS Chapter 8

Solution Control with Mesh Changes

8-18 Version 3.24

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

Step 5

Restore the original coarse-mesh model as follows:

• Choose File > Resume From in the main pro-STAR window’s menu bar.• Read 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 the original solution data by specifying case-coarse.pst as the

solution 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 3-46). This is becauseSMAP operates only on cells in the current set. This set may include both fluid andsolid cells and will normally contain all cells in the model.

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 input is as follows:

1. A pro-STAR model file name, specified in the Model File box. This file willcontain the refined mesh definition (case.mdl in this case). If necessary,use pro-STAR’s built-in file browser to locate the file.

2. An output file name for the mapped data (case.smap, as specified in Step 3above).

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:

Commands: SMAP TSMAP

Page 287: Star Uguide

Chapter 8 CONTROL FUNCTIONS

Solution-Adapted Mesh Changes

Version 3.24 8-19

(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 applicable only to 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

Terminate the pro-STAR session without writing a model file, as this would savethe original coarse-grid data.

Other noteworthy points are:

• In moving mesh problems containing removed cells (see “Cell-layerRemoval/Addition” on page 16-14), do not include such cells in the set formapping if option Use Tsmap is to be used.

• 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.• To visualise the outcome of the mapping operation, use the “Load Data”panel

in STAR GUIde’s Post-Processing folder. The .smap file can be manipulatedjust like a normal solution (.pst) file, by accessing it via the “File(s) tab”and then loading field values via the “Data tab”. The mapped data may thenbe checked by plotting contours but note that only “Cell Data” should be usedfor this purpose.

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

• the solution error estimate discussed under “Using Error Estimates” on page8-15; the results are stored in an error (.err) file

Page 288: Star Uguide

CONTROL FUNCTIONS Chapter 8

Solution-Adapted Mesh Changes

8-20 Version 3.24

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

Note that the .err and .rpo files are mutually exclusive. For each of the abovefiles, one may choose the flow variable and selection method to be employed. Atypical refinement session 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. Usually one would choose the errorestimates stored in file case.err. The flow variable on which to base therefinement depends on the application. For flow-dominated problems, the velocitymagnitude or the turbulence kinetic energy have been found to give good results;for chemical reaction- dominated problems, the temperature might be a betterchoice. 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 mesh regions.

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 resulting .smap file and redefining the monitoring andpressure reference cells, if these were within the area that has been refined.

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 a

Page 289: Star Uguide

Chapter 8 CONTROL FUNCTIONS

Solution-Adapted Mesh Changes

Version 3.24 8-21

completely new mesh built by any pro-STAR operation or imported from anexternal package (see “Importing Data from other Systems” on page 4-1). Thereverse effect, coarsening the mesh, may by achieved via one of the above methodsor by using the CJOIN command.

Page 290: Star Uguide
Page 291: Star Uguide

Chapter 9 POST-PROCESSING

Introduction

Version 3.24 9-1

Chapter 9 POST-PROCESSING

Introduction

Post-processing is an essential part of any CFD work. Given the complexity andvaried nature of flow conditions catered for by STAR, it is important for users to befamiliar with the overall post-processing capabilities available in pro-STAR. Thelatter contains facilities that are used in both the pre- and post-processing phase ofmodelling. These facilities generally fall into the following categories:

1. Database operations for collecting together groups of cells and vertices.2. Action operations for plotting cell, vertex or wall data.3. Plot characteristic functions that determine the plot type, viewing angle, plot

options, display mode, etc.

Computed results from STAR can be analysed in two basic ways, as follows:

1. By looking at the data printed during the course of the calculations and storedin the run-time output (.run) file. The data are presented in tabular form andare further discussed in Chapter 19.

2. By employing the post-processing facilities available in pro-STAR to displaythe results graphically. This is done in combination with the plotting functionsalready mentioned, by selecting various options in one of the STAR GUIdepanels. Additional facilities are also available in the Post menu, the Graphmenu or the Animation Module.

In this chapter, a step by step approach will be adopted to look at the differentpost-processing options available using the GUI facilities. For more detailedinformation on how these are implemented in command form, refer to thepro-STAR Commands volume.

Data Loading and Display Set-up

STAR results can be displayed and analysed by producing the following types ofplot:

• Vector plots of velocity fields — Figure 9-1.• Contour plots of scalar quantities — Figure 9-2.• Isometric surfaces of scalar quantities — Figure 9-3.• Contour and vector plots of wall data — Figure 9-4.• Particle tracks — Figure 9-5.• X-Y graphs — Figure 9-6.• Animated displays.

Page 292: Star Uguide

POST-PROCESSING Chapter 9

Data Loading and Display Set-up

9-2 Version 3.24

Figure 9-1 Vector plot of velocity magnitude

Figure 9-2 Contour plot of temperature

Page 293: Star Uguide

Chapter 9 POST-PROCESSING

Data Loading and Display Set-up

Version 3.24 9-3

Figure 9-3 Isometric plot of temperature

Figure 9-4 Contour plot of wall heat transfer coefficients

Page 294: Star Uguide

POST-PROCESSING Chapter 9

Data Loading and Display Set-up

9-4 Version 3.24

Figure 9-5 Particle tracks

Figure 9-6 Graph plot comparing results from two different meshes

Page 295: Star Uguide

Chapter 9 POST-PROCESSING

Data Loading and Display Set-up

Version 3.24 9-5

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

The basic steps needed for post-processing are as follows:

Step 1

Retrieve all basic information on the desired model by ‘resuming’ from thepro-STAR model file (a file with extension .mdl) — choose File > ResumeModel.

Step 2

Load the analysis results calculated by STAR for this model:

• For steady-state runs, these are stored in a solution file with extension .pst• For transient runs, the results are usually stored at pre-defined time intervals

in a special post data (.pstt) file. pro-STAR permits loading of these resultsaccording to the time at which they were computed. However, the standardsolution (.pst) file is also available, representing the state of the flowsystem at the very end of the transient run.

Facilities for loading either or both file types are available in STAR GUIde’s “LoadData” panel, located under the Post-Processing folder, and are grouped within the“File(s) tab”. Note that:

1. It is possible to check the contents of the currently loaded .pst file beforestarting to use it by issuing command PLIST.

2. If some of the information in the .pstt file is not required, it is possible todiscard the unwanted data and retain only the portion up to a given time stepby using command TRUNCATE. This can be useful when producing particletrack plots in problems where the solution becomes non-physical after acertain time.

3. If the currently-loaded .pstt file does not contain information at the desiredpoint in time, values at the next available time step are used instead. It is,however, possible to override this default by turning on a linear interpolationprocess that calculates data at the precise time required, using values stored atthe time steps on either side of the interpolation point. To do this, select Post

Commands: CAVERAGE VAVERAGE TRINTERPOLATEFLUXSUM PCROSS

Page 296: Star Uguide

POST-PROCESSING Chapter 9

Data Loading and Display Set-up

9-6 Version 3.24

> Trinterpolate from the main menu bar and then choose one of the optionsin the drop-down list displayed, as follows:

(a) Caverage — automatic averaging of all loaded cell values (option All) orjust those in the current cell set (option Cset) to give vertex values

(b) Vaverage — automatic averaging of all loaded vertex values to give cellvalues

(c) Both — averaging is performed with both the above loading operations,for all cells (option All) or only those in the current cell set (option Cset)

(d) None — no averaging

At this stage, both pre- and post-processing data should be available to the currentpro-STAR session.

Step 3

Choose the part of the model on which post-processing will be performed. This isdone using the coloured set-selection buttons on the left-hand side of the mainpro-STAR window. If the whole model is to be displayed, option All should beselected. Otherwise, a wide range of options is available to suit all requirements (seealso “Set Manipulation” on page 2-21 and the description in the pro-STARCommands volume).

Step 4

Choose the desired plot characteristics from the option buttons provided in the mainwindow or from the Plot menu in the main menu bar (see also “Plot Characteristics”on page 5-3). These may include the following:

1. Plot type, e.g. surface, wireframe, section — select an item from the Cell PlotType pop-up or the Plot > Type list. The choice may depend on the variablebeing post-processed. For example, contour plots of pressure cannot be madeusing the Normal (i.e. wireframe) option. For a full list of legitimate optionssee Appendix E.

2. Geometric display — use option buttons in the main window or theequivalent Plot menu options. These turn various display attributes on or off.The available facilities include:

(a) Mesh, edge or surface display.(b) Number display for cells, vertices, contour values, etc.

Step 5

Choose the direction from which to view the model and also its general orientation,as discussed in Chapter 5, “Plot Characteristics” on page 5-5.

Step 6

In cases involving section plots, it is necessary to make further choices concerningthe position of the section — see the discussion beginning on page 5-6 for the detailsof section plane definition.

A plotting operation at this stage (e.g. Plot > Cell Plot) will only display the meshgeometry. To display values of the solution variables further steps are required, asexplained in “Basic Post-processing Displays” on page 9-9.

Page 297: Star Uguide

Chapter 9 POST-PROCESSING

Data Loading and Display Set-up

Version 3.24 9-7

Step 7

Load the appropriate post-processing data in the computer’s memory, ready formanipulation, plotting, or printing. The data can include:

• vector quantities, i.e. velocity components or mass fluxes;• scalar quantities, e.g. pressure (piezometric, static, or total), temperature, wall

data (e.g. heat transfer coefficients), geometric information (e.g. vertexcoordinates for moving meshes), etc.

Facilities for accessing the above information are provided in STAR GUIde’s“Load Data” panel, located under the Post-Processing folder, and grouped withinthe “Data tab”. The available data types are:

• “Cell Data” — load cell-centred values for solution variables

• “Cell and Wall/Boundary Data” — load vertex values generated byinterpolation from cell-centred values

• “Boundary Data” — load solution variable boundary values

• “Wall Data” — load wall data calculated by STAR

In addition to the STAR GUIde facilities, the following two data loading options areavailable from the Post menu in the main pro-STAR window:

1. Get User Data — Get user data from any outside source (stored in filecase.usr) and then plot or manipulate them exactly as if they had beenread from a STAR solution file. This option activates the Get User Post Datadialog shown below:

The above dialog allows a complete specification of the data to be expected,as follows:

Commands: GETUSERDATA ULOAD

Page 298: Star Uguide

POST-PROCESSING Chapter 9

Data Loading and Display Set-up

9-8 Version 3.24

(a) File name — pro-STAR’s built-in file browser may be used to locate it.(b) Data Type — cell or vertex data(c) Registers — depending on what sort of data are to be read, this option

effectively defines their destination in terms of post-processing registernumbers (see “The OPERATE utility” on page 9-21). The availableoptions are:

i) Scalar — one data item per record, stored in Register 4.ii) Vector — three data items per record, stored in Registers 1-3.

iii) Both — four data items per record (three vector plus one scalar),stored in Registers 1-4.

iv) All — six data items per record (three vector plus three scalar),stored in Registers 1-6.

v) Register 1 - 6 — one data item per record, stored in the specifiedregister.

Note that the above options are not applicable to SMAP-type files.(d) File Type — if option User is selected, you must type a FORTRAN

format specification describing the data record structure in the text box atthe bottom of the dialog. Option Free specifies that the input file is in freeformat, i.e. it contains fields of arbitrary length separated by commas.

(e) Cell Offset — offset to be added to cell or vertex numbers upon input (notapplicable to SMAP-type files)

(f) Heading and Units — type in a heading and units definition. These areused as labels for any plots made subsequently.

(g) Post Registers — if option Initialize is selected, the post registers areinitialised to zero before reading in new data. By choosing NoInitialization, you are able to add the new data to what is already in theregisters.

Finally, the input file is read by clicking the Apply button.

The GETUSER operation reads a block every time it is executed and loads thedata encountered in up to five post registers. Thus, if the item of interest is theturbulent viscosity distribution (VIS), the operation needs to be performedtwice and the viscosity ends up in register no. 2. To subsequently access avariable in the first block, it is necessary to close the file first and then performanother GETUSER operation.

pro-STAR also offers facilities for reading in data from files that arecompliant with the CFD General Notation System (CGNS) specification andstoring them in memory for printing, plotting and other manipulation. Thesefacilities are presently available only in command form, viz. CGGCELL forcell-centred data and CGGVERTEX for vertex-centred data. The data file namedefaults to the last CGNS grid imported, i.e. it is of form case.cgns.

2. Save User Data — This is the reverse of Get User Data and works via theSave User Post Data dialog shown below. It is used to write a (.usr) filecontaining cell, vertex or wall data currently stored in pro-STAR’s postregisters.

Page 299: Star Uguide

Chapter 9 POST-PROCESSING

Basic Post-processing Displays

Version 3.24 9-9

The required input is as follows:

(a) File name(b) Registers — specify where the data are located via an appropriate

selection, as in the Get User operation.(c) File Type — specify the file format, as in the Get User operation.(d) Range — specify the range or set of cells/vertices for which to write post

data (not applicable to wall data).

The file itself is written by clicking the Apply button.

Basic Post-processing Displays

Plot specification

Depending on the type of data stored by the operations described in the “DataLoading and Display Set-up” section, you will need to choose a plot option. Theappropriate choice is made via the Plot Options pop-up menu on the left-hand sideof the main pro-STAR window. Additional plotting options may also be chosenfrom the Plot drop-down menu, shown below, in the menu bar:

Command: SAVUSERDATA

Page 300: Star Uguide

POST-PROCESSING Chapter 9

Basic Post-processing Displays

9-10 Version 3.24

A drop-down list opening from item Options offers the following choices:

1. The Geometry option is the default setting and is used for displaying themodel geometry and mesh structure.

2. The Vector option is used for displaying post-processing data that possessboth magnitude and direction (e.g. velocity vectors, force vectors, etc.).

3. The Contour option is used for plotting scalar variables (e.g. pressure,temperature, density, etc.).

4. A facility for displaying a contour plot of a scalar quantity with superimposedvector arrows is available via option Vect+Cont.

5. The Isosurface option is used to display constant-value surfaces for a givenscalar variable. The value for which the isometric surface is to be plotted mustbe typed in the dialog box displayed when this option is selected.An isosurface may be ‘stored’ as a named collection of shells and verticesusing command PSCREATE. Such a definition may then be recalled fordifferent purposes, e.g.

i) in order to be light shaded (see “Special lighting effects” on page5-10)

ii) used for plotting multiple hidden-line surfaces (see “Basic plot typedefinitions” on page 5-3)

iii) used as a platform on which to map currently stored post data (see“Mapping and Copying Post Data” on page 9-27); for example, atemperature distribution may be mapped on a pressure isosurface

If necessary, the shells may be subsequently deleted using commandPSDELETE.

Commands: POPTION PLTYPE CPLOT VPLOT WPLOT

Page 301: Star Uguide

Chapter 9 POST-PROCESSING

Basic Post-processing Displays

Version 3.24 9-11

The choice of plot option can also depend on the type of plot chosen (see thediscussion on plot type selection in “Data Loading and Display Set-up”, Step 4, onpage 9-6). This point is further illustrated by the examples given below. The usershould refer to Appendix E for a full list of permissible combinations.

Example 1Displaying the velocity field by velocity vector arrows.

1. Store all velocity vector data (i.e. U, V, W) in memory by selecting thecorresponding option buttons in the Load Cell Post Data dialog.

2. Choose Plot > Type > Normal to display the model in wire frame mode.3. Choose Plot > Options > Vector to plot the data as velocity vector arrows.

The above choice is usually not very useful because of the overwhelming amountof information which may be displayed simultaneously (see Figure 9-7). Alternativechoices can be made as follows:

• Plot > Type > Qhidden — only data on the free surfaces of the mesh will beplotted.

• Plot > Type > Ehidden — note that the velocity arrows are colouredaccording to a scale based on velocity magnitude (Figure 9-8).

• Plot > Type > Section — data on a pre-defined section(s) will be plotted, asdiscussed in “Data Loading and Display Set-up”, Step 6, on page 9-6 (Figure9-9).

Example 2Displaying the pressure or any other scalar quantity as a contour plot.

1. Store the pressure data in memory, ready to plot, by selecting Pressure in theLoad Vertex Post Data dialog.

2. Choose Plot > Options > Contour.

Contour plots of scalar data can only be plotted on surfaces. This reduces the choiceof plot types to the following:

• Plot > Type > Qhidden — line contour plots on the free surfaces of the mesh(Figure 9-10).

• Plot > Type > Ehidden — line or filled-colour contour plots on the freesurfaces of the mesh (Figure 9-11).

• Plot > Type > Section — line or filled-colour contour plots on user-definedsurfaces (Figure 9-12).

Example 3Displaying temperature contours with superimposed velocity arrows at a section.

1. Choose Plot > Type > Section.2. Store the three components of velocity plus temperature by selecting U, V, W

and Temperature in the Load Cell Post Data dialog.

The subsequent choices are:

Page 302: Star Uguide

POST-PROCESSING Chapter 9

Basic Post-processing Displays

9-12 Version 3.24

• Plot > Options > Vect+Cont — the plot will show contours of temperaturewith superimposed (uncoloured) velocity vectors (Figure 9-13).

• Plot > Options > Vector — this will display the same information as beforebut now the velocity vectors are coloured according to a scale based on thetemperature level at each location (Figure 9-14).

Plot display

The next step is to actually display the specified plot on the screen. This is done viaone of the plotting options in the menu, as follows:

• Cell Plot — plots data for the calculation mesh.• Wall Plot — plots wall data on the automatically-created shells at the wall

surfaces (see “Data Loading and Display Set-up”, item •, on page 9-7). Thenew shells must be included in the currently defined cell set before thisfunction is used. Using Options > Vector with wall data allows one to plotsurface force components rather than velocity components.

• Vertex Plot — plots vector data superimposed on a vertex plot.

Please note that option Cell Plot is the one normally used to plot interpolated vertexdata. Vertex Plot is simply an alternative method of displaying the sameinformation, as shown in Figure 9-15.

Option Replot can also be used at this stage as long as

• the database set for cells, vertices, or wall shells (see “Data Loading andDisplay Set-up”, Step 3, on page 9-6) does not change from one plot to thenext;

• there is an existing plot on display.

Page 303: Star Uguide

Chapter 9 POST-PROCESSING

Basic Post-processing Displays

Version 3.24 9-13

Figure 9-7 Full velocity field vector plot

Figure 9-8 Velocity plot on mesh surfaces

Figure 9-9 Velocity plot on a section

Page 304: Star Uguide

POST-PROCESSING Chapter 9

Basic Post-processing Displays

9-14 Version 3.24

Figure 9-10 Line contour plot on mesh surfaces

Figure 9-11 Filled-colour contour plot on mesh surfaces

Figure 9-12 Filled-colour contour plot on a section

Page 305: Star Uguide

Chapter 9 POST-PROCESSING

Basic Post-processing Displays

Version 3.24 9-15

Figure 9-13 Temperature contours combined with uncoloured velocity vectors

Figure 9-14 Velocity vectors coloured according to temperature

Figure 9-15 Velocity vector plot produced by VPLOT

Page 306: Star Uguide

POST-PROCESSING Chapter 9

Plot Manipulation

9-16 Version 3.24

Plot Manipulation

Flow field velocity vector plots can be manipulated using facilities in STARGUIde’s “Create Plots” panel, located under the Post-Processing folder. A tabcalled “Vectors” within this panel allows the following plotting operations:

• Changing the size of the velocity vectors by a given factor (Vector Scaleoptions), as illustrated by Figure 9-16.

• Changing the shape of the arrows representing the velocity vectors (VectorArrows options), as illustrated by Figure 9-17.

• Interpolation (mapping) of velocity vectors to a uniform grid (PresentationGrid options), as illustrated by Figure 9-18.

• Reducing (thinning out) the number of plotted vectors by a specified factor(Thin Vectors slider), as illustrated by Figure 9-19.

Contour plots of scalar post data can also be manipulated, as follows:

• Reducing (thinning out) the number of labels used in line contour plots by agiven factor, as set on the Thin Vectors slider of tab “Vectors”. This effect isillustrated by Figure 9-20.

• Changing the range and number of colours used for filled-colour contourplots or line contour plots, depending on the setting specified by commandTERMINAL (see “Plotting Functions” on page 2-32). This operation isperformed in another tab called “Options” and its effect when applied to afilled-colour plot is illustrated by Figure 9-21.

Furthermore, pro-STAR caters for changes to the basic colour table currently in use,by adjusting the RGB values of the colour map index (see “Colour settings” on page5-9). The standard background/foreground colour combination can also be reversedby choosing Plot > Background > Reverse from the menu bar. Finally, thedisplayed plot can also be labelled using a combination of commands such as:

• HEADING — changes the heading and units description on the plot label.• SUBTITLE — enables input of up to two subtitles for the plot.• PLLABEL — enables user-defined alphanumeric labels at specified locations.• PLARROW — enables user-defined arrows at specified locations.

Page 307: Star Uguide

Chapter 9 POST-PROCESSING

Plot Manipulation

Version 3.24 9-17

Figure 9-16 Size change of velocity vectors

Figure 9-17 Shape change of velocity vector arrows

Page 308: Star Uguide

POST-PROCESSING Chapter 9

Plot Manipulation

9-18 Version 3.24

Figure 9-18 Velocity vector mapping on a uniform grid

Figure 9-19 Reduction in number of plotted vectors

Page 309: Star Uguide

Chapter 9 POST-PROCESSING

Plot Manipulation

Version 3.24 9-19

Figure 9-20 Reduction in number of contour labels

Page 310: Star Uguide

POST-PROCESSING Chapter 9

Plot Manipulation

9-20 Version 3.24

Figure 9-21 Colour change of contour plots

Page 311: Star Uguide

Chapter 9 POST-PROCESSING

Data Manipulation

Version 3.24 9-21

Data Manipulation

The OPERATE utility

pro-STAR provides a utility for cell, vertex, boundary and wall data manipulationby allowing various mathematical operations to be performed on any post data orgeometry data items loaded from one or more data files. This utility is activated bychoosing Post > Operate from the menu bar to display the Post Register Operationsdialog shown below:

Geometry or post data items (over the entire mesh) can be stored at any time inso-called register numbers 1 to 6; the latter are selected via the various Registerpop-up menus appearing in the dialog. These registers are in fact the same thing asthe memory locations described in “Data Loading and Display Set-up”, Step 7 onpage 9-7. However, whereas with utilities such as GETCELL or GETVERTEX thedata items are simply stored in up to six registers, with the OPERATE utility it ispossible to manipulate them further.

The required operation is chosen from the Function pop-up menu. This in turncontrols the number of Register pop-up menus that appear within the Operationwindow and the context in which they are presented, i.e. the contents of that windoware always appropriate to the operation selected by the user.

A typical data manipulation process using this utility can be divided into threestages as follows:

1. Store the cell or vertex data in registers 1 to 6. Note that:

(a) The normal pro-STAR convention is that vector post data are stored inregisters 1, 2, and 3, corresponding to the X, Y and Z directions. Scalarpost data are stored in register 4. This convention applies when data areread in via the normal loading utilities such as GETCELL.

(b) The OPERATE utility also contains scalar loading functions. These offergreater flexibility regarding the register(s) into which data are loaded. Theavailable functions are:

i) Load Cell Data — similar in functionality to GETCELL; alsoallows loading of cell centroid coordinates (in a specified localcoordinate system, if required), volumes and areas (for shells orbaffles).

ii) Load Vertex Data — similar in functionality to GETVERTEX.iii) Load Boundary Data — similar in functionality to

GETBOUNDARY; also allows loading of boundary centroidcoordinates (in a specified local coordinate system, if required) and

Command: OPERATE

Page 312: Star Uguide

POST-PROCESSING Chapter 9

Data Manipulation

9-22 Version 3.24

areas.iv) Load Wall Data — similar in functionality to GETWALL; allows

loading of wall centroid coordinates (in a specified local coordinatesystem, if required) and areas.

v) Load User Data — similar to GETUSERDATA but with far feweroptions.

(c) Note that, although the choice of storage registers for input data isentirely up to the user, some of the operations performed in the nextstages (e.g. plotting) do assume that the convention given in a) above hasbeen observed.

2. Perform the required operation on the stored data (vector arithmetic, algebraicfunction, trigonometric function, etc.). The operands are selected from theRegister pop-up menus on the right-hand side of the ‘=’ sign. Clicking theApply button places the result of the operation in the register selected via thepop-up on the left-hand side, overwriting any data that may be there already.The available operations are grouped as follows:

(a) Multi-Register — operations are performed on values stored in two ormore registers, as indicated on the right-hand side of the ‘=’ sign. Theresult is stored in the register indicated on the left-hand side of the ‘=’sign (see the description of command OPERATE in the pro-STARCommands volume for a full list of functions).

(b) Single-Register — as above, except that only one register appears on theright-hand side.

(c) Scalar/Vector — as above, except that the available functions require aregister specification plus a constant value. The latter is typed in the textbox provided.

3. Optionally save the outcome of the operation. The available functions are:

(a) Put Cell Data — performs the reverse operation to Load Cell Data,i.e. data currently stored in a given register are written back to thesolution file as the cell item indicated.

(b) Save to File — saves data currently stored in a given register to a (.usr)file in binary or coded format. For wall data, there is a choice ofassociating each value with either its corresponding wall shell number orthe four vertex numbers constituting the shell.

(c) Register Keys — prepares pro-STAR to plot

i) the contents of registers 1 - 3 as vector quantities (option Vector),or

ii) the contents of registers 1 - 6 as flux quantities (option Flux). In thiscase, each register should contain the flux value corresponding toeach of the six faces of a given cell.

The next task is normally to print, summarise or plot the outcome of the aboveoperations. The following examples illustrate some of the possibilities:

Page 313: Star Uguide

Chapter 9 POST-PROCESSING

Data Manipulation

Version 3.24 9-23

Example 1Translation of velocity vectors from the calculated rotating frame of reference to astationary one.

1. Load the STAR output data by selecting Post > Load Static Post File fromthe menu bar and then choosing the required (.pst) file.

2. Activate the Post Register Operations dialog. Load the X-component ofcalculated velocity in register 1, by choosing Load Cell Data > VelocityU-component from the Function pop-up menu.

3. Repeat for components Y and Z, storing them in registers 2 and 3.4. Assuming that the system is rotating around the Z-axis of a local cylindrical

coordinate system 11 at 3000 rpm, re-calculate the velocity componentscurrently stored in registers 1 to 3 in a stationary reference frame. To do this,choose Multi-Register > Reframe(r*w) from the Function pop-up menu andthen type values for the coordinate system number (ICSYS) and rotationalspeed (Omega) in the text box provided.

5. Plot the re-calculated velocity vectors:

(a) Set pro-STAR up to plot registers 1-3 as vector quantities — chooseRegister Keys > Vector from the Function pop-up menu.

(b) Select Plot > Options > Vector from the menu bar, followed by CellPlot.

6. Scalar data for contour plotting can only be stored in register 4. Therefore, toproduce contour plots of velocity magnitude, activate the Post RegisterOperations dialog and choose Multi-Register > Vmagnitude from theFunction pop-up menu. This calculates velocity magnitudes from data inregisters 1 to 3 and stores the result in register 4.

7. To plot the data, choose Plot > Options > Contour from the menu bar,followed by Cell Plot.

Example 2Looking at the difference in pressure fields between two solution data filesXXold.pst and XXnew.pst.

1. Read the first file by selecting Post > Load Static Post File from the menubar and then specifying XXold.pst as the input file name. Click Apply.

2. Store field values of pressure (at cell vertices) for XXold in register 1 bychoosing Post > Operate > Load Vertex Data > Pressure from the menubar. Also type the appropriate material index number in the text box providedand click Apply.

3. Read the second file by selecting Post > Load Static Post File from the menubar and then specifying XXnew.pst as the input file name. Click Apply.

4. Store field values of pressure (at cell vertices) for XXnew in register 2 byrepeating the previous choices in the Post Register Operations dialog, makingsure that register 2 is selected as the destination register.

5. Calculate the difference between the two pressure fields and store in register 4for contour plotting. To this end, choose option Multi-Register > Subtract inthe dialog and select Register 4, Register 1 and Register 2 from the registerpop-up menus, in that order. To plot the data, choose Plot > Options >Contour from the menu bar, followed by Cell Plot.

Page 314: Star Uguide

POST-PROCESSING Chapter 9

Data Reporting

9-24 Version 3.24

Other data manipulation utilities

• Option Change in the Post menu provides an alternative way of changing andmanipulating post data. It is implemented via the Change Post Data dialogshown below:

This utility enables linear transformation of post data using coefficients A andB (supplied in the text boxes provided), as follows:

(9-1)

The register(s) whose data are to be modified is selected by clicking one ormore of the Register option buttons. This utility can modify individual postvalues, or the values of a range (or set) of cells or vertices; the appropriatechoice is made via the pop-up menu provided.

• Option Caverage in the Post menu creates a set of vertex data over a givencell set or the entire mesh. The process relies on inverse distance-weightedaveraging of the available cell-centre values. The vertex data can then be usedto produce smooth contour plots rather than discontinuous ones. Thedifference between data generated by this operation and those obtained viaPost > Get Vertex Data is that the latter takes into account user-specified andprogram-calculated boundary values. Thus, vertex data on the boundariesproduced with Caverage really represent near-boundary rather than actualboundary values. Note that the equivalent command for this operation,CAVERAGE, offers additional options regarding cell range selection and themanner of data averaging at coupled cell interfaces.

• The inverse of the above operation, i.e. averaging vertex values to createcell-centre values, can be performed by selecting option Vaverage from thePost menu. This might be useful in situations where the vertex values havebeen generated externally and the cell values are needed to start a STAR run.

• Command UNITS may be used to translate data from SI to English units andvice versa prior to further post-processing.

Data Reporting

In addition to its graphic capabilities, pro-STAR also provides facilities forprocessing and reporting post data values in numerical, printed form. These are asfollows:

Command: CHANGE

New Value A * (Old Value) + B=

Page 315: Star Uguide

Chapter 9 POST-PROCESSING

Data Reporting

Version 3.24 9-25

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

Note that:

(a) The dialog also provides access, via appropriately labelled buttons, to theOPERATE and CHANGE tools for manipulating post register data (seepages 9-21 and 9-24, respectively). Data items created with these toolsare included in the display automatically.

(b) An Update List button is provided so that the list can be updated ifchanges are made to the sets or to the post register data outside the PostRegister Data dialog.

(c) The panel also contains a sorting function, which causes the post data tobe displayed in numerically-descending order. The latter is determined bythe actual, Sort (Actual), or absolute, Sort (Abs), values of the (scalar)quantities stored in register 4. The Unsort button undoes the effect of thesorting operation.

(d) Any post data changes performed with the manipulation tools can bemade permanent by clicking the Update File button. This writes themodified cell data back to the solution (.pst) file (no changes are madeto boundary values). For example, a file with some badly-convergingpressure spikes could be smoothed and then used to restart the STAR

Commands: PRINT UPDATE

Page 316: Star Uguide

POST-PROCESSING Chapter 9

Data Reporting

9-26 Version 3.24

analysis, hopefully resulting in a converged solution.

2. Interpolating and displaying currently selected post data at user-definedpoints within the solution domain — command SENSOR. These points aredefined using one or more vertices and the values at such locations areinterpolated from those at nearby cells. The vertices used for this purpose donot have to be attached to any of the cells in the mesh; they only need to belocated within the flow field. The extracted values may be useful forcomparing the numerical solution to experimental results obtained at thoselocations. SENSOR is a multi-function command and should be used asshown in the following example:

Extraction of velocity components at 10 points defined by vertices 100 to109.

(a) Get the cell-centre post data for velocity by choosing Post > Get CellData from the menu bar and select all velocity components.

(b) Select a range of ten existing vertices to act as sensor points

SENSOR,ADD,100,109,1

(c) Scan the mesh to check that the target vertices are within the flow fieldand to calculate the velocities

SENSOR,SCAN,ALL

(d) Display the velocity components at vertices 100 to 109 on the screen

SENSOR,PRINT

3. Pointing to a desired location on a surface contour plot with the cursor inorder to display the (interpolated) value of the variable at that location —choose option PCross in the Post menu. Obviously, this can be done only if aplot is already displayed on the screen.

4. Summarising and displaying sums, averages, minimum and maximum valuesand locations — command SUMMARIZE. This facility works on the post dataitems that are currently stored in registers.

5. Displaying interpolated post data in a section plane — command SPRINT.The plane in question is defined in the manner described in Chapter 5, page5-6. As with all other functions in pro-STAR, cell data are treated as constantwithin each cell, whereas vertex data are interpolated linearly to the desiredplane.

6. Integrating post data items over a user-defined section plane — commandINTEGRATE. The plane in question is defined in the manner described inChapter 5, page 5-6.

7. Calculating aerodynamic coefficients — command ACOEFF. This facilityworks in conjunction with values of total force components at the wall, loadedvia the Wall Post Data dialog. A set of wall shells, enveloping the objectwhose coefficients are to be calculated, must also be created using a CSEToperation.

8. Calculating the mass flux crossing an individual cell face or a set of cell faces— choose Post > Flux Sum from the menu bar and then select one of the

Page 317: Star Uguide

Chapter 9 POST-PROCESSING

Mapping and Copying Post Data

Version 3.24 9-27

drop-down list options. The required faces can be picked individually with thecursor (Pick Cells), or collectively (Zone) by drawing a polygon aroundthem. Alternatively, an existing set of shells with a distinct cell index can beselected (Shell Type). Clearly, this operation requires some kind of meshsurface plot to be on display in pro-STAR’s main window. Note that a runningtotal of both fluxes and areas is kept and printed in the Output window. Thistotal can be reset to zero by selecting option Initialize.

All displayed data can also be diverted to a file for later review and analysis. Therelevant procedure is illustrated by the following example:

1. Switch the program output from the terminal to the user-defined data file (e.g.case.dat) by typing:

OFILE,case.dat

2. Use the appropriate function that will write the desired data on the data file,e.g.

PRINT,CSET

3. Switch the program output back to the terminal screen

OFILE,SCREEN

Mapping and Copying Post Data

pro-STAR provides commands for mapping and copying post data items from anexisting mesh (i.e. the mesh used for the calculation) on to any arbitrary volume orsurface. These facilities can be used for both presentation and data export toalternative meshes.

Command DGENERATE is used for generating or copying post data. It enablesthe creation of a new data set from an existing cell or vertex post data set. This isuseful for presenting results calculated in models with an axis or plane of symmetry,where the symmetric or cyclic nature of the flow has been used to reduce the extentand size of the mesh. The cells and vertices onto which the data are to be copied arecreated first. This is followed by command DGENERATE to generate a new set ofpost data. Note that the offsets used in DGENERATE should be the same as thoseused in generating the cells or vertices being considered.

Mapping of post data items onto both arbitrary surfaces and volumes is possible.The pro-STAR command for this function is PMAP, enabling mapping of thecurrently stored post data on a surface consisting of shells, a volume consisting ofcells, or cross-sections defined by command PSCREATE. The required steps are asfollows:

Step 1

Create the shells, cells or sections onto which the data are to be mapped and assigna unique cell index to them. A convenient way of generating shells is via the LIVEcommand.

Page 318: Star Uguide

POST-PROCESSING Chapter 9

Particle Tracking

9-28 Version 3.24

Step 2

Select (using a CSET operation) the set of cells from which the mapping data are tobe extracted. These should envelop the cells or shells to be mapped.

Step 3

Store the post data required for mapping using the options provided by the LoadCell Post Data dialog (see page 9-7).

Step 4

Issue command PMAP to map the stored post data from the existing model onto thetarget cells or shells. For example, to map pressure from a cell set given by CSETon to cell type 5

GETC,PPMAP,5,CSET

It is also important to ensure that the mesh onto which data are to be mapped

• occupies the same physical space as the mesh from which data are extracted• does not share any vertices with it (if mapping vertex data)

Particle Tracking

pro-STAR provides facilities for calculating and displaying particle tracks on top ofan existing mesh plot. These facilities may be accessed by expanding the ParticleTracks sub-folder, located within folder Post-Processing in the STAR GUIdesystem. The available facilities are sub-divided into two groups:

• Particle track generation — see panel “Create Particle Tracks”• Particle track plotting — see panel “Plot Droplets/Particle Tracks”

What is provided is purely a post-processing utility that calculates and displaystracks on the basis of data from an existing flow field, i.e. the presence of theparticles does not influence the flow field. However, the particles themselves can beassigned a volume and a density so as to take the effect of body forces into account.Such forces are encountered, for example, in gravitational or rotating fieldproblems.

In all cases, the progress of particles through the flow field is calculated using a2nd-order accurate Runge Kutta numerical integration scheme that advances theparticle position from one point in “time” to the next using a given timestep size.The latter effectively controls the tracking process; as its value decreases, theparticle tracks become more accurate and less likely to cross a boundaryerroneously, but the tracking calculation takes longer. In transient cases, theintegration time step accounts for the actual analysis time recorded in the transientdata file. Thus, interpolation is used to approximate the fluid velocity in between theanalysis timesteps if the tracking timestep is smaller.

Users should be very clear about the distinction between this type of particles andthe ones used in two-phase Lagrangian flow (see Chapter 13). The latter are realentities forming part of the physical make-up of the problem being modelled.Therefore, all equations governing their behaviour are solved by STAR as part ofthe overall analysis. On the other hand, the particles described below are virtual

Page 319: Star Uguide

Chapter 9 POST-PROCESSING

Particle Tracking

Version 3.24 9-29

entities defined and used solely within pro-STAR for the purpose of flowvisualisation.

Before plotting any tracks, a mesh or problem geometry display should alreadyexist on the screen. The track coordinates themselves may be read from a track data(.trk) file by choosing Lists > Tracks > Load Data from the menu bar in themain pro-STAR window. This opens the Particle/Droplet Track Data dialog andthen reads in and displays all available information in that file, as shown below.

Useful Points

1. Sometimes, it is the position of particles at a given point in time that needs tobe plotted, as opposed to continuous traces of the particle positions. Such adisplay can be created by first typing command PTREAD to interpolate theavailable data at the time point in question. The required particle distributionmay then be displayed using the facilities of the “Plot Droplets/ParticleTracks” panel in STAR GUIde. Note that this kind of plot is particularlyuseful for displaying droplet distributions in problems involving two-phaseLagrangian flow (see Chapter 13).

2. Once a particle track has been calculated, it is possible to create a number ofequally spaced vertices along its path using command PTVERTS. Thesevertices may be used as sensors (see page 9-26) for calculating the value ofany vector or scalar post data item along the path, or for any other purposedeemed suitable by the user.

3. If the mesh display currently on screen is moved, enlarged or rotated (say, viathe mouse or one of the display controls in the main window) the trackdisplay is redrawn so that its spatial relationship to the problem geometryremains unaltered.

Command: PTPRINT

Page 320: Star Uguide

POST-PROCESSING Chapter 9

Graph Displays

9-30 Version 3.24

4. There are some situations where the default plot characteristics (colours andline widths) of particle tracks are not appropriate. Command PTOPTIONallows these characteristics to be modified on a per-particle or per-groupbasis. The command works in both X and Extended graphics mode (seeChapter 2, “Plotting Functions”).

Graph Displays

pro-STAR contains extensive utilities for presenting results in graphical form. Thebasic principles involved in graph production are as follows:

• Any flow variable or other physical quantity, whether available withinpro-STAR or produced by an external program, can be plotted against anyother such quantity.

• Prior to plotting, a series of values for that quantity have to be loaded into aspecial storage location called a graph register.

• A graph is produced by plotting the contents of any register against those ofanother register according to a user-supplied specification.

• One or more graphs can be combined into a unique display entity called aframe. The frame definition also incorporates a description of how to drawother essential graph elements such as axes, legends and labels.

• A graph plot may consist of one or more frames. In the latter case, it isnecessary to provide a description of how the various frames are to bearranged within the composite plot.

Consequently, the steps needed to set up and plot graphs are as follows:

1. Select and load the required data2. Specify the type and properties of the graph(s) in which they will appear3. Display the data

These are described in the next few sections. The necessary facilities for performingthese steps are provided by various panels in STAR GUIde’s Graphs sub-folder.Some of these facilities are duplicated by options in the Graph menu inside the mainpro-STAR window. The Graph Tool, accessed by choosing Tools > Graph Tool inthe menu bar, also includes some of the most common operations.

Data loading

In this step the user specifies the data to be loaded into the graph registers. The mostcommon operations are implemented in the seven STAR GUIde panels groupedunder the Extract/Graph Data sub-folder. These handle the following types of data:

• “Field Data”• “External Data”• “Residual History Data”• “Engineering Data”• “Analysis History Data”• “Particle Data”• “User Data”

In most cases, as well as loading the data, you are also able to check them by

Page 321: Star Uguide

Chapter 9 POST-PROCESSING

Graph Displays

Version 3.24 9-31

producing a default graph.A number of additional facilities for creating, manipulating and storing register

data are available only in command form, as follows:

1. Parameter values defined as part of a pro-STAR loop (see Chapter 1, “Loops”in the pro-STAR Commands volume) may be loaded into a graph register —command GPARAM.

2. x-y values can be extracted from an existing graph and then inserted into aspecified pair of x- and y-registers — command GPUT.

3. Advanced operations for calculating derivatives, integrals, Fourier seriescoefficients, etc. can be performed on curves represented by a pair of registerdata — command RCALCULATE.

4. Sets of x-y data can be extracted from graph registers, interpolated, and thenstored in post registers — command GMAP. This is useful for mappingone-dimensional profiles of data into selected locations within a STAR model.

Graph customization

Once suitable data have been loaded into graph registers, the user may proceed toplot them as a graph using pro-STAR’s default settings. In most cases, however, acertain amount of customization of the graph appearance will be needed before onecan produce exactly what is required on the screen. This is done using STARGUIde’s “Customize Graphs” panel.

The panel is split into a number of tabs, each offering a different customizationfunction which the user may employ or not, depending on the desired graph’sappearance and complexity. Details on the purpose and mode of operation of eachtab are given in the on-line Help text for this panel.

Other plot enhancement features, such as user-defined pointer arrows and extralabels that can be superimposed on the graph are also possible — see Chapter 5,page 5-7.

Data display

The actual graph display is performed on the basis of current graph plot settings, asfollows:

From within the STAR GUIde environment (any panel in the Graphs sub-folder)click:

• Draw Frame > Current to draw the frame currently selected• Draw Frame > Overlay to draw the frame on top of any other plot currently

displayed in the pro-STAR graphics window.• Draw All Frames to draw all frames defined so far

From the Graph menu, choose option:

• Locate to re-size and/or re-position a frame in the graphics window.• Gdraw to plot a frame.• Gredraw to re-draw the last frame displayed, incorporating any changes in

the user-specified plotting parameters.• Gpick to display the value of a graph point picked on the chosen frame with

the cursor. Alternatively, use command GPICK. Note that this operation is not

Page 322: Star Uguide

POST-PROCESSING Chapter 9

Animation

9-32 Version 3.24

valid for pie charts.• Gpan to translate (pan) the centre of the graph to a location indicated with the

cursor. Alternatively, use command GPAN. Note that this operation is notvalid for polar graphs and pie charts.

• Gzoom,on to zoom in (i.e. magnify) a portion of the graph selected via thecursor; repeatedly if desired. Each zoom setting must be confirmed byclicking the Yes button before the frame is re-drawn.Gzoom,back/Gzoom,off display the frame using the previous or originalsizing parameters, respectively. Command GZOOM performs the samefunction.

In all the above cases, the desired frame is selected from a drop-down list.pro-STAR normally operates with a default of 20 graph registers. To modify this

value, click button Change Number of Registers on any panel in STAR GUIde’sGraphs sub-folder and then enter the required number in the pop-up windowprovided.

Note that if some graph data are already loaded, it is necessary to clear thecurrently allocated registers first and reset all graphical parameters to defaultvalues. This is done by clicking Graph Reset in the STAR GUIde panel or byselecting Graph > Greset from the menu bar.

Animation

The purpose of the animation facility is to produce a set of sequential pictures withminimal effort. If displayed in quick succession, these pictures give rise to theanimation effect. In general, the sequence of images is designed to display eithermovement of an object (by changing the view of that object) or a visualisation of atime-dependent analysis (i.e. the results of a transient simulation). The user mustspecify the type of data to be displayed and how they vary with time.

pro-STAR contains some simple but effective tools to help generate verycomplex animation sequences using either a model’s geometry or a CFD solutionproduced by STAR, or both. To this end, pro-STAR can generate the individualframes required to produce a final animation that could last several minutes inlength (or longer, if required). These frames can then be combined to create aMPEG, AVI, QuickTime or GIF animation that can be played back in a variety ofenvironments, from TV’s to computers.

It should also be noted that pro-STAR cannot compile the end animation.Currently, this has to be done using any suitable external software that can importpro-STAR images and arrange them sequentially to produce a movie. Therefore,creating an animation is normally a two-stage process involving

• generation of on-screen image sequences within pro-STAR• production of a real-time film/movie using appropriate software outside

pro-STAR. The choice of this software is up to the individual user and is notprovided with STAR-CD.

The above process is described in detail in the rest of this section.

pro-STAR animation effects

Before anything can be animated, something needs to change. Surprisingly, even

Page 323: Star Uguide

Chapter 9 POST-PROCESSING

Animation

Version 3.24 9-33

for steady-state analysis results, a number of different things can be varied in timeto make a static solution come to life. It is thus possible to animate virtuallyanything the user does on a day-to-day basis using pro-STAR, such as changing theview, plot type, cell set, etc. For a transient solution, an obvious time-varyingelement is already present and can be utilized effectively to make true time-varyinganimations, including combinations of other effects.

Lists of useful items to change for both steady and transient cases are givenbelow. These are not exhaustive lists and users should feel free to think of otheroptions that might be useful for their own applications.

For steady-state analyses, the following are useful items to animate:

• Geometry and solution result rotations, zooms and translations (see Chapter5, “Additional display options”)

• Translucency changes (OpenGL sessions only) and “explosion” views• Tracking of droplets along their path, see “Particle Tracking” on page 9-28• Particle track segment animation (see the STAR GUIde “Particle Tracks”

Help topic)• Cross-section sweeps through the geometry and static solution results (see the

“Multiple Plane Plot” Help topic)• Isosurface sweeps through static solution results (see the “IsoSurface” Help

topic)

For transient results, the following can also be included:

• Full time-varying changes in any solution variable or secondary quantity• Inclusion of moving-mesh effects

Of particular interest is the use of split-screen effects, where different results areanimated in different sections of the screen at the same time.

Some example frames from animations created by the CD-adapco Group areshown below:

Page 324: Star Uguide

POST-PROCESSING Chapter 9

Animation

9-34 Version 3.24

Figure 9-22 Animation frame examples

Animation sequence definition and display

There are three basic approaches to creating animation sequences in pro-STAR

1. Using the SCDUMP command2. Using the Animation tool3. Using pro-STAR loops

and these are described in the following sections

Command SCDUMPpro-STAR can capture screen images in batch mode using command SCDUMP.When the command is issued with a given image format and frame number, allfurther REPLOT or CPLOT type operations are saved in a file as well as beingdisplayed on screen. This also includes any background images built up using theOVERLAY command.

The file formats supported by SCDUMP are:

Page 325: Star Uguide

Chapter 9 POST-PROCESSING

Animation

Version 3.24 9-35

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

In general, the GIF format is recommended for most animations. The followingcommand sequence shows how the command is used as part of a script:

SCDUMP,GIF,1001REPLOTSCDUMP,OFF

This would produce a GIF image with file name casename001001.gif. Ifadditional images need to be created as part of a looping process, the sequence canbe expanded as follows:

*SET,FRM,1001,1*DEFINE,NOEX!- Loop commands start here!!- Loop commands endSCDUMP,GIF,FRMREPLOTSCDU,OFF*END

An alternative to using bitmaps directly is to save the images to the neutral plot fileusing the TERMINAL command. The neutral plot file can then be converted toindividual PostScript files using a batch program, with the PS files then beingconverted further or used directly, as required.

The Animation toolThe starting point for this method is pro-STAR’s Animation tool, shown below.This is accessed by selecting Modules > Animation from the menu bar. The uppersection of the dialog is organised similarly to a video recorder — images saved to afile (the neutral plot file) can be replayed using the control buttons. The sequenceof images to be recorded requires the setting of

• frame definitions, and• sequence parameters.

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

Page 326: Star Uguide

POST-PROCESSING Chapter 9

Animation

9-36 Version 3.24

It can be seen that the primary animation dialog contains a slider showing the framenumber, a set of buttons for controlling the viewing and recording of an animationsequence within pro-STAR, plus a set of pop-up menus, text boxes and buttons forsetting up the animation sequence. The following list describes each of the items onthe dialog:

Manipulation of neutral plot file images

• Rewind — moves the Frame Number slider back to frame 1.• Stop — stops the recording or playback of the animation sequence currently

in progress.• Play — starts the playback of a recorded sequence from a neutral file,

beginning at the current frame number.• Faster — increases the speed of the current playback by skipping frames.

Clicking on this button repeatedly continues to increase the speed of theplayback.

• Play 1 — allows you to step through a recorded sequence by playing backone frame at a time.

General animation

• Record — generates the plots for the current sequences. Plots are generatedeither on the screen or saved to the neutral file, depending on what has beenselected in the Output Device pop-up menu. This works by creating a batchfile (of form case.ani) to store all the pro-STAR frame plotting commandsand then reads back and executes these commands to produce the requiredanimation.While writing the batch file, the RECORD operation also generatesvalues for the following two variables:

(a) TIME — the time corresponding to each frame, as supplied by the user.

Commands: RECRD NPLOT SCRIN PLAYBACKTERMINAL NFILE SCROUT

Page 327: Star Uguide

Chapter 9 POST-PROCESSING

Animation

Version 3.24 9-37

(b) FRAM — the frame number itself, beginning at the start of the sequence.

These variables can be used, for example, to define the point at which particleinformation is to be read or to calculate the time step value for which datamust be loaded from a transient post file.

• Output Device — allows you to select between the screen, the neutral plotfile or a bitmap file for the output medium of a Record operation. It issuggested that Screen be selected initially for testing a particular animationsequence since if you click Record, the animation sequence will be displayeddirectly on the screen. Having satisfied yourself with the animation setup,switch to Neutral File to save the sequence to that file for later playback, ifdesired. Alternatively, the Bitmap File option can be used to directly save upto 20 images to memory. These can be replayed afterwards using the SCRINcommand.

• Output File Name — enter the name of the neutral plot (.plot) file to besaved after a Record operation, having selected the appropriate option in theOutput Device pop-up. The same file name is used for a Play operation.pro-STAR’s built-in file browser may be used to locate the required file.

• Number of Frames in Sequence — enter the total number of frames usedwithin a particular sequence. Start with a small number during testing andincrease this number for final production.

• Number of Playback Loops — enter the number of times that a sequencewill be replayed after Play is started.

• Current Sequence Name — enter a name for the current sequence. You candefine multiple sequences, each with a different name, to show differentanimations of the same model.

• Animation Setup Information File — enter a file name (of formcase.anim) for saving the setup information defined in the animationmodule. The same file should also be used to retrieve the information. Makesure that you use this facility to save your settings as animation parameters arenot stored in the pro-STAR model (.mdl) file.

• Select Sequence… — select the desired sequence from the pop-up menu orcreate a new one using option New. In the latter case, its name can be enteredin the Current Sequence Name text box.

• Edit Frame Definitions… — specify plot parameters for selected frameswithin a particular sequence, chosen from the pop-up menu (see “Framedefinitions” below).

• Edit Sequence Parameters… — specify plot parameters for the currentsequence (see “Sequence parameters” below).

• Read Setup Info from File — Read sequence definitions from a file.• Save Setup Info to File — Write the current sequence definitions to a file.

Frame definitionsThe information required for frames within an animation sequence is:

1. Display parameters for the starting frame2. Display parameters for the ending frame

The desired choice, First Frame or Last Frame, is made via the Edit FrameDefinitions pop-up menu. The selection pops up another dialog, the Animation

Page 328: Star Uguide

POST-PROCESSING Chapter 9

Animation

9-38 Version 3.24

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

The necessary input includes the view, centre, distance, lighting and sectionparameters for the plot displayed in the frame (see also “Plot Characteristics” onpage 5-3). These values can be copied from the current settings by clicking the Copypop-up or can be entered manually. Confirm the values by clicking Apply.

Sequence parametersEach sequence requires the definition of plot parameters that cannot change withinthe sequence. These are supplied by clicking the Edit Sequence Parameters buttonand displaying the Animation Plot Command dialog shown below. The parametersare entities described in Chapter 5 and are selected via a series of pop-up menussuch as

• plot type• plot options• commands used to generate the initial and subsequent plots (CPLOT, WPLOT,

REPLOT, etc.)

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

Command: AOPTION

Page 329: Star Uguide

Chapter 9 POST-PROCESSING

Animation

Version 3.24 9-39

Time StampsA time stamp is a graphical or numerical counter showing the analysis timecorresponding to the currently displayed analysis result. If a transient simulation isbeing animated, it is possible to add such a stamp anywhere on the screen andchoose its display format, e.g. a moving bar, by using one of the Time Stamp Typemenu options in the above dialog. The time stamps available are:

• Bar — Bar type stamp• Cylinder — Piston type stamp• Crank — Crank angle type stamp

and are illustrated in the Figure below:

Figure 9-23 pro-STAR time stamp options

The stamp’s screen size and location is set via the X1, Y1 and X2, Y2 boxes,representing the x- and y- coordinates of opposite corners of the time stamp box.The latter’s background and fill color can also be set, by entering suitable colourindices in the Outline and Fill boxes, respectively.

Commands: AOPTION TMSTAMP

Bar Cylinder Crank

Page 330: Star Uguide

POST-PROCESSING Chapter 9

Animation

9-40 Version 3.24

Two time control parameters are supplied, which affect the way a particular timestamp is displayed. An example sequence of commands within a loop would be:

*GET,DTIM,TIMETMSTAMP,BAR,0.0,1.0,,,10.1,1,12,2TMSTAMP,TIME,DTIM

Alternatively, the time value may also be displayed on screen using commandPLLABEL as follows:

*GET,DTIM,TIMETSCA,1,24PLLA,1,FORMAT,1,1,10.7,2.3DTIM‘Time (s): ‘,F6.1

In the above examples, DTIM is used as variable that can be displayed on screenusing a formatted FORTRAN statement (F6.1).

ExamplesTwo examples are provided here, illustrating the use of the Animation tool inpro-STAR. The first is a general introduction on how to produce a simple animationquickly; the second involves more advanced use of the panels and other pro-STARfeatures.

Example 1This example shows how a model can be rotated and zoomed upon simultaneouslyon the screen display. The animation is then saved in a neutral plot file. Any suitablegeometry can be used for this purpose.

• Set the initial view and plotting options for the model, using either the GUI orcommands. For example:

WINDOW 0 0 13 10PLDIS OFF ALLPLDIS ON LOGO 1.2 11 8VIEW 1 1 1PLTY EHIDPLME OFFLIGHT 1 ON 1 2 3DIST AUTOCPLOT

• In the main Animation Module dialog, set the Output Device to Screen andthe Number of Frames in Sequence to 20. The default Current SequenceName, Sequence#1, will be used here. Next select First Frame from the EditFrame Definitions pop-up menu.

• When the Animation Graphics Parameter Block dialog appears, select optionCurrent Plot from the Copy… pop-up menu. The settings for the initial framewill be filled in the appropriate boxes on the panel. Click the Apply button toconfirm the settings.

Page 331: Star Uguide

Chapter 9 POST-PROCESSING

Animation

Version 3.24 9-41

• Set the final view options, including zooming in on the model, by typing thefollowing commands in the I/O window:

VIEW 1 -1 1REPLOTZOOM ON

• In the Animation Graphics Parameter Block dialog, click the End ofAnimation Sequence radio button. Then, as before, choose the Current Plotoption from the Copy… pop-up menu. Again, the appropriate settings will befilled in automatically in the text boxes of the panel. Enter a value of 2(seconds) in the Time box, click Apply to confirm the settings and then Close.

• In the main Animation Module dialog, click the Edit SequenceParameters… button. This will open up the Animation Plot Commanddialog. In this panel, select Replot from the Command for Initial Plot pop-upmenu. All other settings can be left at their default values. Click Close.

• In the main Animation Module dialog, click the Record button. This willcreate a batch (.ani) file to store all the frame plotting commands and thenread them back in to produce the required animation. The sequence will bedisplayed on screen.

• To permanently save the animation to a file, change the Output Deviceselection to Neutral File and accept the default Output File Name. Click theRecord button again. The animation images will now be stored on file. Usethe video control buttons to replay the images as for a normal video recorder.

Example 2This example animates a particle track (.trk) file and introduces some additionalfeatures of the Animation Module. The particle file can be created as part of a STARanalysis (for cases involving droplets) or via the particle track post option inpro-STAR. The animation is run for the time interval 0 - 5 seconds. CommandPTREAD is used to read the particles from the track file at various time points in thesequence. Since the example needs to store particles in memory, a problem-specificversion of pro-STAR will need to be created using the prolinkl utility. Thisshould be dimensioned according to the number of tracks created for the model.

• Set the initial view and plotting options for the model, using either the GUI orcommands. It is advisable to use the EDGE ON option to make the solutiondomain transparent and thus enable viewing of particles in the model’sinterior. For example:

WINDOW 0 0 13 10PLDIS OFF ALLPLDIS ON LOGO 1.2 11 8VIEW 1 1 1PLTY QHIDEDGE ONDIST AUTOCPLOT

• Set up the particle display options:

Page 332: Star Uguide

POST-PROCESSING Chapter 9

Animation

9-42 Version 3.24

DOPT EDGE AFTER NOHIDDEN REPLOTDOPT PERIM 1DOPT FILL COLO 4DOPT VECTOR NONEDOPT RADI CONS 0.06

• In the main Animation Module dialog, select Screen for the Output Deviceand set the Number of Frames in Sequence to 25. This time, sequence number2 will be used for the animation. This is done by selecting New from theSelect Sequence… pop-up menu. Type the name, Particles, in the CurrentSequence Name text box. Then choose First Frame from the Edit FrameDefinitions… pop-up.

• In the Animation Graphics Parameter Block dialog, choose the Current Plotoption from the Copy… pop-up menu. Set the Time value back to 0. Click theApply button to confirm these settings. Then select the End of AnimationSequence radio button. Since initial and final view points will be the same inthis case, choose the First Frame option under the Copy… pop-up. Set theTime value to 5, click Apply and then Close.

• In the main Animation Module dialog, click the Edit Sequence Parametersbutton. This will open the Animation Plot Command dialog box. Set theoption for both the Command for Initial Plot and the Command forSubsequent Plots pop-up menus to Dplot. Also ensure that the Plot Typepop-up is set to Qhidden, as in the original display.

• To read particle tracks before the animation is created, enter commands

PTREAD case.trk TIMEDOPT FILL COLO 4

in lines 1 and 2, respectively, of the Pre-Animation Sequence Commandsscroll list. Parameter TIME is generated automatically during the Recordoperation and contains the time corresponding to the particular frame that isplotted next. Finally, turn on the time stamp by choosing the Bar option in theTime Stamp Type pop-up. Enter the following values into the text boxes forthe time stamp location parameters:

X1 — 1.5Y1 — 1.0X2 — 3.0Y2 — 1.4Color Index for Outline — 1Color Index for Fill — 4

This will apply a bar type time stamp with a white outline and blue fill to thebottom left corner of the screen. Click Close.

• In the main Animation Module dialog, click the Record button and view theresulting output. Then change the Output Device setting to Neutral File andaccept the default Output File Name. Click the Record button again and, oncecomplete, view the animation using the video control panel.

• Save the sequence parameters to file case.anim by clicking the Save SetupInfo to File button. These parameters can be retrieved at a later time by

Page 333: Star Uguide

Chapter 9 POST-PROCESSING

Animation

Version 3.24 9-43

clicking the Read Setup Info from File button.

Animation loopsAnother alternative for creating animations is to use pro-STAR loops (see alsoChapter 1, “Loops” in the pro-STAR Commands volume). The results will the sameas for the other methods but the set-up procedure is simplified by the use of a loop.Some examples are provided below.

Model geometry animationThis includes changing things like viewing direction, zoom position, degree ofrotation, translucency, etc. as shown in the following examples:Rotating the modelThe model can be rotated using the VIEW, ROTATE or ANGLE commands, or anycombination thereof. It is important to keep the lighting direction the same for allframes, which can be done by setting it to the view direction at each new position.

!-User to define:

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

PLFIX,ON*SET,FRM,1001,1*DEFI,NOEXROTATE,X,RVAL*GET,VWX,VWX*GET,VWY,VWY*GET,VWZ,VWZLIGHT,1,ON,VWX,VWY,VWZSCDU,GIF,FRMREPLOTSCDU,OFF*END*LOOP,1,NOFF,1

Changing the translucencyThis is a useful effect to show the original geometry and then fade to show theinternal components. The translucency is introduced through commandCLRTABLEand starts off with a value of 1.0 (opaque) before fading to 0.3. Note that this optionis only available when running the OpenGL version of pro-STAR.

!-User to define:

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

*SET,TVAL,1.0,1 - ETVA / NOFF * -1*SET,FRM,1001,1*DEFI,NOEXCLRT,GEOM,2,,,,TVALRP19,,1SCDU,GIF,FRM

Page 334: Star Uguide

POST-PROCESSING Chapter 9

Animation

9-44 Version 3.24

REPLOTSCDU,OFF*END*LOOP,1,NOFF,1

Animating section sweepsAn animated section sweep through a display of the analysis results can be easilydefined as shown below. The user only needs to input the sweep direction(command SNORM), the starting and ending section values (for command SPOINT)and the total number of animation frames required. A loop can then be defined tosweep through the model and produce individual images of each section.

!-User to define:

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

PLTY,SECTIONLOAD,,GETC,VMAGCAVER,CSETPOPT,CONTEDGE,ONSECS,OFFCPLOT*SET,FRM,1001,1*SET,SINC,XMAX - XMIN / NOFF*SET,SPVAL,XMIN,SINC*DEFI,NOEXSPOINT,SPVAL,SPVAL,SPVALPLTB,ONSCDU,GIF,FRMREPLOTSCDU,OFFPLTB,OFF*END*LOOP,1,NOFF,1

Animating isosurface sweepsAn isosurface sweep can be defined in a similar way to the section sweep above.Additional options, such as PMAP, can also be introduced if desired. The isosurfaceshells are created using command PSCREATE but are removed at the end of eachloop using command PSDELETE.

!-User to define:

*SET,ISTA,-20 $!-Set starting isosurface value*SET,IEND,10 $!-Set ending isosurface value*SET,NOFF,200 $!-Set max number of animation frames (use

PSDELE for more)

Page 335: Star Uguide

Chapter 9 POST-PROCESSING

Animation

Version 3.24 9-45

!-End of user defined values

LOAD,,GETC,PCSET,NEWS,FLUIDCAVER,CSETCSCA,14,USER,ISTA,IENDPOPT,CONTPLTY,EHID*SET,IINC,IEND - ISTA / NOFF*SET,IVAL,ISTA,IINC*DEFI,NOEXCTDEL,ALL*GET,MXCT,MXCTCSET,NEWS,FLUIDPOPT,ISOS,IVALPSCREATE,,ISOSURF,,CSET,NEWS,TYPE,MXCT + 1POPT,GEOMCPLOTOVER,ONCSET,NEWS,FLUIDPOPT,GEOMEDGE,ONSCDU,GIF,FRMCPLOTSCDU,OFFPSDELE,1,20,1,ALLEDGE,OFFOVER,OFF*END*LOOP,1,NOFF,1

Animating steady-state droplet or particle tracksAll droplet or particle track information is stored in file casename.trk. Even fora steady-state analysis, a time component is available in this file which tracks theposition of the particle over time. This time position can be accessed usingcommand PTREAD and droplets plotted using command DPLOT.

!-User to define:

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

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

Page 336: Star Uguide

POST-PROCESSING Chapter 9

Animation

9-46 Version 3.24

*SET,PTIM,PSTA,PINC*SET,FRM,1001,1*DEFI,NOEXPTREAD,,PTIMDSET,ALLPLTB,ONSCDU,GIF,FRMDPLOT,ALLSCDU,OFFPLTB,OFF*END*LOOP,1,NOFF,1

Animating Transient ResultsA transient result naturally has a time varying element associated with it and as suchmakes for the most natural of all animation sequences. Any of the quantities savedin the .pstt file can be animated using the basic loop definition given below.However, note also the following recommendations:

• As the number of frames required to produce an animation is usually higherthan the number of results saved in the .pstt file, commandTRINTERPOLATE can be used to interpolate linearly between the timevalues stored.

• Command CSCALE should be used to fix the colour scale for the animationsequence, so that the colours used in each frame remain consistent.

• For plotting velocity vectors, the VESCALE,,VMAG option should be used tomaintain velocity-vector plotting length consistency from frame to frame.

!-User to define:

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

TRLOAD,,POPT,CONTPLTY,EHIDCSET,NEWS,FLUIDTRINTERPOLATE,ON,CAVER,CSET*SET,FRM,1001,1*DEFI,NOEXSTOR,TIME,TIMEGETC,VMAGSCDU,GIF,FRMCPLOTSCDU,OFF*END*LOOP,1,NOFF,1

Storing animations

pro-STAR offers three methods of storing animations for subsequent replay:

Page 337: Star Uguide

Chapter 9 POST-PROCESSING

Animation

Version 3.24 9-47

1. Neutral plot files. These files are stored on disk and contain frame data indevice-independent format. In addition:

(a) They can be defined as binary files which allows them to be read andwritten much faster than formatted files

(b) A file name is associated with each file, so that multiple files can beopened and closed independently of each other

(c) pro-STAR can read these files directly and display their contents via thereplay facilities in the main Animation dialog

2. On X-Window and GL based machines, it is possible to store successivescreen images as bitmaps and then replay them. This is more memoryintensive but faster than using neutral plot files. The main limitations are thata maximum of only twenty frames can be produced and these cannot bestored permanently for later viewing.

For example, command SCROUT,5 saves the present screen image tomemory in location no. 5. To re-display this frame at a later stage in thecurrent pro-STAR session, command SCRIN,5 would be used. Since storageof these frames can consume a large amount of memory, commandSCRDELETE should be used where possible to remove unwanted frames.

3. The third method involves saving pro-STAR images as binary files to disk.These can then be processed externally using suitable imaging tools toproduce video images for recording on a VHS (or other) tape. Further detailsare given in the section on “Movie making”.

Movie making

This section outlines the necessary steps required to produce a real-time movieanimation for a STAR-CD model. It also includes various tips andrecommendations that users might find useful should they wish to produce such ananimation.

Movie making basicsAnimations are made up of individual frames, i.e. a set of static images that, whendisplayed in rapid sequence, result in an animation. In pro-STAR, the choice offrame image formats is restricted to GIF, PostScript, XWD and RGB (for SGImachines). More information on these is provided below. Of importance whenmaking an animation are a number of basic items, such as frame rate frequency,image size and animation sequencing. Each of these will be discussed belowtogether with some good practise/rule of thumb advice.

Frame rateMost animations require between 24 and 30 images per second to provide a smooth-looking result. Decreasing the number to around 12 to 15 per second still providesa good result, but fast transitions will become more obvious and “jerky”. For thesake of argument, 25 frames per second provides a good working value and makesthe time values easier to calculate. This will be the base value used in all discussionsand examples in this document. It is also recommended that, for typical pro-STAReffects such as section sweeps or particle animations, around 200 to 250 frames becreated, resulting in between 8 to 10 seconds worth of real-time animation. This is

Page 338: Star Uguide

POST-PROCESSING Chapter 9

Animation

9-48 Version 3.24

usually enough to emphasize the effect of something without making the animationtoo slow or boring to watch.

The frame rate is usually decided by the individual animation compilationsoftware, so this value should be known prior to image generation. pro-STAR hasno influence on the frame rate and can be simply programmed to generate as manyimages as required. In this sense, one can link a time variable in pro-STAR to anactual animation frame rate frequency and work with real time values when makingan animation. More details on this will be given later.

File Format and Naming ConventionThe choice of image file format (e.g. GIF, TIFF, JPEG, BMP, RGB, etc.) is againusually dependent on the tool used to compile the animation. For convenience, theGIF image format is recommended as it is efficient, versatile and can be easilyconverted to other formats if required. Most animation tools also support this formatdirectly.

It is also usual that most animation tools require a sequentially numbered list ofinput files. Typical naming conventions are:

filename001.giffilename.001

pro-STAR can generate images in the format casename000001.ext, whereext stands for the image format extension (gif, xwd, etc.). If necessary, a simplescript can be written to convert these file names to the required format for theanimation tool.

Image Size and QualityWhenever possible, the pro-STAR screen size should be made as large as possiblein order to capture bitmap images of the highest quality. Most animation packagescan take a given image size and reduce it to a standard size, suitable for playing backin presentations and on TV screens. As long as a reduction is being made and notan enlargement, the quality of the bitmap will still be reasonable after processing.However, this is also dependent on the final movie format chosen and whatcompression scheme (if any) is used.

Movie file formats and softwareA number of movie formats are available for compiling the final animation. Somecommon formats include MPEG, Microsoft AVI, Apple QuickTime and GIF.Again, the choice of format is up to the user and usually dependent on the choice ofanimation software used to process the pro-STAR images. A relatively cheap butpowerful package is Adobe’s Premiere™, but many others are available on themarket.

Image File ManipulationOnce the basic images have been created using any of the techniques described inthe “Animation sequence definition and display” section, it is up to the user todecide how best to process them and produce an animation. For users with accessto a SGI Unix machine with suitable imaging tools and graphic cards installed, thefollowing guidelines can be used to produce an animation in QuickTime or AVIformat.

Page 339: Star Uguide

Chapter 9 POST-PROCESSING

Animation

Version 3.24 9-49

In a suitable X-term window, with the pro-STAR output filescasename00????.gif present, issue the following Unix commands:

To produce an AVI movie:

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

To produce a QuickTime movie:

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

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

Page 340: Star Uguide
Page 341: Star Uguide

Chapter 10 POROUS MEDIA FLOW

Setting Up Porous Media Models

Version 3.24 10-1

Chapter 10 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 the useof cell tables (see Chapter 6). As an example, consider the specification of a filterin the pipe shown in Figure 10-1.

Figure 10-1 Flow through filter in a pipe

• For the non-filtered regions (using cell index 1, fluid material property index12 and porous material index 0) the Cell Table Editor would look as follows:

• For the filtered region (using cell index 2, fluid material property index 12 andporous material index 11) the Cell Table Editor would look as follows:

cell index1

cell index1

filter

flow in flow outcell index2

Page 342: Star Uguide

POROUS MEDIA FLOW Chapter 10

Setting Up Porous Media Models

10-2 Version 3.24

The reason for using an identical fluid property index (i.e. 12) is that both regionsare in the same stream.

Step 2

Supply property values (resistance coefficients and porosity) for the porous regionusing the “Resistance and Porosity Factor” STAR-GUIde panel. If your modelcontains multiple porous regions possessing different properties, each region maybe selected in turn via the Porous Material # control at the bottom of the panel (seealso the “Porosity” Help topic).

Figure 10-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 343: Star Uguide

Chapter 10 POROUS MEDIA FLOW

Setting Up Porous Media Models

Version 3.24 10-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 344: Star Uguide

POROUS MEDIA FLOW Chapter 10

Useful Points

10-4 Version 3.24

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 345: Star Uguide

Chapter 10 POROUS MEDIA FLOW

Useful Points

Version 3.24 10-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 7-23). Note that baffles may also beused to model a flow resistance at the interface between a fluid and a porousregion, by placing baffles of suitable properties on the faces of the appropriateporous cells.

8. For examples of porous media flow, refer to the Methodology volume(Chapter 8, “Examples of Resistance Coefficient Calculation”) and to Tutorial2.5, Tutorial 2.6 and Tutorial 2.7 in the Tutorials volume.

9. In simulations involving moving meshes, porous media must not be used inareas where there is internal relative mesh motion (cell expansion orcontraction).

10. As a result of the particular method used in STAR to calculate pressuregradients at cells on either side of the fluid-porous interface, you need toensure that porous regions are at least two cell layers thick in any coordinatedirection.

11. Coupled cell interfaces (see Chapter 4, “Cell Couples”) must not coincidewith porous/non-porous material interfaces

Ki V

Vui

Page 346: Star Uguide
Page 347: Star Uguide

Chapter 11 THERMAL AND SOLAR RADIATION

RadiationModelling Using Discrete Beams

Version 3.24 11-1

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

RadiationModelling Using Discrete Beams

Step 1

Open the “Thermal Options” panel in STAR GUIde and select option DiscreteBeams from the Radiation menu. Specify whether your model includesparticipating media radiation and then enter all necessary modelling parameters, asexplained 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 explained in topic “SolarRadiation”. Note that solar radiation calculations are independent of those forthermal radiation, i.e. they can be performed with or without going through Step 1above. Solar radiation may enter the solution domain through any open boundary,as well as through transparent walls; see “Solar radiation properties” on page 7-21for a 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 that the editor’s Radiation optionis set to On for all such cells.

Step 4

Turn on the temperature solver in the “Thermal Models” panel. If your modelincludes participating media radiation, specify bulk radiative properties (absorptionand scattering coefficients) for the medium lying between the radiating surfaces.

Step 5

In the “Define Boundary Regions” panel, specify surface radiative properties for allboundaries apart from symmetry and cyclic ones. Thus:

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 7-20 (for walls) and on page 7-25(for baffles) should be read before entering values in this panel.

(b) 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.

2. For problems involving both thermal and solar radiation, as well as the above

Page 348: Star Uguide

THERMAL AND SOLAR RADIATION Chapter 11

RadiationModelling Using Discrete Beams

11-2 Version 3.24

parameters, you also need to specify an additional property, solar absorptivity.This is required at walls, baffles, or solid/fluid interfaces. The descriptiongiven in “Solar radiation properties” on page 7-21 (for walls) and on page7-26 (for baffles) should be read before entering a value for this property.

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. Alternatively, you may create patches using one of the followingcommand-driven options:

1. By specifying the four vertex numbers that define a boundary face to beincluded in the patch — command BDEFINE.

2. As above, using the cursor to pick the required vertices from the current plot— command BDX.

3. By converting a set of shells into a patch — command BSHELL

It is strongly advisable to check the patch arrangement created using one of thefollowing 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.

Step 7

Create a geometry file in the usual way by choosing File > Write Geometry Filefrom the menu bar.

Step 8

Run STAR. The view factor and solar radiation flux calculations are performed atthe start of the analysis. In moving mesh cases, view factors are re-calculated atevery time step. View factors are saved in a binary file (case.vfs) and areretrieved from that file in a restart run. Similarly, if participating media radiation isinvolved, all relevant data are stored in another binary file (case.pgr) and thenretrieved from it in a restart run.

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 thermofluidanalysis around a car body, where radiation calculations are only necessary underthe 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. To do this, the following steps are

Page 349: Star Uguide

Chapter 11 THERMAL AND SOLAR RADIATION

RadiationModelling Using Discrete Beams

Version 3.24 11-3

necessary:

Step 1

Using the Cell Table Editor:

• Create a separate cell type covering all cells that occupy the sub-domain thatis subject to the radiative treatment

• For this cell type only, select option On from the editor’s Radiation pop-upmenu

Step 2

Turn on the radiation calculations and specify all necessary radiation parameters viathe “Thermal Options” STAR GUIde panel. Note, however, that the participatingmedia option (including the “Transparent solids” option described below) may notbe used in this type of problem.

Step 3

In the “Create Boundaries” panel, create a number of special ‘Radiation’ boundariesso as to completely separate the radiative part of the domain from the non-radiativepart.

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 7, “Radiation Boundaries”).

Step 5

Create patches on all boundaries surrounding the radiative sub-domain, includingthe radiation boundaries, as described in the section on “RadiationModelling UsingDiscrete Beams” and perform the analysis as described in that section.

Transparent solids

STAR-CD is capable of calculating radiative heat transfer (excluding solarradiation) through transparent solid regions. This enables you to make a realisticassessment of, for example, the effect of objects such as windows on the overall heattransfer within an enclosure. To model this kind of system, the following steps arenecessary:

Step 1

Using the Cell Table Editor:

• Index all transparent solid cells to a separate cell type and assign a solidmaterial number to them

• Select option On from the editor’s Radiation pop-up menu for all fluid andtransparent solid cell types in your model

Step 2

Open the “Thermal Options” panel in STAR GUIde and then:

• Turn on Thermal Radiation• Select the Participating media option and specify all necessary radiation

modelling parameters• Turn on Conjugate Heat Transfer

Page 350: Star Uguide

THERMAL AND SOLAR RADIATION Chapter 11

RadiationModelling Using Discrete Beams

11-4 Version 3.24

Step 3

In the Liquids and Gases folder, assign thermal and radiative properties to the fluidregions via the “Molecular Properties”and “Thermal Models” panel, respectively

Step 4

In the Solids folder, assign thermal and radiative properties to the solid regions viathe “Material Properties” and “Radiative Properties” panel, respectively

Step 5

Use the “Define Boundary Regions” panel to specify surface radiative properties forall wall/baffle regions and also for the fluid-solid interface. Note that:

• The absorptivity of this interface (1 - transmissivity - reflectivity) should beconsistent with the absorptivity of the solid material defined in the previousstep

• In the current version of STAR-CD, the transmissivity value of the interface isrestricted to 1.0, implying a totally transparent surface

• Coupled-cell interfaces should not coincide with the fluid-solid interface

Step 6

Create radiation patches for all boundary regions, including external boundariesnext to solid cells and perform the analysis in the manner described in“RadiationModelling Using Discrete Beams”.

Useful points

1. In the current version of STAR-CD:

(a) The radiation modelling facility should not be used in problemscontaining partial boundaries (see Figure 4-9 on page 4-21 for anillustration of the partial boundary concept)

(b) STAR-HPC runs are not feasible for problems involving participatingmedia or solar radiation

(c) The participating media capability does not generally include the effect ofradiation from particles present in a two-phase Lagrangian system. Theonly exception to this is solid coal particle radiation in coal combustioncases and the facility is accessible only from panel “NOx/Radiation” inSTAR GUIde.

2. Due to the non-linearity of the wall temperature calculation, an under-relaxation factor for temperature is required when one of the followingconditions applies:

(a) A heat flux boundary condition is specified.(b) Internal boundaries such as conducting baffles and solid/fluid interfaces

are present.(c) A thermal wall resistance is specified in addition to the wall temperature.

The under-relaxation factor has a default value of 0.3. If a constant walltemperature boundary condition is present without any thermal resistance,under-relaxation is not necessary and the value should be set to 1.0.

3. Radiation patches cannot be applied to boundaries assigned to the default wall

Page 351: Star Uguide

Chapter 11 THERMAL AND SOLAR RADIATION

Radiation Modelling Using Discrete Ordinates

Version 3.24 11-5

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

4. The accuracy of the radiation calculations depends on the patch size sincequasi-uniform radiation properties are assumed for a patch. The accuracy ofthe 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) Any refinement of patches should be followed by an increase in the

number of beams, so that all patches are resolved adequately (see “Patchand beam definition” on page 9-2 of the Methodology volume for adiscussion of this point).

However, acceptable results may be obtained even if one or more of the aboveconditions are not fully met.

5. If the wrong patch number is assigned to a cell face during the patchdefinition process, the mistake can be rectified either:

(a) numerically via the BMODIFY command, or(b) graphically (using the screen cursor) via the BCROSS command.

6. Patch definitions can be stored in a file (case.bnd) and read back from itusing the normal boundary export and import facilities provided in panels“Export Boundaries” and “Import Boundaries”, respectively.

7. The default number of beams (100) may be sufficient for coarse patches. Insituations where a patch is created for every boundary cell face, the number ofbeams may need to be increased (between 1600 and 2500 for typical radiationproblems) in order to resolve adequately the patches present in the system.

8. The CPU time for view factor calculations increases in proportion to thenumber of patches multiplied by the number of beams. The CPU time forradiation heat transfer calculations increases in proportion to the number ofpatches.

9. Problems involving wall-to-wall radiation can be run in STAR-HPC mode,but the view factors have to be calculated in ‘single-processor’ mode. To dothis, run the case for zero iterations on a single processor and save the viewfactor (.vfs) file.

10. As stated on page 11-2, Step 8 above, view factors for moving mesh cases arere-calculated at every time step. Therefore, in view of the previous restriction,STAR-HPC runs for problems involving both radiation and a moving meshare not feasible.

11. Note that command PATCH generates only shell surfaces. It cannot be used tocreate radiation patches.

Radiation Modelling Using Discrete Ordinates

Step 1

Open the “Thermal Options” panel in STAR GUIde and select option DiscreteOrdinates from the Radiation menu. The participating media radiation option is

Page 352: Star Uguide

THERMAL AND SOLAR RADIATION Chapter 11

Radiation Modelling Using Discrete Ordinates

11-6 Version 3.24

turned on automatically. Enter all necessary modelling parameters, as explained intopic “Thermal Radiation”.

Step 2

Turn on the temperature solver in the “Thermal Models” panel. Since the modelassumes participating media radiation, specify bulk radiative properties (absorptionand scattering coefficients) for the medium lying between the radiating surfaces.The Conservation and Enthalpy settings in this panel do not affect the radiationsolution.

Step 3

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 7-20 (for walls) and on page 7-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 arenot dependent on the direction of radiation incident on or leaving the surface).

Step 4

Run STAR and inspect the run-time output:

• If the initialization stage completes successfully, you will see an echo of thespecified modelling parameters in the .info and .run files.

• During the run, the DO solver is called every n iterations (where n is the valuespecified in the “Thermal Options” panel) to solve the radiative transferequation. The solver allocates and frees memory each time, which is reported.In addition, the solver prints out a residual history for the solution of theradiative transfer equation, 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

1. The discrete ordinates model (DORM) does not need radiation patches andthe computational overheads involved in their use. In addition, to facilitateswitching from discrete beam (DBM) to discrete ordinate (DORM) modelsfor the same problem, STAR will accept geometry files with or withoutpatches.

2. Nevertheless, using DORM can still add significantly to the CPU time and

Page 353: Star Uguide

Chapter 11 THERMAL AND SOLAR RADIATION

Radiation Modelling Using Discrete Ordinates

Version 3.24 11-7

memory needed for a given CFD analysis. For this reason, users areencouraged to plan their analyses conservatively until they gain experiencewith the CPU time and memory requirements of their model. The run-timeoutput for the DORM calculation will echo the memory requirements (seeStep 4 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 and connectivities supportedby pro-STAR (polyhedral cells, coupled cells, baffle cells, etc.)

7. DORM can be used in modelling

(a) conjugate heat transfer problems(b) surface-only radiative heat exchange (i.e. non-participating media

analyses). Since the participating media mode is always on, theabsorption and scattering coefficients must be set to zero for such cases.

8. At present, DORM does not support cases involving

(a) transparent solids (i.e. the solid-fluid interfaces should have zerotransmissivity)

(b) solar radiation(c) radiation sub-domains(d) Langrangian particle radiation, as used in coal combustion cases(e) moving-mesh cases

Table 11-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 354: Star Uguide
Page 355: Star Uguide

Chapter 12 CHEMICAL REACTION AND COMBUSTION

Introduction

Version 3.24 12-1

Chapter 12 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 subroutinesor the STAR-Kinetics package. Homogeneous reactions are grouped into threedistinct 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 12-2 for more details)

(b) Complex Chemistry — these model the reaction system by including thefull reaction mechanism (see “Complex Chemistry Models” on page 12-6for more details). They also allow use of the STAR-Kinetics package ifthe user has a STAR-Kinetics licence.

(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 12-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 12-5 for more details)

The theory behind reaction models of the local source and PPDF type is describedin Chapter 10 of the Methodology volume. Regress variable models are normallyused in engine combustion simulation and are described separately in Chapter 11.

In some cases, the model describing the main chemical reaction(s) may need tobe supplemented by subsidiary models that describe:

• Ignition mechanisms

Page 356: Star Uguide

CHEMICAL REACTION AND COMBUSTION Chapter 12

Local Source Models

12-2 Version 3.24

• Emission of pollutants, typically NOx products. Special considerations applyto modelling NOx-type reactions, as discussed in “NOx Modelling” on page12-16.

• 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 streams or scalar

variables. However, they need to be explicitly assigned to a stream before theycan be used in your simulation.

• Each fluid stream may be associated with only one chemical reaction scheme.However, this association may be changed by the user to suit problemrequirements 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 12-17.

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 andmixture fraction are specified correctly and that they are the same for both of

Page 357: Star Uguide

Chapter 12 CHEMICAL REACTION AND COMBUSTION

Presumed Probability Density Function (PPDF) Models

Version 3.24 12-3

them.8. The reactions themselves are defined by specifying the amounts (in

kilomoles) of the participating leading reactants, reactants and products. Forexample, the input required for the following reaction (combustion ofmethane)

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

The main features of each group are:

Single-fuel PPDF

1. The basic equations solved are for the mean mixture fraction and itsvariance (see Chapter 10, “Single-fuel PPDF” in the Methodologyvolume).

2. There is a choice between equilibrium chemistry models (these assume alocal instantaneous chemical equilibrium) and a laminar flamelet model thatallows for non-equilibrium effects (such as flame stretch)

3. When using equilibrium models:

(a) The PDF integration may be performed in two ways:

i) By employing a numerical integration techniqueii) By expressing all instantaneous values of the variables as

polynomials of the mixture fraction and then doing the integrationanalytically. Polynomial coefficients may be

– supplied by the user– read in from a built-in database stored in file ppdf.dbs

Reaction (1) kmol

Leading reactant (fuel) (1) — 1Reactant (1) — 2Product (1) — 1Product (2) — 2

CH4 2O2 CO2 2H2O+→+

CH4O2CO2H2O

fg f

Page 358: Star Uguide

CHEMICAL REACTION AND COMBUSTION Chapter 12

Presumed Probability Density Function (PPDF) Models

12-4 Version 3.24

– calculated by the CEA (Chemical Equilibrium withApplications) program [5, 6]. This is an auxiliary program thatcomputes the chemical equilibrium composition of a mixture.This program is included in the STAR-CD suite and is used inconjunction with the built-in PPDF model.

(b) There is a choice between adiabatic and non-adiabatic PPDF. Foradiabatic PPDF:

i) The mixture density and temperature are calculated numerically orfrom polynomials in f. Note that these polynomials are based onmolar fractions.

ii) Since temperature is calculated independently, the ‘Constant’specific heat property option with default values may be used

For non-adiabatic PPDF, the density is calculated from the ideal gas lawand the temperature from the enthalpy transport equation.

(c) The mass fractions of all other chemical species related to the reaction aredefined as additional scalar variables and calculated numerically or fromthe user-supplied polynomials in f, as above.

(d) Up to forty eight such species can be specified by the user.

4. When using the laminar flamelet model, the PDF integration is alwaysperformed numerically and the results stored in a look-up table which ischaracterised by its mean mixture fraction, mixture fraction variance andstrain rate. There is also a choice between an adiabatic and a non-adiabaticmodel, as above.

Multiple-fuel PPDF

1. Four equations are solved, for the progress variables (primary fuelmixture fraction), (secondary fuel mixture fraction), (primary fuelvariance) and (variance of variable ξ, see Chapter 10, “Multiple-fuelPPDF” in the Methodology 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.

It is emphasised that PPDF with dilutants can only be used in conjunctionwith the single-fuel, equilibrium chemistry model plus the non-adiabaticPPDF option.

f pf s g f

Page 359: Star Uguide

Chapter 12 CHEMICAL REACTION AND COMBUSTION

Regress Variable Models

Version 3.24 12-5

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 section “Premixed combustion in sparkignition engines” and also in “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’sresponsibility to ensure that boundary conditions for both leading reactant andmixture fraction are specified correctly and that they are the same for both ofthem.

Page 360: Star Uguide

CHEMICAL REACTION AND COMBUSTION Chapter 12

Complex Chemistry Models

12-6 Version 3.24

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 which is supported in conjunctionwith a STAR/KINetics licence (the user should refer to the STAR/KINetics manualfor details). The other is STAR-CD native format and this is described below.

In order to use STAR’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, βthe temperature exponent and E the activation energy of the Arrhenius rate constant(in cal/mol). If the mass fraction exponentials are equal to 1, they are not writteninto 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. Ifthe 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 361: Star Uguide

Chapter 12 CHEMICAL REACTION AND COMBUSTION

Complex Chemistry Models

Version 3.24 12-7

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 362: Star Uguide

CHEMICAL REACTION AND COMBUSTION Chapter 12

Complex Chemistry Models

12-8 Version 3.24

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.

An example reaction mechanism file is shown in Table 12-1.

Table 12-1

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 6964CH + N2 = HCNN 3.1E12 0.150 0.0

H2/2.0/ H2O/6.0/ CH4/2.0/ CO/1.5/ CO2/2.0/

/TROE/ a b c d

/M /

/LOW / AL βL EL

/SRI / a b c d e

/M /

/M /

/M /

/LOW /

/LOW //TROE/

/M /

Page 363: Star Uguide

Chapter 12 CHEMICAL REACTION AND COMBUSTION

Setting Up Chemical Reaction Schemes

Version 3.24 12-9

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.

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, PartiallyPremixed, Premixed, or Heterogeneous/Surface) by choosing an optionfrom the 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 material (stream) properties via panel “Molecular Properties”has already been completed before any scalar properties are defined.

• If the mass fraction of a non-reacting species is to be included in thecalculations, assign a scalar variable to the species via the “MolecularProperties (Scalar)” panel and put it at the end of the existing scalars list.

1.3E25 –3.16 7400.667 235.0 2117.0 4536.0

Table 12-1

/LOW //TROE/

Page 364: Star Uguide

CHEMICAL REACTION AND COMBUSTION Chapter 12

Setting Up Chemical Reaction Schemes

12-10 Version 3.24

• 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

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 stream in your model using the “SchemeAssociation” panel. Note that it is not necessary to assign every available scheme toone of the streams. This allows you to define redundant schemes and thenexperiment with different schemes for the same stream, by performing separateanalyses for each combination. In multi-stream problems where each stream has adifferent scalar composition, the “Additional Scalars” panel (Equation Behavioursub-folder) enables you, in effect, to select which scalars exist in what stream.

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

Page 365: Star Uguide

Chapter 12 CHEMICAL REACTION AND COMBUSTION

Setting Up Chemical Reaction Schemes

Version 3.24 12-11

4. The residual error tolerance for temperature and all scalar variables can betightened 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 stream 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 stream 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.

Chemical reaction conventions

The following conventions should be observed when typing reaction definitions inthe “Reaction System” panel:

Page 366: Star Uguide

CHEMICAL REACTION AND COMBUSTION Chapter 12

Setting Up Chemical Reaction Schemes

12-12 Version 3.24

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

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 367: Star Uguide

Chapter 12 CHEMICAL REACTION AND COMBUSTION

Setting Up Chemical Reaction Schemes

Version 3.24 12-13

(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 368: Star Uguide

CHEMICAL REACTION AND COMBUSTION Chapter 12

Setting Up Chemical Reaction Schemes

12-14 Version 3.24

Figure 12-1 Control parameters for PDF integration

The quantities shown in Figure 12-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

. (12-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 sN F

N i N i 1+

N i N i 1+

N t MF 1+( ) N F 1–( )× 1+=

PFf s

PF 100⁄( ) N t

Page 369: Star Uguide

Chapter 12 CHEMICAL REACTION AND COMBUSTION

Setting Up Chemical Reaction Schemes

Version 3.24 12-15

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–4. 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–4, 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 ΣY i–

Page 370: Star Uguide

CHEMICAL REACTION AND COMBUSTION Chapter 12

NOx Modelling

12-16 Version 3.24

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.

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.

θ∆ 360⁄ θ∆

Page 371: Star Uguide

Chapter 12 CHEMICAL REACTION AND COMBUSTION

Soot Modelling

Version 3.24 12-17

Soot Modelling

The current soot model is applicable only to unpremixed and partially premixedreactions and is activated via the Emission panel’s “Soot” section in STAR GUIde.The only user input required is four scaling factors, see equation (10-120) and(10-121), that determine the magnitude of the contribution from each source term.

For example, a decrease in the value of the scaling factors for positive sourceterms (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 — 5.0 and their default value is 1.

Coal Combustion Modelling

Coal combustion simulations are normally run as a two-stage process using theSTAR GUIde system. An outline of the steps involved at each stage is given below:

Stage 1

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)

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.

Stage 2

Generate the final solution, as follows:

Step 1

Go to the “Select Analysis Features” panel and choose option Coal Combustionfrom the Reacting Flow menu. Click Apply. The Coal Combustion sub-folder willappear in the NavCenter tree, nested inside folders Thermophysical Models andProperties > Reacting Flow. 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

Go to the Coal Combustion sub-folder and supply or modify data in each of itspanels in turn:

• In the “Control/Printout” panel, specify the required solution control andprintout parameters.

• In the “NOx/Radiation” panel, turn on the NOx generation and/or coal

Page 372: Star Uguide

CHEMICAL REACTION AND COMBUSTION Chapter 12

Coal Combustion Modelling

12-18 Version 3.24

particle radiation options, as required. Note that, if the latter is chosen, youshould already have set up your model for radiation calculations as describedin Chapter 11.

• In the “Coal Composition” panel, supply coal composition data and storethem in file coal.dbs in your current directory. Alternatively, thisinformation may be read in from an existing file.

• In the “Sub Models” panel, select the desired models for volatiles, char andgas combustion.

• Go the “Lagrangian Multi-Phase” folder, check the settings for theLagrangian two-phase modelling scheme and make any changes/additionsnecessary for defining coal particle initial positions, entrance behaviour andphysical properties.

Step 3

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 4

Go to the “Thermal Models” panel and check that options Static Enthalpy andChemico-Thermal have been selected for the enthalpy equation.

Step 5

Go to the “Initialisation” panel (Additional Scalars sub-folder) and set up anappropriate initial mass fraction for species O2 and N2.

Step 6

Go to the “Scalar Boundaries” panel (Define Boundary Conditions folder) andadjust the scalar mass fractions at the inlet boundaries. Apart from O2 and N2 , allother scalars must have zero mass fraction at the inlets.

Step 7

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 8

Run the case until reasonably small residuals are achieved.

Useful points

1. It is sometimes necessary to under-relax the particle source terms heavily toavoid divergence when the particle loading is high. This can be achieved bysetting the iteration number at which to begin averaging (see the“Control/Printout” panel) to at least 1500 iterations prior to the point wherecalculations are restarted. For example, suppose that at the end of Stage 1, astable flow field is achieved after 1000 iterations. Parameter Iteration No toBegin Averaging should then be set to -500 when restarting the case in Stage2. Since only the absolute difference between the restart iteration number andthe iteration number to begin averaging is considered, it is acceptable to entera negative iteration number, i.e. -500 in this example. As the combusting flowsolution becomes more stable in Stage 2, you can accelerate the convergencerate by changing the value of this parameter to be 100 to 200 iterations away

Page 373: Star Uguide

Chapter 12 CHEMICAL REACTION AND COMBUSTION

Coal Combustion Modelling

Version 3.24 12-19

from the restart iteration number.2. When discretising the coal particle size distribution, it is important to include

some sub-5 micron particles. This enables a stable flame to be established inthe immediate vicinity of the burner inlets.

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

4. If the calorific value of the modelled coal is very high, it is useful to chooseCH4 as the setting for the Volatiles Specific Heat Option (see panel “Coalcomposition D/B”, Miscellaneous section), at least during the initial stage ofthe calculation. Once the temperature distribution has stabilised, you maychange the setting to Coal CV.

Page 374: Star Uguide
Page 375: Star Uguide

Chapter 13 LAGRANGIAN MULTI-PHASE FLOW

Setting Up Lagrangian Multi-Phase Models

Version 3.24 13-1

Chapter 13 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 376: Star Uguide

LAGRANGIAN MULTI-PHASE FLOW Chapter 13

Setting Up Lagrangian Multi-Phase Models

13-2 Version 3.24

(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 13-1 below:

Figure 13-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 377: Star Uguide

Chapter 13 LAGRANGIAN MULTI-PHASE FLOW

Setting Up Lagrangian Multi-Phase Models

Version 3.24 13-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 13-2:

Figure 13-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 378: Star Uguide

LAGRANGIAN MULTI-PHASE FLOW Chapter 13

Data Post-Processing

13-4 Version 3.24

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 13-3. The circlesize and colour can be made to depend on a variety of local droplet properties.

Figure 13-3 Static display illustration

2. Trajectory displays — these show droplet tracks, either as continuoustrajectories or as animated streaks, whose rate of progress through thesolution domain can be controlled by the user, as illustrated in Figure 13-4.

Page 379: Star Uguide

Chapter 13 LAGRANGIAN MULTI-PHASE FLOW

Data Post-Processing

Version 3.24 13-5

Figure 13-4 Trajectory display illustration

Static displays

Steady-state problemsStep 1

Read the required droplet data from the track (.trk) file generated automaticallyby STAR 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 380: Star Uguide

LAGRANGIAN MULTI-PHASE FLOW Chapter 13

Data Post-Processing

13-6 Version 3.24

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 3regarding sets of cells, vertices, splines, etc. Thus, sets may be selected by

• a coloured button marked D -> on the left-hand-side of the main window• a similar button labelled Dp in the “Droplets” tab• typing command DSET in the I/O window. This provides the most extensive

range of selection options.

The set selection facilities available via the D -> or Dp buttons are as follows:

1. 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 13-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 page13-3) or Current Post Data File (see Step 2 on page 13-8), the followingoptions are available:

(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 381: Star Uguide

Chapter 13 LAGRANGIAN MULTI-PHASE FLOW

Data Post-Processing

Version 3.24 13-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 thetrack (.trk) file and may be used as the basis for selecting a parcel set, via

Page 382: Star Uguide

LAGRANGIAN MULTI-PHASE FLOW Chapter 13

Data Post-Processing

13-8 Version 3.24

command 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-processingparticle tracks without first saving the droplet data.

Page 383: Star Uguide

Chapter 13 LAGRANGIAN MULTI-PHASE FLOW

Engine Combustion Data Files

Version 3.24 13-9

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 material stream in your model and contains both fuel droplet data(represented as globally averaged quantities) and general engine data.

The information in this file may also be displayed in graphical form using 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 Penetration of the leading parcel along the injector axis [m]

Distance Radial distance of the leading parcel from the injector axis [m]

VelocityVelocity component of the leading parcel along the injectoraxis [m/s]

V_mag Radial velocity of the leading parcel [m/s]

Idr Leading parcel number

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]

%Evap_Burnt Burnt fuel as a percentage of fuel evaporated

Page 384: Star Uguide

LAGRANGIAN MULTI-PHASE FLOW Chapter 13

Useful Points

13-10 Version 3.24

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. In steady-state models using the coupled approach, it is recommended to startthe analysis by obtaining a solution that does not include the dispersed phase.The latter should then be introduced into the calculated flow field and theanalysis continued to the final, complete solution. This procedure shouldmake it easier to obtain a solution by reducing the computer time required.

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 desired solution obtainedin 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 8, “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.

Heat_Release_Rate

Heat release rate [J/s]

Scalar Mass of scalar no. i [kg]

Page 385: Star Uguide

Chapter 14 EULERIAN MULTI-PHASE FLOW

Introduction

Version 3.24 14-1

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

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 7,“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:

• Thermal/solar radiation and conjugate heat transfer are not supported in this

Page 386: Star Uguide

EULERIAN MULTI-PHASE FLOW Chapter 14

Setting up multi-phase models

14-2 Version 3.24

version of the code, therefore the usual Thermal Options panel is notdisplayed.

• Use the Liquids and Gases panels to specify physical properties and specialflow conditions in your model. Note that:

(a) Only a single material (or stream) is allowed at present, so the Material #slider in each panel remains set to 1.

(b) Where appropriate, data are entered per phase, with the number of 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 the

Page 387: Star Uguide

Chapter 14 EULERIAN MULTI-PHASE FLOW

Setting up multi-phase models

Version 3.24 14-3

heat transfer coefficient).• 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 7, “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 regions where the volume fraction is close to 1or 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 .pst 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 graph

Page 388: Star Uguide

EULERIAN MULTI-PHASE FLOW Chapter 14

Setting up multi-phase models

14-4 Version 3.24

available are described in topics “Residual History Data”, “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.

3. As well as introducing some E2P-specific subroutines, a number of changeshad to be made to the basic structure of several existing subroutines so that thelatter could be used for either single- or multi-phase problems (see Chapter18, “New Coding Practices for Eulerian Multi-phase Problems” for details).

Page 389: Star Uguide

Chapter 15 FREE SURFACE AND CAVITATION

Free Surface Flows

Version 3.24 15-1

Chapter 15 FREE SURFACE AND CAVITATION

Free Surface Flows

The theory behind flow problems of this kind is given in the Methodology volume(Chapter 14, “Free Surface Flows”). This section contains an outline of the processto be followed when setting up free surface flow problems. Also included are cross-references to appropriate parts of the on-line Help system, which contains details ofthe user input required.

Setting up free surface models

Step 1

Switch on the free-surface facility using the “Select Analysis Features” panel of theSTAR GUIde system:

• Select On from the Free Surface menu• Click Apply. An additional folder called Free Surface will now appear in the

NavCenter tree.

The panel also checks for invalid or unsupported combinations with other majorSTAR-CD modelling options and will automatically prevent you from selectingthem. Such options are currently:

• Eulerian multi-phase• Chemical reactions of any type• Aeroacoustics• Liquid films

Step 2

Set up an appropriate mesh for your problem as normal. All standard STARgeometric features are supported by the free surface facility.

Step 3

In the Free Surface folder, set up numerical solution control parameters using the“Controls” panel (see the on-line Help text for more details on how to choose theseparameters). A special scalar variable, VOF, is automatically set up by pro-STAR totrack the free surface position.

The time step required to solve the VOF transport equation is typically smallerthan that required for the other equations. STAR predicts the time step size requiredfor VOF transport based on the free surface progress. In Figure 15-1, this time stepis labelled as DTFS. In order to avoid solving all other transport equations with thisvery small time step, it is possible to use a form of “subcycling” where several VOFcalculations are performed before solving the other transport equations. You mayset the maximum number of subcycles via the “Controls” panel and DTFS willremain constant during multiple VOF calculations.

For transient analyses, it is possible that the time period given by the product ofDTFS and the ‘maximum number of subcycles’ value to be less than the originaltime step specified by the user. If this happens, a substep period is introduced (asshown in Figure 15-1) which has a time period of (DTFS × No. of subcycles). Thissubstep time is used to solve all other transport equations (thus completing a PISO

Page 390: Star Uguide

FREE SURFACE AND CAVITATION Chapter 15

Free Surface Flows

15-2 Version 3.24

loop). Several substeps may be required before the original user time step iscomplete.

The subcycling feature is also employed for pseudo-transient analyses but thesubstep period treatment described above is not applicable. Thus, if the maximumsubcycle number is reached, STAR will automatically reduce the user-specifiedtime step to a value corresponding to that maximum.

Figure 15-1 Illustration of time step control practices for free surface flows

Step 4

In the Free Surface folder, assign physical properties to the light and heavy fluids inyour model using the corresponding tabs in the “Molecular Properties” panel.

Step 5

In the Thermophysical Models and Properties folder:

• Go to the “Thermal Options” panel and select any features that areappropriate to your model, such as conjugate heat transfer. Note, however,that radiation modelling is not current supported.

• In the Liquids and Gases sub-folder, use the relevant panels to specify specialflow conditions in your model, where appropriate:

(a) “Turbulence Models”, if turbulent flow conditions prevail(b) “Thermal Models”, if heat transfer is involved in the analysis. Note,

however, that only the Thermal option for enthalpy can be used in thiscase.

(c) “Monitoring and Reference Data” — specify a reference pressure andtemperature and the cell location corresponding to the reference pressure

(d) “Buoyancy” — if buoyancy effects are important, specify a referencedensity value and datum location

In specifying the above, make sure that the Material # slider at the bottom ofeach panels remains set to 1.

• If you are doing a conjugate heat transfer analysis, use the Solids sub-folder toset the solid material properties as normal

An additional scalar variable called VOF is also needed for this type of analysis.VOF represents the volume fraction of the heavy fluid and is used for visualising thefree surface position. Normally, this scalar is set up automatically by pro-STAR.

DTFS

Substep time

User time step

Page 391: Star Uguide

Chapter 15 FREE SURFACE AND CAVITATION

Free Surface Flows

Version 3.24 15-3

Step 6

Define initial conditions in your model. Two types of initialisation are required:

1. Location and flow field values for the light and heavy fluids. These willeffectively define the initial position of the free surface. This operation maybe performed in two ways:

(a) Using the Cell Table Editor:

i) Open the Cell Table Editor dialog and define separate cell types forthe light and heavy fluids in your model. Assign distinct colourindices to them so that you can tell them apart easily.

ii) Make sure that both cell types are indexed to material propertynumber 1

iii) Use the Initial Free Surface Material menu to assign an additionalproperty (Light or Heavy) to the light and heavy fluid cell types,respectively

iv) Assign each cell in your model to either of the two types using thepro-STAR facilities described in Chapter 6, “Cell indexing”. Thisoperation provides a complete definition of the free surfacelocation; it also automatically initialises the VOF scalar variable.

(b) Using the “Initialisation” panel in the Additional Scalars sub-folder:

i) Choose scalar VOF from the scroll list and option User from theValues pop-up menu

ii) Specify an appropriate distribution for the VOF values (0.0 in lightfluid cells, 1.0 in heavy fluid cells) via user subroutine INITFI.

2. Specify initial conditions for all other flow variables accessible via the“Initialisation” panel in the Liquids and Gases sub-folder. If option User isselected, supply the required distributions in subroutine INITFI, makingsure to distinguish between the two fluid regions in your model.

Step 7

Define boundary locations and conditions in the usual manner, using the “CreateBoundaries” and “Define Boundary Regions” panels. At present, only part of thefull STAR-CD boundary type set is available for this kind of analysis. Thepermissible options are:

1. Inlet2. Outlet3. Pressure4. Wall5. Non-porous baffle6. Cyclic7. Symmetry8. Attachment

Note that appropriate boundary values for scalar VOF will also need to be set (1.0for pure heavy fluid, 0.0 for pure light fluid) in the “Scalar Boundaries” panel.

Page 392: Star Uguide

FREE SURFACE AND CAVITATION Chapter 15

Free Surface Flows

15-4 Version 3.24

Step 8

In the Analysis Controls folder:

• Select the Solution Controls sub-folder and display the “Solution Method”panel to check the default settings for the solution algorithm parameters(PISO for transient, SIMPLE or SIMPISO for pseudo-transient analyses).Input your own values if necessary.

• Select Solution Controls > Equation Behavior > Primary Variables andmake any necessary adjustments to the current or default settings

Useful points on free surface flow

1. The valid solution modes for this type of problem are transient andpseudo-transient.

2. There is only one valid fluid material number for problems of this kind,material no.1. Do not attempt to define any additional fluid materials.However, there is no restriction on the number of solid materials. Note that, ifpresent, solid materials are numbered starting at no. 3.

3. The VOF scalar variable is automatically set up by pro-STAR, if it does notalready exist. In order to maintain a high resolution of the light/heavy fluidinterface, it is necessary to restrict the maximum mesh Courant number to avalue of 0.3 or below (see also the “Controls” panel in the STAR GUIdesystem).

4. A ‘sub-cycling’ option is provided to reduce the overall time required by thecalculations, as explain in Step 3 above. This option operates as follows:

(a) If sub-cycling is Off, the time step will vary during the analysis to suit theCourant number restriction and will be used to calculate all flow variables

(b) If sub-cycling is On, the user-specified time step is employed incalculating all variables except VOF. The step size should be set so thatthe true nature of the flow can be adequately represented.

(c) The VOF variable is calculated by sub-dividing this time step into anumber of smaller steps (or sub-cycles), up to a user-specified limit(currently set at 50, see also panel “Controls” in STAR GUIde).

(d) The number of sub-cycles performed is just sufficient to satisfy theCourant number constraint. If the limit is exceeded and the solution modeis transient, STAR will automatically use the ‘substep’ time step refrerredto in Step 3 to ensure the limit still applies. If the solution mode ispseudo-transient, the same effect is achieved by reducing theuser-specified time step to a value corresponding to that limit.

5. For transient analyses, the ‘substep’ is essentially the true time step drivingthe overall solution. The .info file will show data on substeps within thenormal user time step and the number of subcycles (VOF calculations) willalso be shown here. The original user-specified time step is now only used todetermine the points at which data should be written to the .run, .pst and.pstt files. The user time step is also taken into account when ABORTing afree surface calculation, as the code will continue running until the end of thisstep before it stops.

6. If surface tension effects are large, it is advisable to run your model in doubleprecision and use a small time step size.

Page 393: Star Uguide

Chapter 15 FREE SURFACE AND CAVITATION

Cavitation

Version 3.24 15-5

Cavitation

The theory behind problems of this kind is given in the Methodology volume(Chapter 14, “Cavitation”). This section contains an outline of the process to befollowed when setting up cavitation problems.

Setting up cavitation models

A cavitation model is set up in a similar manner to a free surface model. Thenecessary steps are as follows:

Step 1

Switch on the cavitation modelling facility using the “Select Analysis Features”panel of the STAR GUIde system:

• Select On from the Cavitation menu• Click Apply. Note that an additional folder called Cavitation will now appear

in the NavCenter tree.

The panel also checks for invalid or unsupported combinations with other majorSTAR-CD modelling options and will automatically prevent you from selectingthem. Such options are currently:

• Eulerian multi-phase• Chemical reactions of any type• Aeroacoustics• Liquid films

Step 2

Set up an appropriate mesh for your problem as normal. All standard STARgeometric features are supported by the cavitation facility.

Step 3

In the Cavitation folder:

• Assign physical properties to the heavy fluid in your model using the“Molecular Properties” panel. Note that, in this case, the light fluid is thevapour phase of the heavy fluid, therefore there is no need for a separateproperty specification (the Light Fluid tab in the panel becomes inactive). Thevapour phase properties are assigned to a special scalar called CAV. These canbe inspected/edited in the Additional Scalars sub-folder, panel “MolecularProperties (Scalar)”.

• Choose a cavitation model and specify parameters for it using the “CavitationModel” panel

Step 4

In the Thermophysical Models and Properties folder:

• Go to the “Thermal Options” panel and select any features that areappropriate to your model, such as conjugate heat transfer. Note, however,that radiation modelling is not current supported.

• In the Liquids and Gases sub-folder, use the relevant panels to specify specialflow conditions in your model, where appropriate:

Page 394: Star Uguide

FREE SURFACE AND CAVITATION Chapter 15

Cavitation

15-6 Version 3.24

(a) “Turbulence Models”, if turbulent flow conditions prevail(b) “Thermal Models”, if heat transfer is involved in the analysis. Note,

however, that only the Thermal option for enthalpy can be used in thiscase.

(c) “Monitoring and Reference Data” — specify a reference pressure andtemperature and the cell location corresponding to the reference pressure

(d) “Buoyancy” — if buoyancy effects are important, specify a datumlocation and density

In specifying the above, make sure that the Material # slider at the bottom ofeach panels remains set to 1.

• If you are doing a conjugate heat transfer analysis, use the Solids sub-folder toset the solid material properties as normal

Step 5

Define initial conditions in your model. Two types of initialisation are required:

1. If the model includes a free surface as well as cavitation effects, the initialposition of the free surface should be specified using the methods describedunder Step 6, page 15-3. For most problems only heavy fluid (i.e. no vapour)is present at the start of the analysis, in which case you only need to open theCell Table Editor dialog and change the Initial Free Surface Material menusetting to Heavy for all fluid cell types. This operation also sets the CAV andVOF scalars to their correct initial values.

2. Specify initial conditions for all flow variables accessible via the“Initialisation” panel in the Liquids and Gases sub-folder. If option User isselected, supply the required distributions in subroutine INITFI.

Step 6

Define boundary locations and conditions in the usual manner, using the “CreateBoundaries” and “Define Boundary Regions” panels. At present, only part of thefull STAR-CD boundary type set is available for this kind of analysis. Thepermissible options are:

1. Inlet2. Pressure3. Wall4. Non-porous baffle5. Cyclic6. Symmetry7. Attachment

Step 7

In the Analysis Controls folder:

• Select the Solution Controls sub-folder and display the “Solution Method”panel to check the default settings for the solution algorithm parameters(PISO for transient, SIMPLE or SIMPISO for pseudo-transient analyses).Input your own values if necessary.

• Select Solution Controls > Equation Behavior > Primary Variables andmake any necessary adjustments to the current or default settings

Page 395: Star Uguide

Chapter 15 FREE SURFACE AND CAVITATION

Cavitation

Version 3.24 15-7

Useful points on cavitation

1. The valid solution modes for this type of problem are transient andpseudo-transient.

2. There is only one valid fluid material number for problems of this kind,material no.1. Do not attempt to define any additional fluid materials.However, there is no restriction on the number of solid materials.

3. A special scalar variable, CAV, is automatically set up by pro-STAR, if it doesnot already exist. This is assigned the material properties of the vapourcreated by cavitation and its value represents the volume fraction of thatvapour. An additional scalar called VOF will also be created automatically totrack the fluid /vapour interface and added to the scalars list (see also “Usefulpoints on free surface flow” on page 15-4).

Page 396: Star Uguide
Page 397: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Rotating Reference Frames

Version 3.24 16-1

Chapter 16 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 (angular velocity and axisof rotation, see Figure 16-1) for the material in your model.

Figure 16-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 8, “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 orabsolute velocities.

ω = 200 rpm

Page 398: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Rotating Reference Frames

16-2 Version 3.24

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 16-2 requires two rotating frames.

• Generate the mesh.

Figure 16-2 Multiple rotating frame illustration

Baffle

Baffle

r = 15 cm

r = 5 cm

r = 10 cm

Block 2Spin index = 2

Block 1Spin index = 1

ω = 0 rpm

ω = 500 rpm

Page 399: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Rotating Reference Frames

Version 3.24 16-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 (see “Cell Table” on page 6-1). Assign different spin and colour table indicesto each cell type, as shown below, for the two rotating blocks of Figure 16-2. Notethat the table entries for both mesh blocks have the same material property referencenumber since the blocks belong to the same fluid stream.

Mesh block 1

Mesh block 2

Page 400: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Rotating Reference Frames

16-4 Version 3.24

Step 4

Assign all cells within a block in turn to each of the cell types created above (see“Cell indexing” on page 6-3).

Step 5

In the Rotating Reference Frames folder, open the “Rotating Reference Frames”panel and select option Multiple Frames - Implicit. This enables you to specify spinparameters (angular velocities and axes of rotation) for each of the spin indicesalready defined. In terms of the example of Figure 16-2, zero rotational speed needsto be assigned explicitly to block no. 2 since its local coordinate system is used intransforming velocities across the block interface.

Useful points on multiple implicit rotating frame problems

1. When modelling multiple rotating reference frame (m.r.f.) problems, it 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, as follows:

(a) For mixing vessel problems, the facilities discussed in “Automatic EventsGeneration for Mixing Vessel Problems” may be appropriate

(b) For other types of problem, consider the facilities of “Arbitrary SlidingInterfaces”

Note, however, that a result obtained via the m.r.f. method can always be usedas an initial field for a transient moving mesh simulation. This will reduce thetime needed to reach a periodic state solution.

2. It is important to ensure that the interface between the different m.r.f. regionsis 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

Chapter 8, “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. To use the implicit method for an interface with the same domain boundary

Page 401: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Rotating Reference Frames

Version 3.24 16-5

geometry, but different mesh structure on either side (for example, betweentwo axial turbomachinery stages, with the blades swept in oppositedirections):

(a) Build each domain separately with its own ‘best fit’ mesh structure, andcell types with different spin indices.

(b) Split the boundary cell layer on one of the domains into two cell layers.(c) Convert the split layer adjacent to the domain boundary to the cell type of

the domain on the other side of the interface. Couple the two layerstogether using the Create Couples dialog (see Chapter 4, “Couplecreation”).

(d) The implicit interface will now be across the split line of the originalboundary cell layer.

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 blocks is definedby pairs of adjacent (but spatially coincident) boundaries, as shown in Figure16-3. The coincident boundaries are first defined as independent boundaryregions using separate sets of vertices and then coupled together as describedin Step 7 below. Note that the interface must be either a plane perpendicular tothe axis of rotation or a conical section, i.e. a surface generated by rotating astraight line around that axis.

Page 402: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Rotating Reference Frames

16-6 Version 3.24

Figure 16-3 Coupled boundary illustration

Step 3

Display the Cell Table Editor by clicking CTAB on the main pro-STAR window.Define cell index numbers to correspond to each of the rotating mesh blocks (see“Cell Table” on page 6-1). Assign different material property and colour 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 block.

Step 4

Assign all cells within a block in turn to each of the cell types created above (see“Cell indexing” on page 6-3). Also ensure that separate monitoring cell andreference pressure locations are specified for each block.

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 betweenblocks, as shown in Figure 16-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 403: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Rotating Reference Frames

Version 3.24 16-7

Step 7

Go back to panel “Create Boundaries” and use tab “Couples” to join the interface

Page 404: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Rotating Reference Frames

16-8 Version 3.24

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 16-3 is

(16-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 solution domains that have only inletboundary couples. Such domains are recommended for solving closed loopproblems where the flow rate needs to be determined as part of the solution.The groups to balance are specified in the “Rotating Reference Frames” panel(see Step 8 below).

Step 8

In the Rotating Reference Frames folder, open the “Rotating Reference Frames”panel and select either option Multiple Frames - Explicit or option “MultipleFrames - NR-Explicit”. This enables you to specify:

1. Spin parameters (angular velocities and axes of rotation) for each of the meshblocks already defined. In the above example, blocks 1, 2 and 3 have angularvelocities of 100, 500 and 1000 r.p.m., respectively. The spin axis is normallycommon to all blocks.

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, as follows:

(a) For mixing vessel problems, the facilities discussed in “Automatic EventsGeneration for Mixing Vessel Problems” may be appropriate

(b) For other types of problem, consider the facilities of “Arbitrary SlidingInterfaces”

Note, however, that a result obtained via the m.r.f. method can always be usedas an initial field for a transient moving mesh simulation. This will reduce thetime needed to reach a periodic state solution.

2. It is important to ensure that the interface between the different m.r.f. regionsis a smooth surface (i.e. a constant-radius surface). This point needs particularattention in all-tetrahedral mesh cases.

Pregion 5 pi sii 5=

8

sii 5=

8

⁄=

Page 405: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Moving Meshes

Version 3.24 16-9

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 8, “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 blocks 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 remains

Page 406: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Moving Meshes

16-10 Version 3.24

active 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 thatare 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 8, “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 16-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 16-14)• Sliding mesh — (see “Sliding Meshes” on page 16-19)• Conditional cell attachment and change of fluid type — (see “Cell

Attachment and Change of Fluid Type” on page 16-26)

Setting up models

The main steps for setting up a moving mesh model are outlined below. For moredetailed information, refer to Tutorial 7.1, Tutorial 11.1 and Tutorial 13.1 in theTutorials volume.

Step 1

Generate the mesh at time t = 0 and issue the following command:

followed by either

TIME,TRANS (turn on the transient solution option)

Page 407: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Moving Meshes

Version 3.24 16-11

or

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 Figure16-4 are as follows:

!! Comments like this are allowed by starting the line with “!!”

MVGRID,ON (turn on the moving-grid option, whenusing subroutine NEWXYZ only)

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)

Page 408: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Moving Meshes

16-12 Version 3.24

Figure 16-4 Moving mesh illustration

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 8, “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

Y

X

1 m/s

1

3

5

7

9

11

2

4

6

8

10

12

Page 409: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Moving Meshes

Version 3.24 16-13

Step 4

Exit from pro-STAR and then run STAR from your session’s X-window, asdescribed in Chapter 2, “Running a CFD Analysis”, Step 6.

Step 5

Post-process the data. For example, the commands needed to process time step no.10 are:

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 relative

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

RCONSTANT, 4, 1. (set constant number 4 to 1.)

Page 410: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Cell-layer Removal/Addition

16-14 Version 3.24

internal movement (i.e. cell expansion or contraction).5. You are strongly advised to set the pressure correction under-relaxation factor

to a value less than 1.0 (e.g. 0.8) before starting the analysis.6. Flow boundary conditions on boundaries that have moving vertices may result

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

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 the

Page 411: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Cell-layer Removal/Addition

Version 3.24 16-15

mesh. The actual change of mesh geometry has to be specified explicitly through amoving mesh operation of the kind described in “Moving Meshes” on page 16-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.

Setting up models

Cell Removal or Addition operations should always be combined with either

• Change Grid operations in the EVENTS command module, or• the user subroutine NEWXYZ.

The main steps for setting up a model of this kind are outlined below. For moredetailed information refer to Tutorial 11.1 in the Tutorials volume.

Step 1

Generate the mesh at time t = 0. The layers to be removed can be given different cellindex numbers using command CTABLE.

.

Figure 16-5 Cell layer removal illustration

Referring to the example of Figure 16-5 the relevant commands would be:

CTAB,1,FluidRP7,1*SET,CTY,1,1*SET,C1,1,3*SET,C2,3,3

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 412: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Cell-layer Removal/Addition

16-16 Version 3.24

*DEFINECTYPE,CTYCSET,NEWS,CRANG,C1,C2,1CMOD,CSET*END*LOOP,1,6,1

Step 2

Issue the following commands:

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

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

Page 413: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Cell-layer Removal/Addition

Version 3.24 16-17

Note that:

1. The event time can also be specified using global parameters. For example

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 8, “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 CFD Analysis”, Step 6.

Step 6

Post-process the data. For example, the commands needed to process time step no.10 are:

EVPARM PISTON 1000. 0.04 0.13 0.015 COMP 0.1015↑ ↑ ↑ ↑ ↑ ↑

pistonengine

rotatingspeed(rpm)

crankradius

lengthof con.

rod

initialpiston

position

pistonlocationat TDC

EVSTEP 1 PCOMP 0.02↑ ↑ ↑

event step compression stage piston position

Page 414: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Cell-layer Removal/Addition

16-18 Version 3.24

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 12, “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.

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

RCONSTANT, 4, 1. (set constant number 4 to 1)

Page 415: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Sliding Meshes

Version 3.24 16-19

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 andevent 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. For more detailed information, refer to Tutorial7.1 in the Tutorials volume.

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.

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 16-26for an explanation of this parameter)

TIME,TRANS (turn on the transient solution option)MVGRID,ON,EVENT,PROSTAR (turn on the moving-grid option)

Page 416: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Sliding Meshes

16-20 Version 3.24

• Perform an initial attachment operation for the relevant boundary pairs(otherwise they will be treated as detached).

followed by either

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.

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)

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 3-44)

EATTACH,10,1 (attached boundaries 10 and 1)EVSAVE 2 (save event no. 2)

Page 417: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Sliding Meshes

Version 3.24 16-21

Step 3

• If using the method described in Chapter 8, “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 CFD 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.

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 418: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Sliding Meshes

16-22 Version 3.24

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

(16-2)

In general, the time step dt should equal dtsl divided by an integer.If accuracy is not at a premium, one may also slide the mesh by more than

one cell width (e.g. two cell widths) in a single time step.4. In cylindrical systems, periodic results are usually reached after about seven

revolutions.5. The transient post data (.pstt) 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. If one cell of an attached pair is deactivated, the other side reverts to the

alternate wall region.9. If both cells of an attached pair are deactivated simultaneously and then

reactivated, the EATTACH command must be re-issued.10. For STAR-HPC runs, you need to ensure that the sliding mesh region resides

completely on one processor. This can also be achieved through manualdecomposition.

Arbitrary Sliding Interfaces

Basic conceptsThe basic techniques used in this approach are as follows:

1. Cell faces to be connected with an ASI are declared as attachment boundaries(boundary type ATTACH).

2. A special event type, called a ‘sliding’ event, is defined using commandEVSLIDE. This is accompanied by commands that declare:

(a) The boundaries on one side of the ASI as ‘master’ faces — commandEMSLIDE.

(b) The boundaries on the other side of the ASI as ‘slave’ faces — command

RCONSTANT,4,1. (set constant number 4 to 1.)

dtsl cell face angle at interface / rotating speed=

Page 419: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Sliding Meshes

Version 3.24 16-23

ESSLIDE.(c) A set of offsets needed to match the two sliding regions — command

EOSLIDE.

The concept of master and slave faces here is identical to that used in staticproblems when joining cell blocks of differing mesh structure (see Chapter 4,“Integral and arbitrary connectivity”). The faces are matched up using theoffsets supplied when the sliding event is saved with the EVSAVE command.

3. Any number of sliding events may be defined in a model.4. A sliding event does not have a time associated with it. Therefore, it is

necessary to activate it by ‘enabling’ it in an actual event using the EASIcommand (option ENABLE). Once enabled, it remains active until it isdisabled in another, later event using EASI with option DISABLE.

5. During a STAR run, the enabled sliding events are processed using the latestvertex coordinates at each time step. User subroutine UASI is called to set upa primary and a secondary offset in the local coordinate system. The defaultoffsets are both zero, which is suitable for most problems where the faces arephysically coincident. UASI needs to be supplied only in problems where thefaces are physically offset and need to be matched in a cyclic sense — forexample, when simulating a mixer by 90˚ segments with cyclic boundaryconditions. The program attempts to match all the active faces with the firstoffset, and the remaining faces with the second offset.

6. In some problems, cell faces on one side of the interface may slide past theiropposite numbers on the other side in such a way that they can no longer bematched to any interior cell face. Such faces then effectively become partial orfull wall boundaries to the solution domain. A particular feature of theseboundaries is that their effective shape and position may change dynamically.Such situations are signalled to STAR-CD by using command EPSLIDEwhich forms part of the ‘sliding’ event specification. Thus, during the run,STAR first tries to match all cell faces at the interface using the methoddescribed under item 5. above. All unmatched surfaces with normalised areagreater than the tolerance given by EPSLIDE become walls and areautomatically assigned to the alternate wall region supplied as part of theattachment boundary specification (see “Attachment Boundaries” on page7-38). Note that specifying a tolerance equal to 1.0 effectively disables thisfeature.

In all other respects, the treatment (and constraints) of ASI problems is similar tothose using the regular sliding interface with ATTACH events. For more details onsetting up and post-processing ASI models, consult an example given in theTutorials volume.

Useful points

1. The ASI approach involves re-computing boundary face matches at each timestep, and may thus be slightly slower than using ATTACH events. However,the matching is done automatically so users do not need to specify ATTACHevents.

2. STAR-CD tolerates an area mismatch of 2% by default. Such mismatchesoccur if part of a cell face on one side of the sliding interface cannot be

Page 420: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Sliding Meshes

16-24 Version 3.24

matched to any face on the other side. If face areas greater than the defaultvalue are left unmatched, the run stops with an error message. This mayhappen if the faces are severely warped, or the relative sizes of master andslave faces are very different, or as a result of errors in the mesh motion. Afterruling out this last possibility, the matching tolerance may be relaxed bysetting it to the value recommended by STAR in its last error message. Thiscan be done by using command

RCON,12,<value>

3. Contour plots of vertex data may show small discontinuities across ASI (oreven arbitrary stationary) interfaces. This is normal, and is not an error. It iscaused by the linear interpolation of vertex values during plotting.

4. pro-STAR treats the ASI attachment boundaries as internal, ‘hidden’ surfaceseven when, as a result of sliding, the mesh moves so as to expose them. Tomake such cell faces visible, it is necessary to issue command ABSURFACEbefore producing any geometry plots of the sliding mesh.

5. For STAR-HPC runs, you need to ensure that the sliding mesh region residescompletely on one processor. This can also be achieved through manualdecomposition.

Automatic Events Generation for Mixing Vessel Problems

pro-STAR provides a simplified procedure for generating a transient moving meshmodel for mixing-vessel type problems, starting from a stationary mesh built at agiven position of the impeller paddle. A single command generates the events, themoving grid commands, the ATTACH boundaries and any required usersubroutines. Advanced users may then add to or modify these events to allow forother motions in the system.

The two relevant pro-STAR commands are MIXVESSEL and MIXASI. TheMIXVESSEL command generates ATTACH events, while the MIXASI commandgenerates arbitrary sliding interface (ASI) events. MIXASI is recommended forgeneral use. MIXVESSEL may result in slightly shorter run times for large models,at the cost of using a distorted mesh at the interface (or a limitation on the time stepto achieve pure sliding motion).

Setting up modelsStep 1

Create a stationary mesh for the minimum repeatable segment of the mixer. Forexample, if the mixer has 4 paddles and 8 baffles on the tank, a 90˚ segment wouldgive a repeatable unit. If there are 6 baffles, a 180˚ segment would have to bemodelled. The relative position of the baffles and the paddle in the model areunimportant, as the mesh will be moved during the solution.

Step 2

Determine the portion of the mesh surrounding the paddles that will be modelledwith a moving mesh. Change this region to cell types with group index 1. Changethe stationary region to cell types with group index 2 (any other convenient groupindex may be used). Following this operation, it is necessary to check that theresulting interface between the rotating and stationary cell groups

Page 421: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Sliding Meshes

Version 3.24 16-25

• does not coincide with a coupled cell interface• is composed solely of cell faces (i.e. no cells must have edges or corners lying

on this interface)

Step 3

In cases where a segment of the full circle is being modelled, create cyclic boundaryconditions on the exposed faces as usual. Also define any other boundary regionsrequired (e.g. any inlets/outlets into the mixer).

Step 4

Include a MIXVESSEL or MIXASI command, as appropriate (see above).

MIXVESSEL commandThis command does the following:

1. Splits the model along the interface between rotating and stationary parts, byassigning new vertex numbers to cell faces on both sides of the interface.

2. Numbers these new vertices sequentially starting from the next availablevertex number, with the ordering based on the I,J distance from a specifiedcorner cell.

3. Creates ATTACH boundaries that are numbered sequentially. Again, theordering is based on distance from the corner cell.

4. Opens an events file and creates attachment events at the appropriate times(based on the specified rotating speed) between the predetermined boundarynumbers. Events are generated so as to run the model for the specified numberof revolutions.

5. Creates EGRID commands that will cause the inner vertices to spin, andadjust the position of the interface vertices on the stationary side (based on theknown ordering of the vertices).

MIXASI commandThe numbering requirements are much less severe for the ASI event. This commanddoes the following:

1. Splits the model along the interface between the rotating and stationarygroups, by assigning new vertex numbers to cell faces on one of the sides ofthe interface.

2. Creates ATTACH boundaries numbered sequentially, again ordered from thecorner cell.

3. Opens an events file, and creates a sliding event between the master and slaveboundaries, plus an actual event to enable this sliding event.

4. Creates EGRID commands to spin the inner vertices.5. Creates user subroutine UASI, if necessary (i.e. if the angular extent is less

than 360˚).

Step 5

If using the method described in Chapter 8, “Load-step based solution mode”,define the load step for the transient run. Then write the problem and geometry filesand run STAR as usual.

Page 422: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Cell Attachment and Change of Fluid Type

16-26 Version 3.24

Useful points

1. The stationary model can be run using implicit multiple reference frames togenerate an initial guess for the full transient solution. This will cut down thetime required to achieve a periodically repeating state. This can be doneeasily, by assigning spin index 1 to all the cells in group 1, etc. and thensetting the appropriate rotating speed.

2. When using command MIXVESSEL, the maximum number of revolutionsmust be determined ahead of time. This value is required for writing theevents (.evn) file.

3. The group number used for the rotating cells must not be used for any othercells (even non-fluid cells like shells, lines, etc.), as the number is used by theEGRID commands to move all vertices attached to this group.

4. When post processing results obtained for segments of circles, the solutionmay be easier to visualise if command DGENERATE is previously used togenerate data (by repetition) for the complete circle (see also “Mapping andCopying Post Data” on page 9-27). This allows display of the solution in aneasily recognisable physical domain.

Cell Attachment and Change of Fluid Type

Basic concepts

Cell attachment permits the following situations to be modelled:

1. The connection of unconnected neighbouring cells in different fluid blocks,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 block of fluid to become completely cut off from the rest of theflow field. Once cut off, the flow solution in such a block can have its own referencepressure and temperature. A special type of boundary (‘Attachment’ type) must alsobe declared at the interface where cell attachment and detachment is to take 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 and any conditions specified in user subroutineCONATT. All conditions defined for a particular event are maintained in the nextevent unless disabled explicitly. Thus, once a boundary pair is attached, it remainsattached until it is explicitly detached.

Page 423: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Cell Attachment and Change of Fluid Type

Version 3.24 16-27

Setting up models

The main steps for setting up a cell attachment and change of fluid type case areoutlined below. For more detailed information, refer to Tutorial 13.1 in the Tutorialsvolume.

Step 1

• Generate the mesh at time t = 0. This requires a boundary interface to be setup separating the (presently or potentially) different flow blocks. 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 Figure16-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)

TIME,TRANS (turn on the transient solution option)MVGRID,ON,EVENT,PROSTAR (turn on the moving-grid option)

Page 424: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Cell Attachment and Change of Fluid Type

16-28 Version 3.24

Figure 16-6 Outline of conditional cell attachment operation

Step 2

• Assign a material property reference no. to each mesh block using commandCTABLE. For the model shown in Figure 16-6:

For mesh block no. 1 (IMAT = 1)

For mesh block no. 2 (IMAT = 2)

For mesh block no. 3 (IMAT = 3)

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,2CSET,NEWS,CRAN,101,150 (collect together all cells with property

ref. no. 2)CTYPE,10CMOD,CSET

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 425: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Cell Attachment and Change of Fluid Type

Version 3.24 16-29

• Define the monitoring cell and pressure reference for each material type usingthe MONITOR and PRESSURE commands:

For mesh block no. 1

For mesh block no. 2

PMAT 2MONI,120PRES,1.0E05,110STATUS

For mesh block no. 3

PMAT 3MONI,170PRES,1.0E05,180STATUS

Step 3

• Define an event step data file using the EVFILE command (see Figure 16-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:

• 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)

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 426: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Cell Attachment and Change of Fluid Type

16-30 Version 3.24

• 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

While the conditional event is enabled, user subroutine CONATT may becalled at each time step to check if the conditional event is to be performed. Insuch a case, CONATT will contain FORTRAN statements of the followingkind:

IMAT1 = KEY(96)IMAT2 = KEY(151)P1 = (P(96)+P(97))/2. + PREFM(IMAT1)P2 = (P(151)+P(152))/2. + PREFM(IMAT2)IF (P2.GT.P1) THENCAFLAG =.TRUE.ELSE

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 427: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Cell Attachment and Change of Fluid Type

Version 3.24 16-31

CAFLAG =.FALSE.

ENDIF

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;(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 8, “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 CFD Analysis”, Step 6.

Step 8

Post-processing the data. For example, the commands needed to process time stepno. 10 are:

UB = 0.VB = 0.WB = 0.

velocities at regions 4 and 3 are set tozero

SUBTITLEResults at time step 10Velocity fieldEVFI CONN case.evn (connect the event file)TRLOAD case.pstt (load the transient post data file)

Page 428: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Mesh Region Inclusion/Exclusion

16-32 Version 3.24

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 as this simplifies thespecification of cell attachment.

Mesh Region Inclusion/Exclusion

Basic concepts

A group of cells can be excluded from the solution domain by defining an ‘exclude’event and issuing command EECELL. Note that:

• This is possible only if the cells in the group are not connected to any 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.

To restore cells that were excluded, it is necessary to define an ‘include’ eventand to issue command EICELL. It is also necessary to specify the initial flowconditions applicable to the newly included cells via command EICOND. There arethree options available for these, as follows:

1. Values specified in pro-STAR’s INITIAL command.2. Values in existence at the time of the exclude event.3. Values calculated in user subroutine UBINIT.

STORE ITER 10 (the appropriate events are loaded andexecuted automatically)

GETC ALL (get the cell data)POPT VECTPLTY NORMCSET NEWS FLUIDCPLOTQUIT,NOSAVE

Page 429: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Moving Mesh Pre- and Post-processing

Version 3.24 16-33

Useful points

1. The EICELL event (to include cell blocks) may destabilize the solution in alarge problem. This is because the flow field solution in the cells introducedinstantaneously within the solution domain may not match the solution in therest of the domain. Smaller time steps may be necessary at this point.

2. The solution variables in the cells that are excluded using EECELL are frozenfor possible reuse. These values may be examined in pro-STAR if necessary,by turning off event processing via command

EVLOAD,RESET

Moving Mesh Pre- and Post-processing

Introduction

The various mesh motions and connectivity changes caused by the execution 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

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-CD 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 are

Page 430: Star Uguide

ROTATING AND MOVING MESHES Chapter 16

Moving Mesh Pre- and Post-processing

16-34 Version 3.24

highlighted in the plots.

Action commands

Commands EVLOAD and EVEXECUTE belong to this category.EVLOAD is used to ‘load’ all events up to a specified point in time. There are two

basic components involved in this operation:

• Creation of internal tables 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 theiroriginal 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:

Page 431: Star Uguide

Chapter 16 ROTATING AND MOVING MESHES

Moving Mesh Pre- and Post-processing

Version 3.24 16-35

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-CD. 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-CD. This saves CPU time and diskspace, 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 432: Star Uguide
Page 433: Star Uguide

Chapter 17 OTHER TYPES OF FLOW

Multi-component Mixing

Version 3.24 17-1

Chapter 17 OTHER TYPES OF FLOW

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.

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“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 regions (see Chapter 10 in this volume),specify the effective mass diffusivity and turbulent Schmidt number for each

Page 434: Star Uguide

OTHER TYPES OF FLOW Chapter 17

Multi-component Mixing

17-2 Version 3.24

additional scalar present in your model using the “Additional Scalar Properties”panel (“Porosity” sub-folder).

Step 6

Specify scalar boundary conditions using the “Scalar Boundaries” panel (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 8, “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.

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 to

Command: SCTRANS

Page 435: Star Uguide

Chapter 17 OTHER TYPES OF FLOW

Aeroacoustic Analysis

Version 3.24 17-3

the 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 21-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 “SelectAnalysis 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 will

Page 436: Star Uguide

OTHER TYPES OF FLOW Chapter 17

Liquid Films

17-4 Version 3.24

now 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 (.pst) 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 9, “The OPERATE utility”).

Liquid Films

The theory behind liquid film modelling and the manner of implementing it inSTAR-CD is given in the Methodology volume, Chapter 16. This section containsan outline of the steps to be followed when setting up a simulation involving films,including details of the user input required and important points to bear in mind.

Setting up liquid film models

Simulations using this feature typically involve droplet deposition on wallboundaries, formation of liquid films and their interaction with the surrounding

Page 437: Star Uguide

Chapter 17 OTHER TYPES OF FLOW

Liquid Films

Version 3.24 17-5

fluid and walls. Some important points to note are as follows:

• Film models can only be used in transient cases, with or without asimultaneous Lagrangian two-phase analysis set-up to model dropletbehaviour

• Film initialization is possible, where a specific amount of film is applied to awall boundary as part of the user input for the simulation

The conditions associated with the presence or absence of an initial film are asfollows:

No initialization

• In a simulation without an initial film specification, films will form wheneverdroplets are deposited on suitable wall boundaries, i.e. boundaries that havebeen defined as capable of supporting them. The appropriate wallimpingement model (Bai or Stick) must also be selected for this to happen.

• Film properties are associated with specific film types in the same way asdroplets. STAR will create film types to correspond with droplet types at thestart of a wall film simulation. The equivalent film type will have the samephysical properties as the droplet type, and will access user coding whenrequired.

• Although droplets of different type may impact a wall boundary, STAR doesnot take the type difference into account when determining the film’s physicalproperties. Therefore, if different droplet types are likely to mix in a film theyshould share identical physical properties.

• STAR does not keep any record of which droplet types are present in a liquidfilm. Only one film type is stored per boundary region.

Film initialization (Beta feature)

• If no Lagrangian two-phase analysis is required, film types can be specified inthe same manner as droplet types. If a simultaneous Lagrangian analysis isrequired, care should be taken to ensure that the film physical properties andmodels for each type correspond to the droplet physical properties andmodels.

• If a simultaneous Lagrangian analysis is selected, droplet deposition ispossible in the same manner as described above for “No initialization”.

• Note that this feature is provided in ‘beta’ form, and you should exercisecaution in using it. It is also recommended that you avoid setting up initialfilms on baffle boundaries at present, although pro-STAR will accept theinputs.

The basic steps for setting up a film model are as follows:

Step 1

Open the “Select Analysis Features” panel in the STAR GUIde system and selectan option appropriate to the problem conditions from the Liquid Films menu:

• No Initialization — no films are present initially, although they may formlater as a result of droplet-wall collisions

• Film Initialization — films are present initially on at least some walls (orbaffles). Droplet deposition will add to existing film or become a new film.

Page 438: Star Uguide

OTHER TYPES OF FLOW Chapter 17

Liquid Films

17-6 Version 3.24

For either choice, a pop-up panel will appear, warning you that the model must berun in transient mode. Click Yes to confirm your choice and proceed with theanalysis. Note that the displayed option in the Time Domain menu willautomatically change to Transient.

Click Apply. The Liquid Films folder will appear in the NavCenter tree,containing the appropriate panels for this type of analysis.

Step 2

If necessary, allow for the presence of droplets by selecting option LagrangianMulti-Phase from the Multi-Phase Treatment menu and clicking Apply. TheLagrangian Multi-Phase folder will then appear in the NavCenter tree, containingpanels used for specifying droplet parameters (see Chapter 13, “Setting UpLagrangian Multi-Phase Models”).

This set-up is required 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

Open the Liquid Films folder:

• If option No Initialization was selected in Step 1, this will contain just onepanel, “Film Controls”, where the basic film modelling settings should bedefined.

• If option Film Initialization was selected, an additional panel titled “FilmPhysical Models and Properties” will also be present. This is used to defineheat, mass and momentum transport mechanisms and physical properties forthe films that are already present in the solution domain at the start of theanalysis.

Step 4

Define boundary locations and conditions in the usual manner. However, note that:

• For each solid boundary (i.e. region type “Wall” or “Baffle”) in your model,you will need to specify whether that boundary is capable of supporting a filmor not. Note that for cases with conjugate heat transfer, a conducting wallregion must be assigned to the solid-fluid interface if it is to support a film.

• If option Film Initialization was selected in Step 1 then, for those boundariesthat are able to support a film, you also need to specify the following initialconditions:

(a) Film velocity, thickness and temperature values are entered in the LiquidFilms pop-up window that opens from the “Define Boundary Regions”panel

(b) For multi-component films, the initial mass fraction of each component isspecified in the “Film Physical Models and Properties” panel (tab “FilmProperties”). Note that if different boundary regions support films withdifferent initial mass fractions, these films must be defined as differentfilm types in the “Film Physical Models and Properties” panel.

Page 439: Star Uguide

Chapter 17 OTHER TYPES OF FLOW

Liquid Films

Version 3.24 17-7

Step 5

Analysis results relevant to films are treated by pro-STAR as wall data. Such dataitems appear in the scroll lists of panel “Analysis Output”, for both the “Post tab”and the “Transient tab”, so that you may select what is to be included in the .pstand .pstt files, respectively.

Film stripping

This process can be modelled only via user subroutine FDBRK at present. If active,the subroutine will be called at all wall faces containing films, at a point just beforethe first droplet tracking stage in a new time step. The user code must provide allnecessary information regarding the new (stripped) droplets leaving the film,including initial injection velocity and global position coordinates.

If droplets are generated solely by the stripping process, it is still necessary todefine droplet properties in advance, as for normal injected droplets. The new(stripped) droplets must have a type associated with them, which has previouslybeen defined in pro-STAR. Obviously, droplet properties should be consistent withthose of the parent film.

Useful points on liquid film analyses

1. If film is not initially present, but subsequently formed on solid boundaries bydroplet impingement, it will automatically acquire the physical properties ofthe parent droplets. Therefore, if user coding has been activated for dropletproperties, no user coding for liquid film properties is needed.

2. Multiple film types are allowed in film initialisation, but STAR may producenon-physical results if films with different physical properties subsequentlymerge. Note that this problem does not arise if each film type appears in aseparate stream.

3. If film is to form on alternative wall regions of ATTACH boundaries, thealternative region definition must also support liquid films. In moving meshcases where a film velocity is applied to wall boundaries, care should be takento ensure the alternative wall region has the correct velocity.

4. It is recommended that the near-wall cell layer be constructed of regularlyconnected hexahedral cells. If trimmed or tetrahedral cells are to be used, thenextrusion layers should be formed on the wall surface.

Unsupported features

Not all STAR modelling capabilities can be used in conjunction with liquid films.Specifically:

1. Coupled cell interfaces with arbitrary connectivity (see Chapter 4, “MeshStructure”) and arbitrary sliding interfaces (see Chapter 16, “Arbitrary SlidingInterfaces”) should not be present in a model requiring liquid films

2. Following on from 1, one-to-one (integral) connections should exist betweenall cells at all times. Mesh motion must take this into account.

3. In conjugate heat transfer cases, film will not flow over corners defined by asolid region, as shown in Figure 17-1

Page 440: Star Uguide

OTHER TYPES OF FLOW Chapter 17

Liquid Films

17-8 Version 3.24

Figure 17-1 Liquid film flow restriction over a corner defined by a solid region

4. Cyclic boundaries should not be specified in cases requiring liquid films5. In a mesh containing ATTACH boundaries, there are potential problems in

cells containing both an ATTACH boundary and multiple wall boundaries, asillustrated in Figure 17-2. Therefore, cells with such a boundary should nothave more than one wall boundary.

Figure 17-2 Supported and unsupported conditions for ATTACH/wall boundaries andliquid film modelling.

6. For simulations running in parallel, avoid placing inter-processor boundarieson corners of the mesh, as shown in Figure 17-3

Solid region

Conducting wallon interface

! Film will not flowover this corner !

ATTACHboundary

ATTACHboundary

Wallboundary

Wallboundary

(a) Acceptable condition

(b) Not acceptable

Page 441: Star Uguide

Chapter 17 OTHER TYPES OF FLOW

Liquid Films

Version 3.24 17-9

Figure 17-3 Condition to avoid in parallel simulations

Inter processor boundary ! Avoid placing here !

Wall boundary

Page 442: Star Uguide
Page 443: Star Uguide

Chapter 18 USER PROGRAMMING

Introduction

Version 3.24 18-1

Chapter 18 USER PROGRAMMING

Introduction

This chapter describes how the user can modify or supplement some of the standardfeatures and operations of STAR, such as thermophysical properties, boundaryconditions, additional sources of momentum, energy, etc. via user-suppliedFORTRAN subroutines. The latter are collectively referred to as UFILE routines.The full set of 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 regions

10. Effective viscosity and turbulence length scale11. Turbulence model parameters (including two-layer models)12. Turbulence characteristics within distributed resistance regions13. 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 forming on walls29. 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 444: Star Uguide

USER PROGRAMMING Chapter 18

Subroutine Usage

18-2 Version 3.24

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 18-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 445: Star Uguide

Chapter 18 USER PROGRAMMING

Subroutine Usage

Version 3.24 18-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 446: Star Uguide

USER PROGRAMMING Chapter 18

Subroutine Usage

18-4 Version 3.24

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 page21-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 21, “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 447: Star Uguide

Chapter 18 USER PROGRAMMING

Description of UFILE Routines

Version 3.24 18-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 region 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 448: Star Uguide

USER PROGRAMMING Chapter 18

Description of UFILE Routines

18-6 Version 3.24

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 449: Star Uguide

Chapter 18 USER PROGRAMMING

Description of UFILE Routines

Version 3.24 18-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 450: Star Uguide

USER PROGRAMMING Chapter 18

Description of UFILE Routines

18-8 Version 3.24

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 region of distributed resistance.

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 region of distributed resistance.

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 region of distributed resistance.

POROS1 Activated from the Resistance Coefficients menu in the Resistanceand Porosity Factor panel or by command POROSITY. It definesspatially varying coefficients α and β within a region of distributedresistance. The user can also specify them in terms of a local coor-dinate 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 451: Star Uguide

Chapter 18 USER PROGRAMMING

Description of UFILE Routines

Version 3.24 18-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

(18-1)

where n is the iteration number and is the mean specific heat.

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

c p( ) n 1–( )----------------------=

c p

Page 452: Star Uguide

USER PROGRAMMING Chapter 18

Description of UFILE Routines

18-10 Version 3.24

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 453: Star Uguide

Chapter 18 USER PROGRAMMING

Description of UFILE Routines

Version 3.24 18-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 conjugate 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.

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 454: Star Uguide

USER PROGRAMMING Chapter 18

Description of UFILE Routines

18-12 Version 3.24

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

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.

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.

Page 455: Star Uguide

Chapter 18 USER PROGRAMMING

Description of UFILE Routines

Version 3.24 18-13

Eulerian multi-phase subroutines

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.

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.

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.

Page 456: Star Uguide

USER PROGRAMMING Chapter 18

Description of UFILE Routines

18-14 Version 3.24

Chemical reaction subroutines

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.

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.

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.

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.

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.

Ct

Ct

Page 457: Star Uguide

Chapter 18 USER PROGRAMMING

Description of UFILE Routines

Version 3.24 18-15

Rotating reference frame subroutines

Moving mesh subroutines

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.

CONATT Used for conditional cell layer attachment/detachment or changeof fluid type. It is called automatically if a model employing thesefeatures is defined using EVENTS module commands.

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 458: Star Uguide

USER PROGRAMMING Chapter 18

Description of UFILE Routines

18-16 Version 3.24

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.

FDBRK Specifies the method of calculating liquid film stripping by thecarrier fluid. Activated from the Stripping and Re-entrainmentmenu in panel Controls (Liquid Films) or by command LFSTRIP

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.

LFPROP Enables the user to specify any physical property appearing inpanel Film Physical Models and Properties (tab Film Properties).It is activated by selecting the Subroutine Usage button next toany of the properties displayed on the tab, or by commandLFPROPERTY.

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.

Page 459: Star Uguide

Chapter 18 USER PROGRAMMING

Description of UFILE Routines

Version 3.24 18-17

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 460: Star Uguide

USER PROGRAMMING Chapter 18

Sample Listing

18-18 Version 3.24

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

C*************************************************************************SUBROUTINE CONDUC(CON)

C ConductivityC*************************************************************************C--------------------------------------------------------------------------*C STAR RELEASE 3.200 INCLUDE 'comdb.inc' COMMON/USR001/INTFLG(100) INCLUDE 'usrdat.inc' DIMENSION SCALAR(50) EQUIVALENCE( UDAT12(001), ICTID ) EQUIVALENCE( UDAT11(001), CP ) EQUIVALENCE( UDAT11(002), DEN ) EQUIVALENCE( UDAT11(003), ED ) EQUIVALENCE( UDAT11(006), P ) EQUIVALENCE( UDAT11(007), T ) EQUIVALENCE( UDAT11(008), TE ) EQUIVALENCE( UDAT11(009), SCALAR(01) ) EQUIVALENCE( UDAT11(059), U ) EQUIVALENCE( UDAT11(060), V ) EQUIVALENCE( UDAT11(061), W ) EQUIVALENCE( UDAT11(062), VISM ) EQUIVALENCE( UDAT11(063), VIST ) EQUIVALENCE( UDAT11(067), X ) EQUIVALENCE( UDAT11(068), Y )

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 461: Star Uguide

Chapter 18 USER PROGRAMMING

New Coding Practices for Dynamic Memory

Version 3.24 18-19

EQUIVALENCE( UDAT11(069), Z )C-----------------------------------------------------------------------CC This subroutine enables the user to specify thermal conductivityC (CON).C STAR calls this subroutine for cells and boundaries.C ** Parameter to be returned to STAR: CONC-----------------------------------------------------------------------C 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 for Dynamic Memory

STAR-CD Release 3.2 marks the change to dynamic memory, meaning that the sizeparameters written by pro-STAR to file parm.inc are no longer hard-coded intoa STAR executable. The parameters are now read and used dynamically at run-time.On the whole this has no implications for user subroutines; subroutines whichworked in Release 3.15 will continue to work in Release 3.2, except for the specificchanges listed in the Release Notes. The specific area in which dynamic memoryaffects user subroutines is where those subroutines need to access parameters fromparm.inc and possibly declare local storage sized using these parameters.

In Release 3.2, it is no longer necessary to include the parm.inc file in asubroutine in order to access the parameters defined in it. These parameters are nowpassed to subroutines automatically via usrdat.inc.

User defined arrays

Regarding the declaration and use of arrays, no action is necessary when the arrayshave a fixed size, e.g.

DIMENSION AUXVEL(3)

Some action is necessary for variable-sized arrays, for example those whose sizedepends on model parameters such as the number of cells. The following exampleshows the dynamic memory allocation of a user-defined array UARRAY,dimensioned to cover the entire range of cells in the computational model(1:NCMAX). Prior to V3.20 this would have been achieved by:

INCLUDE ’../parm.inc’DIMENSION UARRAY(1:NCMAX)COMMON /UCOMM1/ UARRAY

In V3.20 this is achieved by:

DIMENSION UARRAY(1:NCMAX)POINTER(P_UARRAY,UARRAY)

Page 462: Star Uguide

USER PROGRAMMING Chapter 18

New Coding Practices for Dynamic Memory

18-20 Version 3.24

COMMON /UCOMM1/ P_UARRAY

"P_UARRAY" is a Fortran pointer. It is no longer necessary to include parm.incas size parameters are now automatically included via usrdat.inc.

Space for this array must be allocated via

CALL CDMALLOC(P_UARRAY, <TypeSize>*NCMAX)

where <TypeSize> represents the size in bytes of the data type of UARRAY. STARprovides parameters for the size of the various data types. Examples of these fordifferent data types are:

1. IntegerCALL CDMALLOC(P_IARRAY, INTSIZ*NCMAX)

2. CharacterCALL CDMALLOC(P_CARRAY, ICHRSIZ*NCMAX)

3. LogicalCALL CDMALLOC(P_LARRAY, ILOGSIZ*NCMAX)

4. Implicit-precision realCALL CDMALLOC(P_FARRAY, IFLSIZ*NCMAX)

5. Double precision realCALL CDMALLOC(P_DARRAY, IDBLSIZ*NCMAX)

An array such as UARRAY is referenced exactly as it would have been in previousversions of STAR, for example:

DO LIP=1,NCELLUARRAY(LIP)=UARRAY(LIP)+...

ENDDO

To free the space that has been allocated for the pointer, use

CALL CDFREE(P_UARRAY)

Please note the following:

• The geometrical quantities needed to dimension variable-sized arrays arealready accessible via file usrdat.inc; please check with User Supportabout their meaning if in doubt. Previously these quantities would have beenaccessed by inclusion of file parm.inc.

• Generally, if a variable-sized array is not kept in a common block, space for itshould be allocated upon each entry into the subroutine and de-allocated onexit.

• If a variable-sized array is kept in a common block, it will be sufficient toallocate its memory the first time the subroutine is visited, e.g.

IF (INTFLG(1).EQ.0) THENCDMALLOC(P_UARRAY, <TypeSize>*NCMAX)...

Page 463: Star Uguide

Chapter 18 USER PROGRAMMING

New Coding Practices for Dynamic Memory

Version 3.24 18-21

INTFLG(1)=1ENDIF

• If variable-sized arrays are kept in common blocks, there can only be onearray per common block.

Two illustrative examples are given below.

User coding examples

User arrays not kept in COMMON block

C---------------------------------------------------------CC Declare an array of NCMAX implicit-precision REALs

DIMENSION UARRAY(NCMAX)POINTER(P_UARRAY,UARRAY)

C Declare an array of NCMAX INTEGERs INTEGER IARRAY(NCMAX) POINTER(P_IARRAY,IARRAY)C---------------------------------------------------------CC Allocate storage for these arrays CALL CDMALLOC(P_UARRAY,IFLSIZ*NCMAX)

CALL CDMALLOC(P_IARRAY,INTSIZ*NCMAX)C---------------------------------------------------------CC Arrays now available for use......C---------------------------------------------------------CC Deallocate storage before exit CALL CDFREE(P_UARRAY) CALL CDFREE(P_IARRAY)C---------------------------------------------------------C

RETURN

User arrays kept in COMMON block

C---------------------------------------------------------CC Declare an array of NCMAX implicit-precision REALs DIMENSION UARRAY(NCMAX) POINTER(P_UARRAY,UARRAY) COMMON/UCOMM1/P_UARRAY

C Declare an array of NCMAX LOGICALsLOGICAL LARRAY(NCMAX)

POINTER(P_LARRAY,LARRAY) COMMON/UCOMM2/P_LARRAYC---------------------------------------------------------CC Allocate storage for these arrays the first time only IF (INTFLG(32).EQ.0) THEN

CALL CDMALLOC(P_UARRAY,IFLSIZ*NCMAX)CALL CDMALLOC(P_LARRAY,ILOGSIZ*NCMAX)INTFLG(32)=1

END IFC---------------------------------------------------------C

Page 464: Star Uguide

USER PROGRAMMING Chapter 18

New Coding Practices for Eulerian Multi-phase Problems

18-22 Version 3.24

C Arrays now available for use......C---------------------------------------------------------CC No need to deallocate storage before exit

RETURNEND

New Coding Practices for Eulerian Multi-phase Problems

General principle

For STAR-CD Release 3.2, in addition to introducing new subroutines specific toEulerian multi-phase (E2P) applications, we have also modified existing,single-phase ones for use with two phase cases. The guiding principle has been tocause as little disruption as possible so as not to interfere with existing, single-phasepractices. This has been achieved by making the subroutines of interest generic and,therefore, re-usable for each phase. By cycling through and calling user subroutinestwice, once per phase, as opposed to visiting them once for both phases, phase-dependent arguments and variables were eliminated. The only exception to this isE2P-specific variables such as volume fraction.

To make the existing user subroutines useable in two-phase problems withoutaltering their argument list, a new phase index parameter, IPHA, was introduced.Unlike the variable NIPHASE, which was previously passed as argument to somesubroutines and which it replaces, IPHA is passed in common block /USRD22/,stored in file usrdat.inc.

In addition, we have also expanded the list of cell, boundary and generic userdata for phase no.2 to match that of the first, or single, phase. Since Release 3.2 iscurrently limited to two phases only, we only have one volume fraction variable andit always applies to phase 2. In a user subroutine, VFCEL2 stores cell values of thisvariable while VF2BND2 stores boundary values. The complete list of variables isgiven in file nom.inc.

Example of implementation

As an example of the above, consider a user-coded molecular viscosity calculationfor a gas-liquid system, where the first phase is air and the second phase liquidwater. The relevant code should be:

C*************************************************************************SUBROUTINE VISMOL(VISM)

C Viscosity (molecular)C*************************************************************************

IF(IPHA.EQ.1) THENVISM=1.855e05ELSE IF(IPHA.EQ.2) THENVISM=0.0008887ENDIF

CRETURNEND

Page 465: Star Uguide

Chapter 18 USER PROGRAMMING

User Coding in parallel runs

Version 3.24 18-23

E2P-supported subroutines

In addition to the E2P-specific subroutines (see “Eulerian multi-phase subroutines”on page 18-13), the E2P feature will support subroutines FLUINJ, INITFI,POSDAT, SORENT, SORMOM, SORKEP, VISMOL, CONDUC and VISTUR. Ofthese, the first three have been changed according to the rules described above, asfollows:

FLUINJOld:FLUINJ(FLXI,UI,VI,WI,TEI,EDI,TI,SCINJ,FLXI2,NIPHASE,IPMASS)New:FLUINJ(FLXI,UI,VI,WI,TEI,EDI,TI,SCINJ,IPMASS)

The specific mass flux variable FLXI2 for phase 2 has been eliminated andNIPHASE has been removed.

INITFIOld (post August 2002):INITFI(U,V,W,PR,TE,ED,T,XVF2,SCALAR,NIPHASE)New:INITFI(U,V,W,PR,TE,ED,T,SCALAR,XVF2)

Again, NIPHASE has been removed. XVF2 has been moved back after SCALAR, tothe end of the argument list, where it was until August 2002 and in all of Release3.15

POSDATTo preserve the argument list, a common block is introduced for the volumefraction. Inside STAR, this subroutine is now called twice, once per phase, with theappropriate phase variables.

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)

Page 466: Star Uguide

USER PROGRAMMING Chapter 18

User Coding in parallel runs

18-24 Version 3.24

A synopsis of the available message passing-routines is given in Appendix G. 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 467: Star Uguide

Chapter 19 PROGRAM OUTPUT

Introduction

Version 3.24 19-1

Chapter 19 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 19-1 on page 19-7, the input summary begins with theSTAR code version and the date and time of the run. This is followed by a table thatprovides essential data for checking that all important user-defined inputs arecorrect. All listed data reflect the values stored in the problem data (.prob) file.

The table is divided into distinct sections, as follows:

General DataThis section provides general information on the problem at hand, including:

• Number of cells• Number of boundaries specified• Computer memory requirements• The model’s overall physical dimensions• The frequency and extent of restart, post-processing and screen output

This section of the table also summarises:

• The character of the flow (i.e. steady or transient)• The solution procedure selected• The maximum number of iterations or time steps specified• The starting iteration number for the calculations• The residual tolerance used for convergence tests• The number of fluid streams and solid regions present

A sample output can be seen in Section A of Table 19-1.

Page 468: Star Uguide

PROGRAM OUTPUT Chapter 19

Permanent Output

19-2 Version 3.24

Fluid PropertiesThis section comprises one or more tables containing the properties of all fluidstreams included in the model. For each stream, the information supplied includes:

• The variables calculated, including the turbulence model selected and theappropriate characteristic length

• The thermophysical properties specified, such as density, viscosity, specificheat, and conductivity

• The solution monitoring and pressure/temperature reference locations for thestream

• The reference pressure and temperature• Any fixed boundary fluxes included in the model

An example of the output for a multi-stream case appears in Table 19-1, Section B.This shows data for two fluid regions with different fluid properties.

Solid PropertiesThe fluid region tables are followed, in the case of conjugate heat transferapplications, by tables of properties for solid regions such as density, specific heatand conductivity. This can be seen in Table 19-1, Section C. The solutionmonitoring location and reference temperature are also included here.

Body ForcesThe fluid and solid region properties are followed by data specifications for the twostandard body force options, namely:

• Gravitational acceleration (whose components are specified in the globalCartesian coordinate directions).

• Rotation about a user-defined axis.

Both the above are shown on a stream-wise basis. The sample case presented inTable 19-1 does not use this option.

Additional FeaturesIn this part of the table, information is provided on any additional features that areactive in the model, such as:

• Radiation,• Conjugate heat transfer• Distributed resistances

The sample output of Table 19-1, Section D, indicates use of the conjugate heattransfer option.

User FORTRAN CodingThis section of the table only appears when user-defined FORTRAN coding isactive during the calculations. If so, it provides a list of the user routines that havebeen invoked. The sample case presented in Table 19-1 does not use this option.

Boundary TypesThis section of the table provides a list of boundary types used in the model, anexample of which can be seen in Table 19-1, Section E.

Page 469: Star Uguide

Chapter 19 PROGRAM OUTPUT

Permanent Output

Version 3.24 19-3

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 stream and solid region,• solver tolerances,• sweep limits.

For transient runs the printout of relaxation factors is suppressed as irrelevant,except for the pressure correction relaxation factor. A typical printout of the aboveparameters can be seen in Table 19-1, Section F.

In circumstances when normalisation factors are dynamically updated during thecourse of the calculations, a message to that effect will appear immediately belowthe input data table. This is the case in the example shown in Table 19-1. Similarmessages appear for cases with no inflow boundaries and for porous mediacalculations.

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 19-2 on page 19-9 and is arrangedin two sections:

1. The left-hand section contains the global absolute residual histories for eachtransport equation solved. Alternatively, for time-marching calculations, theuser may opt to display the global rates of change.

2. The right-hand section contains values of the dependent variables at apre-defined monitoring location.

In steady-state runs, satisfactory progress of the calculations should show

• a steady reduction in the global absolute residuals from iteration to iteration;• stabilisation of the values of 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. In transient runs,the global rates of change indicate the changes in the flow field and the success ofthe calculation has to be judged by the user from the output values of the fieldvariables.

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.

Page 470: Star Uguide

PROGRAM OUTPUT Chapter 19

Printout of Field Values

19-4 Version 3.24

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 19-3 on page19-10.

Optional Output

All additional outputs are optional and, if requested, will appear in the .info fileby default. Output of additional data is activated by various options in the “MonitorNumeric Behaviour” STAR GUIde panel. Thus:

1. The Echo Input Data option generates additional information on input data, asshown in Table 19-4 on page 19-11, Section 1. This includes

(a) information concerning the number of cyclic boundary pairs(b) turbulence model coefficients(c) initial conditions for different fluid and solid regions

2. The Print Boundary and Body Force Information option activates a printout ofboundary types, conditions and locations, shown in Table 19-4, Section 2.

3. The Print Iteration Residuals and Conservation Checks option controls theprinting of additional information concerning the solution progress. This isshown in Table 19-5 on page 19-12, Section 3 and includes

(a) mass/heat balance data(b) mass flux / heat flux printed for each boundary region and for each

material(c) maximum, minimum, volume-averaged and mass-averaged values of all

solved variables printed for each material(d) heat transfer between different materials

4. The Print Radiation Heat Transfer Boundary Data option controls theprinting of radiation heat exchanges between physical boundary regions (i.e.excluding cyclic and symmetry regions). The information appears in a listshowing the radiative heat flux received by a given region from every otherregion in the solution domain.

5. The Print Boundary Patch Analysis option provides an analysis of theincident radiative heat flux on a given patch. This consists of a list of patchescontributing a stated amount of heat flux to that patch.

The different quantities printed have the following meaning:

Mass balance checksFVIN — total flow in through inlet boundaries, kg/sFVOUT — total flow out through outflow (negative inlet) boundaries, kg/sFPIN — total flow in through pressure, stagnation pressure, free-stream

and transient-wave transmissive boundaries, kg/s

Page 471: Star Uguide

Chapter 19 PROGRAM OUTPUT

Optional Output

Version 3.24 19-5

FPOUT — total flow out through pressure, stagnation pressure, free-streamand transient-wave transmissive boundaries, kg/s

FCYIN — total flow in through partial cyclic boundaries, kg/sFCYOT — total flow out through partial cyclic boundaries, kg/sFLOUT — total flow out through outlet boundaries, kg/sSDRDT — mass accumulation by density change in time, kg/sSDVDT — mass accumulation by volume change in time, kg/sFLINJ — mass injection, kg/sMSDRO — mass transfer from the dispersed phase (droplets) to the

continuous phase, kg/sFDIFF — mass balance kg/sSUM — sum of mass sourcesRESP — sum of absolute mass sourcesRES0 — starting residual in the solver

Heat balance checksENIN — sum of enthalpy transported in through all open boundaries, WENOUT — sum of enthalpy transported out through all open boundaries, WHTIN — heat transfer into fluid or solid materials at walls, baffles or

solid/fluid interfaces, WHTOUT — heat transfer out of fluid or solid materials at walls, baffles or

solid/fluid interfaces, WQUDP — pressure work term, WQMDIS — heat generation due to molecular dissipation, WQTRDS — heat generation due to turbulence dissipation, WQSOR — sum of user-defined heat sources, WQTRAN — change in enthalpy within the solution domain over one time step,

WQDPDT — transient pressure term, WQEXT — total heat transported from the interior to ambient through the wall

boundaries, WQDROP — enthalpy transfer from the dispersed phase (droplets) to the

continuous phase, WQCYC — enthalpy change from an inflow to an outflow partial cyclic

boundary, WQRIN — radiation flux from the walls to the fluid, WQROUT — radiation flux from the fluid to the walls, WQRLOS — thermal radiation lost through fixed velocity, pressure and outflow

boundaries, WQRSO — net radiation energy transfer into the participating media, WQSOLS — sum of the solar radiation sources specified at all wall patches, WQSOL — net solar radiation transfer from the walls to fluid, WQSLOS — solar radiation lost through fixed velocity, pressure and outflow

boundaries, WSHWRK — work done at moving boundaries (appropriate only when total

enthalpy or rothalpy is being solved)QBODY — work done by body forces, WHDIFF — enthalpy balance material-wise, W. This is calculated as

Page 472: Star Uguide

PROGRAM OUTPUT Chapter 19

Optional Output

19-6 Version 3.24

HDIFF = (ENOUT + HTOUT + QTRAN) – (ENIN + HTIN +QDPDT + QUDP + QMDIS + QTRDS + QSOR + QDROP +SHWRK + QBODY + QRSO + QCYC)

HDIFB — enthalpy balance at the wall boundaries for a particular material,W. This is calculated as

HDIFB = (HTIN + QRIN + QEXT + QSOL) – (HTOUT +QROUT)

HDIFT — total enthalpy balance for all materials, W

Both HDIFF and HDIFT should reduce to a small number for a converged solution.

Species conservation checksSCIN — total species mass in through fixed velocity and pressure

boundaries, kg/sSCOUT — total species mass out through fixed velocity, pressure and outflow

boundaries, kg/sMTRAN — net transfer of species at the walls, kg/sMSOR — species mass source (creation or destruction), kg/sMDROP — species mass transfer from the dispersed phase (droplets) to the

continuous phase, kg/sMDIFF — species balance which must reduce to a small number as the

solution converges, kg/sMTRNS — transient accumulation of species mass, kg/s

All warning messages are sent to the .info file during the iteration or time step inwhich they occur.

The user should not need to interpret or take action on the data sent to this fileexcept in circumstances where problems are encountered in obtaining a solution. Insuch a case the additional data and warning messages can help in tracing the sourceof the problem.

Page 473: Star Uguide

Chapter 19 PROGRAM OUTPUT

Example Output

Version 3.24 19-7

Example Output

Table 19-1:*** GEOMETRICAL CALCULATIONS STARTED*** GEOMETRICAL CALCULATIONS COMPLETED

|-------------------------------------------| | STAR VERSION 3.200 | | THERMOFLUIDS ANALYSIS CODE | | Operating System: SunOS | | Stardate: 3-FEB-2004 Startime: 11:59:20 | |-------------------------------------------|

|-----------------------------------------------------------| | STAR Copyright (C) 1988-2003, Computational Dynamics Ltd. | | Proprietary data --- Unauthorized use, distribution, | | or duplication is prohibited. All rights reserved. | |-----------------------------------------------------------|

|-------------------------------------------------------------------------------------------| | ---------------------------- PROBLEM SPECIFICATION SUMMARY ---------------------------- | |-------------------------------------------------------------------------------------------| | CASE TITLE .................. => | | NUMBER OF CELLS ............. => 192 | | NUMBER OF BOUNDARY FACES .... => 440 | | MESH DIMENSIONS XMIN XMAX YMIN YMAX ZMIN ZMAX | | (IN METRES) ............ => 0.0E+00 6.0E-01 0.0E+00 8.0E-01 0.0E+00 5.0E-02 | | RESTART DATA ................ => WILL BE SAVED ON FILE.pst | | SURFACE DATA ................ => WILL BE SAVED ON FILE.pst | | BOUNDARY DATA ............... => WILL BE PRINTED ON FILE.info | | CONVERGENCE DATA ............ => WILL BE PRINTED ON FILE.info | | FIELD DATA .................. => WILL BE PRINTED | | STEADY FLOW ................. => START FROM ITERATION = 0 | | INITIALISATION .............. => WILL BE EMPLOYED | | DATA DUMP (FILE.pst)......... => EVERY 10 ITERATIONS | | SOLUTION PROCEDURE .......... => SIMPLE | | RESIDUAL TOLERANCE .......... => 1.00E-03 | | MAX. NO. OF ITERATIONS ...... => 100 | | NO. OF FLUID MATERIALS ...... => 2 | | NO. OF SOLID MATERIALS ...... => 1 | |-------------------------------------------------------------------------------------------| |-> FLUID 1 -------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | SOLVE ....................... => U, V, P, TE, ED,VIS,DEN, | | FLUID FLOW .................. => TURBULENT INCOMPRESSIBLE HIGH RE K-EPS MODEL | | CHARACTERISTIC LENGTH ....... => 1.000E+00 m | | MONITORING LOCATION ......... => 63 | | REFERENCE PRESSURE .......... => PREF = 1.000E+05 Pa | | DENSITY ..................... => IDEAL GAS: MOLW = 2.891E+01 | | MOLECULAR VISCOSITY ......... => CONSTANT - MU = 1.810E-05 Pas | | FIXED FLOW BOUNDARY FLUXES... => FVIN = 5.934E-01 kg/s FVOUT = 0.000E+00 kg/s | | => FLOUT = 0.000E+00 kg/s | | ACCELERATION ................ => GRAVX= 0.00E+00 GRAVY=-9.81E+00 GRAVZ= 0.00E+00 | | => REF.DEN.=1.205E+00 AT ( 0.00E+00, 0.00E+00, 0.00E+00) | |-------------------------------------------------------------------------------------------| |-> FLUID 2 -------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | SOLVE ....................... => U, V, P, | | FLUID FLOW .................. => LAMINAR INCOMPRESSIBLE | | MONITORING LOCATION ......... => 143 | | PRESSURE REF. CELL .......... => 145 | | REFERENCE PRESSURE .......... => PREF = 1.000E+05 Pa | | DENSITY ..................... => CONSTANT - RHO = 1.000E+03 kg/m3 | | MOLECULAR VISCOSITY ......... => CONSTANT - MU = 1.000E-03 Pas | | FIXED FLOW BOUNDARY FLUXES... => FVIN = 1.000E+00 kg/s FVOUT = 0.000E+00 kg/s | | => FLOUT = 0.000E+00 kg/s | |-------------------------------------------------------------------------------------------| |-> SOLID 3 -------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | SOLVE ....................... => T | | MONITORING LOCATION ......... => 94 |

A

B

B

C

Page 474: Star Uguide

PROGRAM OUTPUT Chapter 19

Example Output

19-8 Version 3.24

| REFERENCE TEMPERATURE ....... => TREF = 2.730E+02 K | | DENSITY ..................... => CONSTANT - RHO = 9.000E+03 kg/m3 | | SPECIFIC HEAT ............... => CONSTANT - C = 3.800E+02 J/kgK | | CONDUCTIVITY ................ => CONSTANT - K = 3.800E+02 W/(mK) | |-------------------------------------------------------------------------------------------| |-> ADDITIONAL FEATURES USED --------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | PLUG AND PLAY | | RAMFILES OPTION ENABLED | | TURBO OPTION ENABLED | | CONJUGATE HEAT TRANSFER (RELA. FAC. IN SOLID = 1.00) | |-------------------------------------------------------------------------------------------| |-> BOUNDARY TYPES USED -------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | INLET, OUTLET, SYM. PL., WALL, PRESSURE, | | Turbulence intensity and Mixing length specified at inlet reg.no. 1 | | Turbulence intensity and Mixing length specified at pressure boundary reg.no. 2 | | Turbulence intensity and Mixing length specified at inlet reg.no. 3 | |-------------------------------------------------------------------------------------------| |-> SOLUTION PARAMETERS -------------------------------------------------------------------| |-------------------------------------------------------------------------------------------| | VARIABLE | U V W P TE ED | |-------------------------------------------------------------------------------------------| | RELA. FAC. | 7.000E-01 7.000E-01 7.000E-01 2.000E-01 7.000E-01 7.000E-01 | | DIFF. SCH. | SFCD SFCD SFCD - SFCD SFCD | | DSCH. FAC. | 5.000E-01 5.000E-01 5.000E-01 - 5.000E-01 5.000E-01 | | SOLV. TOL. | 1.000E-01 1.000E-01 1.000E-01 5.000E-02 1.000E-01 1.000E-01 | | SWEEP LIM. | 100 100 100 1000 100 100 | |-------------------------------------------------------------------------------------------| | VARIABLE | T DENS TVIS MVIS CP COND | |-------------------------------------------------------------------------------------------| | RELA. FAC. | 9.500E-01 1.000E+00 1.000E+00 1.000E+00 1.000E+00 1.000E+00 | | DIFF. SCH. | UD CD - | | DSCH. FAC. | 0.000E+00 1.000E+00 - - - - | | SOLV. TOL. | 1.000E-01 - - - - - | | SWEEP LIM. | 100 - - - - - | |-------------------------------------------------------------------------------------------| | * RESIDUAL NORMALISATION PRACTICE REPRESENTATIVE OF VARIABLE FLUX USED | | * NORMALISATION FACTORS WILL BE DYNAMICALLY UPDATED AS THE FLOW DEVELOPS | |-------------------------------------------------------------------------------------------|

D

F

E

Page 475: Star Uguide

Chapter 19 PROGRAM OUTPUT

Example Output

Version 3.24 19-9

Table 19-2:

|------------------------------------|I---------------------------------------------| CALCULATION MONITORING INFORMATION |---------------------------------------------I

|------------------------------------|

MAT. I---------------- GLOBAL ABSOLUTE RESIDUAL ----------------I I----------- FIELD VALUES AT MONITORING LOCATION -------I NO UMOM VMOM WMOM MASS T EN DISS ENTH U V W P TE ED T---- ------------------------------------------------------- ITER. NO 1 -------------------------------------------------------

1 3.58E-06 4.42E-02 0.00E+00 1.00E+00 5.57E-03 8.79E+00 0.00E+00 1.95E-03 5.00E+01 0.00E+00 5.17E+00 4.91E+00 1.71E+02 2.00E+012 1.24E-05 4.98E-02 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 -5.28E-05 9.98E-02 0.00E+00-9.91E-01 0.00E+00 0.00E+00 2.00E+013 0.00E+00 2.00E+01

FINISH ITERATION NO. 1 CPU TIME IS 0.20 ELAPSED TIME IS 0.64---- ------------------------------------------------------- ITER. NO 2 -------------------------------------------------------

1 4.59E-05 6.36E-03 0.00E+00 1.00E+00 4.76E-03 3.04E-01 0.00E+00 2.66E-03 4.98E+01 0.00E+00 7.88E-01 7.24E+00 3.05E+02 2.00E+012 1.03E-04 7.25E-03 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 -1.12E-05 9.98E-02 0.00E+00 6.24E-02 0.00E+00 0.00E+00 2.00E+013 0.00E+00 2.00E+01

FINISH ITERATION NO. 2 CPU TIME IS 0.24 ELAPSED TIME IS 0.64---- ------------------------------------------------------- ITER. NO 3 -------------------------------------------------------

1 5.55E-05 3.68E-03 0.00E+00 1.00E+00 3.52E-03 1.53E-01 0.00E+00 9.44E-04 4.97E+01 0.00E+00 5.35E+00 9.02E+00 4.25E+02 2.00E+012 5.04E-05 4.07E-03 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 7.42E-06 9.98E-02 0.00E+00 1.81E-02 0.00E+00 0.00E+00 2.00E+013 0.00E+00 2.00E+01

FINISH ITERATION NO. 3 CPU TIME IS 0.27 ELAPSED TIME IS 0.64---- ------------------------------------------------------- ITER. NO 4 -------------------------------------------------------

1 6.09E-05 2.66E-03 0.00E+00 1.00E+00 2.46E-03 8.40E-02 0.00E+00 -1.60E-03 4.96E+01 0.00E+00 3.54E+00 1.03E+01 5.15E+02 2.00E+012 3.67E-05 2.73E-03 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 1.42E-06 9.97E-02 0.00E+00 1.22E-02 0.00E+00 0.00E+00 2.00E+013 0.00E+00 2.00E+01

FINISH ITERATION NO. 4 CPU TIME IS 0.31 ELAPSED TIME IS 0.64---- ------------------------------------------------------- ITER. NO 5 -------------------------------------------------------

1 5.35E-05 2.05E-03 0.00E+00 1.00E+00 1.61E-03 5.50E-02 0.00E+00 -6.38E-03 4.95E+01 0.00E+00 9.51E-01 1.11E+01 5.77E+02 2.00E+012 1.98E-05 2.08E-03 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 1.86E-06 9.97E-02 0.00E+00 2.85E-02 0.00E+00 0.00E+00 2.00E+013 0.00E+00 2.00E+01

FINISH ITERATION NO. 5 CPU TIME IS 0.34 ELAPSED TIME IS 0.96---- ------------------------------------------------------- ITER. NO 6 -------------------------------------------------------

1 4.47E-05 1.46E-03 0.00E+00 1.00E+00 1.04E-03 3.51E-02 0.00E+00 -1.37E-02 4.95E+01 0.00E+00 8.78E-01 1.16E+01 6.16E+02 2.00E+012 2.41E-05 1.45E-03 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 7.95E-06 9.96E-02 0.00E+00 5.23E-03 0.00E+00 0.00E+00 2.00E+013 0.00E+00 2.00E+01

FINISH ITERATION NO. 6 CPU TIME IS 0.38 ELAPSED TIME IS 0.96---- ------------------------------------------------------- ITER. NO 7 -------------------------------------------------------

1 4.03E-05 1.06E-03 0.00E+00 1.00E+00 6.45E-04 2.23E-02 0.00E+00 -2.11E-02 4.94E+01 0.00E+00 1.09E+00 1.18E+01 6.40E+02 2.00E+012 1.88E-05 1.05E-03 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 1.55E-05 9.96E-02 0.00E+00-2.74E-02 0.00E+00 0.00E+00 2.00E+013 0.00E+00 2.00E+01

FINISH ITERATION NO. 7 CPU TIME IS 0.41 ELAPSED TIME IS 0.96---- ------------------------------------------------------- ITER. NO 8 -------------------------------------------------------

1 3.49E-05 7.94E-04 0.00E+00 1.00E+00 3.91E-04 1.40E-02 0.00E+00 -2.86E-02 4.93E+01 0.00E+00 1.87E+00 1.20E+01 6.54E+02 2.00E+012 1.81E-05 7.76E-04 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 1.68E-05 9.96E-02 0.00E+00-1.51E-02 0.00E+00 0.00E+00 2.00E+013 0.00E+00 2.00E+01

FINISH ITERATION NO. 8 CPU TIME IS 0.44 ELAPSED TIME IS 0.96---- ------------------------------------------------------- ITER. NO 9 -------------------------------------------------------

1 2.75E-05 5.93E-04 0.00E+00 1.00E+00 2.26E-04 8.65E-03 0.00E+00 -3.55E-02 4.93E+01 0.00E+00 2.22E+00 1.21E+01 6.61E+02 2.00E+012 1.04E-05 6.00E-04 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 1.80E-05 9.96E-02 0.00E+00-2.75E-03 0.00E+00 0.00E+00 2.00E+013 0.00E+00 2.00E+01

FINISH ITERATION NO. 9 CPU TIME IS 0.47 ELAPSED TIME IS 0.96 ---- ------------------------------------------------------- ITER. NO 10 -------------------------------------------------------

1 2.29E-05 4.32E-04 0.00E+00 1.00E+00 1.24E-04 5.18E-03 0.00E+00 -4.12E-02 4.93E+01 0.00E+00 2.36E+00 1.22E+01 6.65E+02 2.00E+012 6.21E-06 4.51E-04 0.00E+00 1.00E+00 0.00E+00 0.00E+00 0.00E+00 2.12E-05 9.96E-02 0.00E+00-9.36E-04 0.00E+00 0.00E+00 2.00E+013 0.00E+00 2.00E+01

FINISH ITERATION NO. 10 CPU TIME IS 0.51 ELAPSED TIME IS 0.96

Page 476: Star Uguide

PROGRAM OUTPUT Chapter 19

Example Output

19-10 Version 3.24

Table 19-3:

STAR-CD Version 3.200 Computational Dynamics, Ltd.

|------------------------------------| I-------------------------------------------| FIELD VALUES AT ITERATION NO 17 |-------------------------------------------I |------------------------------------|

CELL NO U VEL V VEL PRESS TUR EN DISSI VISCO DENSI 1 -3.729E-03 5.000E+01 1.599E+01 8.864E+00 8.476E+02 9.900E-03 1.187E+00 2 -6.469E-03 5.001E+01 1.566E+01 8.140E+00 7.240E+02 9.774E-03 1.187E+00 3 -8.121E-03 5.003E+01 1.521E+01 7.516E+00 6.245E+02 9.661E-03 1.187E+00 4 -9.057E-03 5.004E+01 1.417E+01 6.973E+00 5.433E+02 9.559E-03 1.187E+00 5 -9.642E-03 5.006E+01 1.274E+01 6.498E+00 4.764E+02 9.466E-03 1.187E+00 6 -1.006E-02 5.008E+01 1.153E+01 6.078E+00 4.206E+02 9.381E-03 1.187E+00 7 -1.032E-02 5.010E+01 1.067E+01 5.705E+00 3.737E+02 9.302E-03 1.187E+00 8 -1.042E-02 5.012E+01 9.867E+00 5.372E+00 3.339E+02 9.230E-03 1.187E+00 9 -1.041E-02 5.014E+01 8.828E+00 5.073E+00 3.000E+02 9.162E-03 1.187E+00 10 -1.034E-02 5.016E+01 7.534E+00 4.803E+00 2.708E+02 9.100E-03 1.187E+00 11 -1.024E-02 5.018E+01 6.154E+00 4.559E+00 2.455E+02 9.041E-03 1.187E+00 12 -1.010E-02 5.020E+01 4.855E+00 4.336E+00 2.235E+02 8.987E-03 1.187E+00 13 -9.875E-03 5.022E+01 3.705E+00 4.134E+00 2.042E+02 8.936E-03 1.187E+00 14 -9.544E-03 5.024E+01 2.677E+00 3.948E+00 1.873E+02 8.889E-03 1.187E+00 15 -9.108E-03 5.026E+01 1.705E+00 3.777E+00 1.723E+02 8.846E-03 1.187E+00 16 -8.703E-03 5.028E+01 7.344E-01 3.621E+00 1.590E+02 8.808E-03 1.187E+00 17 -1.265E-02 5.001E+01 1.643E+01 8.864E+00 8.476E+02 9.900E-03 1.187E+00 18 -1.972E-02 5.002E+01 1.599E+01 8.140E+00 7.240E+02 9.774E-03 1.187E+00 19 -2.317E-02 5.003E+01 1.540E+01 7.516E+00 6.245E+02 9.662E-03 1.187E+00 20 -2.520E-02 5.005E+01 1.428E+01 6.974E+00 5.434E+02 9.560E-03 1.187E+00 21 -2.660E-02 5.007E+01 1.282E+01 6.499E+00 4.764E+02 9.468E-03 1.187E+00 22 -2.761E-02 5.009E+01 1.158E+01 6.080E+00 4.207E+02 9.385E-03 1.187E+00 23 -2.829E-02 5.011E+01 1.070E+01 5.707E+00 3.738E+02 9.308E-03 1.187E+00 24 -2.871E-02 5.013E+01 9.880E+00 5.375E+00 3.341E+02 9.237E-03 1.187E+00 25 -2.897E-02 5.015E+01 8.829E+00 5.077E+00 3.001E+02 9.172E-03 1.187E+00 26 -2.915E-02 5.017E+01 7.527E+00 4.808E+00 2.710E+02 9.112E-03 1.187E+00 27 -2.926E-02 5.019E+01 6.140E+00 4.565E+00 2.457E+02 9.057E-03 1.187E+00 28 -2.927E-02 5.021E+01 4.836E+00 4.344E+00 2.237E+02 9.007E-03 1.187E+00 29 -2.906E-02 5.023E+01 3.679E+00 4.142E+00 2.045E+02 8.960E-03 1.187E+00 30 -2.851E-02 5.025E+01 2.641E+00 3.958E+00 1.876E+02 8.918E-03 1.187E+00 31 -2.747E-02 5.026E+01 1.659E+00 3.789E+00 1.726E+02 8.880E-03 1.187E+00 32 -2.602E-02 5.029E+01 6.926E-01 3.633E+00 1.594E+02 8.847E-03 1.187E+00 33 -2.962E-02 5.002E+01 1.750E+01 8.866E+00 8.465E+02 9.917E-03 1.187E+00 34 -4.068E-02 5.003E+01 1.650E+01 8.161E+00 7.228E+02 9.840E-03 1.187E+00 35 -4.427E-02 5.005E+01 1.561E+01 7.562E+00 6.240E+02 9.788E-03 1.187E+00 36 -4.621E-02 5.007E+01 1.440E+01 7.049E+00 5.439E+02 9.756E-03 1.187E+00 37 -4.755E-02 5.009E+01 1.292E+01 6.606E+00 4.785E+02 9.742E-03 1.187E+00 38 -4.830E-02 5.010E+01 1.165E+01 6.221E+00 4.243E+02 9.742E-03 1.187E+00 39 -4.858E-02 5.012E+01 1.075E+01 5.885E+00 3.792E+02 9.755E-03 1.187E+00 40 -4.858E-02 5.014E+01 9.911E+00 5.588E+00 3.411E+02 9.777E-03 1.187E+00 41 -4.846E-02 5.015E+01 8.854E+00 5.326E+00 3.089E+02 9.808E-03 1.187E+00 42 -4.827E-02 5.017E+01 7.551E+00 5.093E+00 2.814E+02 9.846E-03 1.187E+00 43 -4.802E-02 5.018E+01 6.163E+00 4.885E+00 2.577E+02 9.890E-03 1.187E+00 44 -4.766E-02 5.020E+01 4.854E+00 4.699E+00 2.373E+02 9.938E-03 1.187E+00 45 -4.705E-02 5.021E+01 3.684E+00 4.531E+00 2.195E+02 9.991E-03 1.187E+00 46 -4.595E-02 5.022E+01 2.620E+00 4.380E+00 2.039E+02 1.005E-02 1.187E+00 47 -4.377E-02 5.024E+01 1.593E+00 4.243E+00 1.903E+02 1.010E-02 1.187E+00 48 -3.912E-02 5.025E+01 5.735E-01 4.117E+00 1.782E+02 1.016E-02 1.187E+00 49 -4.128E-02 4.997E+01 1.998E+01 1.013E+01 5.056E+02 2.167E-02 1.187E+00 50 -5.490E-02 4.994E+01 1.730E+01 1.081E+01 5.577E+02 2.239E-02 1.187E+001

STAR-CD Version 3.200 Computational Dynamics, Ltd.

|------------------------------------| I-------------------------------------------| FIELD VALUES AT ITERATION NO 17 |-------------------------------------------I |------------------------------------|

CELL NO U VEL V VEL PRESS TUR EN DISSI VISCO DENSI 51 -5.872E-02 4.989E+01 1.581E+01 1.128E+01 5.944E+02 2.287E-02 1.187E+00 52 -6.068E-02 4.983E+01 1.450E+01 1.163E+01 6.219E+02 2.322E-02 1.187E+00 53 -6.194E-02 4.978E+01 1.299E+01 1.188E+01 6.420E+02 2.346E-02 1.187E+00 54 -6.249E-02 4.972E+01 1.167E+01 1.203E+01 6.548E+02 2.362E-02 1.187E+00 55 -6.246E-02 4.967E+01 1.073E+01 1.213E+01 6.626E+02 2.371E-02 1.187E+00 56 -6.207E-02 4.961E+01 9.866E+00 1.219E+01 6.675E+02 2.377E-02 1.187E+00

Page 477: Star Uguide

Chapter 19 PROGRAM OUTPUT

Example Output

Version 3.24 19-11

Table 19-4:

|-------------------------------------------| | STAR VERSION 3.200 | | THERMOFLUIDS ANALYSIS CODE | | Operating System: SunOS | | Stardate: 3-FEB-2004 Startime: 11:59:20 | |-------------------------------------------|

CASE NAME : out

|-------------------------| -----------------------------------------------| SECTION 1 => INPUT DATA |----------------------------------------------- |-------------------------| TURBULENCE MODEL COEFFICENTS FOR MATERIAL 1: CMU = 0.900000E-01 C1 = 1.44000 C2 = 1.92000 C3 = 1.44000 C4 = -0.330000 CAPPA = 0.419000 SIGMAK = 1.00000 SIGEPS = 1.21917 AMU = 50.5100 CEPS = 5.30000 TURBULENCE MODEL COEFFICENTS FOR MATERIAL 2: CMU = 0.900000E-01 C1 = 1.44000 C2 = 1.92000 C3 = 1.44000 C4 = -0.330000 CAPPA = 0.419000 SIGMAK = 1.00000 SIGEPS = 1.21917 AMU = 50.5100 CEPS = 5.30000

INITIAL CONDITIONS FOR MATERIAL 1: U = 0.00000 V = 0.00000 W = 0.00000 P = 0.00000 TE = 0.258200E-01 ED = 0.100000 T = 293.000

INITIAL CONDITIONS FOR MATERIAL 2: U = 0.00000 V = 0.00000 W = 0.00000 P = 0.00000 TE = 0.258200E-01 ED = 0.100000 T = 293.000

INITIAL CONDITIONS FOR MATERIAL 3: T = 293.000 *** No Tables in problem file

|----------------------------| ---------------------------------------------| SECTION 2 => BOUNDARY DATA |--------------------------------------------- |----------------------------|

CELL FACE ORIENTATION 1:

CELL NO. REGI. TYPE BOUNDARY CONDITIONS 1 5 SYMMETRY PLANE 2 5 SYMMETRY PLANE 3 5 SYMMETRY PLANE

Page 478: Star Uguide

PROGRAM OUTPUT Chapter 19

Example Output

19-12 Version 3.24

Table 19-5: |----------------------------| ---------------------------------------------| SECTION 3 => SOLUTION DATA |--------------------------------------------- |----------------------------|

ITERATION NUMBER = 0 -------------------------- SUM = 5.93369E-01 RESP = 2.59337E+00 10 SUM =-4.89229E-06 RESP = 1.65293E-03 RESCR= 0.00000E+00 11 NSP = 16 CPU TIME IS 0.73 ELAPSED TIME IS 0.82 MEMORY (DYNAMIC) USED IS 1 MBYTES

ITERATION NUMBER = 1 -------------------------- ______________________________BALANCE DATA________________________________________________

MATERIALWISE MASS BALANCE (kg/s) MAT. NO. FDIFF TOTAL_FLOW_IN TOTAL_FLOW_OUT MSDRO (FVIN) (FPIN ) (FLOUT) (FVOUT) (FPOUT) 1 -3.0160E-05 5.9337E-01 5.9340E-01 0.0000E+00 5.9337E-01 0.0000E+00 0.0000E+00 0.0000E+00 5.9340E-01 2 1.1921E-07 1.0000E+00 1.0000E+00 0.0000E+00 1.0000E+00 0.0000E+00 1.0000E+00 0.0000E+00 0.0000E+00 HEAT BALANCE IN SOLIDS (watts) MAT. NO. HDIFF HTIN HTOUT QTRAN QSOR 3 1.0000E+00 0.0000E+00 0.0000E+00 2.9300E+02 -1.0000E+00

TOTAL HEAT BALANCE = 1.0000E+00 WATTS

------------ BOUNDARY REGIONWISE ------------ REGION NO. TYPE FLOW-IN(kg/s) FLOW-OUT(kg/s) 1 INLET 5.9337E-01 0.0000E+00 2 PRESSURE 0.0000E+00 5.9340E-01 3 INLET 1.0000E+00 0.0000E+00 4 OUTLET 0.0000E+00 1.0000E+00

______________________________FIELD DATA_________________________________________________ *** FOR FLUID STREAM *** 1

Field Extrema: Umax Vmax Wmax VMAGmax Pmax TKEmax EPSmax Tmax RHOmax 3.0077E-03 5.0109E+01 0.0000E+00 5.0109E+01 9.5026E+02 7.6659E+00 6.3961E+02 2.9300E+02 1.1867E+00 Umin Vmin Wmin VMAGmin Pmin TKEmin EPSmin Tmin RHOmin -3.5403E-02 4.9425E+01 0.0000E+00 4.9425E+01 2.6202E+01 2.5003E+00 8.2445E+00 2.9300E+02 1.1867E+00

Field Volume-Averages: Pvav RHOvav Tvav TKEvav EPSvav 4.3461E+02 1.1867E+00 2.9300E+02 3.9029E+00 1.4506E+02

Field Mass-Averages: Pmav RHOmav Tmav TKEmav EPSmav 4.3461E+02 1.1867E+00 2.9300E+02 3.9029E+00 1.4506E+02

Field Totals: Mass Volume TKE EPS 9.4939E-03 8.0000E-03 3.7053E-02 1.3772E+00

*** FOR FLUID STREAM *** 2

Field Extrema: Umax Vmax Wmax VMAGmax Pmax TKEmax EPSmax Tmax RHOmax 4.1347E-05 1.0020E-01 0.0000E+00 1.0020E-01 3.6534E-04 0.0000E+00 0.0000E+00 2.9300E+02 1.0000E+03 Umin Vmin Wmin VMAGmin Pmin TKEmin EPSmin Tmin RHOmin -5.7719E-05 9.8765E-02 0.0000E+00 9.8765E-02 -3.1572E+00 0.0000E+00 0.0000E+00 2.9300E+02 1.0000E+03

Field Volume-Averages: Pvav RHOvav Tvav TKEvav EPSvav -1.7811E+00 1.0000E+03 2.9300E+02 0.0000E+00 0.0000E+00

Field Mass-Averages: Pmav RHOmav Tmav TKEmav EPSmav -1.7811E+00 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 STREAM *** 3

Page 479: Star Uguide

Chapter 20 PRO-STAR CUSTOMISATION

Set-up Files

Version 3.24 20-1

Chapter 20 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 21, “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 20-9), panel size and location(see “Panel definition files” on page 20-5) and ‘favourite’ panels (see “Panel

Page 480: Star Uguide

PRO-STAR CUSTOMISATION Chapter 20

Panels

20-2 Version 3.24

navigation system” on page 2-41).

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 20-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 481: Star Uguide

Chapter 20 PRO-STAR CUSTOMISATION

Panels

Version 3.24 20-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 482: Star Uguide

PRO-STAR CUSTOMISATION Chapter 20

Panels

20-4 Version 3.24

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 483: Star Uguide

Chapter 20 PRO-STAR CUSTOMISATION

Panels

Version 3.24 20-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 nor 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 21, “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 484: Star Uguide

PRO-STAR CUSTOMISATION Chapter 20

Macros

20-6 Version 3.24

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 20-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 20-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 page20-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 485: Star Uguide

Chapter 20 PRO-STAR CUSTOMISATION

Macros

Version 3.24 20-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 21, “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 486: Star Uguide

PRO-STAR CUSTOMISATION Chapter 20

Macros

20-8 Version 3.24

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 487: Star Uguide

Chapter 20 PRO-STAR CUSTOMISATION

Function Keys

Version 3.24 20-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 488: Star Uguide

PRO-STAR CUSTOMISATION Chapter 20

Function Keys

20-10 Version 3.24

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 489: Star Uguide

Chapter 20 PRO-STAR CUSTOMISATION

Function Keys

Version 3.24 20-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-36)

Any changes to the function key definitions are saved in a file called.Prostar.Defaults (see “Set-up Files” on page 20-1) at the location specifiedby environment variable STARUSR (or in your current directory, see page 20-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 490: Star Uguide
Page 491: Star Uguide

Chapter 21 OTHER STAR-CD FEATURES AND CONTROLS

Introduction

Version 3.24 21-1

Chapter 21 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.geom, test.mdl, etc. and will be used for the appropriate input/outputoperation during the model building and CFD analysis 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 (.pst) 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 492: Star Uguide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 21

File Handling

21-2 Version 3.24

pro-STAR 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-20)• Copied to a temporary file which can be subsequently edited to make changes

to the recorded commands (see item 12 on page 21-11). 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).

pro-STAR 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 21-10).

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 21-10).

Command: SAVE

Page 493: Star Uguide

Chapter 21 OTHER STAR-CD FEATURES AND CONTROLS

File Handling

Version 3.24 21-3

Note that, although the model file is normally saved in binary form, there may beoccasions when you need to write the model data in text (coded) form. Examples ofsuch instances 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 16-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 as follows:

Command: RESUME

Command: CDSAVE

Page 494: Star Uguide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 21

File Handling

21-4 Version 3.24

• Start a pro-STAR session.• Issue command

IFILE,case.inp

All data in files .cel, .vrt, .bnd, and .drpc (if present) are read inautomatically.

• Issue command EVFILE to use data on the events file.

pro-STAR 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 8-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 8-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.

pro-STAR plot file (.plot)This is always open to receive neutral plot information, i.e. machine-independentrepresentations of a set of plots. The file may be written in either binary or text(coded) format. CD adapco supply source code for several decoding programs thatdrive hard-copy devices in a variety of formats (e.g. Postscript), or screen outputdevices (e.g. X-window workstations). These programs can also serve as templatesfor constructing plot drivers for other, unsupported devices. To make use of theneutral 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 nowdiverted to the file instead of being displayed on the screen.

• To restore normal operation, choose option Plot To Screen from the Plotmenu.

Details of data representation in the neutral plot file can be found in Appendix B.

STAR geometry file (.geom)This is written by pro-STAR and used by STAR. The file contains all cell topology

Page 495: Star Uguide

Chapter 21 OTHER STAR-CD FEATURES AND CONTROLS

File Handling

Version 3.24 21-5

and model geometry information, e.g. cell definitions and connectivities, boundarydefinitions, vertex locations, local coordinate system definitions, etc. It must berewritten whenever

• the mesh geometry is modified;• boundaries are added, subtracted, or assigned to different boundary regions;• the material or porous properties of a cell are changed.

The file is created by selecting File > Write Geometry File from the menu bar todisplay the Geometry File Write dialog shown below:

The input required is:

1. 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 (seepage 21-10)

2. File Type — either Binary or Coded (text). The binary option must always beused for moving mesh cases involving ‘events’ (see Chapter 16, “MovingMeshes”).

3. Check Option — specify whether pro-STAR should check the mesh fordouble vertices, negative volumes, etc. (see “Microscopic checking” on page4-27). Any unused or improper boundary definitions are automatically placedinto the current boundary set (see “Set Manipulation” on page 2-21) so thatthey can be easily inspected.

4. Geometry Scale Factor — an optional scale factor applied to all dimensionsof the problem geometry

While the geometry file is being written, an auxiliary file called parm.inc iscreated automatically. This file is used to dimension data arrays in STAR to the sizerequired for the analysis.

STAR control file (.prob)This is written by pro-STAR as a companion to the geometry file and is also readby STAR. It contains information on what kind of analysis is to be performed andwhat data are to be printed or saved for post processing. It also contains all materialproperty values, boundary conditions and initial conditions.

Command: GEOMWRITE

Page 496: Star Uguide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 21

File Handling

21-6 Version 3.24

The file is created by selecting File > Write Problem File from the menu bar todisplay the dialog shown below:

Note that

• An alternative file name may be entered, if necessary• There is an option for specifying how the geometry file was written (i.e.

whether as a coded or binary file)

The control file should be rewritten every time the model description is modified.Depending on the information written, some updating of file parm.inc mayoccur.

STAR solution file (.pst)This is both written and read by STAR and contains all the calculated values neededto restart a partially converged or interrupted analysis. It is also used by pro-STARfor post-processing, i.e. to make contour, vector or graph plots of any variablecalculated by STAR.

Since the file is originally written in binary format, pro-STAR provides a facilityto convert it to text (coded) plus other binary formats and vice-versa, by choosingTools > Convert > Star from the main window menu bar. This activates the StarConvert dialog shown below:

If, for example, you wish to convert the solution file from binary to text format,select option Post Data and then

• enter the name of the file containing data to be converted (Input File with

Command: PROBLEMWRITE

Command: PSTAR

Page 497: Star Uguide

Chapter 21 OTHER STAR-CD FEATURES AND CONTROLS

File Handling

Version 3.24 21-7

extension .pst) or select it using PROSTAR’s built-in file browser (see page21-10)

• choose its file type (Binary in this case) from the adjacent menu• enter the name of the file that will store the converted data (Output File with

extension .pstc)• choose the desired file type (Coded in this case) from the adjacent menu

STAR 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 8-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 solution (.pst) file.

Since the file is originally written in binary format, pro-STAR provides a facilityto convert it to text (coded) plus other binary formats and vice-versa. It is alsopossible to reduce the size of a previously generated transient post file by limitingthe number of time step data stored in it. To do this, choose Tools > Convert > Starfrom the main window menu bar to activate the Star Convert dialog and then selectoption button Transient as shown below:

You may then

• enter the name of the file containing the original data (Input File withextension .pstt) or select it using PROSTAR’s built-in file browser (seepage 21-10)

• choose its file type (Binary in this case) from the adjacent menu• enter the name of the file that will store the truncated data (Output File with a

different name and extension .pstt)• choose the appropriate file type (Binary in this case) from the adjacent menu• specify the time step range to be transferred to the output file by entering the

first and last time step numbers and the time step increment in the boxesprovided

• if the output file already exists, choose whether the transferred data willReplace the current contents or will be Appended at the end of the file

Command: TSTAR

Page 498: Star Uguide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 21

File Handling

21-8 Version 3.24

File relationships

The use and relationship between files in the STAR-CD environment is illustratedby Figure 21-1. Appendix C contains a complete list of all files that can be writtenor read by either pro-STAR or STAR. The same information may also be displayedon-line in the Help dialog (choose Help > pro-STAR Help from the menu bar,select Misc. from the Module pop-up menu, and then highlighting item FILE). Forthe great majority of problems, however, only the files shown below are everneeded.

Figure 21-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 different formats and isaccessed by selecting Tools > Convert > Star from the menu bar. This activates theStar Convert dialog shown below:

case.trnsTransienthistory data

PROSTAR

STAR

case.mdl

case.echo

case.plot

case.pstt

case.geomcase.prob

case.pst

Model data

Commandecho

Neutral plot

parm.incDimensioning

Transientoutput data

GeometryBoundary conds.Solution params.

Binaryoutput data

Page 499: Star Uguide

Chapter 21 OTHER STAR-CD FEATURES AND CONTROLS

File Handling

Version 3.24 21-9

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 8, “Output controls”), thesecond with droplet track data conversion (see “Trajectory displays” on page13-8) or particle track data conversion (see “Particle Tracking” on page 9-28)

• enter the name of the file containing the data to be converted (Input File withextension .rsi or .trk) or select it using pro-STAR’s built-in file browser(see page 21-10)

• 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 (.geom) 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

Commands: SMCONVERT PTCONVERT

Page 500: Star Uguide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 21

File Handling

21-10 Version 3.24

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.

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 “STAR geometry file (.geom)” above) bychoosing File > Write Geometry File from the menu bar.

5. Writing the problem data file (see “STAR control file (.prob)” above) bychoosing File > Write Problem File from the menu bar.

6. Restoring a previously created model from a saved model file (see “pro-STARmodel file (.mdl)” above) by choosing File > Resume from the menu bar.When used for the first time in a pro-STAR session, RESUME will alsoautomatically read and execute commands stored in a special file calledPROINIT (see “Set-up Files” on page 20-1). This provides a very convenientway of setting up pro-STAR in a standard way (regarding, for example, plottype, viewing angle, 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.

Page 501: Star Uguide

Chapter 21 OTHER STAR-CD FEATURES AND CONTROLS

File Handling

Version 3.24 21-11

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

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

Page 502: Star Uguide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 21

Special pro-STAR Features

21-12 Version 3.24

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

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 20-6)

PANEL_LOCAL and PANEL_GLOBALPaths to the local and global pro-STAR panel directories, respectively (see “Paneldefinition files” on page 20-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-38). 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.

Page 503: Star Uguide

Chapter 21 OTHER STAR-CD FEATURES AND CONTROLS

Special pro-STAR Features

Version 3.24 21-13

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 commandTSCALE 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-36)

STARUSRPath to pro-STAR files PRODEFS (abbreviations), PROINIT (initial set up) and.Prostar.Defaults (see “Set-up Files” on page 20-1)

Resizing pro-STAR

pro-STAR is a dynamic-memory executable code and requires a file 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 CFD 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

Page 504: Star Uguide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 21

Special pro-STAR Features

21-14 Version 3.24

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.

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 subsequent

Page 505: Star Uguide

Chapter 21 OTHER STAR-CD FEATURES AND CONTROLS

The StarWatch Utility

Version 3.24 21-15

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

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.

Page 506: Star Uguide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 21

The StarWatch Utility

21-16 Version 3.24

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

Page 507: Star Uguide

Chapter 21 OTHER STAR-CD FEATURES AND CONTROLS

The StarWatch Utility

Version 3.24 21-17

star-chart6 6206/tcp # Local Stripchart 6

where port numbers 6200 — 6206 can be replaced by any set of port numbers.

Step 1

If using the STAR GUIde environment to run a CFD analysis interactively,StarWatch will start automatically as soon as STAR itself begins execution and willopen a monitoring window like the one shown above (see Chapter 2, “Running aCFD 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 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.

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.

Page 508: Star Uguide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 21

The StarWatch Utility

21-18 Version 3.24

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 CFD 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 509: Star Uguide

Chapter 21 OTHER STAR-CD FEATURES AND CONTROLS

The StarWatch Utility

Version 3.24 21-19

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 regions

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

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

Page 510: Star Uguide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 21

The StarWatch Utility

21-20 Version 3.24

Solution control can then be exercised as follows:

1. During execution, monitor the behaviour of normalised residual sums (orglobal rates of change) for each variable being solved for, by looking at the

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 511: Star Uguide

Chapter 21 OTHER STAR-CD FEATURES AND CONTROLS

The StarWatch Utility

Version 3.24 21-21

displayed values at the end of each iteration or time step. In addition, look atthe flow variable values at the monitoring 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 512: Star Uguide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 21

Hard Copy Production

21-22 Version 3.24

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 “pro-STAR plot file (.plot)” on page 21-4). Once the requiredplot is on-screen, type

TERMINAL,,FILE,RAST(switches to the neutral plot file in raster, i.e. colour-fill, mode)

Page 513: Star Uguide

Chapter 21 OTHER STAR-CD FEATURES AND CONTROLS

Hard Copy Production

Version 3.24 21-23

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 5-9)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 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 514: Star Uguide

OTHER STAR-CD FEATURES AND CONTROLS Chapter 21

Hard Copy Production

21-24 Version 3.24

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 (glm) mode(see Chapter 2, “Plotting Functions”). This can include any effects available inextended 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 515: Star Uguide

APPENDICES

STAR-CD VERSION 3.24

CONFIDENTIAL — FOR AUTHORISED USERS ONLY

© 2004 CD adapco Group

APPENDICES

Page 516: Star Uguide
Page 517: Star Uguide

Appendix A pro-STAR CONVENTIONS

Command Input Conventions

Version 3.24 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 518: Star Uguide

pro-STAR CONVENTIONS Appendix A

Command Input Conventions

A-2 Version 3.24

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 519: Star Uguide

Appendix A pro-STAR CONVENTIONS

Help Text / Prompt Conventions

Version 3.24 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 520: Star Uguide

pro-STAR CONVENTIONS Appendix A

Control and Function Key Conventions

A-4 Version 3.24

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 521: Star Uguide

Appendix B pro-STAR NEUTRAL PLOT FILE

Version 3.24 B-1

Appendix B pro-STAR NEUTRAL PLOT FILEThe pro-STAR neutral plot (.plot) file is a machine/device- independentrepresentation of a plot. As such, it can be easily transferred to any other computerand, with the appropriate PLOT program, plotted on any device. The onlyrestriction is that the device must support raster type operations if the RASTERoption is used in the TERM command. For example, a raster style plot could not beplotted on a pen plotter. The file is written any time a user performs a plottingoperation after first using the TERM,,FILE,/RASTER/VECTOR/ command.The file is written using free-format integers, real numbers and characters and hasan absolute maximum length per record of 80 characters. Each plot command in thefile is represented by an integer followed by an appropriate set of alphanumericparameters. Table B-1 describes the neutral file plot commands and theirparameters. Table B-2 and Table B-3 describe the default colour schemes to be usedfor devices for which colours can be specified.

All neutral plots are plotted in a single independent coordinate system called the‘screen system’. In this system, the origin is located at the lower left hand corner ofthe plot, as shown in the figure below. The X axis points to the right and may havevalues between 0 and 13. The Y axis points up and may have values between 0 and10. All necessary three-dimensional rotations and window clipping are done beforethe neutral file is written. It is up to the user to ensure that the appropriate mappingbetween the screen system and his plotting device takes place.

Label

Plot Information

Triad

Default windowPlot title

(SX=13,SY=10)(SX=10,SY=10)

(SX=0,SY=1)

SY

SX

Page 522: Star Uguide

pro-STAR NEUTRAL PLOT FILE Appendix B

B-2 Version 3.24

CD adapco provide a suite of several different PLOT programs, to be used inconjunction with various plot drivers (HP-GL, Postscript, etc.). These programsshould be used as a guide for developing additional versions capable of operatingwith devices not supported by CD adapco.

Below is a small sample of a .plot file and a description of its purpose:

1, 6, 1, 2, 10.5000, 9.5000, 5, 12, PROSTAR 3.0,2, 10.1000, 9.0000, 6, 2, 7, 2, 10, -2, 4, 0,10.1000, 6.9300, 10.4000, 6.9300, 10.4000, 7.0400,10.1000, 7.0400, 7, 3, ...

1 Initialise plotter and set the colour map6, 1 Change text size to 1 (largest)2, 10.5, 9.5 Move to location 10.5, 9.55, 12, PROSTAR 2.0 Write 12 text characters (PROSTAR 3.0)2, 10.1, 9 Move to location 10.1, 9.6, 2 Change text to size 27, 2 Change pen colour (lines and text) to

index 210,-2, 4, 0, 10.1, 6.93,10.4, 6.93, 10.4,7.04,10.1, 7.04

Plot a polygon using index no. 2 for thefill colour. The polygon has four verticesand the edges are not drawn. The fourcorners are (10.1,6.93), (10.4,6.93), …

7, 3 Change pen to index 3

Page 523: Star Uguide

Appendix B pro-STAR NEUTRAL PLOT FILE

Version 3.24 B-3

Table B-1: List of Neutral File Plot Commands

Command Parameters Description

1 None Change the colour map

2 X,Y Move (pen up) to location X,Y

3 X,Y Draw (pen down) to location X,Y

4 X,Y Draw (pen down) to location X,Yusing variable value

5 NCH,TEXT(1:NCH) Place NCH text characters startingat the most current location. Thearray of characters follows param-eter NCH.

6 ISIZE Change the character size. ISIZEcan be between 1 (largest) and 4(smallest).

7 IPEN Change line and text colour toindex number IPEN.

8 ISTYLE Change line style

9 X,Y Draw a point at location X,Y

10 NCOL,NENT,IBOUND[X(I),Y(I),I=1,NENT]

Draw and fill a polygon. The inte-rior of the polygon is determinedby the index of the absolute valueof NCOL. If IBOUND = 1, thenthe polygon edges are drawn in theindex defined by the latest IPEN(command number 7); otherwise,the edges are not drawn. NENTrepresents the number of cornersin the polygon and it is followedby NENT pairs of X,Y giving thescreen location of each corner.

Page 524: Star Uguide

pro-STAR NEUTRAL PLOT FILE Appendix B

B-4 Version 3.24

11 X,Y,RADIUS,SANGLE,ANGLE

Draw an arc boundary using X,Yas the coordinates of the upper leftcorner of the rectangle that con-tains the arc. RADIUS is theparameter which scales the widthand height of the major and minoraxes of the arc. SANGLE indicatesthe start of the arc relative to thethree-o’clock position from thecentre. ANGLE specifies the pathand extent of the arc relative to itsstart. Angles are specified in 64thsof a degree, i.e. 360 x 64 is a com-plete circle.

12 X,Y,RADIUS,SANGLE,ANGLE,IBOUND,IFILL

Draw a filled arc. In addition tousing the parameters for commandnumber 11, if IFILL=1 the fillingwould be as in a pie slice; other-wise the filling would be an arcchord (i.e. an area between the arcand a line segment joining the endpoints of the arc). IBOUNDdefines the foreground colours.

13 X,Y,RADIUS,SANGLE,ANGLE

Draw a sphere using the parame-ters of command number 11 withSANGLE=0.0 and ANGLE=360.0

14 XMIN,XMAX,YMIN,YMAX

Set the clip plane usingXMIN/XMAX and YMIN/YMAXas the clip limits

15 INDEX Set the line width to INDEX

Table B-1: List of Neutral File Plot Commands

Command Parameters Description

Page 525: Star Uguide

Appendix B pro-STAR NEUTRAL PLOT FILE

Version 3.24 B-5

Table B-2: Default Colour Table for Geometry Only Plots

Index Colour

0 Black

1 White

2 Red

3 Green

4 Blue

5 Cyan

6 Magenta

7 Yellow

8-20 Not used

21-39 Shades of red varying in intensity (HLS model) from 0.95 (almostwhite) to 0.05 (almost black), and used for light shaded images.

41-59 Shades of green varying in intensity (HLS model) from 0.95(almost white) to 0.05 (almost black), and used for light shadedimages.

61-79 Shades of cyan varying in intensity (HLS model) from 0.95(almost white) to 0.05 (almost black), and used for light shadedimages.

81-99 Shades of gold varying in intensity (HLS model) from 0.95(almost white) to 0.05 (almost black), and used for light shadedimages.

Table B-3: Default Colour Table for Post-processing Plots

Index Colour

0 Black

1 White

2-14 Smooth variation in hues from red to violet. The user can extendthis table, if desired, to use up to index 20.

21-99 Varied intensities for light shaded images, as defined in Table B-2.

Page 526: Star Uguide
Page 527: Star Uguide

Appendix C FILE USAGE

Version 3.24 C-1

Appendix C FILE USAGEFrom Version 3.1 onwards, file names in STAR-CD changed from beingI/O-unit-number based to file-extension based. For the user’s convenience, both theold and the new naming conventions are given in the table below. Note, however,that you may still use a file conforming to the old convention in any command orGUI text box, provided you enclose the name in single or double quotes.

FileExtension

Old UnitNumber Usage

.ani 22Default input/output for recording animationcommands

.anim 25 Default save file for animation options

.bakBackup (i.e. previous version) of the currentpro-STAR model file (binary)

.bdf 25 STAR file used for storing body forces

.bnd 23 Default input/output for boundary definitions

.bshlAuxiliary file generated by the domaindecomposition tool in STAR-HPC and used bySTAR produce the .ndt file for parallel runs

.btr 23 STAr file used for storing beam tracking data

.ccd 63 STAR file used for storing coal combustion data

.cel 14 Default input/output for cell definitions

.cel 17 Default output for surface cell definitions

.cgns Default input/output for CGNS data files

.cgrd Default input file containing grid change commands

.chm 34Default output file for chemical scheme definitions(coded)

.cpfz 32Default temporary storage of ‘frozen’ vertex dataused with the SAVE and MAP options of commandCPFREEZE

.cpl 35 Default input/output for coupled cell definitions

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

.drp 37Default output for droplet definitions (written withcommand PROBLEMWRITE)

.drpc 36 Default input/output for droplet data (coded)

.ecd File for storing engineering data for cell monitoring

.ecd2File for storing dispersed-phase engineering data forcell monitoring

Page 528: Star Uguide

FILE USAGE Appendix C

C-2 Version 3.24

.echo 1 Echo of all input typed by the user

.elem 14Default input/output for ANSYS™ elementdefinitions

.erdFile for storing engineering data for boundary regionmonitoring

.erd2File for storing dispersed-phase engineering data forboundary region monitoring

.errSTAR file used for storing error estimates. Mutuallyexclusive with the .rpo file.

.evn 28Default transient event save file (binary/directaccess) used by pro-STAR

.evnc 19 Default input/output for ASCII event data files

.evt 32Default transient event data file (binary) used bySTAR

.fac File containing cell face definitions

.g3d 14 Default input for GRID3D data files

.gen 23 Default output for GENERIC data

.geom 8Default output for STAR geometry file (coded orbinary)

.grf 12 Default graph register data save file

.grf 13 Default graph register ‘GET’ file

.iges 13 Default input for IGES data files

.info 61 Run-time optional output file

.inp 5 Any file containing pro-STAR commands

.inp 24Default input/output for miscellaneous problem datadefinitions

.lct 49STAR file used for storing cell types for thetwo-layer turbulence model

.lfbFile containing group and colour information forparticles

.loop 23 Default save file of current loop information

.mdl 16 Default pro-STAR model file (binary)

.mdl 26 Default input for SMAP-type data

.msh TGRID™ data output file

.nas 14 Default input/output for NASTRAN™ data files

.ndt 21

STAR file containing normal distances from wallboundaries, used in various turbulence modelimplementations (e.g. low Reynolds number models,two-layer models, etc)

FileExtension

Old UnitNumber Usage

Page 529: Star Uguide

Appendix C FILE USAGE

Version 3.24 C-3

.neu Gambit™ data output file

.node 15 Default input/output for ANSYS™ node definitions

.out 6 Default output file

.pat 14 Default input/output for PATRAN™ data files

.pdftLook-up table file created when using PPDFchemical reaction models

.pgr 90File containing participating media radiation data(binary)

.plot 2 Neutral plot file

.prob 10Default output for STAR control file (coded orbinary)

.proc 23File containing cell-to-processor mappinginformation used in STAR-HPC runs

.prs 64STAR file containing particle radiation sources foruse in restart runs

.pst 9 Default STAR solution file (binary/direct access)

.pstc 7Default input/output of coded STAR solution filesfor BINARY-CODED-BINARY file conversions

.pstt 29 Default transient solution file (binary/direct access)

.pttc 27Default input/output of coded transient solution filesfor BINARY-CODED-BINARY conversions

.refiRefinement data file used by the adaptive refinementcommands (CMREFINE / CMUNREFINE)

.reu 27Residual history file for phase no. 2 (used inEulerian two-phase problems)

.rpo 39Default output file for solution variable residuals in asteady-state run (turned on by command RESDAT).Mutually exclusive with the .err file.

.rsi 62 Default residual history file (binary/direct access)

.rsic 34Default input/output of residual histories forBINARY-CODED-BINARY file conversions

.run 60 Standard run-time output file

.scl 35 Default output for scalar variable definitions (coded)

.set 31Default output for set definitions (written with theSETWRITE command)

.smap 38Default output of the SMAP operation, used forSTAR restart runs with a changed mesh

.spd 12 File for storing engine data (coded)

.spl 22 Default input/output for spline definitions

FileExtension

Old UnitNumber Usage

Page 530: Star Uguide

FILE USAGE Appendix C

C-4 Version 3.24

The format for cell definitions is: (file case.cel)Cell number, eight vertices, cell type number, cell key (I9, 6X, 9I9, 1X, I4)

The format for vertex definitions is: (file case.vrt)Vertex number, X, Y, Z (global coordinates) (I9, 6X, 3G16.9)

The format for boundary definitions is: (file case.bnd)Boundary number, four vertices, region number, patch number, region type(characters) (I8, 6X, 4I9, 2I7, A)

The format for spline definitions is: (file case.spl)Spline number, number of vertices, spline type (3I9)Up to 100 vertex numbers 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)

.srf 30Default output for plotting-surface database (used toskip surface creation step in future plots)

.stl 14 Default input for STL data files

.tabl 18 Default input file for droplet spray tables

.tbl Default file for storing general table data

.terr 50STAR file used for storing estimates of total error intransient analyses

.trk 33 Default input/output for particle/droplet tracks

.trkc 34Default input/output of particle/droplet track data forBINARY-CODED-BINARY file conversions

.trnc 24 Default input for transient load data (coded)

.trns 26Default transient history save file (binary/directaccess

.unv 14Default input/output for IDEAS™ (SDRC) universalfile

.uns Fieldview™ data output file

.usr 23 Default input/output for ASCII post data

.vda 13 Default input for VDA data files

.vfs 20 STAR file used for storing view factors

.vrml 14 Virtual reality data output file

.vrt 15 Default input/output for vertex definitions

.vrt 18 Default output for surface vertex definitions

FileExtension

Old UnitNumber Usage

Page 531: Star Uguide

Appendix C FILE USAGE

Version 3.24 C-5

Vertex and/or cell number (as appropriate), scalar value (I9, 6X, 6G16.9).

Page 532: Star Uguide
Page 533: Star Uguide

Appendix D PROGRAM UNITS

Version 3.24 D-1

Appendix D 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 534: Star Uguide
Page 535: Star Uguide

Appendix E VALID PLOT COMBINATIONS

Version 3.24 E-1

Appendix E VALID PLOT COMBINATIONS

(NOTE: CONTOURS IN VECTOR MODE ARE DRAWN AS FRINGE [LINE] CONTOURS)

(NOTE: CONTOURS IN RASTER MODE ARE DRAWN AS FILLED COLOUR CONTOURS)

Table E-1: Terminal Type = Vector

POPTIONPLTYPE MISC. OPTIONS

NORMAL SECTION QHIDDEN EHIDDEN EDGES LIGHTED

GEOMETRY X X X X X

VECTORS(CELL DATA)

X X X X X

CONTOUR(CELL DATA)

VECTORS(VERTEX DATA)

X X X X X

CONTOUR(VERTEX DATA)

X X X X

ISOSURFACE(VERTEX DATA)

FACE COLOURCODE

CONTOUR(FLUX DATA)

Table E-2: Terminal Type = Raster

POPTIONPLTYPE MISC. OPTIONS

NORMAL SECTION QHIDDEN EHIDDEN EDGES LIGHTED

GEOMETRY X X X X X X

VECTORS(CELL DATA)

X X X X X X

CONTOUR(CELL DATA)

X X X

VECTORS(VERTEX DATA)

X X X X X X

CONTOUR(VERTEX DATA)

X X X

ISOSURFACE(VERTEX DATA)

X X

FACE COLOURCODE

X

CONTOUR(FLUX DATA)

X X

Page 536: Star Uguide

VALID PLOT COMBINATIONS Appendix E

E-2 Version 3.24

TRANSLUCENT PLOTS ARE AVAILABLE IN ALL RASTER AND EXTENDED MODES ON

MACHINES USING GL GRAPHICS WITH APPROPRIATE HARDWARE

Table E-3: Terminal Type = Extended (Raster + 24-bit Colour + Zbuffer)

POPTIONPLTYPE MISC. OPTIONS

NORMAL SECTION QHIDDEN EHIDDEN EDGES LIGHTED

GEOMETRY X X X X X X

VECTORS(CELL DATA)

X X X X X

CONTOUR(CELL DATA)

X X X X

VECTORS(VERTEX DATA)

X X X X X

CONTOUR(VERTEX DATA)

X X X X

ISOSURFACE(VERTEX DATA)

X X X

FACE COLOURCODE

CONTOUR(FLUX DATA)

Page 537: Star Uguide

Appendix F pro-STAR X- RESOURCES

Version 3.24 F-1

Appendix F 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 538: Star Uguide

pro-STAR X- RESOURCES Appendix F

F-2 Version 3.24

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 top of the screen to the topof the window, and Y the distance form the left of the screen to the left side 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 539: Star Uguide

Appendix F pro-STAR X- RESOURCES

Version 3.24 F-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 540: Star Uguide

pro-STAR X- RESOURCES Appendix F

F-4 Version 3.24

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 541: Star Uguide

Appendix F pro-STAR X- RESOURCES

Version 3.24 F-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 542: Star Uguide
Page 543: Star Uguide

Appendix G USER INTERFACE TO MESSAGE PASSING ROUTINES

Version 3.24 G-1

Appendix G 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 544: Star Uguide

USER INTERFACE TO MESSAGE PASSING ROUTINES Appendix G

G-2 Version 3.24

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 545: Star Uguide

Appendix H STAR RUN OPTIONS

Usage

Version 3.24 H-1

Appendix H STAR RUN OPTIONS

Usagestar [-version] [-abort] [-batch] [-case=casename] [-chktime=minutes] \

[-chkdir=directory] [-chkpnt] [-collect] [-dp] \ [-devtool="program"] [-g] [-kill] [-noramfiles] [-norecalc] \

[-norestart] [-nosave] [-noskip] [-noturbo] [-noufile] [-restart] \ [-save="file1[ file2 ...]"] [-set variable="value"] \ [-toolchest] [-timer] [-ufile] \ [-ulib="library1[ library2 ...]"] [-watch] \ [-copy="file1[ file2 ...]"] [-decomp] [-decomphost=hostlist] \ [-decompmeth=method] [-decompflags="flags"] [-distribute] \ [-loadbalance] [-mergehost=hostlist] [-mpi=vendor] \ [-mppflags="flags"] [-mpphosts] [-nocollect] [-nocopy] \ [-nodecomp] [-noshmem] [-swap121] \ [-mvmeshhost=host] [-nooverload] [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.

Page 546: Star Uguide

STAR RUN OPTIONS Appendix H

Options

H-2 Version 3.24

-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.-noramfiles Disable memory based scratch files.-norecalc Disable the recalculation of near-wall distances and

radiation view factors.-norestart Disable restart if selected in the problem file.-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.

-noturbo Disable platform specific solver optimizations.-noufile Ignore user coding in the "ufile" directory, i.e. the

run’s results will not be influenced by the actual usercoding.

-restart Enable restart if post data file exist.-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.

Page 547: Star Uguide

Appendix H STAR RUN OPTIONS

Parallel Options

Version 3.24 H-3

Parallel Options

-ufile Compile user coding and build new plugable objectonly. Useful to verify if user coding compiles, i.e., if itcontains any syntax mistakes.

-ulib="librarylist" Specify precompiled user coding libraries and/or someadditional dynamic shared objects required by usercoding.

-watch Enable connection to the STAR watch 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 for running decomposer(i.e. host1:host2:…).

Page 548: Star Uguide

STAR RUN OPTIONS Appendix H

Parallel Options

H-4 Version 3.24

-decompmeth=method Select decomposition method (i.e. optimised, automatic,manual, sets, metis, ometis). The abbreviations o, a, m,s, x and y, respectively, can be used instead. Theirindividual meanings are:

o : The decomposition will be read from file<casename>.proc, composed of two columns:first column contains cell numbers, second columncontains process number to which the cell is goingto be assigned.

a : The decomposition will uniformly divide thenumber of cells between the intended number ofprocesses.

m : The decomposition is done per cell types, as theymay have been defined in pro-STAR.

s : The decomposition is read from a .sets file, as itmay have been defined in pro-STAR.

x : The mesh will be partitioned with the METIS, abuilt-in graph handling library.

y : Same as above, but with a lower memory foot-print/higher execution time.

The default is ‘metis’ decomposition, except when themodel contains events, in which case the defaultbecomes ‘sets’.

Example:-decompmeth=x

Page 549: Star Uguide

Appendix H STAR RUN OPTIONS

Parallel Options

Version 3.24 H-5

-decompflags="flags" Special options for Domain Decomposition step:

vopt,n : This options controls which vertices are writteninto each of the different geometry files being created inthe subdomain directories; n can be equal to:

1 : All vertices are written on all geometry files;2 : All vertices on the master process geometry file but

only local vertices on others;3 : Only local vertices on each geometry file;

Local vertices are the ones that define the cells belong-ing to a certain subdomain; this option has a particularimpact on moving mesh cases, whereby the strategychosen to move the mesh (i.e. the vertices) will dictatewhich option to choose. Whenever the moving meshoperations are centralised on the master process (whichis the default behaviour, altered only for cases withoutevents by activating logical switch 110) then either val-ues 1 or 2 must be chosen. Value 3 can only be usedwhen the mesh motion operation is performed by allprocesses, in parallel (i.e. logical switch 110 has beenactivated for a moving mesh case without events). Forthe majority of cases, the vertices will be correctly dis-tributed across processes, which means that one doesnot need to specify any option explicitly.

vcom(/novc) : Compress(/do not compress) vertex num-bers on each geometry file; if compressed, the verticeson each geometry file will be numbered from 1 to thelocal maximum number; if not compressed, the verticeswill retain their original numbering from the un-decom-posed mesh. This option is coupled to the previous one,whereby the vertex numbering may be important for themesh motion operation (e.g. the vertex movement maybe specified relative to a fixed vertex). The default is thatif any process geometry file contains all vertices, thenno vertex set is compressed. Again, for the majority ofcases, the default behaviour will lead to correct vertexnumbering.

Page 550: Star Uguide

STAR RUN OPTIONS Appendix H

Parallel Options

H-6 Version 3.24

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

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

mfiles,n : reads n files for partition (files called<casename>.proc, <casename>.proc.1,<casename>.proc.2, etc.); for large models whichcannot be decomposed by METIS, this allows METIS tobe run on pieces of the model, generate the .proc filesfor each piece, and then use them on the large modelwith a ‘manual’ partitioning. These files should containtwo columns of integers: the first column withpro-STAR cell numbers and the second with the corre-sponding process number to which that cell will beassigned.

nolem : only use this option if the default fails wheneverusing QUICK or LUD schemes, in particular if you aretrying to use these schemes in mostly tetrahedralmeshes.

mhal : only use this option if the default fails; if used,this option allows a bigger addressing space to be usedby the star executable; it is rarely necessary.

Example:-decompflags=”vopt,1 outproc mhal”

-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:…).

Page 551: Star Uguide

Appendix H STAR RUN OPTIONS

Resource Allocation

Version 3.24 H-7

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 nodes

-mpi=auto Automatic selection of the MPI implementation usingthe vendor order shown below. This is the defaultbehaviour which can be changed by supplying one ofthe flags below:

-mpi=os Selects Operating System Vendor’s MPI-mpi=gm Selects MPICH-GM (Myricom GM MPI)-mpi=scampi Selects ScaMPI (Scali MPI)-mpi=score Select SCore MPI-mpi=sgi Selects SGI Itanium MPI-mpi=lam Selects LAM MPI-mpi=mpich Selects 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.

-swap121 Enables faster one-to-one algorithm for domain dataswaps by the message passing protocol on somehardware platforms. However, this option may reducethe run-time robustness of STAR-CD, so it should beused with caution.

Page 552: Star Uguide

STAR RUN OPTIONS Appendix H

Default Options

H-8 Version 3.24

list.

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 ordinaryusers need to do less work. Other examples are to make everybody run in double

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

-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 553: Star Uguide

Appendix H STAR RUN OPTIONS

Batch Runs Using STAR-NET

Version 3.24 H-9

precision, to always use the -distribute option, etc.

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>

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

Page 554: Star Uguide

STAR RUN OPTIONS Appendix H

Batch Runs Using STAR-NET

H-10 Version 3.24

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

Page 555: Star Uguide

Appendix H STAR RUN OPTIONS

Batch Runs Using STAR-NET

Version 3.24 H-11

• 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, tosubmit 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.

Page 556: Star Uguide

STAR RUN OPTIONS Appendix H

Batch Runs Using STAR-NET

H-12 Version 3.24

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:

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

Page 557: Star Uguide

Appendix H STAR RUN OPTIONS

Batch Runs Using STAR-NET

Version 3.24 H-13

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 558: Star Uguide
Page 559: Star Uguide

Appendix I BIBLIOGRAPHY

Version 3.24 I-1

Appendix I 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 560: Star Uguide
Page 561: Star Uguide

INDEXCommands are listed at the end of each section

Version 3.24 1

Aabsorptivity 18-11

solar 11-2accuracy

numerical 1-5, 4-7temporal 1-16view factor 11-5

adaptive mesh refinement. See mesh, adaptive refinementaeroacoustics 17-3angular velocity 16-1, 16-8, 18-15animation 2-33, 9-32 to 9-49area

cell face 4-11, 16-24surface 4-26

aspect ratiocell 1-6 to 1-7check 4-29patch 11-5

atomisation models 13-1axis

coordinate 3-8 to 3-11of rotation 3-39, 16-1, 16-4plot 5-5

axisymmetric flow 1-14ABBREVIATE 20-1ABSURFACE 16-24ACOEFF 9-26ACROSS 4-26ANGLE 5-6ANORM 8-2AOPTION 9-38 to 9-39AREA 4-26AXISUP 5-3AZONE 4-26

Bbackground fluid 17-3baffle

cells 3-38, 3-47 to 3-49, 4-23, 8-19conducting 6-18, 11-4porous 7-24, 10-5shapes 3-43transparent 7-26

boundarycondition

attachment 7-38baffle 7-23 to 7-27check 1-21cyclic 1-3, 1-14, 7-27 to 7-32degassing 7-39free-stream 1-14, 7-27, 7-32 to 7-33, 18-6inlet 7-10 to 7-11, 18-5non-reflective 1-14, 7-17, 18-6outlet 1-13, 7-12 to 7-13, 18-6

prescribed flow 1-13pressure 1-14, 7-13 to 7-15, 18-6radial equilibrium 7-13, 7-15radiation 7-39Riemann 1-14, 7-36, 18-6stagnation 1-14, 7-15, 16-1, 16-4, 16-9, 18-6subroutines 18-5symmetry plane 7-27table input 2-25 to 2-32transient wave transmissive 1-14, 7-34 to 7-36,

18-6wall 7-19 to 7-23, 18-6, 18-13

no-slip 6-12, 7-20temperature 11-4

layer 6-14turbulent 1-7, 1-9

location 7-1 to 7-2value

display 9-7in load steps 8-6 to 8-8

visualisation 7-41partial boundaries 4-20

buoyancy driven flow 1-15 to 1-17, 6-20, 7-14, 8-4byte ordering 20-1BATCH 2-18BCROSS 7-3, 11-5BDEFINE 7-2, 11-2BDELETE 7-5BDISPLAY 7-41, 11-2BDX 7-2, 11-2BGENERATE 7-2BLIST 7-5BLK 3-57BLKCELL 3-57BLKDELETE 3-58, 3-59BLKEXECUTE 3-59BLKFACTORS 3-59BLKGENERATE 3-57BLKLIST 3-59BLKMODIFY 3-59BLKPLOT 3-58, 5-16BLKSET 2-25, 3-57, 3-59BLKTRACE 3-64BLKWALL 3-59BMODIFY 7-3, 7-5, 11-5BSET 2-25, 7-4, 7-5BSHELL 7-3, 11-2BWRITE 11-5

Ccavitation 15-5 to 15-7cell

attachment 16-19, 16-26connectivity

check 4-29

INDEX

Page 562: Star Uguide

Index

2 Version 3.24

integral 4-5regular 4-4

couplescreation 4-11 to 4-13indexing 4-11manipulation 4-15 to 4-22table 4-9

data 21-3definition 3-1, 3-37detachment 16-26, 16-32distribution 3-56face

area 4-26boundary 7-1, 7-2master 4-5matching 4-11, 7-29, 16-22plotting 5-5slave 4-5

index 6-3, 10-1layer 10-5

addition 16-14removal 8-19, 16-14

master 4-5near-wall 6-12, 6-13, 6-14orientation 3-45 to 3-46plot 5-16post data 9-7set 2-21 to 2-25, 3-46 to 3-47, 5-2shape 1-8, 3-40 to 3-43size 1-7, 4-22slave 4-5surface 6-4table 6-1 to 6-3, 10-1trimmed 3-41, 3-44, 3-47, 3-51, 4-23, 4-30

near boundaries 6-10, 7-11, 7-14, 7-16, 7-22,7-33, 7-35, 7-37, 7-39

type 3-37type. See cell shapevolume 4-27, 6-22

characteristicdiffusivity 1-16length 1-12, 19-2time 1-16velocity 1-16, 8-9

chemical reactioncomplex chemistry 12-6conventions 12-11local source 12-2, 12-10PPDF multi-fuel 12-4, 12-12PPDF single-fuel 12-3, 12-12PPDF with dilutants 12-4rate 18-14regress variable 12-5, 12-10source term 18-11species 12-2, 12-5, 12-9

coal combustion 12-17 to 12-19combustion

EGR systems 12-11partially premixed 12-1

compressibility 6-9compressible flow

Courant number 8-9model setup 6-9 to 6-11outlets 1-13 to 1-14transient 7-34

concentrationboundary values

baffle 7-26wall 7-21

conductivity 1-11, 12-11, 17-3, 18-6, 18-8, 21-20conjugate heat transfer 1-3, 3-38, 6-16 to 6-19, 19-2convergence 6-14, 19-1, 21-19 to 21-21coordinate

framevelocity 16-2, 16-4, 16-9

coordinate systemCartesian 3-8, 5-8cell 3-46cylindrical 3-9, 5-6in attachment boundaries 7-38, 16-19, 16-27in porous media 10-2 to 10-3local 3-10 to 3-13, 5-8, 21-5rotation 3-11spherical 3-10toroidal 3-10

Courant number 8-9, 15-4CPU time 19-3customisation of PROSTAR 2-18, 20-1cyclic boundary pair. See boundary, condition, cyclicC 3-44CASENAME 21-1CAVERAGE 9-5, 9-24, 16-33CAVITATION 18-11CAVNUCLEI 18-11CAVPROPERTY 18-12CBEXTRUDE 3-7, 6-18, 6-19CCOMPRESS 3-48CCROSS 3-48, 6-4CDELETE 3-48, 3-52, 16-34CDIRECTION 3-19, 4-24CDISPLAY 5-3, 7-41, 11-2, 13-5CDIVIDE 4-24CDSAVE 21-3CDSCALAR 17-3CDTRANS 8-11, 21-4CDX 3-44, 7-2CENTER 3-21, 5-5CFIND 3-48, 6-4CFIX 4-29CFLIP 4-28CGENERATE 3-44, 16-20CGGCELL 9-8CGGVERTEX 9-8CHANGE 9-24, 9-25

Page 563: Star Uguide

Index

Version 3.24 3

CHECK 4-28CJOIN 4-24, 8-21CLEAR 5-3CLIST 3-52CLOCAL 3-11CLOSE 21-11CLRFILL 5-9CLRLIST 5-9CLRMODE 2-33CLRPENS 5-9CLRTABLE 5-9, 9-43CMODIFY 3-45, 6-5CMREFINE 4-25, 4-26CMROPTION 4-26CMUNREFINE 4-26COKE 18-17CONDUCTIVITY 18-6CONJUGATEHEAT 6-19COUNT 3-19, 3-29, 3-45, 3-57, 4-22, 7-3CP 4-12CPCELL 4-20CPCHECK 4-19CPCOMPRESS 4-9CPCREATE 4-12CPDELETE 4-9, 4-17CPDISPLAY 4-9CPFACE 4-22CPFLAG 4-23CPFREEZE 4-21CPGENERATE 4-22CPLIST 4-17CPLOT 3-48, 5-16, 9-10, 9-38CPMERGE 4-9CPMODIFY 4-9, 4-17, 4-22CPOST 8-11CPRANGE 4-22, 8-11CPREAD 4-15CPRINT 8-11CPSET 2-25, 4-15 to 4-17CPTABLE 4-10CPTDELETE 4-10CPTLIST 4-10CPTMODIFY 4-10CPTNAME 4-10CPTOLERANCE 4-13CPTYPE 4-9, 4-12CPWRITE 4-16CREAD 3-50CREFINE 4-23 to 4-24CREORDER 3-53CRMODEL 18-14CRSE 4-24CSCALE 5-10, 9-46CSDEL 3-11CSDIR 3-15CSET 2-25, 3-47, 3-52, 4-17, 4-22, 5-16, 9-26, 9-28,

16-34

CSHELL 4-13CSLIST 3-11CSPLINE 3-45CSYS 3-11CTABLE 6-2, 16-15, 16-28CTCOMPRESS 3-48, 6-2, 6-4CTDELETE 6-2CTLIST 6-2CTMODIFY 6-2CTNAME 6-2CTRIM 3-44CTYPE 6-4CUNDELETE 3-52CURSORMODE 2-19CVERTEX 4-28CVREFLECT 3-45CWRITE 3-51CYCLIC 7-29CYCOMPRESS 7-31CYDELETE 7-31CYGENERATE 7-29CYLIST 7-31CZONE 3-48, 6-4

Ddata

export 4-2import 4-1

densityPPDF scheme 12-4reference 7-14under-relaxation 1-17, 21-20user subroutine 18-8

dependent variableinitialisation 1-11, 7-41monitoring 1-19printout 19-3

differencing scheme 8-4diffusion

reaction system 12-1diffusivity

mass 18-8molecular 18-8porous 10-4

discretisationerror 1-7, 1-22higher-order 18-18time 8-11volume 1-3

dissipationlength scale 18-9

distancenormal 6-13, 6-14normal dimensionless 1-9vector 4-27

distributed resistance 10-1, 18-8, 19-2

Page 564: Star Uguide

Index

4 Version 3.24

drag coefficient 18-18droplet

collision models 13-1, 18-12plots 9-29user subroutines 18-12 to 18-13volume 13-10

DAGE 13-7, 13-8DCOLLISION 18-12DELTIME 18-17DENSITY 18-8DGENERATE 9-27, 16-26DIFFUSIVITY 18-8DISTANCE 5-5DLIST 13-8DPLOT 9-45DRAVERAGE 18-12DRCMPONENT 18-13DRHEAT 18-12DRMASS 18-13DRMOMENTUM 18-13DRPROPERTIES 18-13DRPROPERTY 18-16DRUSER 18-13DRWALL 18-13DSCHEME 18-18DSET 2-25, 13-6, 13-8DTIME 13-5, 13-7

Eelapsed time 2-7, 19-3emissivity 11-1, 11-6

escape boundaries 7-39wall 7-20, 7-25

energyequation 6-19source 1-10 to 1-11

engine data 13-9enthalpy

balance 19-5, 19-6source 18-10stagnation 6-11temperature dependence 12-4, 18-7transport 19-5

errorestimation 8-15 to 8-17numerical discretisation 1-7, 1-22splitting 1-15

Eulerian multi-phase flowmodel setup 14-1subroutine coding practices 18-22user subroutines 18-13

Event stepsarbitrary sliding 16-22cell attachment 16-26cell inclusion/exclusion 16-32cell removal/addition 16-14

mixing vessels 16-24moving mesh 16-9regular sliding 16-19

expansion wave 7-32EACOMPRESS 16-20EADELETE 16-20EAGENERATE 16-20EALIST 16-20EAMATCH 16-21, 16-32, 16-33EASI 16-23EATTACH 16-21, 16-32ECHOINPUT 2-19EDATA 8-3EDCOMPRESS 16-30EDDELETE 16-30EDETACH 16-21, 16-32EDGE 5-3EDRAG 18-13EECELL 16-32 to 16-33EGRID 16-25, 16-26, 16-33 to 16-35EHTRANSFER 18-14EICELL 16-33, 16-32EICOND 16-32, 18-16EMSLIDE 16-22ENSIGHT 4-1EOSLIDE 16-23EPSLIDE 16-23ESSLIDE 16-23ETURB 18-14EVCHECK 16-34EVCOMPRESS 16-12, 16-17, 16-20EVDELETE 16-12, 16-17, 16-20, 16-31EVEXECUTE 16-34 to 16-35EVFILE 16-29, 21-4EVFLAG 16-34EVGET 16-12, 16-17, 16-20, 16-31EVLIST 16-12, 16-17, 16-20, 16-31EVLOAD 16-34 to 16-35EVOFFSET 16-12, 16-17, 16-20, 16-31EVPARM 16-10EVPREP 16-12, 16-17, 16-21, 16-31EVREAD 16-12, 16-17, 16-21, 16-31EVSAVE 16-23EVSLIDE 16-22, 18-15EVUNDELETE 16-12, 16-17, 16-20, 16-31EVWRITE 16-12, 16-17, 16-21, 16-31

Fflow

axisymmetric 1-14buoyancy driven 1-15, 6-20, 7-14, 8-4compressible 1-17, 6-9 to 6-11, 7-15, 8-1free surface 15-1 to 15-4incompressible 7-15inviscid 6-10, 7-20non-Newtonian 6-11

Page 565: Star Uguide

Index

Version 3.24 5

prescribed 1-13steady 1-12, 1-20, 6-9, 8-1 to 8-3subsonic 6-9, 6-10supersonic 1-13, 6-9transient 1-10, 8-4 to 8-15

compressible 1-14, 6-9, 7-34transonic 1-13, 6-10turbulent 1-17, 6-12

fluidbackground 17-3injection 6-21 to 6-22, 18-10mixture 17-1non-Newtonian 6-11properties 19-2stream 12-2, 19-2

multiple 6-5, 7-12flux

heat 8-13, 18-6mass 6-22, 8-13, 9-26, 18-6radiation 19-5

solar 11-2force

body 1-11, 6-20, 6-21centrifugal 1-10shear 8-13total 9-26

free surface flow. See flow, free surfacefree-stream boundary 1-14, 7-8, 7-32 to 7-33FLIST 3-45FLUXSUM 9-5FSTAT 2-24, 5-18, 21-11FWRITE 3-45

Ggas

ideal 6-9law. See ideal gas law

global rate of change. See rate of change, globalgradient

pressure 10-5graphs

creation 9-31customization 9-31data loading 9-30

gravity 1-10GAMBIT 4-1GENERIC 4-2GEOMWRITE 16-12, 16-17, 16-21, 16-31, 21-5GETBOUNDARY 9-21GETCELL 9-21GETUSERDATA 9-7 to 9-8, 9-22GETVERT 9-21GETWALL 9-22GMAP 9-31GPAN 9-32GPARAM 9-31

GPICK 9-31GPUT 9-31GRAY 9-38GZOOM 9-32

Hheat

conductivity 12-11, 17-3, 21-20flux

boundary condition 11-4generation 19-5transfer

check 19-5coefficient 1-21, 6-17conjugate. See conjugate heat transferwall function 18-16

HCOEF 18-16HEADING 9-16HISTORY 2-19 to 2-21HRSDUMP 2-34

Iideal gas law 6-20, 12-4ignition 12-10, 16-18, 18-14initial conditions 1-11 to 1-12, 1-21, 19-4, 21-5initialisation procedure

built-in 8-1in Lagrangian flow

user coding 18-13in moving meshes 18-16steady-state run 7-41transient run 7-42

injectionfluid 6-22, 18-10

inlet boundary 6-9, 6-10, 7-8, 7-10 to 7-11interface

cell 4-3, 16-19solid/fluid 6-18, 7-1, 11-4

iterativecalculation 1-20steady-state solution procedure 1-10

IFILE 17-3, 21-2, 21-10, 21-12IGNMODEL 18-14INITIALIZE 16-32, 18-16INTEGRATE 9-26

Kk-ε model

low Reynolds number 1-9, 6-12k-l model 1-9, 18-9KNOCK 18-14

Page 566: Star Uguide

Index

6 Version 3.24

LLagrangian multi-phase flow

model setup 13-1static displays

steady-state 13-5transient 13-8

trajectory displays 13-8user subroutines 18-12with liquid films 17-6

liquid filmsgravitational effect 6-20model setup

no initialization 17-5with initialization 17-5 to 17-7

stripping 17-7user subroutines 18-16

load steps 8-6 to 8-9local source scheme 12-1LAYER 5-13LFPROPERTY 18-16LFSTRIP 18-16LIGHT 5-11LIVE 3-6, 4-21, 9-27LMATERIAL 5-12LOCAL 3-11LSCOMPRESS 8-11LSDELETE 8-11LSGET 8-11LSLIST 8-11LSRANGE 8-11LSSAVE 8-11LSTEP 8-11, 18-17LSWITCH 5-3, 5-11LVISCOSITY 18-9

MMach number 1-16, 6-9 to 6-10mapping

solution 8-17mass

conservation 12-3, 12-5diffusivity 18-8flow rate 7-30, 18-10flux. See flux, massin excluded cells 16-32source 19-5transfer

coefficient 1-21, 18-16droplet 18-13

memory allocationdynamic 21-13

meshadaptive refinement 8-19 to 8-21block 2-22, 3-53, 3-54, 4-3checking

macroscopic 4-26

microscopic 4-27 to 4-29continuity 3-60distortion 1-6 to 1-7embedded 4-7 to 4-8generation 3-3 to 3-8, 3-54, 3-60layered boundary-fitting 6-10, 7-11, 7-16, 7-22, 7-33,

7-35, 7-37, 7-39moving 7-20, 10-5, 11-2, 11-5, 16-9 to 16-14, 18-16

display 5-16quality 4-29 to 4-31refinement 3-53, 4-23 to 4-25, 8-17 to 8-19sliding 16-19 to 16-26, 18-15structured 4-24tetrahedral 3-46, 4-25unstructured 1-4, 1-7visualisation

colour setting 4-10, 5-9, 6-1lighting effect 5-10, 6-1

mixing length model 6-14mixing vessels 16-24 to 16-26mixture

fluid 17-1fraction 12-2, 12-5, 12-10

momentum 6-10, 13-10, 18-13equation 6-20source 18-10

monitoringengineering data 7-40, 8-2 to 8-3, 8-14field variables 2-7, 8-14, 8-20, 14-2, 15-2, 15-6, 16-6,

16-18, 16-29, 18-18, 19-2 to 19-4, 21-19numerical solution 8-2, 8-5, 8-10, 21-9, 21-20 to

21-22MACRO 20-9MEMORY 21-14MESH 3-5MFRAME 18-15MIXASI 16-24, 16-25MIXVESSEL 16-24 to 16-26MLIST 6-9MONITOR 16-18, 16-29MORTHO 4-22, 4-30MULTISECTION 5-3MVGRID 8-11, 16-9, 18-15, 18-16

Nnear-wall

cell 6-13, 6-14layer (NWL) 1-9, 6-12, 6-14

NOx formation 12-16NOx modelling 12-16nozzle models 13-1numerical

discretisation error 1-7, 1-22, 8-15 to 8-17instability 1-11 to 1-12, 1-16, 7-14

NFILE 9-36, 21-4NOX 18-14

Page 567: Star Uguide

Index

Version 3.24 7

NPLOT 9-36NUMBER 5-3

Ooutflow

boundary 1-13, 19-5 to 19-6condition 7-10, 7-13supersonic 6-10

outlet boundary 1-13, 6-9, 7-8, 7-12 to 7-13OFILE 21-10OPANEL 20-1, 20-6OPERATE 9-21 to 9-22, 9-25OVERLAY 5-3, 5-12, 9-34

Pparticle

radiation. See radiation, coal paticlestracking 9-28 to 9-29

patchradiation 11-2, 11-5, 19-5surface 3-2, 3-27, 11-5

permeabilityfunction 1-11

PISO algorithm 1-15 to 1-17, 8-4, 8-9, 21-19, 21-20plotting

hard copy 21-22mesh 5-3 to 5-16mouse-controlled 5-15results 9-9 to 9-13speedup 5-16 to 5-17view attributes 5-18 to 5-19

porousbaffle 10-5medium 3-38, 7-24, 16-13, 17-1region 10-5region modelling 7-23, 10-1 to 10-4

PPDF (presumed-pdf) scheme 12-1, 12-3 to 12-13Prandtl number 12-11, 18-8, 18-17pressure 1-11, 1-17, 6-9, 6-10, 7-6, 7-8, 9-28

boundary 7-8, 7-12, 7-13 to 7-15, 7-16, 16-2, 16-4,16-9

correction 1-15 to 1-16, 1-18drop 7-24, 7-30, 10-5field 9-23gradient 10-5piezometric 7-13prescribed 1-14static 7-13

pseudo-transient calculation 1-12, 8-1PAGE 2-19PAN 5-3PATCH 3-6, 11-5PCROSS 9-5PLARROW 5-8, 9-16PLATTACH 16-34 to 16-35

PLAYBACK 9-36PLDISPLAY 5-3, 5-7PLFACE 5-3PLFIX 5-6PLIST 9-5PLLABEL 5-8, 9-16, 9-40PLLOCALCOOR 3-11, 5-8PLMESH 5-3, 5-5PLRECALL 5-19PLSAVE 5-19PLTBACK 2-34PLTYPE 5-3, 9-10PMAP 9-27 to 9-28POPTION 9-10POREFF 18-8POROSITY 18-8PORTURBULENCE 18-8PRESSURE 16-18, 16-29PRFIELD 18-18PRINT 9-25PROBLEMWRITE 16-12, 16-17, 16-21, 16-31, 21-6PROMPT 20-7PRTEMP 6-17PSCREATE 5-7, 9-10, 9-27, 9-44PSDELETE 5-7, 9-10, 9-44PSTAR 21-6PTCONV 21-9PTOPTION 9-30PTPRINT 9-29, 13-7, 13-8PTREAD 9-29, 9-41, 9-45, 13-7PTVERTS 9-29

QQUIT 2-21QDRAW 5-17

Rradiation 19-2, 21-20

analysis methodsdiscrete beams 11-1discrete ordinates 11-5

coal particles 11-4, 11-7, 12-18, C-3flux 19-5gaseous 11-1, 11-6patch 11-2, 11-4, 11-5property 7-20, 7-25, 18-11solar 7-21, 7-26, 11-1, 19-5sub-domains 11-2thermal 7-21, 7-25, 7-26, 11-1, 18-10, 19-5transparent

baffles 7-26solids 3-39, 11-3 to 11-5walls 7-21

rateof strain tensor 6-11

Page 568: Star Uguide

Index

8 Version 3.24

rate of changeglobal 1-20, 8-5, 8-10, 19-3, 21-20

referencedensity 6-21temperature 8-19, 16-26, 19-2

reflectivity 7-20, 7-21, 11-1, 11-6regress variable models 12-5regress variable scheme 12-1residual sum

normalised 2-6, 21-20resistance

distributed 10-1, 18-8, 19-2wall 11-4

restartaeroacoustic analysis 17-4coal combustion 12-18data 8-3, 8-5, 8-13files 2-7, 21-6flamelet calculations 12-14in error estimates 8-15in mesh changes 8-17, 8-20mode 2-13moving mesh 16-14multiple runs 8-15NR boundaries 7-19run options H-2steady-state runs 7-42, 8-3transient runs 7-42, 8-6, 8-10, 8-14turbulence models 6-15view factors 11-2with INITFI 18-16

rotating reference framesmultiple

explicit method 16-5 to 16-9implicit method 16-2 to 16-5

single 16-1RADPROPERTIES 18-11RANGE 4-27RCALCULATE 9-31RDEFINE 16-19, 16-27, 18-5, 18-6RECALL 2-21RECOVER 2-21, 4-15RECRD 9-36REEXTRUDE 3-7RENDEROPT 5-15REPLOT 5-16, 9-38, 20-3REPROJECT 3-18RESET 2-33RESTRUCTURE 3-19, 3-53RESUME 21-3, 21-10REWIND 21-11RGENERATE 7-8ROTATE 5-6, 9-43RRATE 18-14RSOURCE 18-10RSTATUS 12-11

Sscalar

plotting 9-7, 9-10 to 9-11printing 8-13, 17-2transport equation 12-2, 12-5variable 12-4, 12-10, 17-3

Schmidt number 10-4, 12-11, 17-1, 18-8, 18-17sensor point 3-16, 9-26shear force. See force, shearshell 3-2, 3-5, 3-38, 3-47 to 3-48, 9-27

in block meshing 3-60 to 3-64shock wave 7-32SIMPISO algorithm 1-18SIMPLE algorithm 1-17 to 1-18sliding

interface 16-22mesh 16-19

solar radiation. See radiation, solarsolid

region 19-2solution domain 1-2 to 1-4, 1-9solver

conjugate gradient 1-19soot modelling 12-17source

enthalpy 6-9, 18-10heat 19-5mass 6-8, 18-10, 19-5momentum 6-8, 18-10scalar 17-2, 18-11turbulence 6-9, 18-10

species mass fraction 12-4, 18-15specific heat 12-11, 12-13, 18-9, 19-2spin

index 3-47, 6-1, 16-3, 16-26parameters 16-1, 16-4 to 16-8

spline 3-2, 3-27 to 3-37display 5-16in block meshing 3-64set 2-22, 3-20, 5-2

stabilitynumerical 1-5, 1-12

stagnation boundary 1-14, 7-8, 7-15 to 7-16STAR-Launch utility 2-8 to 2-12StarWatch utility 21-15 to 21-22strain rate tensor 6-11surface

cell 3-50, 6-4data 3-60, 4-1free 7-8, 9-11plot data 5-17radiation properties 7-20, 7-25

symmetryaxis 3-16, 9-27plane 1-14, 7-27, 9-27

SAFETY 2-21, 3-22

Page 569: Star Uguide

Index

Version 3.24 9

SAVE 5-16, 21-2SAVUSERDATA 9-9SC 17-3SCCONTROL 17-3SCDUMP 2-34, 9-34SCENEE 21-24SCLOCATE 5-8SCPOROUS 18-8SCPROPERTIES 17-3, 18-15, 18-17SCRDELETE 2-33, 9-47SCRIN 2-33, 9-36 to 9-37, 9-47SCROUT 2-33, 9-36, 9-47SCSOURCE 18-11SCTRANS 8-11, 17-2SECSCALE 5-7SENSOR 9-26SETADD 2-24SETDELETE 2-23SETENV 20-6SETFEATURE 20-1SETREAD 2-24SETWRITE 2-23SHREFINE 4-26SHRINK 5-3SIZE 2-19SMAP 8-17 to 8-18SMCONV 21-9SNORM 9-44SNORMAL 5-4, 5-6SOLAR 18-11SORT 4-28SPCHECK 3-31, 3-35SPCOMPRESS 3-31SPECIFICHEAT 18-7, 18-9SPIN 18-15SPL 3-28, 3-64SPLCROSS 3-31SPLDELETE 3-31, 3-34SPLGENERATE 3-29SPLLIST 3-34SPLMODIFY 3-31, 3-34SPLOT 3-31, 5-16SPLREAD 3-33SPLSET 2-25, 3-30 to 3-34SPLUNDELETE 3-34SPLWRITE 3-33SPOINT 5-6, 5-7, 9-44SPRINT 9-26SPVCOMPRESS 3-35SRFDELETE 5-17SRFREAD 5-18SRFWRITE 5-17STABLE 3-28STDELETE 3-28STENSION 18-12STLIST 3-28STYPE 3-28

SUBTITLE 9-16SUMMARIZE 9-26SURFACE 5-3SYSTEM 2-19

Ttables

editor 2-27 to 2-32usage in

boundary conditions 2-25, 7-8initial conditions 2-25injectors and sprays 2-27rotational speeds 2-26run-time controls 2-26source terms 2-25

temperatureboundary 7-35, 7-37bulk mean 7-30display 9-11distribution 6-17functional dependence 18-7, 18-9radiation 11-1, 11-6reference 8-19, 19-2stagnation 6-11under-relaxation 12-10, 21-20wall 11-4

thermalresistance 6-17, 7-21, 11-4runaway 1-11

timescale 8-9

heat/mass transfer 12-18step 1-12, 1-16, 8-6, 19-1

specification 8-12varying 18-17, 21-19

toolblock 3-57cell 3-47check 4-28colour table 5-9couple 4-8mesh 3-60 to 3-64spline 3-28, 3-30vertex 3-20

transient calculation 1-15 to 1-16, 2-7, 6-11full 8-6 to 8-14single 8-4 to 8-6

transient wave boundary 1-14, 7-8, 7-34 to 7-36transmissivity 7-20, 7-21, 11-1, 11-4turbulence

boundary conditions 16-2, 16-4, 16-9dissipation 19-5length scale 18-9models 1-9, 6-8, 6-12, 19-2

two-dimensional flowaxisymmetric 1-14

Page 570: Star Uguide

Index

10 Version 3.24

two-layer model 6-12 to 6-14, 18-9two-phase flow

Lagrangian 13-1TBDEFINE 2-29TBGRAPH 2-29TBLIST 2-31TBMODIFY 2-31TBREAD 2-27, 2-31TBSCAN 2-32TBWRITE 2-29TDSCHEME 8-11TERMINAL 2-32, 9-16, 9-35, 9-36, 21-4TETALIGN 3-46TETREFINE 4-25TEXT 2-19TGRID 4-1TICMARK 5-8TIME 18-17TITLE 2-20TLMODEL 18-9TMSTAMP 9-39TPLOT 5-16TPRINT 2-19TRFILE 8-11, 8-14, 21-4TRINTERPOLATE 9-5, 9-46TRUNCATE 9-5TSCALE 2-33, 5-5, 5-8TSMAP 8-18TSTAR 21-7TURBULENCE 18-9

Uunder-relaxation 1-12, 1-17, 2-8, 6-20, 6-21, 11-4

concentration 17-2mesh smoothing 4-31varying 21-20

unsteady calculation 1-15ULOAD 9-7UNITS 9-24UNSKEW 4-30UNWARP 4-30 to 4-31UPDATE 9-25USER 2-19USUBROUTINE 18-3

Vvariable

field 8-14, 18-5velocity

angular 18-15boundary values 7-27characteristic 1-16, 8-9component 10-5initial 1-12, 7-16injection 6-22, 18-10

interpolation 9-26magnitude 9-23, 10-5solver residual 21-20vector display 9-12, 9-23

vertexcell 18-15coordinate 3-1, 3-26, 20-5

in moving mesh 8-15, 16-9, 16-23data 21-3, 21-9set 2-22

view factor 11-2, 11-5viscosity

effective 1-17molecular 18-9turbulent 18-9, 21-20

volumedroplet 13-10mesh 4-27

V 3-14, 3-24VADJANGLE 4-30VAPORIZATION 18-12VAVERAGE 9-5VC3DGEN 3-13VCELL 3-16VCENTER 3-16VCEXTRUDE 3-6VCOMPRESS 3-21, 3-26VCROSS 3-21VDELETE 3-21, 3-24VDISTANCE 4-27VELLIPTIC 4-30VEQUAL 3-17VESCALE 9-46VFILL 3-15, 3-26VGAP 3-19VGENERATE 3-14, 3-26, 3-44VIEW 5-6VINTERSECT 3-16, 3-29, 3-45VLIST 3-21, 3-24VLOCAL 3-11VMAP 3-21VMERGE 3-25, 3-60VMODIFY 3-24VMOVE 3-17VOLUME 4-27, 6-22VPLOT 3-21, 5-16, 9-10VPROJECT 3-18VREAD 3-23VREFLECT 3-16, 3-44, 3-45VRENUMBER 3-19VREPLACE 3-19VRML 4-2VSCALE 3-18, 3-27VSECTION 3-16, 3-29, 3-45, 5-7, 9-10VSET 2-25, 3-20, 3-24VSMOOTH 4-30VSPCROSS 3-31, 3-36

Page 571: Star Uguide

Index

Version 3.24 11

VSPDEFINE 3-36VSPFILL 3-36VSPGENERATE 3-36VSPLIST 3-37VSPMOVE 3-36VSPPROJECT 3-37VSTYLE 5-3VTRANS 3-18VUNDO 3-21VVERTEX 3-16VWRITE 3-23

Wwall

boundary 7-8, 7-19 to 7-23boundary layer 1-7functions 1-9, 6-12, 18-6heat flux 8-5, 8-13, 18-16patch 11-2permeable 3-38resistance 11-4temperature 11-4transparent 7-21

waveshock 7-32theory 7-33, 7-34

WHOLE 2-33WINDOW 5-3WIPEOUT 21-14WPLOT 5-16, 9-10, 9-38WPOST 8-11WPRINT 8-11

ZZOOM 5-3, 5-16

Page 572: Star Uguide

Index

12 Version 3.24