Sunteți pe pagina 1din 478

CCM TUTORIALS

STAR-CD VERSION 4.02

CONFIDENTIAL FOR AUTHORISED USERS ONLY

2006 CD-adapco

TABLE OF CONTENTS
INTRODUCTION
Tutorial Structure ..........................................................................................................1
Basic Definitions ..........................................................................................................1
Running a Tutorial ........................................................................................................2
Working with commands ................................................................................ 1-2
Using tutorial command files .......................................................................... 1-3
Tutorial 1 - FLOW IN A MIXING PIPE
Physical Problem Description ......................................................................... 1-1
Tutorial 1.1 PRE-PROCESSING AND CFD SOLUTION ...................................... 1-3
Pre-Processing ................................................................................................. 1-3
CFD Analysis ................................................................................................ 1-15
Tutorial 1.1 POST-PROCESSING ......................................................................... 1-17
Post-Processing ............................................................................................. 1-17
Tutorial 2 - EVALUATION OF MESH EFFECTS
Physical Problem Description ......................................................................... 2-1
Tutorial 2.1 HEXAHEDRAL MESH ANALYSIS .................................................. 2-3
Pre-Processing ................................................................................................. 2-3
CFD Analysis .................................................................................................. 2-7
Post-Processing ............................................................................................... 2-7
Tutorial 2.2 TETRAHEDRAL MESH ANALYSIS .............................................. 2-19
Pre-Processing ............................................................................................... 2-19
CFD Analysis ................................................................................................ 2-22
Post-Processing ............................................................................................. 2-23
Tutorial 2.3 POLYHEDRAL MESH ANALYSIS ................................................. 2-33
Pre-Processing ............................................................................................... 2-33
CFD Analysis ................................................................................................ 2-36
Post-Processing ............................................................................................. 2-36
Tutorial 3 - POROUS MEDIA FLOW
Tutorial 3.1 FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM .............. 3-2
Physical Problem Description ......................................................................... 3-2
Modelling Strategy .......................................................................................... 3-2
Pre-Processing ................................................................................................. 3-2
CFD Analysis .................................................................................................. 3-7
Post-Processing ............................................................................................... 3-7
Version 4.02

Tutorial 3.2 FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM .... 3-17


Physical Problem Description ....................................................................... 3-17
Modelling Strategy ........................................................................................ 3-17
Pre-Processing ............................................................................................... 3-17
CFD Analysis ................................................................................................ 3-19
Post-Processing ............................................................................................. 3-19
Tutorial 3.3 FLOW IN A MEDIUM WITH ISOTROPIC FLOW RESISTANCE 3-27
Physical Problem Description ....................................................................... 3-27
Modelling Strategy ........................................................................................ 3-27
Pre-Processing ............................................................................................... 3-27
User Subroutine ............................................................................................. 3-29
CFD Analysis ................................................................................................ 3-31
Post-Processing ............................................................................................. 3-31
Tutorial 4 - FREE-SURFACE AND CAVITATION
Tutorial 4.1 GRAVITY-DRIVEN FLOW WITH A FREE SURFACE ................... 4-2
Physical Problem Description ......................................................................... 4-2
Modelling Strategy .......................................................................................... 4-2
Pre-Processing ................................................................................................. 4-2
CFD Analysis .................................................................................................. 4-7
Post-Processing ............................................................................................... 4-7
Tutorial 4.2 FORCED FREE-SURFACE FLOW WITH CAPILLARY EFFECTS 4-11
Physical Problem Description ....................................................................... 4-11
Pre-Processing ............................................................................................... 4-11
CFD Analysis ................................................................................................ 4-15
Post-Processing ............................................................................................. 4-15
Tutorial 4.3 FORCED FREE-SURFACE FLOW WITH CAVITATION ............. 4-19
Physical Problem Description ....................................................................... 4-19
Pre-Processing ............................................................................................... 4-19
CFD Analysis ................................................................................................ 4-24
Post-Processing ............................................................................................. 4-24
Tutorial 5 - TURBULENT FLUID STREAM MIXING
Physical Problem Description ......................................................................... 5-1
Tutorial 5.1 STEADY 3-D FLOW ........................................................................... 5-2
Pre-Processing ................................................................................................. 5-2
CFD Analysis .................................................................................................. 5-8
Post-Processing ............................................................................................... 5-8
Tutorial 5.2 TRANSIENT 3-D FLOW ................................................................... 5-13
ii

Version 4.02

Pre-Processing ............................................................................................... 5-13


CFD Analysis ................................................................................................ 5-17
Post-Processing ............................................................................................. 5-17
Tutorial 6 - SUPERSONIC AND TRANSONIC FLOWS
Tutorial 6.1 ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW ..... 6-2
Physical Problem Description ......................................................................... 6-2
Pre-Processing ................................................................................................. 6-2
CFD Analysis - Coarse Mesh .......................................................................... 6-5
Mesh Refinement ............................................................................................ 6-6
CFD Analysis - Refined Mesh ........................................................................ 6-9
Post-Processing ............................................................................................. 6-11
Tutorial 7 - MULTIPLE ROTATING REFERENCE FRAMES
Introduction ..................................................................................................... 7-1
Physical Problem Description ......................................................................... 7-1
Tutorial 7.1 ROTATING-FRAME FAN ANALYSIS ............................................. 7-2
Pre-Processing ................................................................................................. 7-2
CFD Analysis ................................................................................................ 7-14
Post-Processing ............................................................................................. 7-14
Tutorial 8 - LAGRANGIAN TWO-PHASE FLOW
Tutorial 8.1 STEADY FLOW WITH FUEL SPRAY INJECTION ......................... 8-2
Physical Problem Description ......................................................................... 8-2
Pre-Processing ................................................................................................. 8-2
CFD Analysis .................................................................................................. 8-6
Post-Processing ............................................................................................... 8-7
Tutorial 8.2 TRANSIENT FLOW WITH FUEL SPRAY INJECTION ................ 8-13
Physical Problem Description ....................................................................... 8-13
Pre-Processing ............................................................................................... 8-13
CFD Analysis ................................................................................................ 8-15
Post-Processing ............................................................................................. 8-16
Tutorial 9 - COMBUSTION
Physical Problem Description ......................................................................... 9-1
Tutorial 9.1 PROPANE COMBUSTION (ADIABATIC PPDF) ............................. 9-3
Pre-Processing ................................................................................................. 9-3
CFD Analysis ................................................................................................ 9-11
Post-Processing ............................................................................................. 9-11
Version 4.02

iii

Panel Definition ............................................................................................. 9-17


Tutorial 9.2 PROPANE COMBUSTION (THREE-STEP EDBR) ........................ 9-25
Additional Modelling Notes .......................................................................... 9-25
Numerical Considerations ............................................................................. 9-26
Pre-processing ............................................................................................... 9-26
CFD Analysis ................................................................................................ 9-34
Post-Processing ............................................................................................. 9-34
Tutorial 9.3 C7H8 DROPLET COMBUSTION (EDBR, RADIATION) ............... 9-39
Pre-processing ............................................................................................... 9-39
User Subroutines ........................................................................................... 9-50
CFD Analysis ................................................................................................ 9-54
Post-Processing ............................................................................................. 9-54
Tutorial 9.4 HYDROGEN COMBUSTION (LAMINAR FLAMELETS) ............ 9-61
Pre-Processing ............................................................................................... 9-61
CFD Analysis ................................................................................................ 9-68
Post-Processing ............................................................................................. 9-68
Tutorial 10 - BUOYANCY AND RADIATION EFFECTS
Introduction ................................................................................................... 10-1
Material Properties ........................................................................................ 10-2
Tutorial 10.1 BUOYANCY DRIVEN FLOW AROUND A HEATED FIN ......... 10-3
Pre-Processing ............................................................................................... 10-3
CFD Analysis ................................................................................................ 10-9
Post-Processing ............................................................................................. 10-9
Tutorial 10.2 SURFACE-TO-SURFACE RADIATION ..................................... 10-15
Pre-Processing ............................................................................................. 10-15
CFD Analysis .............................................................................................. 10-20
Post-Processing ........................................................................................... 10-20
Tutorial 10.3 RADIATION THROUGH A TRANSPARENT SOLID ............... 10-25
Pre-Processing ............................................................................................. 10-25
CFD Analysis .............................................................................................. 10-29
Post-Processing ........................................................................................... 10-29
Tutorial 11 - MOVING GRIDS
Tutorial 12 - EULERIAN TWO-PHASE FLOW
Tutorial 12.1 TERMINAL VELOCITY OF BUBBLES ........................................ 12-2
Pre-Processing ............................................................................................... 12-3
CFD Analysis ................................................................................................ 12-7
iv

Version 4.02

Post-Processing ............................................................................................. 12-7


Suggestions for Further Exercises ................................................................. 12-8
Tutorial 12.2 AERATION TANK .......................................................................... 12-9
Pre-Processing ............................................................................................... 12-9
CFD Analysis .............................................................................................. 12-13
Post-Processing ........................................................................................... 12-13
Suggestions for Further Exercises ............................................................... 12-16
Tutorial 12.3 FLUIDISED BED RISER .............................................................. 12-17
Pre-Processing ............................................................................................. 12-17
User Subroutine ........................................................................................... 12-21
CFD Analysis .............................................................................................. 12-22
Post-Processing ........................................................................................... 12-23
Tutorial 12.4 BOILING SIMULATION .............................................................. 12-25
Pre-Processing ............................................................................................. 12-25
User Subroutines ......................................................................................... 12-29
CFD Analysis .............................................................................................. 12-35
Post-Processing ........................................................................................... 12-35
Discussion of Results .................................................................................. 12-39
Validation Check ......................................................................................... 12-39
Suggestions for Further Exercises ............................................................... 12-40
Tutorial 13 - AEROACOUSTIC ANALYSIS
Introduction ................................................................................................... 13-1
Tutorial 13.1 STEADY FLOW AROUND A CYLINDER ................................... 13-2
Pre-Processing ............................................................................................... 13-2
CFD Analysis ................................................................................................ 13-5
Post-Processing ............................................................................................. 13-5
Tutorial 13.2 TRANSIENT FLOW AROUND A CYLINDER ........................... 13-11
Pre-Processing ............................................................................................. 13-12
User Subroutines ......................................................................................... 13-16
CFD Analysis .............................................................................................. 13-21
Post-Processing ........................................................................................... 13-21
Tutorial 14 - LIQUID FILM SIMULATION
Tutorial 14.1 2D FILM FLOW DOWN A VERTICAL WALL ............................ 14-2
Physical Problem Description ....................................................................... 14-2
Pre-Processing ............................................................................................... 14-3
CFD Analysis ................................................................................................ 14-7
Post-Processing ............................................................................................. 14-8
Version 4.02

Suggestions for Further Exercises ............................................................... 14-11


Tutorial 14.2 SPRAY IMPINGEMENT ON A WALL ....................................... 14-13
Problem Description .................................................................................... 14-13
Pre-Processing ............................................................................................. 14-13
CFD Analysis .............................................................................................. 14-21
Post-Processing ........................................................................................... 14-21
Tutorial 15 - COAL COMBUSTION
Physical Problem Description ....................................................................... 15-1
Modelling Strategy ........................................................................................ 15-1
Tutorial 15.1 ISOTHERMAL, NON-REACTING FLOW .................................... 15-3
Pre-Processing ............................................................................................... 15-3
CFD Analysis ................................................................................................ 15-7
Post-Processing ............................................................................................. 15-7
Tutorial 15.2 CONSTANT RATE DEVOLATILISATION ................................ 15-11
Pre-Processing ............................................................................................. 15-11
CFD Analysis .............................................................................................. 15-19
Post-Processing ........................................................................................... 15-19
Tutorial 15.3 TWO-COMPETING-STEPS DEVOLATILISATION .................. 15-25
Pre-Processing ............................................................................................. 15-25
CFD Analysis .............................................................................................. 15-27
Post-Processing ........................................................................................... 15-27
Tutorial 16 - LARGE EDDY SIMULATION OF FULLY-DEVELOPED CHANNEL FLOW
Physical Problem Description ....................................................................... 16-1
Modelling Strategy ........................................................................................ 16-2
Tutorial 16.1 STEADY-STATE ANALYSIS ........................................................ 16-3
Pre-processing ............................................................................................... 16-3
CFD Analysis ................................................................................................ 16-3
Post-Processing ............................................................................................. 16-4
Macro ............................................................................................................ 16-8
Tutorial 16.2 LARGE EDDY SIMULATION ..................................................... 16-11
Pre-Processing ............................................................................................. 16-11
User Subroutine ........................................................................................... 16-14
CFD Analysis .............................................................................................. 16-15
Post-Processing ........................................................................................... 16-15
Bibliography ................................................................................................ 16-22
Macros ......................................................................................................... 16-22

vi

Version 4.02

INTRODUCTION
Tutorial Structure
This document contains examples of applying STAR-CD to a variety of tutorial
problems, thus demonstrating some of its features and illustrating their use.
However, for a detailed description of STAR-CDs overall capabilities, you are
advised to consult the Computational Continuum Mechanics (CCM) and
Post-Processing User Guides in addition to this document.
Each tutorial starts with a brief description of the physical problem, followed by
a description of GUI operations and typed STAR-CD commands needed to set up
the corresponding model, perform a CCM analysis and display the results. In those
instances where graphical output is generated, selected screen plot images are also
included in the description. This enables you to check that you have followed the
tutorial correctly up to that point.
The tutorials are structured in such a way that, for a given physical feature
distinguishing a particular problem, a number of different variants are analysed to
illustrate different options. The tutorial numbering system reflects this structure.

Basic Definitions
Throughout this volume, it is assumed that you will be using STAR-CDs Graphical
User Interface facilities whenever possible. Therefore, the discussion is in terms of
GUI operations (e.g. selecting items from a screen menu, clicking option buttons in
a dialog box, etc.) unless the required action can only be performed by typing a
command in pro-STARs I/O window. Most GUI facilities are incorporated in a
special window called STAR GUIde that opens directly from pro-STAR and
enables you to build models for most commonly-occurring CFD problems in a
systematic and user-friendly way.
The on-screen placement of pro-STAR windows and dialog boxes while
working on a tutorial is entirely at your discretion. However, the arrangement
shown below is recommended for greatest ease of use. This consists of:

Version 4.02

The STAR GUIde window on the left this displays the Navigation Centre
tree structure for finding your way around the system, plus various panels for
detailed specification of a particular operation.
The main pro-STAR window on the right this enables you to display your
current model as well as manipulate various aspects of its on-screen
appearance. The latter is achieved via several buttons and pop-up menus along
the top and down the left-hand side of the window. Some of the less obvious
buttons are labelled in the illustration shown overleaf.
The I/O window at the bottom this confirms the action taken by pro-STAR
in response to a GUI operation. It also enables you to type instructions in
command form for cases where no equivalent GUI operation is available.

Working with commands

Show STAR GUIde window


Plot with legend
Reset buttons
Plot four views
Turn mesh plotting on / off
Turn edge plotting on / off
Orientation slider controls
Turn light shading on / off
Quick Draw option
Plot orientation cube
Select a cell set
Select a vertex set
Select a spline set
Select a block set
Select a boundary set
Select a couple set
Select a droplet set
Store/recall set, surface or view
Display the cell table
Display coordinate systems
Display/edit a user table

Throughout the document, > signs denote successive mouse clicks on menu
names, menu list items, dialog box buttons, etc. For example
Tools > Cell Tool > Edit Types
means click Tools on the main pro-STAR windows menu bar, then click the Cell
Tool item in the drop-down list, then click the Edit Types button on the displayed
Cell dialog box.
Detailed instructions on how to perform a STAR-CD analysis from start to finish
are given in the CCM User Guide (Chapter 2, Running a STAR-CD Analysis).
These instructions should also be followed in running the tutorials, together with
any specific guidance given for each individual tutorial.

Running a Tutorial
Working with commands
If you wish to run through any of the tutorials by working in command mode, you
can:
1. Type in just the desired command name. This will cause pro-STAR to prompt
you for the required parameters and will also show you the system defaults.
2. Replace any number of commands with your own abbreviation, defined via
command *ABBREVIATE. This substitute can be used repeatedly throughout
2

Version 4.02

Using tutorial command files

the session in place of the original commands.


A comprehensive discussion of the various facilities for customising or
abbreviating command-mode input is given in Chapter 1 of the Commands
volume (section on pro-STAR Commands).
3. Repeat all commands in a single action, by making use of the tutorial
command files supplied in your STAR-CD installation CD-ROM (see the
STAR-CD Installation and Systems Guide for information on where these
files may be found). The files are written in separate sub-directories for each
tutorial and are called either prep.inp (for pre-processing) or post.inp
(for post-processing). Also included are auxiliary files needed by particular
cases, e.g. user-defined subroutines, cgrid files containing grid-changing
commands, etc.
Using tutorial command files
The usual procedure for repeating the pre- or post-processing part of a tutorial via
the supplied tutorial command files is as follows:
1. Create a directory for the tutorial and copy the prep.inp, post.inp and
auxiliary files (e.g. user subroutines) to it.
2. If the tutorial involves a restart from a previous case, copy all STAR-CD
generated files (e.g. tut.mdl, tut.ccm, etc.) from their current location to
the new directory.
3. For a pre-processing session, start up pro-STAR in the usual way, supply a
tutorial name (e.g. tut) and then type the following command in the I/O
window:
ifile prep.inp
Important Note: When running tutorials involving use of the screen cursor,
make sure that both the main pro-STAR window and the graphics area within
it remain at their normal (default) sizes. Altering these in any way will
invalidate the screen coordinate information stored in file prep.inp and the
tutorial will fail.
4. Following the automatic execution of all commands, terminate the pro-STAR
session by typing.
quit, save
5. The procedure for a post-processing session is identical to the above, except
that the file name supplied is now post.inp and the run is terminated by
typing
quit, nosave

Version 4.02

Physical Problem Description

Tutorial 1 FLOW IN A MIXING PIPE


This tutorial describes in detail how to set up, run and post-process a simple CFD
problem involving flow through a mixing pipe. The problem geometry is shown
below:

Figure T1.0-1

Mixing pipe geometry

Physical Problem Description


The assembly has two inlet pipes, located on the left and centre of the above figure,
through which air at different temperatures flows into the interior. There is also an
outlet pipe on the right-hand side through which the fluid exits. The air stream
entering the solution domain at each inlet has a specified velocity, temperature,
density, turbulence intensity and turbulence length scale. These properties vary
throughout the pipe as the two streams mix. Adiabatic and no-slip conditions are
assumed at the pipe walls.
The mesh used to describe the problem geometry is shown below. Users wishing
to generate the mesh used in this case from scratch should first complete Tutorial
1.1 and 1.2 of the Meshing Tutorials volume. Alternatively, they may continue with
this tutorial using files provided in the STAR-CD installation directory.

Version 4.02

1-1

Physical Problem Description

Figure T1.0-2

1-2

Mixing pipe mesh

Version 4.02

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing
Preliminaries

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

This part of the tutorial gives a detailed account of how to:

Initiate a pro-STAR pre-processing session that builds a CFD model for a


simple problem
Alter fluid properties
Specify turbulence and thermal models
Apply boundary conditions
Perform a CFD analysis using the STAR-CD solver

Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut1-1. If you have completed
Tutorial 1.1 and 1.2 of the Meshing Tutorials volume, copy the model file created
at the end of Meshing Tutorial 1.2 (mixing_pipe.mdl) into this directory.
Alternatively, copy the coded files mixing_pipe.cel, mixing_pipe.vrt,
mixing_pipe.bnd and mixing_pipe.inp supplied with the STAR-CD
installation into it.

Start pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (mixing_pipe) in the Casename text box

If you have chosen to restart from the model file mixing_pipe.mdl:

Check that the Resume existing .mdl file option is selected


Click Continue

If you have chosen to start from the coded files provided with STAR-CD:

Click Continue
Select File > Read File... in the main pro-STAR window, as shown below:

In the Input Coded Command File dialog check that the File Name is
mixing_pipe.inp
Click Apply
Click Close

Version 4.02

1-3

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing
Mesh Checking

The next step is to give the model a name:

In the main window, select File > Model Title


In the Title text box type:
FLOW IN A MIXING PIPE

Mesh
Checking

Click Apply

A simple, but often effective, method of checking the mesh is to display it on screen
and examine it visually:

Select C > All

The I/O window states that the mesh contains 82,339 cells.
Rotating the mesh by holding the left mouse button whilst dragging the cursor
across the display window should not reveal any malformed or irregular cells on the
mesh surface. Once you are satisfied there are no problems there, reset the view and
check the interior mesh structure:

1-4

Select Plot > Up Axis > Z

Select View > Isometric > -1,-1,1


Version 4.02

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing
Mesh Checking

Click the button at the bottom of the rotate slider to reset the view angle

Click Zoom Off


Turn on light shading by clicking the light button,
. Light shading
enhances the 3D effect of the mesh visualisation.
Click Cell Plot to display the mesh shown in Figure T1.0-2 above
Select a Clipped Hidden plot type to display Figure T1.1-1

The varying size of cells within the trimmed mesh is clearly shown.

Version 4.02

1-5

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing
Basic Problem Settings

Figure T1.1-1

Basic
Problem
Settings

Clipped hidden view of mixing pipe mesh interior

Most pre-processing operations are performed using various panels of the STAR
GUIde window. The first panel to check is Select Analysis Features at the top of the
STAR GUIde folder tree:

Open the Select Analysis Features panel

This case is a steady-state problem and includes none of the other analysis features
listed here, so no changes are required.

1-6

Version 4.02

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing
Material Properties

Material
Properties

Before any boundary conditions can be applied, appropriate fluid properties must
be specified. The panel to check for this is Molecular Properties, located inside the
Thermophysical Models and Properties and Liquids and Gases folders:

Select the Thermophysical Models and Properties folder


Select the Liquids and Gases sub-folder
Open the Molecular Properties panel

The default fluid material is air so this does not need changing. However, since the
air temperature (and hence density) of each inlet stream is different, the Density
option must be re-specified:

Select Ideal-f(T,P) from the Density list

The rest of this panels options are suitable for the analysis so:

Click Apply

The next set of parameters requiring attention are those describing the application
of a turbulence model:

Version 4.02

Open the Turbulence Models panel


Turn On turbulence modelling
1-7

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing
Boundary Locations

Under the Turbulence tab, select the k-Epsilon/High Reynolds Number


model. This is the default k- model in STAR-CD and will be used in most of
the tutorials provided.

All default parameter settings are suitable for this model so:

Click Apply

Since the problem in hand is non-isothermal, the energy equation must be activated:

Open the Thermal Models panel


Turn On the temperature calculation
Click Apply

This completes the specification of physical properties and models for the fluid. The
next step is to locate the boundary regions and specify boundary conditions.
Boundary
Locations

Meshes such as this one created using pro-STARs Automated Meshing module
automatically include boundary definitions on all mesh surfaces. To display these
boundaries:

Select B > All in the pro-STAR window


Click Bound in the Cell Plot Display Options area of this window to display
Figure T1.1-2

Observe that there is one boundary for every cell face on the mesh surface.
Depending on the features of that surface, these boundaries are split into different
regions; in this case there are nine such regions numbered 14 22.

1-8

Version 4.02

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing
Boundary Locations

Figure T1.1-2

Default boundaries displayed on a clipped hidden view of the mesh

Most of these regions correspond to parts of the mixing pipe wall and are redundant
for the purposes of this tutorial. They may therefore be combined into a single
region and assigned the appropriate wall boundary conditions. In doing this, one can
take advantage of a useful pro-STAR feature that
(a) assigns all cell faces on the mesh surface for which no boundaries have
been specified to a default region (known as region no. 0) and
(b) sets up a default set of boundary conditions (adiabatic, no-slip, stationary,
smooth wall) to it.
In this case, the default conditions are appropriate to the pipe wall and they may
therefore be applied indirectly simply by deleting most of the boundaries shown in
Figure T1.1-2.
To start this process, first remove the boundaries on the inlet and outlet faces
from the current boundary set:

Version 4.02

Select B > Unselect > Region (Cursor Select)...


Using the screen cursor, click on any boundary lying on the pipes first inlet
plane, as shown in Figure T1.1-3. The information displayed on the I/O
window will indicate that the region number corresponding to this inlet is 14.

1-9

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing
Boundary Locations

Select a boundary here

Figure T1.1-3

Selecting a boundary on the first inlet

Select View > Isometric > 1,-1,1 to change the view


Select B > Unselect > Region (Cursor Select)...
Using the screen cursor, click on any boundary lying on the pipes second
inlet plane, as shown in Figure T1.1-4. The information displayed on the I/O
window will indicate that the region number corresponding to this inlet is 22.

Select a boundary here

Figure T1.1-4

1-10

Selecting a boundary on the second inlet

Version 4.02

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing
Boundary Locations

Select B > Unselect > Region (Cursor Select)...


Using the screen cursor, click on any boundary lying on the pipes outlet
plane, as shown in Figure T1.1-5. The information displayed on the I/O
window will indicate that the region number corresponding to the outlet is 19.

Select a boundary here

Figure T1.1-5

Selecting a boundary on the outlet

To verify that the above operations have been performed correctly:

Enter the following command in the I/O window:


COUNT BOUNDARY

The resulting I/O window output should be as shown below, indicating that all
inlet/outlet boundaries have been excluded; hence all those remaining in the set are
the (redundant) wall boundaries created by the AutoMesh Module.

To delete these boundaries:

Enter the following command in the I/O window:


BDEL BSET

Version 4.02

1-11

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing
Boundary Conditions

Display the remaining boundaries:

Select B > All


Change back to a Hidden Surface plot
Select View > Isometric > -1,-1,1 to display Figure T1.1-6

Figure T1.1-6

Boundary
Conditions

Specify boundary conditions at the inlets and outlet as follows:

1-12

Boundary display with a single (default) wall boundary region

Select the Define Boundary Conditions folder in the STAR GUIde window
Open the Define Boundary Regions panel
In the boundary regions list, select Reg# 0 (the default boundary region) and
note that it is defined as a stationary, no-slip, adiabatic wall, as required
Select Reg# 14, the first inlet, from the boundary regions list
Choose Inlet from the Region Type drop-down menu
Enter boundary conditions as shown below:

Version 4.02

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing
Boundary Conditions

Version 4.02

Click Apply
Select Reg# 22, the second inlet, from the boundary regions list
Choose Inlet from the Region Type drop-down menu
Enter boundary conditions as shown below:

1-13

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

Pre-Processing
Boundary Conditions

1-14

Click Apply
Select Reg# 19, the outlet, from the boundary regions list
Choose Outlet from the Region Type drop-down menu
The boundary condition defaults shown on the panel are appropriate for this
case, so click Apply to confirm
Click Replot to produce the mesh plot shown in Figure T1.1-7, which now
includes a graphical representation of the boundary conditions applied above.
Check that the yellow arrows indicating the inlet velocities point in the correct
direction and are perpendicular to the inlet boundary planes.

Version 4.02

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

CFD Analysis
Set Run Time Controls

Figure T1.1-7

Boundary conditions shown on mesh plot

This completes the boundary condition setup.

Turn off the Bound Cell Plot Display Option

Set Run Time Before the analysis can be run in STAR-CD, the maximum number of iterations to
Controls
be performed and the maximum residual tolerance acceptable for convergence need
to be specified:

In the STAR GUIde window, select the Analysis Preparation/Running folder


Open the Set Run Time Controls panel
Change the Number of Iterations to 300
The default Max. Residual Tolerance of 0.001 is acceptable so click Apply

The pre-processing task is now complete. The next section details how to prepare
and run the analysis in STAR-CD.
CFD Analysis
There are two ways of running a STAR-CD analysis:
1. Save the geometry and problem files in pro-STAR, then quit pro-STAR and
run the STAR solver from the command line
2. Run STAR interactively from within pro-STAR using STAR GUIde
Both of these are described below.

Version 4.02

1-15

Tutorial 1.1

PRE-PROCESSING AND CFD SOLUTION

CFD Analysis
Running From The Command Line

Running
From The
Command
Line

Begin by writing the geometry and problem files, save the model file and then quit
pro-STAR:

In the pro-STAR window, select File > Write Geometry File to open the
Geometry File Write dialog
The geometry was created in centimetres so set the Scale Factor to 0.01
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

At the command line enter the following:


star
The analysis will start and the results will be displayed in your sessions window.
Once it is complete, pro-STAR may be restarted and the results post-processed as
described in the second part of this tutorial.
Running
Interactively

STAR GUIdes Run Analysis Interactively panel activates the STAR solver through
the pro-STAR interface:

Open the Run Analysis Interactively panel


Click Start New Analysis

The geometry and problem files will be written automatically and the analysis will
run in the window that pro-STAR was started from. Once complete, you can
continue by post-processing the results in pro-STAR as described in the next
section.

1-16

Version 4.02

Tutorial 1.1

POST-PROCESSING

Post-Processing
Preliminaries

Tutorial 1.1

POST-PROCESSING

This part of the tutorial gives a detailed account of how to:

Initiate a pro-STAR post-processing session for evaluating the solution results


produced by STAR-CD for a simple problem
Create simple vector and contour plots
Produce plots of particle tracks
Combine particle tracks with vector or contour plots

Post-Processing
Preliminaries Begin by checking that the model file, mixing_pipe.mdl, and the results file,
mixing_pipe.ccm, generated during the first part of this tutorial exist in your
current working directory.

Start pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Check that the case name (mixing_pipe) is displayed in the Casename text
box and that the Resume existing .mdl file option is selected
Click Continue

Read in the results of the analysis:

Contour
Plots

The first plot to be drawn is a contour plot of temperature on the surface of the
mixing pipe:

Version 4.02

Select the Post-Processing folder


Open the Load Data panel to display the File(s) tab
Click Open Post File

Select the Data tab in the Load Data panel


Turn On the Smooth Option
Select item Temperature from the Scalar Data list

1-17

Tutorial 1.1

POST-PROCESSING

Post-Processing
Contour Plots

1-18

Click Get Data


Select Go To > Create Plots to open the Create Plots panel

Under the 3-D Surface tab, select options Contour (filled) and Edge

Click Plot To Screen to display Figure T1.1-8

Version 4.02

Tutorial 1.1

POST-PROCESSING

Post-Processing
Contour Plots

Figure T1.1-8

Temperature contours on the mesh surface

Now plot contours of velocity magnitude on an x-z plane passing through the origin:

Version 4.02

Click Go To Load Data to return to the Load Data panel


Select item Velocity Magnitude from the Calculated Scalar Data list
Click Get Data
Select Go To > Create Plots
Under the Section Clipped tab, select options Contour (filled) and Edge
Change the Normal coordinates to 0, 1, 0

1-19

Tutorial 1.1

POST-PROCESSING

Post-Processing
Contour Plots

Click Apply
Click Plot to Screen to display Figure T1.1-9

Figure T1.1-9

1-20

Velocity magnitude contours on an x-z plane through the origin

Version 4.02

Tutorial 1.1

POST-PROCESSING

Post-Processing
Velocity Vector Plots

Velocity
Vector Plots

Velocity vectors will first be plotted on the mesh surface:

Click Go To Load Data


Select Velocity Components UVW from the Vector Data list
Click Get Data
Select Go To > Create Plots
Under the 3-D Surface tab, select options Vector and Edge
Click Plot to Screen to display Figure T1.1-10

Figure T1.1-10

Velocity vectors displayed on the mesh surface

It can be seen that the flow field pattern cannot be seen very clearly as Figure
T1.1-10 displays far too many vectors. Therefore, the following measures may be
taken to thin out the vectors and generally improve the clarity of the plot:

Version 4.02

Select the Vectors tab in the Create Plots panel


Adjust the Thin Vectors slider so that it is at approximately 0.25
Change the Scale Factor to 0.7 to make each vector arrow shorter
Change the Fraction Length of Arrow Head to 0.3 to make each arrow head
larger

1-21

Tutorial 1.1

POST-PROCESSING

Post-Processing
Velocity Vector Plots

Click Apply
Click Replot in the pro-STAR window to display Figure T1.1-11

Figure T1.1-11

Thinned out velocity vectors displayed on the mesh surface

The revised plot now clearly shows the flow swirling through the mixing pipe.
Next, plot velocity vectors on the plane that was previously used for the velocity
magnitude contour plot:

1-22

Version 4.02

Tutorial 1.1

POST-PROCESSING

Post-Processing
Velocity Vector Plots

Select the Section Clipped tab in the Create Plots panel


Select options Vector and Edge
Click Plot to Screen to display Figure T1.1-12

Figure T1.1-12

Velocity vectors displayed on an x-z plane

The vectors shown in Figure T1.1-12 are too thinly spaced near the centre of the
model geometry. However, this is not the case near the walls where the presence of
a finer mesh results in more vectors being displayed. A plot with evenly distributed
vectors across the plane can be achieved using the Presentation Grid facility:

Version 4.02

Select the Vectors tab in the Create Plots panel


Turn On the Presentation Grid facility
The presentation grid is defined by the number of grid points in each direction
across the entire plot window. For this case, specify the number of points in
the x- and y- directions as 75 and 66, respectively.
Move the Thin Vectors slider back to 1.0

1-23

Tutorial 1.1

POST-PROCESSING

Post-Processing
Particle Tracks

Click Apply
Click Replot in the pro-STAR window to display Figure T1.1-13

Figure T1.1-13

Particle
Tracks

1-24

Velocity vectors displayed on an x-z plane using a presentation grid

An effective way of visualising a flow pattern is to draw tracks of imaginary


massless particles introduced into to the flow at specified points. Here we will draw
tracks of particles introduced at the smaller inlet:

Version 4.02

Tutorial 1.1

POST-PROCESSING

Post-Processing
Particle Tracks

In the Post-Processing folder, select sub-folder Particle Tracks


Open the Create Particle Tracks panel
Select Boundary Faces for the Particle Location Type
Select Bset from the drop-down menu that appears underneath

Before continuing, it is necessary to collect the inlet boundary faces from which
particles will originate into a boundary set:

In the pro-STAR window, select a Geometry Plot and Hidden Surface plot
type
Click Bound in Cell Plot Display Options section

Hold the middle mouse button and drag to zoom in on the smaller inlet
Select B > New > Cursor Select...
Select 6 inlet boundary faces as indicated below:

Select boundaries here

Figure T1.1-14

Version 4.02

Selecting boundary faces on the smaller inlet

Click the Done button at the top right of the screen to end cursor selection
Click Replot to display a plot similar to that shown in Figure T1.1-15. Note
1-25

Tutorial 1.1

POST-PROCESSING

Post-Processing
Particle Tracks

that the exact boundaries chosen is not important in this case

Figure T1.1-15

Click Apply in the Create Particle Tracks panel


Select the Generation tab
Click Generate Tracks
Select Go To > Plot Particle Tracks. The Plot Droplets/Particle Tracks panel
should appear

In the Particle Tracks tab of this panel, change the Display Option to
Continuous
Click Plot Tracks
Click Zoom Off in the pro-STAR window to display Figure T1.1-16

1-26

Boundaries selected as starting points for particle tracks

Version 4.02

Tutorial 1.1

POST-PROCESSING

Post-Processing
Particle Tracks

Figure T1.1-16

Tracks of particles introduced at the smaller inlet

Figure T1.1-16 illustrates very clearly the swirling nature of the flow. Particle tracks
can also be plotted together with vectors or contours by producing such a plot after
displaying the particle tracks:

Version 4.02

Return to the Load Data STAR GUIde panel


Select Data Type Cell & Wall/Bound (Smooth)
Select Temperature from the Scalar Data list
Click Get Data
Select Go To > Create Plots
In the Section Clipped tab of the Create Plots panel select options Contour
(filled) and Edge
Click Plot to Screen to display Figure T1.1-17

1-27

Tutorial 1.1

POST-PROCESSING

Post-Processing
Particle Tracks

Figure T1.1-17

Particle tracks displayed with a temperature contour plot

Note that in order to produce further plots of vectors or contours without the particle
tracks, you will need to return to the Create Droplets/Particle Tracks panel and click
the Clear Tracks button at the bottom of the Particle Tracks tab.
This completes the post-processing part of this tutorial. Descriptions of more
complex post-processing operations may be found in some of the other tutorials in
this volume.

1-28

Version 4.02

Physical Problem Description

Tutorial 2 EVALUATION OF MESH EFFECTS


Physical Problem Description
The problem considered is steady airflow over an obstacle mounted at the bottom
wall of a three-dimensional channel. The geometry is shown in Figure T2.0-1. This
case is based on an investigation conducted by the Danish Maritime Institute whose
experimental data are compared with the STAR-CD predictions. In the
experimental set-up, the flow velocity and turbulence characteristics were
non-uniform across the inlet section. However, to simplify the modelling procedure,
the case presented here is based on a parabolic inlet velocity profile with fixed
turbulence characteristics.
The boundaries consist of an inlet, an outlet, a symmetry plane on one of the two
side faces (parallel to the plane of the paper in Figure T2.0-1) and default no-slip
walls for the remaining boundaries. The fluid is air and its physical properties are
assumed constant and equal to the STAR-CD default values:
1.205 kg/m3
1.81 105 Pa s

Density
Molecular viscosity

The fluid enters the solution domain at standard pressure and temperature (1 bar and
293 K) with a velocity of 1.17 m/s. Based on the height of the obstacle, the Reynolds
number is 3,115. The turbulent kinetic energy and dissipation rate at the inlet are set
to 0.024 m2/s2 and 0.07 m2/s3, respectively; these values having been derived from
experimental data. All fluid mass entering the solution domain exits through the
outlet. The flow is isothermal, incompressible and turbulent and turbulence is
simulated using the standard linear k- model combined with the Wolfstein
two-layer model.
Wall

300 Inlet

Outlet

40
320

Wall
870

10
All units in mm.
The depth of the solution domain is 300 mm throughout.

Figure T2.0-1

Problem geometry

The same problem is modelled using three different meshes: a hexahedral, a


tetrahedral and a polyhedral mesh. All three are based on the same initial shell
surface defining the problem geometry but each mesh was produced using different
Version 4.02

2-1

Physical Problem Description

methods. Comparisons are then drawn between the accuracy and speed of each type
of mesh.

2-2

Version 4.02

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Pre-Processing
Preliminaries

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

This tutorial will show the user how to:

Model a 3D flow using a simple hexahedral mesh


Apply, and verify the use of, a two-layer turbulence model
Use a pre-defined table to describe a boundary condition
Produce contour plots of wall data
Produce and customize graphs of cell and wall data

Pre-Processing
Preliminaries Begin by creating a directory for this tutorial (called tut2-1) and copy the cell,
vertex and boundary files supplied with STAR-CD (hex.cel, hex.vrt and
hex.bnd) into it. Also copy the table file inlet.tbl and the text file
exp230.xy. The table describes the inlet velocity profile while the text file
contains the experimental data and is used for comparing them to the analysis
results.
Start up pro-STAR in this directory:

Type prostar at the command line


Specify the graphics driver (xm, mesa or glm)
Type hex in the Casename text box
Click Continue
In the main pro-STAR window, select File > Model Title
In the Title text box type
AIR FLOW OVER AN OBSTACLE (HEXAHEDRAL MESH)
Click Apply

Make sure that the STAR-GUIde window is displayed on your screen, next to the
main pro-STAR window. If not, activate it by clicking the special Show
STAR-GUIde button shown below:

Select folder Create and Import Grids and then open the Import Grids panel
Select pro-STAR as the file Format
Check that the default cell and vertex files are hex.cel and hex.vrt,
respectively, and that both are of File Type Coded
Click Import Grid

The I/O window should tell you that 74,985 vertices and 67,699 cells have been
imported. Ignore the warnings regarding non-existent cell table numbers as new
ones are created during import.
To display the grid:

Version 4.02

In the main pro-STAR window, choose C > All


Select View > Isometric > -1,1,1
2-3

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Pre-Processing
Material Properties

Click Cell Plot to display Figure T2.1-1

Figure T2.1-1

Hexahedral mesh

There are currently no boundaries attached to the grid as only the cell and vertex
data have been imported. To import boundary definitions from the boundary file:

Select folder Locate Boundaries in STAR-GUIde and open the Import


Boundaries panel
The boundary file is hex.bnd. This should be displayed in the File Name box
Click Apply

Now the boundaries can be displayed:

In the main pro-STAR window, choose B > All


Click Replot

Hide the boundary regions again:

Material
Properties

Click off Bound in the Cell Plot Display Options area of the window

Check the default fluid property settings. The only property data needed for an
isothermal and incompressible flow are fluid density and molecular viscosity.

Select folder Thermophysical Models and Properties in STAR-GUIde


Select sub-folder Liquids and Gases
Open the Molecular Properties panel

Given that the default property values are those of air at standard temperature and
pressure, no change is necessary. Turn on the standard k- turbulence model:

2-4

Open the Turbulence Models panel


Version 4.02

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Pre-Processing
Boundary Conditions

Click On to select turbulence modelling


Select option K-Epsilon/High Reynolds Number from the Turbulence menu
Click Apply

A two-layer model is to be used to account for turbulence near the walls. The
near-wall layer thickness should be large enough to fully encompass the boundary
layer (but not too large, as the computational time will increase unnecessarily). To
define the two-layer model:

Select the Near-Wall Treatment tab


Turn On the Standard Two-Layer model
Select option Wolfstein from the Two-Layer Model menu
Change the Near-Wall Layer Thickness to 0.04 m. The suitability of this value
will be checked in the Post-Processing section
Click Apply

Choose a cell just above the obstacle (say cell no. 801) as the monitoring location.

Boundary
Conditions

Open the Monitoring and Reference Data panel


Type 29772 in the Monitoring cell number box
Type 93 in the Reference Pressure Cell Number box. This is a cell on the wall
near to the inlet.
Click Apply

Having imported the boundary location definitions and their associated region
numbers, boundary conditions are specified as follows:
For the wall (region 0):

Select folder Define Boundary Conditions


Open the Define Boundary Regions panel
Select region no. 0 in the region scroll list
Select Active from the Two-Layer drop-down menu
Click Apply

For region 1, the inlet velocity profile will be specified by a table:

Select region no. 1 in the region scroll list


Select Table from the Options menu
Click the file browser button shown below and select the table file
inlet.tbl

Click OK to exit from the file browser


Select option k/Epsilon from the Turb. Switch menu
Type inlet values for the turbulence parameters; 0.024 m2/s2 in the k box and
0.07 m2/s3 in the Epsilon box.
Click Apply

For the outlet (region 2):

Version 4.02

Check that the Flow Split is set to 1


2-5

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Pre-Processing
Analysis Controls

Click Apply

No user input is required for the last (symmetry plane) boundary region.
Check the model by displaying some key parameters in the I/O window (number
of cells and cell types, boundary regions, etc.) and then save the model data.

Analysis
Controls

In the main pro-STAR window, select Utility > Count > All
Select File > Save Model

Use of a second-order differencing scheme can significantly increase the accuracy


of the solution. Select MARS as the differencing scheme for this analysis:

Select folder Analysis Controls in STAR GUIde followed by sub-folder


Solution Controls
Select the Equation Behaviour sub-folder and open the Primary Variables
panel
Under the Differencing Schemes tab, select MARS as the momentum and
turbulence Differencing Scheme
Click Apply

Set the frequency of outputting data to the solution (post-processing) file and
specify that wall data (shear force coefficients and y+ values) are to be stored in it.
Also specify the maximum number of iterations:

Final
Operations

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data for the hexahedral mesh, write the geometry and problem
files and exit from pro-STAR, as shown below. Alternatively, you may continue
with the CFD analysis, using the STAR GUIde facilities for running STAR
interactively. This process is described in the next section.

2-6

Select sub-folder Output Controls in STAR-GUIde and then open the Analysis
Output panel
In the Solution File Setup section, type 10 in the Output Frequency box
Go to the Additional Output Data section and select item Shear Force in the
Wall Data scroll list
Click option button Post
Repeat the above process for item Yplus
Click Show selected to display a summary of the chosen items
Click Apply
Go to the Analysis Preparation/Running folder and open the Set Run Time
Controls panel
Change the Number of Iterations to 200

In the main pro-STAR window, select File > Write Geometry File
Type 0.001 in the Scale Factor text box to convert the geometry units from
millimetres to metres
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit
Version 4.02

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

CFD Analysis
Preliminaries

CFD Analysis
To perform the analysis interactively, proceed as follows:

Select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Check that the units in which the model was built are correctly selected
(option button millimetres). Leave all other settings at their default values.
Click Start New Analysis

The analysis will then start automatically. Convergence should be achieved within
the specified maximum number of iterations.
Post-Processing
Preliminaries Read in the results of the analysis from file hex.ccm:

Basic Plots

Select the cell-based velocity vectors for plotting. Also scale down the vector size
and switch on the edge display mode:

Version 4.02

Select folder Post-Processing


Open the Load Data panel and display the File(s) tab
Click Open Post File

Go to the Data tab and check that Data Type Cell is selected
In the Vector Data list, select item Velocity Component UVW
In the Scalar Data list, check that the default setting is None
Click Get Data
Select Go To > Create Plots to open the Create Plots panel
In the Section Clipped tab, choose Vector from the Option menu and Edge
from the Edge/Mesh menu
Set the Normal parameter to 0, 0, 1 and the Point parameter to 0, 0, 0
Go to the Vectors tab and type 0.5 in the Scale Factor box
Click Apply
Go to the Options tab and select User from the Range menu
Enter a range of 0 to 1.7
Click Apply
Under the Section Clipped tab, click Plot to Screen
Display Figure T2.1-2 by clicking the small button at the bottom right of the
orientation cube, as shown below:

2-7

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing
Basic Plots

Figure T2.1-2

Velocity vector plot on the symmetry plane

As expected, a recirculation zone is observed downstream of the obstacle. Zoom in


using the mouse to examine it more closely.
Now examine the pressure distribution:

2-8

Click Go To Load Data


In the Data tab, select Cell & Wall/Bound (Smooth) from the Data Type
menu
In the Scalar Data list, select item Pressure and then click Get Data
Select Go To > Create Plots to display the Create Plots panel
In the Section Clipped tab choose Contour (filled) from the Option menu and
Edge from the Edge/Mesh menu
In the Options tab, enter a Range of -1.9 to 0.6
Click Apply
Under the Section Clipped tab, click Plot to Screen to display Figure T2.1-3

Version 4.02

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing
Basic Plots

Figure T2.1-3

Filled contour plot of pressure on the symmetry plane

Plot the vertex-based turbulence kinetic energy and dissipation rate:

In the Options tab select User from the Range list and enter values 0 to 0.2
Click Apply
Click Go To Load Data
Select item Turb. Kinetic Energy from the Scalar Data list
Click Get Data
In the main window, click Replot to display Figure T2.1-4
Select item Dissipation Rate from the Scalar Data list
Click Get Data
In the main window, click Replot

The plot is almost entirely blue. This is because the dissipation rate is very high just
above the obstruction. To apply a more suitable scale to the plot:

Version 4.02

Click Go To > Create Plots


In the Options tab select User from the Range list and enter values 0 to 2
Click Apply
In the main window, click Replot to display Figure T2.1-5

2-9

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing
Validation of Results

Figure T2.1-4

Contour plot of turbulence kinetic energy on the symmetry plane


S

Figure T2.1-5

Validation of
Results

2-10

Contour plot of turbulence dissipation rate on the symmetry plane

In Tutorial 2.2 and 2.3, tetrahedral and polyhedral cells will be used to mesh the
same problem. In order to ensure that the three meshes are comparable, the
distribution of y+ values at the wall boundaries will be noted for each of them.

Version 4.02

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing
Validation of Results

Go to the Options tab in the Create Plots panel


Choose Auto for Range and click Apply
In the Load Data panel, select option Wall from the Data Type menu
Turn Smooth Option Off
Select item YPLUS from the Scalar Data list
Click Get Data

Since wall data are stored in specially created shells at the wall surfaces (cell type
no. 5), it is necessary to assemble a new cell set that contains only these shells:

Change the plot type to a Hidden Surface plot


Select View > Axis > +Y
Turn off edge and mesh plotting by clicking the edge and mesh buttons in
the main pro-STAR window
Select Plot > Wall Plot
Select C > New > Type... and click anywhere on the visible surface
Select Post > Caverage > Cset
Select Plot > Wall Plot
Type
VIEW -0.5 0.5 -1.0

in the I/O window


Click Replot to display Figure T2.1-6

Figure T2.1-6

y+ values plotted on the walls

This plot shows that the y+ values never exceed 6.1 and that for the vast majority of
the flow regime they are below 3.0, the maximum value considered acceptable for
a rigorous examination of wall data.
Version 4.02

2-11

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing
Graph Plotting

To check whether the near-wall layer thickness in the turbulence model (see page
2-5) was given a reasonable value:

In the Load Data panel, select Data Type Cell


Turn the Smooth option Off
Choose Two Layer from the Scalar Data list
Click Get Data
Choose Go To > Create Plots
In the 3D Surface tab select Contour (filled) and None
Change the plot type to a Section (Surface) plot
Click Plot to Screen
Select C > All
Click Cell Plot and reset the view by clicking the small button at the bottom
left of the orientation cube to display Figure T2.1-7.

The red region in this plot represents cells in the boundary layer, the green region
cells that are outside the boundary layer but still inside the near-wall layer and the
blue region cells outside the near-wall layer. The plot shows that the two-layer
model has been implemented correctly as there are no places at which the blue and
red regions are in contact. In other words, the near-wall layer encompasses the
whole boundary layer, as required. The green region also has minimal thickness,
hence the computational cost is minimal.

Figure T2.1-7

Graph
Plotting

2-12

Plot demonstrating correct application of two-layer model

It is sometimes useful to display the results of the analysis as x-y graphs, bar charts
or pie charts. When combined with various data manipulation functions (e.g.
OPERATE or ROPERATE), such pro-STAR facilities constitute powerful tools for
display and analysis. Some of the codes x-y graph plotting capabilities are
demonstrated in this part of the tutorial.
Version 4.02

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing
Simple Graphs

The following operations are normally necessary for producing an x-y graph:

Extract and prepare the data to be plotted


Store the data in graph registers
Create graphs by plotting the contents of any register against those of another
register
Combine several graphs into pro-STARs basic graph entity, called a frame
Define essential information for each frame, such as axis scaling, legends and
graph labels
Display the frame

One does not need to follow the entire procedure outlined above. Default settings
can often be used, as shown in the examples below.
Simple
Graphs

The first requirement is to assemble a set of U velocity magnitude values along a


line on the symmetry plane located at x = 230 mm. The graph will plot the U
velocity (the abscissa) against the y-coordinate (the ordinate).
To do this, and produce a default graph, proceed as follows:

Not all the graph specification options are available when a section plot is
displayed. To avoid this, select a Hidden Surface plot using the drop-down
menu in the main pro-STAR window.
In the STAR GUIde window, select sub-folder Graphs followed by sub-folder
Extract/Graph Data
Open the Field Data panel
Click Graph Reset at the bottom of the panel and choose Yes
Select option Line from the menu at the top of the Define Locations section
Enter 300 as the Total number of data points
To increase the number of allowed data points, type
MEMORY MAXPRB 1000

Version 4.02

in the I/O window


Choose Line defined by End points
Specify these end points to be 230, 0, 0 and 230, 300, 0
In the Data Type tab, choose Post 4 as the post register number in which to
load field data and then click Go To Load Data
In the Load Data panel, select option Cell from the Data Type menu
Turn On the Smooth Option
Select item Velocity Component U from the Scalar Data list
Click Get Data
Select Go To > Field Data. The Field Data panel display will confirm that the
U velocity component (SU) is now loaded in post register no. 4
In the Graph Data section, choose to plot the graph data against the Y-axis
Click Create Graph to see a default graph of the data, as shown in Figure
T2.1-8

2-13

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing
Customizing Graphs

Figure T2.1-8

Customizing
Graphs

It is clear that the default graph is not exactly what is required. To swap the axes and
adjust their scales:

2-14

Default graph of U velocity on the symmetry plane at x = 230 mm

Click Go To Customize Graph


In the Customize Graphs panel, go to the Pairs tab
Click Clear at the bottom of the Register Pairs list to remove the existing
graph
Choose SU (which should be Reg# 9) from the X-Axis Register list
Choose Y LOCATION (which should be Reg# 4) from the Y-Axis Register
list
Click Add Register Pair and Apply
Click Draw All Frames
Go to the Axis tab
In the X-Axis Parameters sub-tab, change the Title to U - m/s
Change the axis end-points by entering 0 and 1.4 in the Xmin, Xmax boxes,
respectively
Change the axis annotations by entering 0.1, the required segment length for
major tick marks, in the Xmajor box
Click Apply
In the Y-Axis Parameters sub-tab, change the Title to Y - mm. Also, change
the axis end-points by entering 0 and 300 in the Ymin, Ymax boxes,
respectively
Change the format for Numbers to Integer
Click Apply
Go to the Options sub-tab
In the Additional Graph Labels section, select label no. 1 in the scroll list and
Version 4.02

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing
Customizing Graphs

then enter the desired label, U velocity profile at x = 230 mm, in the text box
underneath.
Specify the labels location by entering coordinates (3.5, 9.0) in the Sx and Sy
boxes
Click Apply
In the main window, click Redraw to display the modified graph

Experimental results are provided in a coded (text) file. To plot these on the same
graph and hence check the validity of the numerical results:

Select Go To > External Data


The required File name is exp230.xy. Find it using pro-STARs built-in file
manager
Select xyxyxy from the Establish x-y pairs list
Click Create Graph

The External Data panel can also be used to save graph register data to an external
file. To save the data displayed in Figure T2.1-8:

Change the File name to hex230.xy


Choose to Specify the Starting register to write data as 4
Change the Increment in register to write data to 5
Click Save Registers

Unfortunately, the colours of the two graphs are the same. To change one of them
and add a legend:

Version 4.02

Click Go To Customize Graph


In the Display tab select the Legend sub-tab
Specify the Location as X1 = 7.35, Y1 = 8.85, X2 = 9.85, Y2 =9.85
Click Apply
Select the Registers tab
Click on Reg# 4 in the Registers list and change its label to Numerical
Click Apply
Click on Reg# 11 in the Registers list and change its label to Experimental
Change the Color under Line Parameters to number 7, i.e. yellow
Click Apply
Click Redraw in the main pro-STAR window to display Figure T2.1-9

2-15

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing
Wall Shear Force

Figure T2.1-9

Comparison of U velocity profile with experimental results

The numerical results are within 10% of the experimental results in the region in
which the experiment was carried out (0 < Y (mm) < 180).
Wall Shear
Force

In this case, wall shear force is a useful quantity for judging the length of the
circulation zone; i.e. the re-attachment point of the recirculation zone can be
determined by finding the point on the bottom wall at which the wall shear force
is zero. This may be determined approximately by using a wall plot, as in Figure
T2.1-6, but a more accurate method is to plot a graph.
The x-component of the wall shear force is by far the greatest, so it can be used
in place of the total wall shear force scalar. The former is a more suitable choice
because its sign also indicates the flow direction. On the other hand, the total wall
shear force scalar is positive everywhere and so a minimum value would need to be
used to estimate the re-attachment point instead of a zero value.
To produce such a graph:

Click Graph Reset and then Yes to remove the existing graph data
Select Go To > Field Data
Change the Total number of data points to 175
Choose to Select data along a Line and Specify the End points as 330, 0, 0
and 1200, 0, 0
Select Post 4 from the Post data to load menu and click Go To Load Data
Select Data Type Wall and Smooth Option On
Select Shear Force (X-Dir) from the Scalar Data list and click Get Data
Select Go To > Field Data
Choose to plot the graph data against the X-axis
Click Create Graph

To customize the graph:


2-16

Version 4.02

Tutorial 2.1

HEXAHEDRAL MESH ANALYSIS

Post-Processing
Final Operations

Click Go To Customize Graph


In the Axis tab, choose the X-Axis Parameters sub-tab
Change Xmin and Xmax to 330 and 1200, respectively
Change the Title to X - mm and the Numbers type to Integer
Click Apply
Under the Display tab, Specify the graph Location as having parameters X1 =
2.0, X2 = 9.0, Y1 = 2.35, Y2 = 8.65
Click Apply
Under the Y-Axis Parameters tab, change the Title to Shear Force - N
Change the Title Location to 0.5, 6.8
Click Apply
Go to the Options tab
In the Additional Graph Labels section, select label no. 1 in the scroll list and
then enter the desired label, Wall Shear Force at y = 0, downstream of
obstruction, in the text box underneath.
Specify the labels location by entering coordinates (2.5, 9.0) in the Sx and Sy
boxes
Click Apply then Draw All Frames to display Figure T2.1-10

Figure T2.1-10

Graph of wall shear force along the bottom wall

The recirculation zone extends roughly 800 mm downstream of the obstacle.


Final
Operations

Version 4.02

This tutorial is now complete. Exit pro-STAR by selecting:

File > Quit > Quit, Nosave

2-17

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Tutorial 2.2

Pre-Processing

TETRAHEDRAL MESH ANALYSIS

This tutorial tackles exactly the same problem as Tutorial 2.1 except that, in this
case, a tetrahedral mesh is used instead of a hexahedral one. The dimensions of
individual cells are approximately the same as in the hexahedral mesh. Particular
care is also taken to ensure that the near-wall cells are of the same thickness.
This tutorial will show the user how to:

Model a 3D flow using a simple tetrahedral mesh


Apply, and verify the use of, a two-layer turbulence model
Produce contour plots of wall data
Produce and customize graphs of cell and wall data

Pre-Processing
Create a directory for this tutorial (called tut2-2) and copy the coded files
provided supplied with the STAR-CD installation (tet.cel, tet.vrt and
tet.bnd) into it. Also copy the table file inlet.tbl and the text file
exp230.xy., containing the inlet velocity profile and experimental data.
Start up pro-STAR in this directory:

Type prostar at the command line


Choose the graphics driver (mesa, glm or xm)
Type tet in the Casename box
Click Continue
Select File > Model Title
In the Title text box type
AIR FLOW OVER AN OBSTACLE (TETRAHEDRAL MESH)
Click Apply

Now, import the grid into pro-STAR using STAR-GUIde:

In the STAR-GUIde window, select folder Create and Import Grids and then
open the Import Grids panel
Select pro-STAR as the file Format
Check that the default cell and vertex files are tet.cel and tet.vrt, respectively,
and that both are of File Type Coded
Click Import Grid

The I/O window should show that 52,663 vertices and 140,141 cells have been
imported. Ignore the warnings regarding non-existent cell table numbers as new
ones are created during import.
Boundary data must also be imported, as follows:

Select folder Locate Boundaries and open the Import Boundaries panel
The boundary file is tet.bnd. This should be displayed in the File Name text
box
Click Apply

To display the grid:

Version 4.02

In the main pro-STAR window, select C > All


2-19

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Pre-Processing
Material Properties

Select View > Isometric > -1,1,1


Click Cell Plot to display Figure T2.2-1

Figure T2.2-1

Tetrahedral mesh

To display the boundaries:

Select B > All


Click Bound in the Cell Plot Display Options area of the window
Check visually that all boundaries are appropriate to the case and then click
off the Bound Cell Plot Display Option

Whenever a grid is imported from files other than a complete model (.mdl) file, it
is always advisable to check that the mesh is connected and has no cracks in it. To
check the mesh connectivity:

Choose Tools > Check Tool from the pro-STAR window menu
Select Connectivity from the Check Option list
Click Apply

In this case, the cells are all connected and belong to one group so the mesh is OK.
Material
Properties

The default fluid property values are those of air at standard temperature and
pressure. No change to these is necessary. Turn on the standard k- turbulence
model:

2-20

Select folder Thermophysical Models and Properties in STAR-GUIde


Select sub-folder Liquids and Gases
Open the Turbulence Models panel
Click On to select turbulence modelling
Select option K-Epsilon/High Reynolds Number from the Turbulence menu
Version 4.02

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Pre-Processing
Boundary Conditions

Click Apply

A two-layer model is to be used to account for turbulence near the walls. The
near-wall layer thickness should be large enough to fully encompass the boundary
layer. To define the two-layer model:

Select the Near-Wall Treatment tab


Turn On the Standard Two-Layer model
Select option Wolfstein as the Two-Layer Model
Change the Near-Wall Layer Thickness to 0.035 m. The suitability of this
value will be checked in the Post-Processing section
Click Apply

Choose a fluid cell just above the obstacle (say cell no. 69732) as the monitoring
location:

Boundary
Conditions

Open the Monitoring and Reference Data panel


Type 66638 in the Monitoring cell number box
Type 158 in the Pressure Reference Cell Number box. This cell is in the same
position as the one specified in Tutorial 2.1
Click Apply

Having imported the boundary location definitions and their associated region
numbers, boundary conditions are imposed as follows:
For the wall (region 0):

Select folder Define Boundary Conditions


Open the Define Boundary Regions panel
Select region no. 0 in the region scroll list
Select Active from the Two-Layer pull-down menu
Click Apply

For the inlet (region 1):

Select region no. 1 in the region scroll list


Select Table from the Options menu
Click the file browser button and select the table file inlet.tbl
Click OK to exit from the file browser
Select option k/Epsilon from the Turb. Switch menu
Type inlet values for the turbulence parameters; 0.024 in the K box and 0.07
in the Epsilon box.
Click Apply

For the outlet (region 2):

Check that the Flow Split is set to 1


Click Apply

No user input is required for the last (symmetry plane) boundary region.
Analysis
Controls

Use of a second-order differencing scheme can significantly increase the accuracy


of the solution. Select MARS as the differencing scheme for this analysis:

Version 4.02

2-21

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

CFD Analysis
Final Operations

Select folder Analysis Controls in STAR GUIde followed by sub-folder


Solution Controls
Select the Equation Behaviour sub-folder and open the Primary Variables
panel
Under the Differencing Schemes tab, select MARS as the momentum and
turbulence Differencing Scheme
Click Apply

Set the frequency of data output to the solution file and specify that wall data,
specifically shear force coefficients and y+ values, are to be stored in it:

Select sub-folder Output Controls and then open the Analysis Output panel
In the Solution File Setup section, type 10 in the Output Frequency box
Go to the Additional Output Data section and select item Shear Force in the
Wall Data scroll list
Click option button Post
Repeat the above process for item Yplus
Click Show selected to display a summary of the chosen items
Click Apply

Specify the maximum number of iterations:

Go to the Analysis Preparation/Running folder and open the Set Run Time
Controls panel
Change the Number of Iterations to 200
Click Apply

Check the model:

Final
Operations

In the Check Model Setup folder select the Check Everything panel
Click All

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data for the tetrahedral mesh, write the geometry and problem
files and exit from pro-STAR, as shown below. Alternatively, you may continue
with the CFD analysis, using the STAR GUIde facilities for running STAR
interactively. This process is described in the next section.

In the main pro-STAR window, select File > Write Geometry File
Enter 0.001 for the Geometry Scale Factor
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
To perform the analysis interactively, proceed as follows:

2-22

Select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Version 4.02

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing
Preliminaries

Check that the units in which the model was built are correctly selected
(option button millimetres). Leave all other settings at their default values.
Click Start New Analysis

The analysis will then start automatically. Convergence should be achieved within
the specified maximum number of iterations.
Post-Processing
Preliminaries Read in the results of the analysis from file tet.ccm:

Basic Plots

The plots shown in this section are similar to those in Tutorial 2.1, thus enabling the
user to draw comparisons between the two cases. The first of these is a velocity
vector plot:

Version 4.02

Select folder Post-Processing


Open the Load Data panel and display the File(s) tab
Click Open Post File

Go to the Data tab and check that Data Type Cell is selected
In the Vector Data list, select item Velocity Component UVW
Click Get Data
Select Go To > Create Plots to open the Create Plots panel
In the Section Clipped tab, choose Vector from the Option menu and Edge
from the Edge/Mesh menu
Set the Normal parameter to 0, 0, 1 and the Point parameter to 0, 0, 0
Go to the Vectors tab and enter a Scale Factor of 0.5
Click Apply
Go to the Options tab and select User from the Range list.
Enter a range of 0 to 1.7
Click Apply
Under the Section Clipped tab, click Plot to Screen
Display Figure T2.2-2 by selecting View > Axis > +Z

2-23

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing
Basic Plots

Figure T2.2-2

Plot of velocity vectors on the symmetry plane

The plot shows very few differences to that in Figure T2.1-2, the most obvious
being a slightly smaller recirculation zone.
Now examine the pressure distribution:

2-24

Click Go To Load Data


In the Data tab, select Cell & Wall/Bound (Smooth) from the Data Type
menu
In the Scalar Data list, select item Pressure and then click Get Data
Select Go To > Create Plots to display the Create Plots panel
In the Section Clipped tab choose options Contour (filled) and Edge
In the Options tab, enter a Range of -1.9 to 0.6
Click Apply
Under the Section Clipped tab, click Plot to Screen to display Figure T2.2-3

Version 4.02

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing
Basic Plots

Figure T2.2-3

Plot of pressure contours on the symmetry plane

The most obvious differences between Figure T2.2-3 and Figure T2.1-3 occur far
downstream of the obstruction.
Plot the vertex-based turbulence kinetic energy and dissipation rate:

Version 4.02

In the Options tab select User from the Range list and enter values 0 to 0.2
Click Apply
Click Go To Load Data
Select item Turb. Kinetic Energy from the Scalar Data list
Click Get Data
In the main window, click Replot to display Figure T2.2-4
Select item Dissipation Rate from the Scalar Data list
Click Get Data
Click Go To > Create Plots
In the Options tab select User from the Range list and enter values 0 to 2
Click Apply
In the main window, click Replot to display Figure T2.2-5

2-25

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing
Validation of Results

Validation of
Results

Figure T2.2-4

Contours of turbulence kinetic energy on the symmetry plane

Figure T2.2-5

Contours of turbulence dissipation rate on the symmetry plane

Plot the y+ values at the wall boundaries to help verify the suitability of the mesh
for the turbulence model employed:

2-26

Go to the Options tab in the Create Plots panel


Version 4.02

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing
Validation of Results

Choose Auto Range and click Apply


In the Load Data panel, select option Wall from the Data Type menu
Turn Smooth Option Off
Select item YPLUS from the Scalar Data list
Click Get Data

Since wall data are stored in specially created shells at the wall surfaces (cell type
no. 5), it is necessary to assemble a new cell set that contains only these shells:

Change the plot type to a Hidden Surface plot


Select View > Axis > +Y
Turn off edge and mesh plotting by clicking the edge and mesh buttons in
the main pro-STAR window
Select Plot > Wall Plot
Select C > New > Type... and click anywhere on the visible surface
Select Post > Caverage > Cset
Select Plot > Wall Plot
Type
VIEW -0.5 0.5 -1.0

in the I/O window


Click Replot to display Figure T2.2-6

Figure T2.2-6

y+ values plotted on the walls

Note that the y+ values are roughly comparable to those shown for the hexahedral
mesh (Figure T2.1-6). This is what we would expect because the thickness of the
cell layer next to the wall is the same for both meshes.
To check whether the near-wall layer thickness in the turbulence model (see page
Version 4.02

2-27

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing
Simple Graphs

2-21) was given a reasonable value:

In the Load Data panel, select Data Type Cell


Turn the Smooth option Off
Choose Two Layer from the Scalar Data list
Click Get Data
Choose Go To > Create Plots
In the Section Clipped tab select Contour (filled) and None
Change the plot type to a Section (Surface) plot
Click Plot to Screen
Select C > All
Click Cell Plot
Display Figure T2.2-7 by clicking the small button at the bottom left of the
orientation cube, as shown below:

The plot shows that the two-layer model has been implemented correctly. In
addition, the tetrahedral mesh has permitted the use of a smaller near-wall layer
thickness compared to that in Tutorial 2.1. This saves some computational time,
though the greater number of cells in the tetrahedral model is a much more
significant factor.

Figure T2.2-7

Simple
Graphs
2-28

Plot demonstrating correct application of two-layer model

Graphs similar to those in Tutorial 2.1 will be created next. The first requirement is
to assemble a set of U velocity magnitude values along a line located at x = 230 mm,
z = 0 mm. The graph will plot the U velocity (the abscissa) against the y-coordinate
Version 4.02

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing
Customizing Graphs

(the ordinate).
To do this, and produce a default graph, proceed as follows:

Not all the graph specification options are available when a section plot is
displayed. To avoid this, select a Hidden Surface plot using the drop-down
menu in the main pro-STAR window.
In the STAR GUIde window, select sub-folder Graphs followed by sub-folder
Extract/Graph Data
Open the Field Data panel
Click Graph Reset at the bottom of the panel and choose Yes
Select option Line from the menu at the top of the Define Locations section
Enter 300 as the Total number of data points
Choose Line defined by End points
Specify these end points to be 230, 0, 0 and 230, 300, 0
In the Data Type tab, choose Post 4 as the post register number in which to
load field data and then click Go To Load Data
In the Load Data panel, select option Cell from the Data Type menu
Turn On the Smooth Option
Select item Velocity Component U from the Scalar Data list
Click Get Data
Select Go To > Field Data. The Field Data panel display will confirm that the
U velocity component (SU) is now loaded in post register no. 4
In the Graph Data section, choose to plot the graph data against the Y-axis
Type
MEMORY MAXPRB 1000

Customizing
Graphs

The default graph in not very well presented at this stage. To rectify this we can
swap the axes and adjust their scales:

Version 4.02

in the I/O window to increase the number of sensors (data points) allowed
Back on the Field Data panel, click Create Graph to see a default graph of
the data

Click Go To Customize Graph


In the Customize Graphs panel, go to the Pairs tab
Click Clear at the bottom of the Register Pairs list to remove the existing
graph
Choose SU (which should be Reg# 9) from the X-Axis Register list
Choose Y LOCATION (which should be Reg# 4) from the Y-Axis Register
list
Click Add Register Pair and Apply
Go to the Axis tab
In the X-Axis Parameters sub-tab, change the Title to U - m/s
Enter 0 and 1.4 in the Xmin, Xmax boxes, respectively
Enter 0.1 in the Xmajor box and click Apply
In the Y-Axis Parameters sub-tab, change the Title to Y - mm. Also, enter 0
and 300 in the Ymin, Ymax boxes, respectively
Select Integer as the Numbers format
Click Apply
2-29

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing
Customizing Graphs

Go to the Options sub-tab


In the Additional Graph Labels section, select label no. 1 in the scroll list and
then enter U velocity profile at x = 230 mm in the text box underneath.
Enter coordinates (3.5, 9.0) in the Sx and Sy boxes
Click Apply
In the main window, click Redraw to display the modified graph

Experimental results are provided in a coded (text) file. To plot these on the same
graph and hence check the validity of the numerical results:

Select Go To > External Data


The required File name is exp230.xy. Find it using pro-STARs built-in file
manager
Select xyxyxy from the Establish x-y pairs list
Click Create Graph

The External Data panel can also be used to save graph register data to an external
file. To save the data displayed in the graph:

Change the File name to tet230.xy


Choose to Specify the Starting register to write data as 4
Change the Increment in register to write data to 5
Click Save Registers

To add a legend:

2-30

Click Go To Customize Graph


In the Display tab select the Legend sub-tab
Specify the Location as X1 = 7.35, Y1 = 8.85, X2 = 9.85, Y2 =9.85
Click Apply
Select the Registers tab
Click on Reg# 4 in the Registers list and change its label to Numerical
Click Apply
Click on Reg# 11 in the Registers list and change its label to Experimental
Change the Color under Line Parameters to number 7, i.e. yellow
Click Apply
Click Redraw in the main pro-STAR window to display Figure T2.2-8

Version 4.02

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing
Wall Shear Force

Figure T2.2-8

Comparison of U velocity profile with experimental results

As with the hexahedral mesh, the numerical results are within 10% of the
experimental results in the region in which the experiment was carried out (0 < Y
(mm) < 180).
Wall Shear
Force

To produce a graph of wall shear force:

Click Graph Reset and then Yes to remove the existing graph data
Select Go To > Field Data
Change the Total number of data points to 175
Choose to Select data along a Line and Specify the End points as 330, 0, 0
and 1200, 0, 0
Select Post 4 from the Post data to load menu and click Go To Load Data
Select Data Type Wall and Smooth Option On
Select Shear Force (X-Dir) from the Scalar Data list and click Get Data
Select Go To > Field Data
Choose to plot the graph data against the X-axis
Click Create Graph

To customize the graph:

Version 4.02

Click Go To Customize Graph


In the Axis tab, choose the X-Axis Parameters sub-tab
Change Xmin and Xmax to 330 and 1200, respectively
Change the Title to X - mm and the Numbers type to Integer
Click Apply
Under the Y-Axis Parameters tab, change the Title to Shear Force - N
Change the Title Location to 0.5, 5.8
Click Apply
2-31

Tutorial 2.2

TETRAHEDRAL MESH ANALYSIS

Post-Processing
Final Operations

Go to the Options tab


In the Additional Graph Labels section, select label no. 1 in the scroll list and
then enter the desired label, Wall Shear Force at y = 0, downstream of
obstruction, in the text box underneath.
Specify the labels location by entering coordinates (2.0, 9.0) in the Sx and Sy
boxes
Click Apply then Draw All Frames to display Figure T2.2-9

Figure T2.2-9

Graph of wall shear force along the bottom wall

The irregularity of the tetrahedral mesh leads to a less smooth shear stress profile
compared to that for the hexahedral mesh. Even so, the predicted recirculation zone
length can easily be measured.
Final
Operations

2-32

This tutorial is now complete. Exit pro-STAR by selecting:

File > Quit > Quit, Nosave

Version 4.02

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Tutorial 2.3

Pre-Processing

POLYHEDRAL MESH ANALYSIS

This tutorial will show the user how to:

Model a 3D flow using a simple polyhedral mesh


Apply, and verify the use of, a two-layer turbulence model
Produce contour plots of wall data
Produce and customize graphs of cell and wall data
Draw comparisons between different mesh types

Pre-Processing
Create a directory for this tutorial (called tut2-3) and copy the files provided with
STAR-CD (poly.cel, poly.vrt and poly.bnd) into it. Also copy the table
file inlet.tbl and the text files exp330.xy, hex330.xy, and tet330.xy,
which will be used to draw comparisons between the results produced by the three
meshes in this tutorial group.
Start up pro-STAR in this directory:

Type prostar at the command line


Choose the graphics driver (mesa, glm or xm)
Type poly in the Casename box
Click Continue
Select File > Model Title
In the Title text box type
AIR FLOW OVER AN OBSTACLE (POLYHEDRAL MESH)
Click Apply

Import the cell, vertex and boundary data into pro-STAR using STAR-GUIde and
display the grid and boundaries:

Version 4.02

In the STAR-GUIde window, select folder Create and Import Grids and then
open the Import Grids panel
Select pro-STAR as the file Format
Check that the default cell and vertex files are poly.cel and poly.vrt,
respectively, and that both are of File Type Coded
Click Import Grid
In the main pro-STAR window, select C > All
Select View > Isometric > -1,1,1
Click Cell Plot to display Figure T2.3-1
In the STAR-GUIde window, select folder Locate Boundaries
Open the Import Boundaries panel
Check that poly.bnd is displayed in the File Name box
Click Apply
In the main pro-STAR window, select B > All
Click Bound in the Cell Plot Display Options area of the window
Check the boundary locations visually and then click off the Bound Cell Plot
Display Option

2-33

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Pre-Processing
Material Properties

Figure T2.3-1

Material
Properties

Polyhedral Mesh

Turn on the two-layer turbulence model:

Select folder Thermophysical Models and Properties in STAR-GUIde


Select sub-folder Liquids and Gases
Open the Turbulence Models panel
Turn On turbulence and select the k-Epsilon/High Reynolds Number model
from the list
Under the Near-Wall Treatment tab, turn On the Standard Two-Layer option
Select Wolfstein from the list
Enter a Near-Wall Layer Thickness of 0.05 m. The suitability of this value will
be checked in the Post-Processing section.
Click Apply

Set the monitoring and pressure reference cell locations to be equivalent to those
chosen in the previous two tutorials:

Boundary
Conditions

2-34

Select the Monitoring and Reference Data panel


Change the Monitoring cell number to 27774
Change the Reference Pressure Cell Number to 9

Activate the two-layer turbulence model at all wall boundaries:

Select folder Define Boundary Conditions


Open the Define Boundary Regions panel
Select Reg# 0 Wall from the list
Change the Two-Layer option to Active
Click Apply

Version 4.02

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Pre-Processing
Analysis Controls

Specify conditions at the inlet and outlet:

Analysis
Controls

Select Reg# 1 Inlet from the list


Select Table from the Options menu
Click the file browser button and select the table file inlet.tbl
Click OK to exit from the file browser
Select option k/Epsilon from the Turb. Switch menu
Specify k to be 0.024 m2/s2 and Epsilon to be 0.07 m2/s3
Click Apply
Select Reg# 2 Outlet from the list
Check that the Flow Split is set to 1
Click Apply

Select MARS as the differencing scheme for this analysis:

Select folder Analysis Controls in STAR GUIde followed by sub-folder


Solution Controls
Select the Equation Behaviour sub-folder and open the Primary Variables
panel
Under the Differencing Schemes tab, select MARS as the momentum and
turbulence Differencing Scheme
Click Apply

Set the frequency of data output to the solution file and specify that wall data are to
be stored in it:

Final
Operations

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data for the polyhedral mesh, write the geometry and problem
files and exit from pro-STAR, as shown below. Alternatively, you may continue
with the CFD analysis, using the STAR GUIde facilities for running STAR
interactively. This process is described in the next section.

Version 4.02

Select sub-folder Output Controls and then open the Analysis Output panel
In the Solution File Setup section, type 10 in the Output Frequency box
Go to the Additional Output Data section and select item Shear Force in the
Wall Data scroll list
Click option button Post
Repeat the above process for item Yplus
Click Show selected to display a summary of the chosen items
Click Apply

Select File > Write Geometry File


Enter 0.001 as the Geometry Scale Factor
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

2-35

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

CFD Analysis
Preliminaries

CFD Analysis
To perform the analysis interactively, proceed as follows:

Select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Check that the units in which the model was built are correctly selected
(option button millimetres). Leave all other settings at their default values.
Click Start New Analysis

The analysis will then start automatically. Convergence will be achieved within the
specified maximum number of iterations.
Post-Processing
Preliminaries Read in the results of the analysis from file poly.ccm:

Basic Plots

The plots drawn in this section are similar to those in Tutorial 2.1 and Tutorial 2.2
to enable the user to draw comparisons between them. The first of these is a velocity
vector plot:

2-36

Select folder Post-Processing


Open the Load Data panel and display the File(s) tab
Click Open Post File

Go to the Data tab and check that Data Type Cell is selected
In the Vector Data list, select item Velocity Component UVW
Click Get Data
Select Go To > Create Plots to open the Create Plots panel
In the Section Clipped tab, choose options Vector and None
Set the Normal parameter to 0, 0, 1 and the Point parameter to 0, 0, 0
Go to the Vectors tab and then enter a Scale Factor of 0.5
Click Apply
Go to the Options tab and select User from the Range list
Enter a range of 0 to 1.7
Click Apply
Click Plot to Screen
Display Figure T2.3-2 by selecting View > Axis > +Z

Version 4.02

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing
Basic Plots

Figure T2.3-2

Velocity vector plot

The vector plot is, again, quite similar to those shown in Figure T2.1-2 and Figure
T2.2-2. However, as with the tetrahedral mesh, the recirculation zone appears
slightly shortened.
Now examine the pressure distribution:

Version 4.02

Click Go To Load Data


In the Data tab, select Cell & Wall/Bound (Smooth) from the Data Type
menu
In the Scalar Data list, select item Pressure and then click Get Data
Select Go To > Create Plots to display the Create Plots panel
In the Section Clipped tab choose options Contour (filled) and Edge
In the Options tab, enter a Range of -1.9 to 0.6
Click Apply
Click Plot to Screen to display Figure T2.3-3

2-37

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing
Basic Plots

Figure T2.3-3

Pressure contour plot

There are a few differences between Figure T2.1-3, Figure T2.2-3 and Figure
T2.3-3, but all three plots are very similar.
Plot the vertex-based turbulence kinetic energy and dissipation rate:

2-38

In the Options tab select User from the Range list and enter values 0 to 0.2
Click Apply
Click Go To Load Data
Select item Turb. Kinetic Energy from the Scalar Data list
Click Get Data
In the main window, click Replot to display Figure T2.3-4
Select item Dissipation Rate from the Scalar Data list
Click Get Data
Click Go To > Create Plots
In the Options tab select User from the Range list and enter values 0 to 2
Click Apply
In the main window, click Replot to display Figure T2.3-5

Version 4.02

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing
Validation of Results

Validation of
Results

Figure T2.3-4

Contours of turbulence kinetic energy

Figure T2.3-5

Contours of turbulence dissipation rate

Plot the y+ values at the wall boundaries to help verify the suitability of the mesh
for the turbulence model employed:

Version 4.02

Go to the Options tab in the Create Plots panel


2-39

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing
Validation of Results

Choose Auto Range and click Apply


In the Load Data panel, select option Wall from the Data Type menu
Turn Smooth Option Off
Select item YPLUS from the Scalar Data list
Click Get Data

Since wall data are stored in specially created shells at the wall surfaces (cell type
no. 5), it is necessary to assemble a new cell set that contains only these shells:

Type
VIEW -0.5 0.5 -1.0

in the I/O window


In the main window, deselect the edge button
Deselect the mesh button
Select a Hidden Surface plot
Select Plot > Wall Plot
Select C > New > Type and click anywhere on the upper wall boundary
Select Post > Caverage > Cset
Select Plot > Wall Plot to display Figure T2.3-6

Figure T2.3-6

y+ values plotted on the walls

The y+ values are roughly comparable to those shown for the hexahedral and
tetrahedral meshes (Figure T2.1-6 and Figure T2.2-6, respectively). This is what we
would expect because the thickness of the cell layer next to the wall is the same for
all three meshes.
To check whether the near-wall layer thickness in the turbulence model (see page
2-34) was given a reasonable value:
2-40

Version 4.02

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing
Comparative Graphs

In the Load Data panel, select Data Type Cell


Turn the Smooth option Off
Choose Two Layer from the Scalar Data list
Click Get Data
Choose Go To > Create Plots
Change the plot type to a Section (Surface) plot
In the Section Clipped tab select Contour (filled) and None
Click Plot to Screen
Select C > All
Click Cell Plot and reset the view by clicking the small button at the bottom
left of the orientation cube to display Figure T2.3-7

The plot shows that the two-layer model has been implemented correctly.

Figure T2.3-7

Comparative
Graphs

Instead of plotting graphs showing just the current results, as in Tutorial 2.1 and
Tutorial 2.2, we will now plot graphs comparing results from all three meshes with
each other and with the experimental data. Files containing experimental data and
also those obtained in Tutorial 2.1 and Tutorial 2.2 should have been copied into the
working directory at the beginning of this tutorial.
Begin by plotting a graph of U velocity at x = 330mm, z = 0 mm against the
y-coordinate:

Version 4.02

Plot demonstrating correct application of two-layer model

Not all the graph specification options are available when a section plot is
displayed. To avoid this, select a Hidden Surface plot using the drop-down
menu in the main pro-STAR window.
In the STAR GUIde window, select sub-folder Graphs followed by sub-folder
Extract/Graph Data
Open the Field Data panel
2-41

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing
Comparative Graphs

Click Graph Reset at the bottom of the panel and choose Yes
Select option Line from the menu at the top of the Define Locations section
Enter 300 as the Total number of data points
Choose Line defined by End points
Specify these end points to be 330, 0, 0 and 330, 300, 0
In the Data Type tab, choose Post 4 as the post register number in which to
load field data and then click Go To Load Data
In the Load Data panel, select option Cell from the Data Type menu
Turn On the Smooth Option
Select item Velocity Component U from the Scalar Data list
Click Get Data
Select Go To > Field Data. The Field Data panel display will confirm that the
U velocity component (SU) is now loaded in post register no. 4
In the Graph Data section, choose to plot the Graph data against the Y-axis
Type
MEMORY MAXPRB 1000

in the I/O window to increase the number of sensors (data points) allowed
Back on the Field Data panel, click Create Graph to see a default graph of
the data
Click Go To Customize Graph
In the Customize Graphs panel, go to the Pairs tab
Click Clear at the bottom of the Register Pairs list to remove the existing
graph
Choose SU (which should be Reg# 9) from the X-Axis Register list
Choose Y LOCATION (which should be Reg# 4) from the Y-Axis Register
list
Click Add Register Pair and Apply
Go to the Axis tab
In the X-Axis Parameters sub-tab, change the Title to U - m/s
Enter -0.4 and 1.5 in the Xmin, Xmax boxes, respectively
Enter 0.1 in the Xmajor box and click Apply
In the Y-Axis Parameters sub-tab, change the Title to Y - mm. Also, enter 0
and 300 in the Ymin, Ymax boxes, respectively
Select Integer as the Numbers format
Click Apply
Go to the Options sub-tab
In the Additional Graph Labels section, select label no. 1 in the scroll list and
then enter U velocity profile at x = 330 mm in the text box underneath.
Enter coordinates (3.5, 9.0) in the Sx and Sy boxes
Click Apply
In the main window, click Redraw to display the modified graph

Now import the experimental data and the data sets from the previous two tutorials
and plot them all on the same graph:

2-42

Select Go To > External Data


The File containing data from the hexahedral mesh is hex330.xy. Find it
using the file manager
Version 4.02

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing
Comparative Graphs

Select xyxyxy from the Establish x-y pairs list


Click Create Graph
The File containing data from the tetrahedral mesh is tet330.xy. Find it
using the file manager
Select xyxyxy from the Establish x-y pairs list
Click Create Graph
Select File exp330.xy using the file manager
Select xyxyxy from the Establish x-y pairs list
Click Create Graph to display Figure T2.3-8

Figure T2.3-8

Graph comparing U velocity data at x = 330 mm

Files containing data at x = 30 mm, x =230 mm and x = 380 mm are also available
and graphs of these are shown below. These graphs have been generated in the same
way as Figure T2.3-8.

Version 4.02

2-43

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing
Comparative Graphs

2-44

Figure T2.3-9

Graph comparing U velocity data at x = 30 mm

Figure T2.3-10

Graph comparing U velocity data at x = 230 mm

Version 4.02

Tutorial 2.3

POLYHEDRAL MESH ANALYSIS

Post-Processing
Final Operations

Figure T2.3-11

Graph comparing U velocity data at x = 380 mm

The results from the three meshes show broad agreement with the experimental
data, although all of them also show discrepancies, primarily in the recirculation
zone. In this region in particular, the hexahedral mesh is marginally more accurate
than the other two. However, examination of the model size and number of
iterations and time required to reach convergence (shown in Table 1) shows that the
polyhedral mesh may be preferable.
Table 1:Comparison of run data
Mesh

No. of
cells

Hexahedral
Tetrahedral
Polyhedral

67699
140141
60838

No. of
Time (s)a
iterations
179
169
95

412
644
277

a.Run time will vary with computer speed

The polyhedral mesh fills the problem geometry much more efficiently, allowing
fewer cells to be used and run times to be reduced without significantly degrading
the solution accuracy. Conversely, a polyhedral mesh with as many cells as the
tetrahedral mesh in Tutorial 2.2 would be expected to produce a significant increase
in accuracy with little increase in run time.
Final
Operations

Version 4.02

This tutorial is now complete. Exit pro-STAR by selecting:

File > Quit > Quit, Nosave

2-45

Tutorial 3 POROUS MEDIA FLOW


The next three tutorials (Tutorial 3.1 to Tutorial 3.3) are designed to familiarise
users with STAR-CDs capabilities for modelling porous media flow. A polyhedral
mesh, based on the geometry used in Meshing Tutorial 6 (see the Meshing Tutorials
volume) is provided. The tutorials demonstrate how to model flow in highly porous
(isotropic and orthotropic) or moderately porous media.

Figure T3.0-1

Version 4.02

Mesh geometry

3-1

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Physical Problem Description


Preliminaries

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

This tutorial aims to demonstrate how to:

Model flow through an isotropic, highly porous medium


Produce vector and contour plots
Compute sums and averages of field data
Check the validity of the porous model

Physical Problem Description


The tutorial models an isotropic porous subdomain of length 0.03 m in the centre of
the catalyst geometry. The pressure drop per unit length is given by the equation
p
------ = ( v + )v
L
where v is the superficial velocity through the medium and , are coefficients
defining the porous resistance.
Values for the resistance coefficients can be measured experimentally or derived
using various empirical relationships, depending on the exact nature of the problem
(see Chapter 8 of the Methodology volume). In this case = 25 and = 1500. These
values are roughly what would be expected from a porous catalyst.
Modelling Strategy
The following steps are taken to set up the model:

In the cell table list, define a porosity index for the porous medium
Define porous properties pertaining to that porosity index
Select a cell range for the porous medium
Modify the cell type of the selected cell range

Pre-Processing
Preliminaries Create a sub-directory for this tutorial called tut3-1. Copy the coded files
catalyst.cel, catalyst.vrt, catalyst.bnd and catalyst.inp
supplied with the STAR-CD installation into it.

Start pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (cat_iso) in the Casename text box
Click Continue
Select File > Read File... in the main pro-STAR window
In the Input Coded Command File dialog, change the File Name to
catalyst.inp
Click Apply
Click Close

This will read default problem settings from file catalyst.inp as well as
problem geometry and boundary location definitions from the remaining three files.
3-2

Version 4.02

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Pre-Processing
Mesh Checking

In the main window, select File > Model Title


In the Title text box type:
3D FLOW THROUGH AN ISOTROPIC HIGHLY POROUS CATALYST

Mesh
Checking

Click Apply

Verify that the mesh data are correct by selecting all cells and vertices and plotting
the mesh in Hidden Surface mode:

In the main window, select C > All. The I/O window tells you that the mesh
read in has 29,108 cells.
Select V > All. The I/O window tells you that the mesh has 103,488 vertices.
Select Hidden Surface as the cell plot type
Select Plot > Up Axis > Z
Set the viewpoint by selecting View > Isometric > -1,1,1
Click Cell Plot

The mesh geometry is shown in Figure T3.0-1


Material
Properties

This part of the model building is conveniently handled through a series of panels
under the Thermophysical Models and Properties folder.

Go to the Thermophysical Models and Properties folder to display the


available facilities
Select sub-folder Liquids and Gases
Open the Molecular Properties panel

In this tutorial, the fluid is air at standard pressure and temperature and its
temperature, density and viscosity are assumed to be constant. These conditions are
also the pro-STAR defaults, so the properties shown on the panel are acceptable.

Open the Turbulence Models panel


Click On to set up a turbulent flow
Select the desired turbulence model, K-Epsilon/High Reynolds Number,
from the Turbulence menu
Click Apply to save your settings
Open the Monitoring and Reference Data panel to check the cell whose flow
variable values will be sent to the solution monitoring file (cat_iso.run).
The cell number appears in the Monitoring cell number box and can be left at
its default value of 1. The displayed Reference Data defaults for pressure and
reference pressure cell location are also acceptable.

Next, define the porous subdomain. In the cell table list, define cells of type 2 as
belonging to a porous medium (called POR1 and identified by colour 3 and porosity
index 1):

Version 4.02

In the main window, click the CTAB button


Select cell no. 2 in the Cell Table Editors scroll list
Select Fluid from the Cell Type menu
Change the value in the Porosity Index box to 1
Type POR1 in the Name box
Click Apply and then Close
3-3

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Pre-Processing
Material Properties

Specify the resistance coefficients in the global Cartesian directions:

Go to the STAR GUIde window and select folder Thermophysical Models


and Properties
Select sub-folder Porosity
Open the Resistance and Porosity Factor panel
Select option By local coordinate system in the Define X1,X2,X3 menu and
type 1 in the Local Coord. System box
Type 25 in the AlphaX1, AlphaX2 and AlphaX3 boxes
Type 1500 in the BetaX1, BetaX2 and BetaX3 boxes
Click Apply

Collect all cells that will take on porous properties into a set:

Select View > Axis > -X


Select C > Unselect > Type... and click on any of the blue extrusion-layer
cells
Click Cell Plot
Select C > New > Zone
Carefully draw a box enclosing only the central block of cells, i.e. those
within the catalyst ring
If any cells outside the ring are accidentally selected, they may be removed
from the cell set by selecting C > Unselect > Zone and drawing a box around
them
Click Cell Plot

Some of the blue extrusion-layer cells are also part of the porous subdomain. To
include these three layers, you will need to grow the cell set three times:

3-4

Select V > New > Cell Set


Select C > New > Vertex Set (Face)
Select V > New > Cell Set
Select C > New > Vertex Set (Face)
Select V > New > Cell Set
Select C > New > Vertex Set (Face)
Click Cell Plot to display Figure T3.1-1
Change the viewpoint by selecting View > Isometric > -1, 1, 1

Version 4.02

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Pre-Processing
Material Properties

Figure T3.1-1

Catalyst ring

Assign the selected cells to the currently active cell type (no. 2) and plot:

In the main window, select Tools > Cell Tool


In the Cell Table scroll list, highlight cell type number 2 and then choose
Modify Type > Cell Set
Click Replot. You will see that the colour of the chosen cells is now green
(colour 3), confirming the change to porous cells.
Close the Cell Tool

Finally, select the whole mesh and display it as shown in Figure T3.1-2 to confirm
visually that the correct cells have become porous.

Version 4.02

In the main window, select C > All


Click Cell Plot

3-5

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Pre-Processing
Boundary conditions

Figure T3.1-2

Boundary
conditions

Mesh geometry displaying porous subdomain

Specify boundary conditions for the inlet and outlet boundary regions:

Select folder Define Boundary Conditions and then open the Define Boundary
Regions panel
Select region no. 1 (the inlet) in the scroll list
Select option TI/Length from the Turb. Switch menu
Enter inlet conditions as shown below:

Click Apply
Select region no. 2 (the outlet) in the scroll list
The default settings are acceptable, so click Apply

Check visually that the boundary conditions are applied correctly:


3-6

Version 4.02

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

CFD Analysis
Final Operations

Final
Operations

In the main window, click Bound from the Cell Plot Display Options button
group
Select B > All
Click Cell Plot

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the problem and geometry files and exit from
pro-STAR, as shown below. Alternatively, you may run STAR interactively, as
described in the next section.

In the main pro-STAR panel, select File > Write Geometry File
Set the Scale Factor to 0.1. This gives the catalyst a realistic maximum
diameter of 10cm
Click Apply. Ignore the I/O window warning regarding the scale factor
Click Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
To perform the analysis interactively, proceed as follows:

In the main pro-STAR panel, select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Leave all settings at their default values and click Start New Analysis

The analysis will then start automatically. The solution should satisfy the
convergence criteria within the specified maximum number of iterations. Check file
cat_iso.info for error messages during the run. There should be none.
Post-Processing
Preliminaries Read in the results of the analysis:

Select folder Post-Processing


Open the Load Data panel to display the File(s) tab
Click Open Post File

You are now ready to start the post-processing session.


Postprocessing

Load the velocity vector components and then plot the vectors:

Version 4.02

Go to the Data tab and check that Data Type Cell is selected
In the Vector Data list, select item Velocity Component UVW to load all
three velocity components
In the Scalar Data list, check that the default setting is None
Click Get Data
Select Go To > Create Plots to open the Create Plots panel
In the Section Clipped tab, select Vector from the Option menu and Edge
from the Edge/Mesh menu
3-7

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Post- processing

Change the Normal Vector to -1, 0, 0


Click Apply
Click Plot to Screen
Click off Bound in Cell Plot Display Options
Select View > SNORMAL to display Figure T3.1-3

Figure T3.1-3

Velocity vector plot on the y-z plane

To establish the approximate mean velocity magnitude in the porous subdomain:

3-8

Open the Cell Tool and select Cell Type number 2


Click Set Active Type
Close the Cell Tool
Select C > New > Type(Current) and then click Cell Plot to display Figure
T3.1-4

Version 4.02

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Post- processing

Figure T3.1-4

Velocity vectors on the y-z plane in the porous region

Note that the mean velocity magnitude through the porous cells is approximately
3.2 m/s.
Now inspect the pressure variation throughout the model:

Version 4.02

Select C > All


Go back to the Load Data panel by clicking Go To Load Data
In the Data tab, select option Cell & Wall/Bound (Smooth) from the Data
Type menu
In the Scalar Data list, select item Pressure and then click Get Data
Select Go To > Create Plots to open the Create Plots panel
In the 3-D Surface tab, select plot options Contour (filled) and Edge
Click Plot to Screen
Click Cell Plot to display Figure T3.1-5

3-9

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Analysis of Results

Figure T3.1-5

Analysis of
Results

Figure T3.1-5 shows that the largest pressure drop occurs across the porous cells.
To see the value of this drop more clearly, collect all cells within the porous region
(porosity index 1) into a set and plot pressure contours on the surface of the porous
medium.

3-10

Cell-averaged filled contour plot of pressure

In the main window, select C > New > Porosity


When the cursor appears on your screen, click any cell in the porous region.
The I/O window message should indicate that 9,621 cells have been selected
Select View > Isometric > -1,1,1
Click Cell Plot to display Figure T3.1-6

Version 4.02

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Analysis of Results

Figure T3.1-6

Filled contour plot of pressure on the surface of the porous medium

Figure T3.1-6 shows that the pressure across the upstream interface of the porous
medium is non-uniform, so an average needs to be calculated. To do this, it is
necessary to collect all cells on each of the porous interfaces into a set:

Version 4.02

Select V > New > Cell Set Surface


Select Tools > Cell Tool
In the Cell Tool, select Table# 11 from the list and click Set Active Type
Select C > New > Type(Current)
Select V > Subset > Cell Set Surface
Select C > New > Vertex Set (Face)
Click Cell Plot
Select View > Axis > -X
Turn off edge and mesh plotting to display Figure T3.1-7
Select C > Subset > Zone...
Draw a box around the left-hand (upstream) group of cells

3-11

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Analysis of Results

Figure T3.1-7

Vertex set on the upstream boundary of the porous medium

The pressure values at the fluid cells adjacent to the porous medium can be
reasonably used to approximate the pressure values on the upstream surface of the
porous medium, given that the pressure drop across this medium is much greater
than that in the unresisted flow. In addition, cell values are more suitable than
surface vertex values since the latter are averages of cell values on either side of the
surface separating the porous from the non-porous subdomain, and may lead to a
possible underestimate of the pressure drop. This point is illustrated in Figure
T3.1-8.

3-12

Version 4.02

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Analysis of Results

Porous
subdomain

Pressure

Actual surface
value
Values at
adjacent
cells

Vertex value

y-coordinate

Figure T3.1-8

Diagram illustrating the reason for choosing cell-centred pressure values

Load the pressure values and their corresponding cell volumes into pro-STARs
post registers:

Select Post > Operate


Select Function > Load Cell Data > Pressure
Select Register 5 using Relative Values
Click Apply
Select Function > Load Cell Data > Volume
Select Register 6
Click Apply

The average pressure value should be accurately volume-weighted. If the cell


values were averaged without volume-weighting, the small near-wall cells would be
over-represented and the pressure magnitude would thus be underestimated.
To calculate the pressure-volume product for each cell:

Version 4.02

Select Function > Multi-Register > Multiply


3-13

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Analysis of Results

Select Register 4 = Register 5 * Register 6


Click Apply then Close

Sum the pressure-volume product on the upstream surface of the porous medium:

In the I/O window, type *get prs1 rtot 4. A value of 1.505 should be
displayed.

Sum the cell volumes on the upstream surface of the porous medium:

In the I/O window, type *get vol1 rtot 6. A value of 0.822e-2 should be
displayed.

The volume-weighted average pressure across the upstream surface is the first of
these parameters divided by the second, i.e. 183.09 Pa.
The pressure across the downstream surface of the porous medium is also
non-uniform, though to a much lesser degree. The average pressure across the
non-porous cells on this surface can be calculated similarly and was found to be
33.88 Pa. The average pressure drop is therefore 149.21 Pa compared to a
theoretical pressure drop of 151.68 Pa. Since the theoretical value assumes a
constant superficial velocity of 3.2 m/s throughout the porous medium, while the
calculated velocity varies, the 1.6% discrepancy between the theoretical and
calculated pressure drops is acceptable.
The turbulence parameters can be inspected by plotting the relevant contours:

3-14

Select C > All


Select View > SNORMAL
Go back to the Load Data panel by clicking Go To Load Data
Select Data Type Cell & Wall/Bound (Smooth)
Select item Turb Kinetic Energy from the Scalar Data list
Click Get Data
Select Go To > Create Plots
Under the Section Clipped tab, select options Contour (filled) and Edge
Click Plot To Screen to display Figure T3.1-9
In the Load Data panel, select item Dissipation Rate from the Scalar Data
list
Click Get Data
In the main window, click Replot to display Figure T3.1-10

Version 4.02

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Analysis of Results

Figure T3.1-9

Turbulence kinetic energy contour plot

Figure T3.1-10

Dissipation rate contour plot

Turbulence parameters are fixed in the porous medium by assuming a turbulence


intensity of 10% and length scale of 0.01 m. These correspond to values of 0.154
m2/s2 and 0.989 m2/s3 for the turbulence kinetic energy and dissipation rate,
respectively. Fixing the turbulence parameters within the porous subdomain causes
Version 4.02

3-15

Tutorial 3.1

FLOW IN AN ISOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Analysis of Results

the flow downstream of it to exhibit very little turbulence. Note that such settings
may be changed via the Turbulence Properties panel within the Thermophysical
Models and Properties > Porosity sub-folder in the STAR GUIde window.
Finally, confirm that STAR-CDs porous model has been used correctly by
normalising the resistance coefficients as follows (again assuming a superficial
through-flow velocity of 3.2 m/s):
L
------- = 0.622

L
-------- = 11.67
V
The simplified momentum equation employed within the porous medium is only
valid if the sum of the normalised parameters is >> 1. This condition is satisfied here
and the total resistance term is one order of magnitude greater than the convection
term. Therefore, the use of the porosity model is justified.
Quit the pro-STAR session by choosing:

3-16

File > Quit > Quit, Nosave

Version 4.02

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Physical Problem Description


Preliminaries

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS


MEDIUM

This tutorial aims to demonstrate how to:

Model flow through an orthotropic, highly porous medium


Produce vector and contour plots
Compute sums and averages of field data
Check the validity of the porous model

Physical Problem Description


In this tutorial, the isotropic, highly porous medium specified in Tutorial 3.1 is
re-defined as an orthotropic porous medium. To this end, resistance coefficients are
set up so as to prevent flow along the x- and z-directions of the global Cartesian
coordinate system (see Figure T3.2-1). The values of these coefficients in the
y-direction are the same as in Tutorial 3.1, i.e.
y = 25 and y = 1500
Modelling Strategy
The modelling steps used in setting up this case are identical to those described in
Tutorial 3.1, except that the porous medium now has orthotropic properties.
Pre-Processing
Preliminaries A number of preliminary file-copying operations are needed for proper operation of
this tutorial, as follows:

Create a sub-directory for the tutorial called tut3-2 and copy the model file
generated in Tutorial 3.1 (i.e. cat_iso.mdl) into it
Rename this file cat_ortho.mdl
Since the solution obtained in Tutorial 3.1 will act as the starting point of the
current analysis, it is also necessary to copy the solution file for that case
(cat_iso.ccm) to the current directory

Start up the pro-STAR interface:

Type prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Accept the default case name (cat_ortho) displayed in the Casename text box
Select the Resume existing .mdl file option
Deselect the Append to .echo file option
Click Continue

The above reads the data in file cat_ortho.mdl and sets up the model as it was
at the end of Tutorial 3.1.

Version 4.02

In the main window, select File > Model Title


In the Title text box, change the title to:
3-17

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Pre-Processing
Material Properties

3D FLOW THROUGH AN ORTHOTROPIC HIGHLY POROUS


CATALYST

Click Apply

Check the model geometry retrieved from file cat_ortho.mdl

Select C > All


In the main window, click Cell Plot
Turn off the Bound option in Cell Plot Display Options group to display
Figure T3.2-1

Figure T3.2-1

Material
Properties

Enter appropriate resistance coefficients for the porous medium in the Cartesian
coordinate system:

3-18

Mesh Geometry

Go to the STAR GUIde window and select folder Thermophysical Models


and Properties
Select sub-folder Porosity
Open the Resistance and Porosity Factor panel
Select option By local coordinate system from the Define X1,X2,X3 menu
Enter 1 in the Local Coord. System box (or use the Select button to help locate
the required coordinate system number)
Type 1.0E6 in the AlphaX1 and BetaX1 boxes
Type 25 in the AlphaX2 box and 1500 in the BetaX2 box
Type 1.0E6 in the AlphaX3 and BetaX3 boxes
Click Apply
Version 4.02

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

CFD Analysis
Run Time Controls

Run Time
Controls

Set restart options so that the analysis will restart from the solution file of Tutorial
3.1:

Final
Operations

Select folder Analysis Preparation/Running and open the Analysis (Re)Start


panel
Select Standard Restart from the Restart File Option list
Click the browser button next to the Restart File box, select file
cat_iso.ccm from the browser dialog and then click OK
Click Apply

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the problem and geometry files and exit from
pro-STAR, as shown below. Alternatively, you may run STAR interactively, as
described in the next section.

In the main pro-STAR panel, select File > Write Geometry File
Accept the default value, 0.1, shown in the Scale Factor box
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
To perform the analysis interactively, proceed as follows:

In the main pro-STAR panel, select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Leave all settings at their default values and click Restart Analysis

The analysis will then start automatically. The solution should converge within the
specified maximum number of iterations. Check file cat_ortho.info for error
messages during the run.
Post-Processing
Preliminaries Read in the results of the analysis:

Select folder Post-Processing

Open the Load Data panel to display the File(s) tab

Click Open Post File


You are now ready to start the post-processing session
Postprocessing

Load the velocity vector components and plot the vectors:

Version 4.02

Go to the Data tab and check that Data Type Cell is selected
In the Vector Data list, select item Velocity Component UVW to load all
three velocity components
In the Scalar Data list, check that the default setting is None
Click Get Data
Select Go To > Create Plots to open the Create Plots panel
3-19

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Post- processing

In the Section Clipped tab, select Vector from the Option menu and Edge
from the Edge/Mesh menu
Check that the Normal setting is -1, 0, 0
Click Apply
Click Plot to Screen
Select View > SNORMAL to display Figure T3.2-2

Figure T3.2-2

Velocity vectors on the y-z plane

Initial comparison of Figure T3.2-2 with the equivalent plot for the isotropic porous
medium, Figure T3.1-3, reveals few apparent differences between them. To
examine any variations more closely, a velocity magnitude plot in the porous
subdomain is necessary:

3-20

Open the Cell Tool and select Cell Type number 2


Select C > New > Type(Current) and click Cell Plot to display Figure
T3.2-3
Close the Cell Tool

Version 4.02

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Post- processing

Figure T3.2-3

Velocity vectors on the y-z plane in the porous subdomain

The significant difference between Figure T3.2-3 and the equivalent plot for the
isotropic porous medium, Figure T3.1-4, is that the orthotropic property prevents
the bulk of the fluid flowing through the centre of the model from spreading
outwards and slowing down, as it does in the isotropic case. Note that the mean
velocity magnitude in the porous subdomain is approximately 3.2 m/s.
Now inspect the cell-based pressure variation:

Version 4.02

Select C > All


Go back to the Load Data panel by clicking Go To Load Data
Select Data Type Cell & Wall/Bound (Smooth)
In the Scalar Data list, select item Pressure
Click Get Data
Select Go To > Create Plots to open the Create Plots panel
In the 3-D Surface tab, select plot options Contour (filled) and Edge
Click Plot to Screen
Click Cell Plot to display Figure T3.2-4

3-21

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Post- processing

Figure T3.2-4

Cell-averaged pressure plot

Before calculating the pressure drop across the catalyst, plot the cell-centred
pressure in the porous subdomain:

3-22

Select C > New > Porosity and click anywhere inside the porous subdomain
Select View > Isometric > -1,1,1
Click Cell Plot to display Figure T3.2-5

Version 4.02

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Post- processing

Figure T3.2-5

Cell-averaged pressure plot in the porous subdomain

The pressure across the surfaces of the porous medium is clearly non-uniform, so
averages should be calculated. For the downstream surface:

Version 4.02

Select V > New > Cell Set Surface


Select Tools > Cell Tool
In the Cell Tool, select Table# 11 from the list and click Set Active Type
Select C > New > Type(Current)
Select V > Subset > Cell Set Surface
Select C > New > Vertex Set (Face)
Click Cell Plot
Select View > Axis > -X
Turn off edge and mesh plotting
Select C > Subset > Zone...
Draw a box around the right-hand (downstream) group of cells
Select Post > Operate
Select Function > Load Cell Data > Pressure
Select Register 5 using Relative Values
Click Apply
Select Function > Load Cell Data > Volume
Select Register 6
Click Apply
Select Function > Multi-Register > Multiply
Select Register 4 = Register 5 * Register 6
Click Apply then Close
In the I/O window type *get prs2 rtot 4. A value of 0.280 should be
3-23

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Analysis of Results

displayed.
In the I/O window type *get vol2 rtot 6. A value of 0.841e-2 should be
displayed.

The volume-weighted average pressure across the downstream surface is the first of
these parameters divided by the second, i.e. 33.29 Pa. The pressure across the
upstream surface of the porous subdomain can be calculated similarly and found to
be 182.07 Pa.
Analysis of
Results

The above figures give an average pressure drop of 148.78 Pa. This may be
compared with the expected pressure drop of 151.68 Pa, based on an average cell
velocity of 3.2 m/s. The user can verify these calculations.
The turbulence parameters may be inspected by plotting the relevant contours:

3-24

Select C > All


Select View > SNORMAL
Go back to the Load Data panel by clicking Go To Load Data
Select Data Type Cell & Wall/Bound (Smooth)
Select item Turb Kinetic Energy from the Scalar Data list
Click Get Data
Select Go To > Create Plots
Under the Section Clipped tab, select options Contour (filled) and Edge
Click Plot To Screen
Click Cell Plot to display Figure T3.2-6
In the Load Data panel, select item Dissipation Rate from the Scalar Data
list
Click Get Data
In the main window, click Replot to display Figure T3.2-7

Version 4.02

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Analysis of Results

Version 4.02

Figure T3.2-6

Contour plot of turbulence kinetic energy

Figure T3.2-7

Contour plot of dissipation rate

3-25

Tutorial 3.2

FLOW IN AN ORTHOTROPIC, HIGHLY POROUS MEDIUM

Post-Processing
Analysis of Results

Turbulence parameters are fixed in the porous medium by assuming a turbulence


intensity of 10% and length scale of 0.01 m. Consequently, the values for turbulence
kinetic energy and its dissipation rate should be roughly 0.154 m2/s2 and 0.989
m2/s3, respectively, based on a velocity magnitude of 3.2 m/s. As in Tutorial 3.1,
fixing the turbulence parameters in this way causes the flow downstream of the
porous medium to exhibit very little turbulence.
The normalised resistance coefficients have the same values as those in Tutorial
3.1. Therefore, the same conclusions about the validity of using the STAR-CD
porous model can be drawn in this case.
Quit the pro-STAR session by choosing:

3-26

File > Quit > Quit, Nosave

Version 4.02

Tutorial 3.3

FLOW IN A MEDIUM WITH ISOTROPIC FLOW RESISTANCE

Physical Problem Description


Preliminaries

Tutorial 3.3

FLOW IN A MEDIUM WITH ISOTROPIC FLOW


RESISTANCE

This tutorial aims to demonstrate how to:

Model flow in a moderately porous region with isotropic flow resistance


Introduce momentum source terms via user coding
Produce vector and contour plots

Physical Problem Description


In this tutorial, the properties of the porous medium defined in Tutorial 3.1 are
modified in order to demonstrate the implementation of a flow resistance
mechanism (momentum sink) via user coding. The porous region is assumed to be
moderately porous and to exhibit the same flow resistance in all directions. The
resultant pressure drop is assumed to depend on the superficial velocity in exactly
the same way as in the standard STAR-CD porous media model (see Chapter 8 of
the Methodology volume). The user specifies values for the resistance coefficients,
and , which in this example are:
= = 300.0
As intended, the above values do not satisfy the criteria for highly porous media
under the problems flow conditions. Specifically, for L = 0.03 m, = 1.205 kg/m3,
U = 3.2 m/s, the normalised resistance coefficients are equal to 7.469 and 2.334,
respectively, indicating that the resistance term is of the same order of magnitude as
the convection term in the momentum equations. This simulation thus requires a
more rigorous treatment of momentum transport than the STAR-CD porosity model
can provide.
Modelling Strategy
The following steps are required to set up flow with a momentum sink:

Define a unique cell identifier for the sink region


Select the cells in the sink region
Assign these to the cell type defined above
Employ user coding to calculate momentum sources
Supply a user subroutine to calculate the flow resistance

Pre-Processing
Preliminaries The following file-copying operations are needed for proper operation of this
tutorial, as follows:

Create a sub-directory for the tutorial called tut3-3 and copy the model file
generated in Tutorial 3.1 (i.e. cat_iso.mdl) into it
Rename this file cat_res.mdl

Start up the pro-STAR interface:


Version 4.02

3-27

Tutorial 3.3

FLOW IN A MEDIUM WITH ISOTROPIC FLOW RESISTANCE

Pre-Processing
Material Properties

Type prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Accept the default case name (cat_res) displayed in the Casename text box
Select the Resume existing .mdl file option
Deselect the Append to .echo file option
Click Continue

The above reads the data in file cat_res.mdl and sets up the model as it was at
the end of Tutorial 3.1.

In the main window, select File > Model Title


In the Title text box, change the title to:
3D FLOW THROUGH A CATALYST WITH ISOTROPIC FLOW
RESISTANCE

Click Apply

Perform a visual check of the mesh geometry retrieved:

Select C > All


In the main window, click Cell Plot
Click off the Bound button in the Cell Plot Display Options group to display
Figure T3.3-1

Figure T3.3-1

Material
Properties

Most properties used in Tutorial 3.1 are acceptable for this tutorial. The one item
requiring adjustment is a redefinition of the porous region so that it does not use the
previously set parameters:

3-28

Mesh geometry

In the main window, click the CTAB button


Version 4.02

Tutorial 3.3

FLOW IN A MEDIUM WITH ISOTROPIC FLOW RESISTANCE

User Subroutine
Run Time Controls

Select cell index no. 2 in the Cell Table Editors scroll list
Change the Porosity Index back to 0
Type POR2 in the Name box
Click Apply and then Close

Signal to pro-STAR that momentum source terms will be supplied via user
subroutine SORMOM and place a dummy version of this subroutine in subdirectory
ufile.

Run Time
Controls

In the main window, choose File > System Command


Type ufiles in the text box, click Apply and then Close
Open the STAR GUIde window and select folder Thermophysical Models and
Properties
Open sub-folder Sources
Select Source Terms to open the corresponding panel and then select the
Momentum tab
Click On to activate momentum source calculations and then choose User
Coding from the Define Source menu
Click Apply and Define User Coding to write the default (dummy) version
of subroutine SORMOM in sub-directory ufile, ready for editing

Check the status of the run time control parameters.

Final
Operations

Select folder Analysis Preparation/Running and open the Set Run Time
Controls panel
Enter 1e-4 for the maximum residual tolerance
Click Apply

The boundary conditions remain the same so the pre-processing task is now
complete. If you wish to terminate the session at this stage, save all model data,
write the problem and geometry files and exit from pro-STAR, as shown below.
Alternatively, you may run STAR interactively, as described in the CFD Analysis
section.

In the main pro-STAR panel, select File > Write Geometry File
Accept the default value, 0.1, shown in the Scale Factor box
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

User Subroutine
To introduce the coding needed for the extra source terms, use pro-STARs built-in
editor to edit subroutine SORMOM (in file sormom.f within sub-directory ufile)
as follows:

Version 4.02

In the main pro-STAR panel, select File > Edit File


In the pro-STAR Editor dialog, click File > Open
In the File Selection dialog displayed, enter sub-directory ufile and select file
sormom.f
Click OK
3-29

Tutorial 3.3

FLOW IN A MEDIUM WITH ISOTROPIC FLOW RESISTANCE

User Subroutine
Final Operations

Edit the contents of the subroutine by adding an extra 11 lines of code after
the explanatory section, as shown below
Click File > Save
Click File > Quit to exit from the editor

C*************************************************************************
SUBROUTINE SORMOM(S1U,S2U,S1V,S2V,S1W,S2W,POROS)
C
Source-term for momentum
C*************************************************************************
C--------------------------------------------------------------------------*
C
STAR-CD VERSION 4.02
C--------------------------------------------------------------------------*
INCLUDE comdb.inc
COMMON/USR001/INTFLG(100)
INCLUDE usrdat.inc
DIMENSION SCALAR(50)
EQUIVALENCE( UDAT12(001), ICTID )
EQUIVALENCE( UDAT03(001), CON )
EQUIVALENCE( UDAT03(006), G1 )
EQUIVALENCE( UDAT03(007), G2 )
EQUIVALENCE( UDAT03(008), G3 )
EQUIVALENCE( UDAT03(019), VOLP )
EQUIVALENCE( UDAT04(001), CP )
EQUIVALENCE( UDAT04(002), DEN )
EQUIVALENCE( UDAT04(003), ED )
EQUIVALENCE( UDAT04(005), PR )
EQUIVALENCE( UDAT04(008), TE )
EQUIVALENCE( UDAT04(009), SCALAR(01) )
EQUIVALENCE( UDAT04(059), U )
EQUIVALENCE( UDAT04(060), V )
EQUIVALENCE( UDAT04(061), W )
EQUIVALENCE( UDAT04(062), VISM )
EQUIVALENCE( UDAT04(063), VIST )
EQUIVALENCE( UDAT04(007), T )
EQUIVALENCE( UDAT04(067), X )
EQUIVALENCE( UDAT04(068), Y )
EQUIVALENCE( UDAT04(069), Z )
C------------------------------------------------------------------------C
This subroutine enables the user to specify the momentum source
C
term (per unit volume) in linearised form:
C
C
Source in x direction = S1U-S2U*U, (N/m3)
C
Source in y direction = S1V-S2V*V, (N/m3)
C
Source in z direction = S1W-S2W*W, (N/m3)
C
C
in an arbitray manner.
C
C
** Parameters to be returned to STAR: S1U,S2U,S1V,S2V,S1W,S2W,
C
POROS
C
C------------------------------------------------------------------------if (ictid.eq.2) then
gvmag = sqrt(u**2+v**2+w**2)
3-30

Version 4.02

Tutorial 3.3

FLOW IN A MEDIUM WITH ISOTROPIC FLOW RESISTANCE

CFD Analysis
Preliminaries

galpha = 300.0
gbeta = 300.0
s1u
= 0.0
s1v
= 0.0
s1w
= 0.0
s2u
= galpha*gvmag + gbeta
s2v
= galpha*gvmag + gbeta
s2w
= galpha*gvmag + gbeta
endif
C-------------------------------------------------------------------------C
RETURN
END

CFD Analysis
To perform the analysis interactively, proceed as follows:

In the main pro-STAR panel, select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Leave all settings at their default values and click Start New Analysis

The analysis will then start automatically. The solution should converge within the
specified maximum number of iterations. Check file cat_res.run for error
messages. There should be none.
Post-Processing
Preliminaries Read in the results of the analysis:

Select folder Post-Processing


Open the Load Data panel to display the File(s) tab
Click Open Post File

You are now ready to start the post-processing session


Postprocessing

Load the velocity vector components and plot the vectors:

Version 4.02

Go to the Data tab and check that Data Type Cell is selected
In the Vector Data list, select item Velocity Component UVW to load all
three velocity components
In the Scalar Data list, check that the default setting is None
Click Get Data
Select Go To > Create Plots to open the Create Plots panel
In the Section Clipped tab, select Vector from the Option menu and Edge
from the Edge/Mesh menu
Check that the Normal setting is -1,0,0 and then click Apply
Click Plot to Screen
Select View > SNORMAL to display Figure T3.3-2

3-31

Tutorial 3.3

FLOW IN A MEDIUM WITH ISOTROPIC FLOW RESISTANCE

Post-Processing
Post- processing

Figure T3.3-2

Velocity vector plot

To examine the velocity vectors in the region where the momentum sink is applied:

Open the Cell Tool and select Cell Type number 2


Select C > New > Type(Current) and click Cell Plot to show Figure T3.3-3
Close the Cell Tool

Figure T3.3-3
3-32

Velocity vector plot in the porous region


Version 4.02

Tutorial 3.3

FLOW IN A MEDIUM WITH ISOTROPIC FLOW RESISTANCE

Post-Processing
Results analysis

Inspect the pressure variation throughout the model:

Go back to the Load Data panel by clicking Go To Load Data


Select option Cell & Wall/Bound (Smooth) from the Data Type menu
In the Scalar Data list, select item Pressure
Click Get Data
Select Go To > Create Plots to open the Create Plots panel
In the 3-D Surface tab, select options Contour (filled) and Edge
Click Plot to Screen
Select C > All and click Cell Plot to display Figure T3.3-4

Figure T3.3-4

Results
analysis

The pressure drop in the sink region is of comparable magnitude to the pressure
variation elsewhere. To calculate the approximate total pressure drop across the
porous block, select cells of type 2 and plot cell-centred (non-averaged) pressure
contours:

Version 4.02

Cell-averaged pressure contours on the model surface

In the main window, select C > New > Type(Current)


Choose View > Isometric > -1,1,1
Click Cell Plot to display Figure T3.3-5

3-33

Tutorial 3.3

FLOW IN A MEDIUM WITH ISOTROPIC FLOW RESISTANCE

Post-Processing
Results analysis

Figure T3.3-5

Cell-averaged pressure contours on the surface of the porous region

The average pressure values on the two surfaces can be calculated as in Tutorial 3.1
and Tutorial 3.2. The pressure variation across the porous medium is 121.34 Pa.
To inspect the turbulence parameters:

Select C > All


Select View > SNORMAL
Go back to the Load Data panel by clicking Go To Load Data
Select Data Type Cell & Wall/Bound (Smooth)
Select item Turb Kinetic Energy from the Scalar Data list
Click Get Data
Select Go To > Create Plots
Under the Section Clipped tab, select options Contour (filled) and Edge
Click Plot To Screen
Click Cell Plot to display Figure T3.3-6
In the Load Data panel, select item Dissipation Rate from the Scalar Data
list
Click Get Data
In the main window, click Replot to display Figure T3.3-7

Using the full momentum equations does not fix the turbulence parameters in the
porous region, as was the case when the built-in porosity model was used.
Therefore, the turbulence kinetic energy and dissipation rate in the porous region
are calculated as in the rest of the flow field, leading to increased turbulence
downstream of the porous region. Depending on the nature of the problem, this can
be a limitation of using the full momentum equations with an added source term. In
some problems, further user coding to fix the turbulence parameters may also be
necessary.
3-34

Version 4.02

Tutorial 3.3

FLOW IN A MEDIUM WITH ISOTROPIC FLOW RESISTANCE

Post-Processing
Results analysis

Figure T3.3-6

Turbulence kinetic energy contour plot

Figure T3.3-7

Dissipation rate contour plot

Quit the pro-STAR session

Version 4.02

File > Quit > Quit, Nosave

3-35

Tutorial 4 FREE-SURFACE AND CAVITATION


The next three tutorials demonstrate how to set up and perform simulations of
free-surface and cavitating flows. All three tutorials use the same ready-to-use
polyhedral mesh, supplied in file gridfs.ccm and displayed in Figure T4.0-1.
The mesh consists of a single layer of polygonal prisms, suitable for performing a
planar, two-dimensional flow analysis. Examples of mesh generation are provided
in the Meshing Tutorials volume.

Figure T4.0-1

Version 4.02

Geometry plot showing the mesh, distribution of cell types and generic
boundary region names

4-1

Tutorial 4.1

GRAVITY-DRIVEN FLOW WITH A FREE SURFACE

Physical Problem Description


Preliminaries

Tutorial 4.1

GRAVITY-DRIVEN FLOW WITH A FREE SURFACE

This tutorial aims to demonstrate how to:

Perform an unsteady flow simulation using the transient SIMPLE algorithm


Activate STAR-CDs interface-capturing method for free-surface flows
Post-process the simulation results
Create animations using a neutral plot file together with pro-STARs
Animation utility

Physical Problem Description


The tutorial simulates gravity-driven fluid flow through a channel connecting two
chambers. The one on the left is represented by the green-coloured cells shown in
Figure T4.0-1 and the one on the right by the red-coloured cells. Given that this is
a 2D simulation, the front and back planes of Figure T4.0-1 are symmetry planes.
All other boundaries are solid walls except for the horizontal top surfaces where a
constant (atmospheric) static pressure is applied.
Initially, the left chamber is filled with liquid and the right one is filled with air.
Under the action of gravity, liquid flows into the right chamber under assumed
turbulent conditions. At the same time, liquid also flows in through the top left
boundary so as to maintain the fluid level constant. After some time, the free surface
on the right chamber settles at the level of the top boundary in the left chamber.
Modelling Strategy
During mesh generation, the cells on the right vessel were assigned to cell type 1
and those on the left to cell type 2. This was done in order to facilitate definition of
the initial liquid and air distribution within the model. Note that in some cases (e.g.
when inlet boundary conditions are present), one may start with the whole solution
domain filled by a single fluid phase. However, if pressure boundary conditions and
gravity are used to drive the flow, both phases need to be present within the domain.
Cell typing then offers a convenient way of assigning heavy and light fluid
characteristics to cells and thus make for a simple initialization process.
Pre-Processing
Preliminaries Create a directory for the tutorial called tut4-1 and copy file gridfs.ccm
supplied with the STAR-CD installation into it. In this directory:

Start pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (gravfs) in the Casename text box
Click Continue

Define a transient simulation of a free surface flow and give the case a title:

4-2

Open the Select Analysis Features panel in STAR GUIde


Select Transient in the Time Domain section
Select On in the Free Surface section
Version 4.02

Tutorial 4.1

GRAVITY-DRIVEN FLOW WITH A FREE SURFACE

Pre-Processing
Mesh Import & Checking

Click Apply
In the main window, select File > Model Title
In the Title text box type:
GRAVITY-DRIVEN FREE SURFACE FLOW

Mesh Import
& Checking

Click Apply

To import and display the mesh:

Select the Create and Import Grids folder in STAR GUIde


Open the Import Grids panel
Select the CCM button from the Format list
Enter gridfs.ccm as the CCM File name
Check that the State Name entry is set to default
Click Import Grid
In the main window, select C > All to put all cells into the current cell set
Check that the Geometry Plot mode and Hidden Surface plot type are
selected
Click Cell Plot to display the grid shown in Figure T4.0-1

The generic names of all boundary regions are indicated in Figure T4.0-1. Their
locations can be displayed on the grid plot via the following steps:

Material
Properties

Select the Locate Boundaries folder in STAR GUIde


Open the Create Boundaries panel
Select each region shown on the list in turn (except no. 0) and then click Plot
Region to display its location
Turn off the Bound Cell Plot Display Option

To examine the free-surface flow modelling options:

Select the Free Surface folder in Star GUIde


Open the Controls panel to inspect the default settings and confirm that they
are suitable for the current problem
Open the Molecular Properties panel
Note that, by default, the Light Fluid is AIR and the Heavy Fluid is H2O.
Alternative fluids can be selected from the database, if required, but the
defaults are suitable for this case.

To specify the magnitude and direction of the gravity force:

Select the Thermophysical Models and Properties folder in STAR GUIde


Open the Gravity panel
Change the Acceleration due to gravity to 9.81 m/s2
Change the gravity Direction to (0, -1, 0) in coordinate system 1
Click Apply

The remaining material properties are specified using panels in the Liquids and
Gases folder. These panels feature a Material # slider, enabling you to specify
different properties for each fluid material used. For the heavy and light fluids
defined in free surface problems, this functionality is not relevant since those
properties specified for the light fluid (Material # 1) are also applied automatically
Version 4.02

4-3

Tutorial 4.1

GRAVITY-DRIVEN FLOW WITH A FREE SURFACE

Pre-Processing
Initialization

to the heavy fluid (Material # 2).


Turn on turbulence modelling and select an appropriate model:

Select the Liquids and Gases folder and open the Turbulence Models panel
Check that the slider at the bottom of the panel is set to Material # 1
Turn On turbulence modelling
Select the k-Epsilon/High Reynolds Number model from the list
Click Apply

To select monitoring and pressure reference locations:

Open the Monitoring and Reference Data panel


Click the mouse symbol in the Monitoring cell number section to select the
monitoring location
In the main pro-STAR window, select a cell just to the right of the narrow
section. This location is chosen because large variations in field variable
values are expected here.
In the Reference Data section, click the mouse symbol to select the reference
pressure cell number
In the main pro-STAR window, click on a cell at the top right-hand corner.
This location is chosen because this corner will always contain air and so the
pressure variations are likely to be minimal.
Click Apply

To turn on buoyancy:

Initialization

Initially, the left-hand vessel contains only water and the right-hand vessel only air.
This initial distribution is specified by associating the two fluids with different cell
types:

Boundary
Conditions

Open the Buoyancy panel


Turn On buoyancy
The default values for Datum Location and Datum Density are suitable so
click Apply

Click the CTAB button in the main pro-STAR window to open the Cell Table
Editor
Select Table# 1 in the list, i.e. the cell type of the red-coloured cells
Check that the Initial Free Surface Material setting is Light
Select Table# 2 in the list, i.e. the cell type of the green-coloured cells
Select option Heavy from the Initial Free Surface Material menu
Click Apply and then Close

First, define the wall boundary conditions:

Select the Define Boundary Conditions folder and open the Define Boundary
Regions panel
In the region list, select Reg#1 named Wall
Change the Region Type to Wall and click Apply
Repeat this operation for the regions named Left, Right, and Bottom

Next, define the pressure boundary conditions:

4-4

Version 4.02

Tutorial 4.1

GRAVITY-DRIVEN FLOW WITH A FREE SURFACE

Pre-Processing
Scalar Boundaries

Scalar
Boundaries

All free surface analyses involve a scalar called VOF, representing the volume
fraction of the heavy fluid. The values of this scalar at pressure boundaries must be
specified as follows:

Analysis
Controls

Select Reg#5 named TopRight


Change the Region Type to Pressure
Change the pressure Option to Static and set the Pressure value to 0 Pa
Check that the Envir Press and Mean options are turned Off. These options
are not applicable to free-surface flows.
Click Apply
Repeat this process for Reg#7 named TopLeft
No action is needed for the regions named Back and Front as these are
already defined as symmetry planes in the supplied mesh geometry file

Open the Scalar Boundaries panel and check that the currently selected
Scalar is VOF
Select Boundary Region 5 from the Boundary Region list
Check that the Boundary Condition is set to Boundary Mass Fraction and
that the Mass Fraction value is 0. This in effect enforces the condition that
only air may enter the domain through this boundary. Note, however, that
either fluid may leave through the boundary.
Click Apply
Select Boundary Region 7 from the Boundary Region list
Check that the Boundary Condition is set to Boundary Mass Fraction and
then set the Mass Fraction value to 1. This in effect enforces the condition
that only water may enter the domain through this boundary.
Click Apply

The transient SIMPLE solution algorithm must be used for free surface problems.
This tutorial will also use the AMG solver, the recommended pressure-correction
equation solver for all free surface problems. To specify these settings:

Select the Analysis Controls folder


Select the Solution Controls sub-folder and open the Solution Method panel
In the Solution Setup section, change the Max. No. of Outer Iterations to 10
Change the Method menu setting to AMG and check that the Temporal
Discretization option is set as Euler Implicit
Click Apply

This tutorial involves a two-dimensional analysis so it is not necessary to solve for


the momentum component in the z-direction. To turn this off and specify
appropriate settings for the solver parameters and differencing schemes:

Version 4.02

Select the Equation Behavior sub-folder and open the Primary Variables
panel
Under the Equation Status tab, deselect the W-Mom button
Click Apply
Under the Solver Parameters tab, set the Relaxation Factor for the momentum
and turbulence equations to 0.8
Set the Relaxation Factor for the pressure equation to 0.4 (higher than the
default because we are dealing with an unsteady flow and small time steps)
4-5

Tutorial 4.1

GRAVITY-DRIVEN FLOW WITH A FREE SURFACE

Pre-Processing
Run Time Controls

In transient SIMPLE calculations, it is unnecessary to solve the pressure


equation as accurately as in PISO calculations because the outer iterations
within each time step control convergence. Therefore, set the Residual
Tolerance for all variables to 0.01.
Set the Number of Sweeps to 100 for all variables
Click Apply
Under the Differencing Schemes tab, check that the UD scheme is selected for
all variables
Click Apply
Open the Additional Scalars panel
Select Scalar 1 (VOF) and change the Under-Relaxation Factor to 0.8
Leave all other settings at their default values and click Apply

Specify what data should be written to the results (.ccm) file and the transient post
data (.pstt) file:

Run Time
Controls

Select the Output Controls folder and open the Analysis Output panel
Under the Post tab, check that option Write final solution (restart) file is
selected with an Output Frequency of 100 time steps
Click Apply
Under the Transient tab, choose to Write data every 0.25 seconds
Select Turbulent Kinetic Energy as an output variable from the list and click
Post
Repeat for the VOF variable
Click Apply

To specify the run time and time step size:

Select the Analysis Preparation/Running folder


Open the Set Run Time Controls panel
In the Run Time section, instruct the analysis to Run for 5 seconds
Click Apply
In the Time Step Option section, specify the Time Step for Period as 0.005
seconds. This means that the run will continue for 1,000 time steps.
Click Set Period

Although you can run the simulation interactively from STAR GUIde, it is more
common to run lengthy transient simulations from the command line. To write out
the problem and geometry files and save the model file:

In the main pro-STAR window, select File > Write Geometry File
In the Geometry File Write dialog, check that 1.0 is entered as the Geometry
Scale Factor
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Save Model

You can stay within the current pro-STAR session by either moving pro-STAR into
the background or by opening another terminal window to start up the STAR-CD
solver.
4-6

Version 4.02

Tutorial 4.1

GRAVITY-DRIVEN FLOW WITH A FREE SURFACE

CFD Analysis
Preliminaries

CFD Analysis
Check that you are in the current working directory and then start the simulation by
typing:
star
at the command line. The run should only take a few minutes. The screen output will
show that, for some time steps, the residuals fail to converge to the specified
tolerance within the specified maximum number of outer iterations. However, the
monitored values do converge, so the maximum number of outer iterations need not
be increased for this case.
Post-Processing
Preliminaries Start the post-processing session by opening the transient post data file:

In STAR-GUIde, select the Post-Processing folder and then open the Load
Data panel
Under the File(s) tab, select Transient as the Analysis option
Select the first empty position, 1, in the Transient Post File(s) list
Click Add File to List
Select file gravfs.pstt from the Transient Post File(s) list
Click Open Transient Post File

The following steps describe how to create static plots of flow variables at specified
times and also how to create an animation from a sequence of static plots that show
how the flow varies over time.
Basic Plots

The first plot will show how the water front moves through the connecting channel
into the right vessel, and how the free surface deforms during this process. The plot
superimposes velocity vectors on a contour plot of the VOF scalar variable, the
latter showing the distribution of air and water in the solution domain:

Version 4.02

Under the File(s) tab of the Load Data panel, select the first time step from
the Select Time Step list and click Store Iter/Time to load the data.
Under the Data tab, select Data Type Cell & Wall/Bound (Smooth)
Select Velocity Components UV (2D vectors) from the Vector Data list
Select VOF from the Scalar Data list
Click Get Data
Select Go To > Create Plots
Under the 3-D Surface tab, use the Select Plot windows slider to display the
last available plot type (for edges, contours and vectors) and then select it
Click Plot to Screen to display VOF contours and velocity vectors
simultaneously, as computed after 50 time steps. This plot is shown in Figure
T4.1-1

4-7

Tutorial 4.1

GRAVITY-DRIVEN FLOW WITH A FREE SURFACE

Post-Processing
Basic Plots

Figure T4.1-1

Volume fraction and velocity vectors after 50 time steps (0.25 s)

In some situations, usually when the mesh density varies significantly within the
domain, it may be useful to use a presentation grid. This prevents overcrowding of
velocity vectors in regions where the mesh is very fine. A description of how to do
this is given in Tutorial 1.1.
Figure T4.1-1 shows water flowing into the domain through the left pressure
boundary (TopLeft) and moving towards the right chamber, displacing air through
the right pressure boundary (TopRight) as it progresses. This is expected and, since
the results look plausible, you may continue plotting contours of VOF alone, or in
combination with vectors, or vectors alone for subsequent time steps. You may also
plot other quantities such as pressure or turbulent kinetic energy, since these were
also stored in the transient post data file. To do this, repeat the steps listed above
changing the time step selected in the File(s) tab and the variables selected in the
Data tab as desired. Pressure contours after 100, 600, and 1000 time steps are shown
in Figure T4.1-2. This type of plot was created by selecting options Contour (filled)
and Edge on the 3-D Surface tab.

4-8

Version 4.02

Tutorial 4.1

GRAVITY-DRIVEN FLOW WITH A FREE SURFACE

Post-Processing
Animations

Figure T4.1-2

Pressure contours after 100 (top), 600 (middle) and 1000 (bottom) time
steps

Note how, over time, the pressure profile becomes increasingly stratified. If the run
duration is sufficiently extended, an equilibrium point will be reached at which the
fluids become stationary and the pressure contours appear horizontal and evenly
spaced.
Animations

pro-STAR loops can be used to produce on-screen animations, as described in


Tutorial 8.2 and Tutorial 12.3. However, animations can also be produced by
writing data to a neutral plot file and using the Animation module to replay them.
The advantage of this method is primarily in improved presentation, as an animation
replayed from a neutral plot file will usually run faster and more smoothly than one
created directly on screen. The animation created here uses contours of the VOF
scalar variable, which must first be displayed as static contour plots:

Version 4.02

Under the File(s) tab of the Load Data panel, select the first time step in the
Select Time Step list
4-9

Tutorial 4.1

GRAVITY-DRIVEN FLOW WITH A FREE SURFACE

Post-Processing
Animations

Click Store Iter/Time


Under the Data tab, select VOF from the Scalar Data list
Click Get Data
Click Replot in the main pro-STAR window to display a plot similar to
Figure T4.1-1 but without the vectors. If such a plot does not appear, check
that Contour Plot mode and Hidden Surface plot type are selected.

The Animation module is now used to set up, write and play back an animation
sequence showing how the VOF scalar distribution changes during the analysis:

In the main pro-STAR window, select Modules > Animation


In the Animation module, change the Number of Frames in Sequence to 20
Select Edit Frame Definitions.. > First Frame...
In the Animation Graphics Parameter Block dialog, select Copy > Current
Plot. This makes the plotting options for the first animation frame the same as
those of the current plot.
Change the Time to 0.25
Click Apply
Select the End of Animation Sequence radio button
Select Copy > First Frame
Change the Time to 5.0
Click Apply and then Close
In the Animation module, click Edit Sequence Parameters
Enter the following commands in the first two lines of the Post-Animation
Sequence Commands box:
STORE NEXT
GETV CONC 1

Change the Command For Initial Plot to Replot


Click Close
Click Record to store the animation into the neutral plot file
Once the data have been written, click Play to view the result

The animation shows the free surface movement for the first 5 seconds. It will
clearly take significantly longer for equilibrium to be reached. You may, if you
wish, run the analysis for a longer period of time by:

Increasing the Run Time specified in the Set Run Time Controls panel
Writing a new problem file
Running STAR again

The tutorial is now complete. To quit pro-STAR:

4-10

Select File > Quit > Quit, Nosave

Version 4.02

Tutorial 4.2

FORCED FREE-SURFACE FLOW WITH CAPILLARY EFFECTS

Physical Problem Description


Mesh Import & Checking

Tutorial 4.2

FORCED FREE-SURFACE FLOW WITH CAPILLARY


EFFECTS

This tutorial aims to demonstrate:

How to simulate free-surface flow in which capillary effects are important


The appearance of parasitic currents under certain conditions in such analyses

Physical Problem Description


This tutorial simulates forced flow of liquid glycerine through a nozzle into an
air-filled chamber at atmospheric pressure. The mesh used is the same as that of
Tutorial 4.1 except that, in this instance, the problems physical dimensions are
scaled down by a factor of 1,000. This gives a nozzle width of about 1 mm. The
boundary region labelled Left in Figure T4.0-1 is now an inlet with fluid velocity
of 1 mm/s and the boundary region labelled Right is at atmospheric pressure. The
boundary regions labelled Bottom, Front and Back are symmetry planes, and
all other regions are solid walls.
Initially, the chamber behind the nozzle (cell type 2, coloured green in Figure
T4.0-1) is filled with liquid and the remainder of the solution domain is filled with
air. For the given geometry and inlet velocity, the flow can be assumed to be
laminar. Gravity acts in the positive x-direction and so helps to drive the fluid flow
through the nozzle. The shape of the free-surface that develops in the chamber
downstream of the nozzle depends upon the contact angle between liquid and wall.
Pre-Processing
Create a directory for the tutorial called tut4-2 and copy file gridfs.ccm
supplied with the STAR-CD installation into it. In this directory:

Start pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (forcfs) in the Casename text box
Click Continue

Define a transient simulation of a free surface flow and give the case a title:

Open the Select Analysis Features panel in STAR GUIde


Select Transient in the Time Domain section
Select On in the Free Surface section
Click Apply
In the main window, select File > Model Title
In the Title text box type:
FORCED FREE-SURFACE FLOW WITH CAPILLARY EFFECTS

Mesh Import
& Checking

Version 4.02

Click Apply

To import and display the mesh:

Select the Create and Import Grids folder in STAR GUIde


Open the Import Grids panel
4-11

Tutorial 4.2

FORCED FREE-SURFACE FLOW WITH CAPILLARY EFFECTS

Pre-Processing
Material Properties

Material
Properties

Select the CCM button from the Format list


Enter gridfs.ccm as the CCM File name
Check that the State Name entry is set to default
Click Import Grid
In the main window, select C > All to put all cells into the current cell set
Check that the Geometry Plot mode and Hidden Surface plot type are
selected
Click Cell Plot to display the grid shown in Figure T4.0-1

Examine the free-surface flow modelling options and material property settings:

Select the Free Surface folder in STAR GUIde


Open the Controls panel
Turn On Surface Tension
Click Apply
Open the Molecular Properties panel
Select the Heavy Fluid tab
Choose Select material from database from the drop-down menu at the top
of the panel
Select GLYCERINE(L) from the list that appears
Click Select material
Enter 45 for the Contact Angle at Wall
Click Apply
Select the Light Fluid tab
The default fluid, AIR, is suitable for this case so click Apply

To select other physical models and initialize the flow variables:

Select the Thermophysical Models and Properties folder and open the Gravity
panel
Change the Acceleration value to 9.81 m/s2
Change the Direction of Gravity Force to (1, 0, 0) in coordinate system 1
Click Apply
Select the Liquids and Gases folder and open the Turbulence Models panel
Check that turbulence is switched Off so that the flow is treated as laminar

To select monitoring and pressure reference locations:

4-12

Open the Monitoring and Reference Data panel


Click the mouse symbol in the Monitoring cell number section to select the
monitoring location
In the main pro-STAR window, select a cell just to the right of the narrow
section. This location is chosen because large variations in field variable
values are expected here.
In the Reference Data section, click the mouse symbol to select the reference
pressure cell number
In the main pro-STAR window, click on a cell at the top right-hand corner.
This location is chosen because this corner will always contain air and so the
pressure variations are likely to be minimal.
Click Apply

Version 4.02

Tutorial 4.2

FORCED FREE-SURFACE FLOW WITH CAPILLARY EFFECTS

Pre-Processing
Initialization

To turn on buoyancy:

Initialization

Initially, the left-hand vessel contains only glycerine and the right-hand vessel only
air. This initial distribution is specified by associating the two fluids with different
cell types:

Boundary
Conditions

Open the Buoyancy panel


Turn On buoyancy
The default values for Datum Location and Datum Density are suitable so
click Apply

Click the CTAB button in the main pro-STAR window to open the Cell Table
Editor
Select Table# 1 in the list, i.e. the cell type of the red-coloured cells
Check that the Initial Free Surface Material setting is Light
Select Table# 2 in the list, i.e. the cell type of the green-coloured cells
Select option Heavy from the Initial Free Surface Material menu
Click Apply and then Close

To define boundary conditions for this simulation:

Select the Define Boundary Conditions folder and open the Define Boundary
Regions panel
In the region list, select Reg#1 named Wall
Change the Region Type to Wall and click Apply
Repeat this operation for the regions named TopLeft and TopRight
Select Reg# 3, named Right, from the list
Change the Region Type to Pressure
Change the pressure Option to Static
Click Apply
Select Reg# 2, named Left
Change the Region Type to Inlet
Change the U velocity to 0.001 m/s
Click Apply

No action is needed for the regions named Back, Front and Bottom as these
are already defined as symmetry planes in the supplied mesh geometry file.
Scalar boundary conditions must also be defined such that only glycerine enters
through the inlet boundary and, in the case of backflow, only air enters through the
pressure boundary:

Analysis
Controls
Version 4.02

Open the Scalar Boundaries panel and check that the currently selected
Scalar is VOF
Select Boundary Region 2, Inlet from the Boundary Region list
Check that the Boundary Condition is set to Boundary Mass Fraction
Change the Mass Fraction value to 1
Click Apply
The Mass Fraction for Boundary Region 3, Pressure is set to 0 by default so
no change is required

The transient SIMPLE solution algorithm must be used for free surface problems.
This tutorial will also use the AMG solver, the recommended pressure-correction
4-13

Tutorial 4.2

FORCED FREE-SURFACE FLOW WITH CAPILLARY EFFECTS

Pre-Processing
Run Time Controls

equation solver for all free surface problems. To specify these settings:

Select the Analysis Controls folder


Select the Solution Controls sub-folder and open the Solution Method panel
In the Solution Setup section, change the Max. No. of Outer Iterations to 10
Change the Method menu setting to AMG and check that the Temporal
Discretization option is set as Euler Implicit
Click Apply

This tutorial involves a two-dimensional analysis so it is not necessary to solve for


the momentum component in the z-direction. To turn this off and specify
appropriate settings for the solver parameters and differencing schemes:

Select the Equation Behavior sub-folder and open the Primary Variables
panel
Under the Equation Status tab, deselect the W-Mom button
Click Apply
Under the Solver Parameters tab, set the Relaxation Factor for the momentum
equations to 0.8
Set the Relaxation Factor for the pressure equation to 0.4 (higher than the
default because we are dealing with an unsteady flow and small time steps)
In transient SIMPLE calculations, it is not necessary to solve the pressure
equation as accurately as in PISO calculations because the outer iterations
within each time step control convergence. Therefore, set the Residual
Tolerance for all variables to 0.01.
Set the Number of Sweeps to 100 for all variables
Click Apply
Under the Differencing Schemes tab, check that the UD scheme is selected for
all variables
Click Apply
Open the Additional Scalars panel
Select Scalar 1 (VOF) and change the Under-Relaxation Factor to 0.8
Leave all other settings at their default values and click Apply

Specify what data should be written to the results (.ccm) file and the transient post
data (.pstt) file:

Run Time
Controls

4-14

Select the Output Controls folder and open the Analysis Output panel
Under the Post tab, check that the analysis is set to Write final solution
(restart) file with an Output Frequency of 100 time steps
Click Apply
Under the Transient tab, choose to Write data every 0.1 seconds
Select VOF as an output variable from the list and click Post
Click Apply

To specify the run time and time step size:

Select the Analysis Preparation/Running folder


Open the Set Run Time Controls panel
In the Run Time section, instruct the analysis to Run for 2 seconds
Click Apply
In the Time Step Option section, change the Time Step for Period to 0.001
Version 4.02

Tutorial 4.2

FORCED FREE-SURFACE FLOW WITH CAPILLARY EFFECTS

CFD Analysis
Preliminaries

seconds. This means that the run will continue for 2,000 time steps
Click Set Period

Although you can run the simulation interactively from STAR GUIde, it is more
common to run lengthy transient simulations from the command line. To write out
the problem and geometry files and save the model file:

In the main pro-STAR window, select File > Write Geometry File
In the Geometry File Write dialog, change the Geometry Scale Factor to
0.001 to convert the model units to millimetres
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Save Model

You can stay within the current pro-STAR session by either moving pro-STAR into
the background or by opening another terminal window to start up the STAR-CD
solver.
CFD Analysis
Check that you are in the current working directory and then start the simulation by
typing:
star
at the command line. The analysis should only take a few minutes. The output on
the screen will show that the outer iterations are converging to the specified
tolerance for each time step.
Post-Processing
Preliminaries Start the post-processing session by opening the transient post data file:

In STAR-GUIde, select the Post-Processing folder and then open the Load
Data panel
Under the File(s) tab, select Transient as the Analysis option
Select the empty position, 1, in the Transient Post File(s) list
Click Add File to List
Select file forcfs.pstt from the Transient Post File(s) list
Click Open Transient Post File

The remainder of this tutorial demonstrates how to create static plots of flow
variables at specified times. Animated plots are not be produced here as the methods
for creating them are described in detail in other tutorials, namely Tutorial 4.1,
Tutorial 8.2 and Tutorial 12.3.
Basic Plots

First, plot the VOF distribution and velocity vectors after 1,700 time steps:

Version 4.02

Under the File(s) tab of the Load Data panel, select step number 1700 from
the Select Time Step list
Click Store Iter/Time to load the data
4-15

Tutorial 4.2

FORCED FREE-SURFACE FLOW WITH CAPILLARY EFFECTS

Post-Processing
Basic Plots

Under the Data tab, select Data Type Cell & Wall/Bound (Smooth)
Select VOF from the Scalar Data list
Click Get Data
Select Go To > Create Plots
Under the 3-D Surface tab, select options Contour (filled) and Edge
Click Plot To Screen. Note that the angle the free surface makes with the wall
is ~45o

To plot these contours in the same window as a velocity vector plot:

Type the following command in the I/O window:


CENTER 0.5 -0.1 0.0

Click Replot
Select Plot > Display > Overlay
Type the following command in the I/O window:
CENTER 0.5 4.1 0.0

Under the Data tab of the Load Data panel, select Velocity Components UV
(2D vectors) from the Vector Data list
Click Get Data
Select Go To > Create Plots
Under the 3-D Surface tab, select options Vector and Edge
Click Plot To Screen to display Figure T4.2-1

Figure T4.2-1

4-16

Distribution of volume fraction (upper) and velocity vectors (lower) for a


contact angle of 45 degrees, after 1,700 time steps

Turn off the overlay mode by selecting Plot > Display > Overlay
Version 4.02

Tutorial 4.2

FORCED FREE-SURFACE FLOW WITH CAPILLARY EFFECTS

Post-Processing
Basic Plots

The velocity vector plot shows high air velocities close to free surface. This is a
numerical inaccuracy known as parasitic currents. These currents arise because the
surface tension and pressure forces are much larger than all other terms in the
momentum equations, and their balance on an irregular grid is difficult to achieve
numerically due to the sensitivity of the curvature approximation. These parasitic
currents become appreciable when the problem size is small and fluid velocity and
viscosity are low. For cases where the free surface curvature is small (i.e. the radius
is of the order of 10 mm or more) or where fluid flows at high speed (as in injection
nozzles), these problems are not encountered. Since the artificial velocities are
generated only within the air, their effect on the liquid flow (which is usually what
we are trying to predict) is small.
To examine how changing the contact angle affects the resulting free surface:

Select the Free Surface folder in STAR GUIde and open the Molecular
Properties panel
Under the Heavy Fluid tab, change Contact Angle at Wall to 150
Click Apply
Write the problem file and re-run the analysis
Follow the procedure described above to plot contours of volume fraction and
velocity vectors after 1,700 time steps. The resulting plot is shown in Figure
T4.2-2

Figure T4.2-2

Distribution of volume fraction (upper) and velocity vectors (lower) for a


contact angle of 150 degrees, after 1,700 time steps

The increase in contact angle means that the wall is now non-wetting, i.e. the liquid
does not spread along the wall after passing through the nozzle, but instead
continues to flow in the direction of the gravity force. If the solution domain was
Version 4.02

4-17

Tutorial 4.2

FORCED FREE-SURFACE FLOW WITH CAPILLARY EFFECTS

Post-Processing
Basic Plots

extended further to the right and the analysis was run for longer, the droplet forming
behind the nozzle would eventually detach from it. This would occur because
gravity would cause the droplet to accelerate to a speed greater than that in the
nozzle.
In some applications, it may be necessary to specify different contact angles on
different walls. This is not possible using current STAR GUIde facilities since the
contact angle is specified as a heavy fluid property. However, this value can be
over-ridden, where necessary, via user coding. The latter is activated by selecting
User rather than Constant in the Additional Properties section of the Heavy Fluid
tab. The relevant user subroutine, FSTEN, can then be modified, as required.

4-18

Version 4.02

Tutorial 4.3

FORCED FREE-SURFACE FLOW WITH CAVITATION

Physical Problem Description


Preliminaries

Tutorial 4.3

FORCED FREE-SURFACE FLOW WITH CAVITATION

This tutorial aims to demonstrate how to:

Perform a simulation of a free-surface flow in which cavitation takes place


Display free-surface and cavitation data in the same plot
Change the Post Colormap settings to improve the appearance of contour
plots

Physical Problem Description


This tutorial models the forced flow of water through a nozzle into an air-filled
chamber at atmospheric pressure. The geometry, mesh and scale factor (0.001) are
the same as those used in Tutorial 4.2. The boundary labelled Left in Figure
T4.0-1 is at a static pressure of 500 bar and the boundary labelled Right is at
atmospheric pressure. The boundaries labelled Bottom, Front and Back are
symmetry planes, and all other boundaries are solid walls. Initially, the nozzle is
filled with liquid (cell type 2) and the downstream chamber is filled with air (cell
type 1). The sharp corner at the entrance into the narrow nozzle combined with the
flow acceleration will produce a low pressure region in which cavitation will take
place.
Pre-Processing
Preliminaries Create a directory for the tutorial called tut4-3 and copy file gridfs.ccm
supplied with the STAR-CD installation into it. In this directory:

Start pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (cavit) in the Casename text box
Click Continue

Define a transient simulation and activate the free surface and cavitation modelling
options:

Open the Select Analysis Features panel in STAR GUIde


Select Transient in the Time Domain section
Select On in the Free Surface section
Select On in the Cavitation section
Click Apply

Give the case a title:

In the main window, select File > Model Title


In the Title text box type:
FORCED FREE-SURFACE FLOW WITH CAVITATION

Mesh Import
& Checking
Version 4.02

Click Apply

To import and display the mesh:

Select the Create and Import Grids folder in STAR GUIde


4-19

Tutorial 4.3

FORCED FREE-SURFACE FLOW WITH CAVITATION

Pre-Processing
Material Properties

Material
Properties

Open the Import Grids panel


Select the CCM button from the Format list
Enter gridfs.ccm as the CCM File name
Check that the State Name entry is set to default
Click Import Grid
In the main window, select C > All to put all cells into the current cell set
Check that the Geometry Plot mode and Hidden Surface plot type are
selected
Click Cell Plot to display the grid shown in Figure T4.0-1

Examine the free-surface flow modelling options and material property settings:

Select the Free Surface folder in STAR GUIde


Open the Controls panel
Turn On Surface Tension
Click Apply
Open the Molecular Properties panel
Both the default Light Fluid, AIR, and the default Heavy Fluid, H2O, are
suitable for this case so no changes are needed

Examine the cavitation modelling options:

Select the Cavitation folder


Open the Cavitation Model panel
The default options are all acceptable so click Apply. For a detailed
description of the options in this panel, consult the corresponding pro-STAR
on-line Help topic

The remaining material property settings are specified using panels in the Liquids
and Gases folder. These panels feature a Material # slider, enabling you to specify
different properties for each fluid material in the model. For the heavy and light
fluids defined in free-surface problems, this functionality is not relevant since those
properties specified for the light fluid (Material # 1) are also applied automatically
to the heavy fluid (Material # 2).
Turn on turbulence modelling and select an appropriate model:

Select the Liquids and Gases folder and open the Turbulence Models panel
Check that the slider at the bottom of the panel is set to Material # 1
Turn On turbulence modelling
Select the k-Epsilon/High Reynolds Number model from the list
Click Apply

To select monitoring and pressure reference locations:

4-20

Open the Monitoring and Reference Data panel


Click the mouse symbol in the Monitoring cell number section to select the
monitoring location
In the main pro-STAR window, select a cell just to the right of the narrow
section. This location is chosen because large variations in field variable
values are expected here.
In the Reference Data section, click the mouse symbol to select the reference
pressure cell number
Version 4.02

Tutorial 4.3

FORCED FREE-SURFACE FLOW WITH CAVITATION

Pre-Processing
Initialization

Initialization

In the main pro-STAR window, click on a cell at the top right-hand corner.
This location is chosen because this corner will always contain air and so the
pressure variations are likely to be minimal.
Click Apply

Initially, the left-hand vessel contains only water and the right-hand vessel only air.
This initial distribution is specified by associating the two fluids with different cell
types:

Click the CTAB button in the main pro-STAR window to open the Cell Table
Editor
Select Table# 1 in the list, i.e. the cell type of the red-coloured cells
Check that the Initial Free Surface Material setting is Light
Select Table# 2 in the list, i.e. the cell type of the green-coloured cells
Select option Heavy from the Initial Free Surface Material menu
Click Apply and then Close

The initial turbulence parameters must also be set as follows:

Scalars

Two scalars are defined for problems involving both free surfaces and cavitation. A
passive scalar called VOF is defined as the volume fraction of the heavy fluid. An
active scalar named CAV stores the volume fraction of vapour generated during the
cavitation process.

Boundary
Conditions

Select the Additional Scalars folder and open the Molecular Properties
(Scalar) panel
Check that the slider at the bottom of the panel is set to Scalar # 1 and that the
scalars Name is VOF. The properties of this scalar are defined by the choice
of heavy fluid so no changes are necessary in this panel.
Move the slider to Scalar # 2, named CAV, which represents the heavy fluid
vapour
The default properties are suitable so click Apply
Open the Initialization panel
Check that the Initial Mass Fraction of both VOF and CAV scalars is 0

To define boundary conditions for this problem:

Version 4.02

Open the Initialization panel in STAR GUIde


Under the Turbulence tab, check that option k-Epsilon is selected
Change the Turbulent Energy to 1
Change Epsilon to 10000. Note that what is important here is not the actual
values specified but rather their ratio, as this determines the initial turbulent
viscosity. In this case, k and are chosen to give a turbulent viscosity of the
order of 0.01
Click Apply

Select the Define Boundary Conditions folder and open the Define Boundary
Regions panel
In the region list, select Reg# 1 named Wall
Change the Region Type to Wall and click Apply
Repeat this operation for the regions named TopLeft and TopRight
Select Reg# 3, named Right
4-21

Tutorial 4.3

FORCED FREE-SURFACE FLOW WITH CAVITATION

Pre-Processing
Analysis Controls

Change the Region Type to Pressure


Change the pressure Option to Static
Click Apply
Select Reg# 2, named Left
Change the Region Type to Pressure
Change the pressure Option to Static
Change the Pressure value to 5.0e7 Pa
Click Apply

No action is needed for the regions named Back, Front and Bottom as these
are already defined as symmetry planes in the supplied mesh geometry file.
The values of VOF and CAV at the pressure boundaries must also be specified:

Open the Scalar Boundaries panel and check that the currently selected
Scalar is VOF
Select Boundary Region 2, Pressure from the Boundary Region list
Check that the Boundary Condition is set to Boundary Mass Fraction
Change the Mass Fraction value to 1
Click Apply
The Mass Fraction for Boundary Region 3, Pressure is set to 0 by default so
no change is required

No changes are required for the CAV scalar since its default setting of 0 volume
fraction at all boundaries is appropriate for this problem.
Analysis
Controls

The transient SIMPLE solution algorithm must be used for free surface problems.
This tutorial will also use the AMG solver, the recommended pressure-correction
equation solver for all free surface problems. To specify these settings:

Select the Analysis Controls folder


Select the Solution Controls sub-folder and open the Solution Method panel
In the Solution Setup section, change the Max. No. of Outer Iterations to 10
Change the Method menu setting to AMG and check that the Temporal
Discretization option is set as Euler Implicit
Click Apply

This tutorial involves a two-dimensional analysis so it is not necessary to solve for


the momentum component in the z-direction. To turn this off and specify
appropriate settings for the solver parameters and differencing schemes:

4-22

Select the Equation Behavior sub-folder and open the Primary Variables
panel
Under the Equation Status tab, deselect the W-Mom button
Click Apply
Under the Solver Parameters tab, set the Relaxation Factor for the momentum
and turbulence equations to 0.8
Set the Relaxation Factor for the pressure equation to 0.4 (higher than the
default because we are dealing with an unsteady flow and small time steps)
In transient SIMPLE calculations, it is not necessary to solve the pressure
equation as accurately as in PISO calculations because the outer iterations
within each time step control convergence. Therefore, set the Residual
Version 4.02

Tutorial 4.3

FORCED FREE-SURFACE FLOW WITH CAVITATION

Pre-Processing
Run Time Controls

Tolerance for all variables to 0.01.


Set the Number of Sweeps to 100 for all variables
Click Apply
Under the Differencing Schemes tab, change the differencing scheme for the
momentum equations to MARS
Click Apply
Open the Additional Scalars panel
Select Scalar 1 (VOF) and check that the Under-Relaxation Factor is 0.8
Leave all other settings at their default values and click Apply
Select Scalar 2 (CAV) and check that the Under-Relaxation Factor is 0.8
Leave all other settings at their default values and click Apply

Specify what data should be written to the results (.ccm) file and the transient post
data (.pstt) file:

Run Time
Controls

Select the Output Controls folder and open the Analysis Output panel
Under the Post tab, check that the analysis is set to Write final solution
(restart) file with an Output Frequency of 100 time steps
Click Apply
Under the Transient tab, choose to Write data every 1e-5 seconds
Select VOF as an output variable from the list and click Post
Repeat this for CAV
Click Apply

To specify the run time and time step size:

Select the Analysis Preparation/Running folder


Open the Set Run Time Controls panel
In the Run Time section, instruct the analysis to Run for 5e-5 seconds
Click Apply
In the Time Step Option section, change the Time Step for Period to 1e-7
seconds. This means that the run will continue for 500 time steps
Click Set Period

Although you can run the simulation interactively from STAR GUIde, it is more
common to run lengthy transient simulations from the command line. To write out
the problem and geometry files and save the model file:

In the main pro-STAR window, select File > Write Geometry File
In the Geometry File Write dialog, change the Geometry Scale Factor to
0.001 to convert the model units to millimetres
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Save Model

You can stay within the current pro-STAR session by either moving pro-STAR into
the background or by opening another terminal window to start up the STAR-CD
solver.

Version 4.02

4-23

Tutorial 4.3

FORCED FREE-SURFACE FLOW WITH CAVITATION

CFD Analysis
Preliminaries

CFD Analysis
Check that you are in the current working directory and then start the simulation by
typing:
star
at the command line. The analysis should only take a few minutes. The output on
the screen will show that the outer iterations are converging to the specified
tolerance for each time step.
Post-Processing
Preliminaries Start the post-processing session by opening the transient post data file:

In STAR-GUIde, select the Post-Processing folder and then open the Load
Data panel
Under the File(s) tab, select Transient as the Analysis option
Select the empty position, 1, in the Transient Post File(s) list
Click Add File to List
Select file cavit.pstt from the Transient Post File(s) list
Click Open Transient Post File

The remainder of this tutorial demonstrates how to create static plots of flow
variables at specified times. Animated plots are not be produced here as the methods
for creating them are described in detail in other tutorials, namely Tutorial 4.1,
Tutorial 8.2 and Tutorial 12.3.
Basic Plots

First, plot velocity vectors after 500 time steps:

4-24

Under the File(s) tab of the Load Data panel, select step number 500 from the
Select Time Step list and click Store Iter/Time to load the data
Under the Data tab of the Load Data panel, select Velocity Components UV
(2D vectors) from the Vector Data list
Click Get Data
Select Go To > Create Plots
Under the 3-D Surface tab, select options Vector and Edge
Click Plot To Screen to display Figure T4.3-1

Version 4.02

Tutorial 4.3

FORCED FREE-SURFACE FLOW WITH CAVITATION

Post-Processing
Basic Plots

Figure T4.3-1

Velocity vectors after 500 time steps

It is possible to create a contour plot that approximately shows both the CAV and
VOF scalar distributions (i.e. both water vapour and liquid water) by using the
OPERATE utility to manipulate the post data. First, put the VOF and CAV scalar
data in post registers 5 and 6, respectively:

Enter the following commands in the I/O window:


OPERATE GETC CONC 5 1
OPERATE GETC CONC 6 2

Version 4.02

In the main pro-STAR window, select Post > Operate... to open the Post
Register Operations dialog
Select Function > Scalar/Vector > Multiply
Choose Register 6 = 2 * Register 6
Click Apply
Select Function > Multi-Register > Add
Choose Register 4 = Register 5 + Register 6
Click Apply and then Close
Select Post > Caverage > Cset
Under the Options tab of the Create Plots panel, select RGB from the
Colormap list. Note that the colours displayed under the pop-up menu change
when you do this.
Click Apply
Change the Number of Color Indices to 12
Change the Range to User and enter minimum and maximum values 0 and 2
Click Apply
Under the 3-D Surface tab, select options Contour (filled) and None
Click Plot To Screen to display Figure T4.3-2
4-25

Tutorial 4.3

FORCED FREE-SURFACE FLOW WITH CAVITATION

Post-Processing
Basic Plots

Figure T4.3-2

Contour plot showing VOF and CAV distributions after 500 time steps

To a reasonable approximation, the blue and turquoise regions are predominantly


occupied by air, the green regions predominantly by liquid water and the yellow,
orange and red regions predominantly by water vapour. As expected, cavitation
occurs at the nozzle entrance as a result of the low pressure region produced by the
sharp corner and the accelerating flow.
Manipulating the results in this way provides a qualitative visual estimate of the
extent of the different regions. However, the resulting plots are prone to
inaccuracies in those places where air and water vapour occur together and also
where the value of VOF is only slightly greater than that of CAV. In such a case,
the latter leads to an overprediction of the size of the region of high water vapour
concentration.
The tutorial is now complete. To quit pro-STAR:

4-26

Select File > Quit > Quit, Nosave

Version 4.02

Physical Problem Description

Tutorial 5 TURBULENT FLUID STREAM MIXING


Physical Problem Description
This tutorial deals with the mixing of air and methane gas in a dilution pipe, using
the mesh shown in Figure T5.0-1, created in Tutorial 7.1 of the Meshing Tutorials
volume. The problem geometry consists of two concentric pipes, with the inner pipe
covering only one quarter of the total distance between inlet and outlet. An orifice
plate protrudes from the outer wall half way along the pipe. Air at standard pressure
and temperature (1 bar, 293 K), flows in through the outer annulus with a uniform
velocity of 5 m/s. Methane gas (molecular weight 16 kg/kmole) at a temperature of
323 K flows in through the inner pipe at a uniform velocity of 10 m/s. The pipe
walls (inner and outer) are assumed to be adiabatic and the orifice plate has
negligible thermal resistance. The background fluid for this problem is air (constant
pressure of 1 bar, temperature of 293 K); its physical properties are as follows:
Molecular weight
Density
Molecular viscosity
Specific heat
Thermal conductivity

28.96
1.205
1.81 105
1006.0
2.637 102

kg/kmole
kg/m3
Pa s
J/kg K
W/m K

The flow is three-dimensional and essentially symmetric, so only half of the


problem geometry was considered in building the mesh. The tutorial is divided into
two parts, one dealing with a steady-state and the other with a transient analysis.

Figure T5.0-1
Version 4.02

Mesh structure for the dilution pipe model (back elevation)


5-1

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing
Preliminaries

Tutorial 5.1

STEADY 3-D FLOW

The primary task of this tutorial is to:

Set up and analyse a turbulent, multi-species flow


Define boundary conditions for both main flow variables and additional scalar
variables representing species mass fractions
Create multiple cross-sectional plots showing the analysis results as part of a
single operation

Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut5-1. The mesh for this problem
has already been created in the Meshing Tutorials volume (Tutorial 7.1) and the
relevant cell, vertex, boundary and problem setup files are already available (files
dil_pipe.cel, dil_pipe.vrt, dil_pipe.bnd and dil_pipe.inp,
respectively). Therefore, before starting the tutorial, make sure that the supplied
files are copied into your current directory.

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (say, dil_pipe_ss) in the Casename text box
Click Continue

Read in the available problem data:

Select File > Read File... in the main pro-STAR window


In the Input Coded Command File dialog check that the File Name is
dil_pipe.inp
Click Apply
Click Close

This will read default problem settings from file dil_pipe.inp plus the
problems cell, vertex and boundary location definitions from the remaining three
files.

In the main window, select File > Model Title


In the Title text box type:
TURBULENT MIXING IN A DILUTION PIPE (STEADY)

Mesh
Checking

Verify that the mesh data are correct by selecting all cells and vertices and plotting
the mesh in Hidden Surface mode:

5-2

Click Apply

In the main window, select C > All. The I/O window output shows that 2,080
cells were read in
Select V > All. The I/O window output shows that 2,331 vertices were read in
Check that Hidden Surface is the default cell plot type
Click Cell Plot
Change the viewpoint to approximately (-1, 0.5, -1) using the orientation
Version 4.02

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing
Material Properties

cubes slider controls to display Figure T5.1-1


It will be seen that the mesh is in fact the same as the one created in Meshing
Tutorial 7.1.

Figure T5.1-1

Material
Properties

Mesh geometry

Check the default fluid properties and then choose the ideal gas law for density
variations, making it a function of temperature only (incompressible flow):

In the STAR GUIde window, select folder Thermophysical Models and


Properties
Select sub-folder Liquids and Gases
Open the Molecular Properties panel
Choose option Ideal-f(T) from the Density menu
Click Apply

Turn on the standard k- turbulence model:

Open the Turbulence Models panel


Click On to switch on turbulence modelling
Select K-Epsilon/High Reynolds Number from the drop-down menu
Click Apply

Turn on the solution of the temperature equation:

Open the Thermal Models panel


Click the Temperature Calculation On button
Click Apply

Set the monitoring point location:


Version 4.02

5-3

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing
Scalar Properties

Scalar
Properties

Open the Monitoring and Reference Data panel


Type 11 in the Monitoring cell number text box
Click Apply

Physical properties for scalar variables are specified next:

Select the Additional Scalars folder and then open the Molecular Properties
(Scalar) panel

It will be seen that no scalar entities have been defined yet. The required scalar is
methane and its properties can be retrieved from the built-in property database.
However, in this tutorial, methane is treated as a user-defined scalar and its
properties are supplied manually for the purposes of illustration.

Type the following property data in the corresponding dialog boxes:


Name CH4
Density 0.669
Molecular Weight 16
Molecular Viscosity 1.175e-5
Specific Heat 2230.0
Conductivity 0.038
Heat of Formation -4.68e6
Temp. of Formation 298.15
Click Apply

The details of the scalars properties will be shown in the I/O window as follows:
PROPERTIES FOR SCALAR NO. 1 NAMED CH4
INFLUENCE = ACTIVE
SOLVER TURNED ON
MOLECULAR WEIGHT = 16.0000
DENSITY = 0.669000
BETAM = 0.
SPECIFIC HEAT = 2230.00
LAMINAR VISCOSITY = 0.117500E-04
THERMAL CONDUCTIVITY = 0.380000E-01
HEAT OF FORMATION = -4680000.
TEMPERATURE OF FORMATION = 298.15
Note that the scalars ACTIVE designation signifies that its concentration at any
point in the flow will influence the overall fluid density at that point.
Save the model data entered so far:

Boundary
Conditions

Specify boundary conditions for each region, including turbulence parameters at the
two inlets in terms of turbulence intensity and length scale:

5-4

In the main window, select File > Save Model

Select folder Define Boundary Conditions and then open the Define Boundary
Regions panel
Select region no. 1 (the inner inlet) in the scroll list
Version 4.02

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing
Boundary Conditions

Version 4.02

Select option TI/Length from the Turb. Switch menu


Enter inlet conditions in the appropriate boxes, as shown below:

Click Apply

Select region no. 2 in the scroll list


Select option TI/Length in the Turb. Switch menu
Enter inlet conditions in the appropriate boxes, as shown below:

Click Apply

Select region no. 3 in the Boundary Regions scroll list


Select option TI/Length in the Turb. Switch menu
Enter pressure boundary conditions in the appropriate boxes, as shown below:

5-5

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing
Boundary Conditions

Click Apply

Specify boundary conditions for the scalar (CH4) mass fraction, ensuring that its
value is 1.0 at the inner pipe inlet and 0.0 at all other boundaries.

Open the Scalar Boundaries panel


Select region no. 1 (the inner pipe inlet) in the Boundary Region scroll list.
CH4 is selected by default in the Scalar list.
Enter the required boundary value, 1.0, in the Mass Fraction box and then
click Apply
Select region no. 2 (the outer pipe inlet) and then region no. 3 (the outflow
boundary) in the list to confirm that the scalar mass fraction at both
boundaries is 0.0

Check the boundary conditions graphically:

5-6

In the main window, select B > All


Select B > Unselect > Symplane
Select Cell Plot Display Option Bound
Select cell plot type Quick Hidden Line to display Figure T5.1-2

Version 4.02

Tutorial 5.1

STEADY 3-D FLOW

Pre-Processing
Control Parameters

Figure T5.1-2

Control
Parameters

Inlet and outflow boundary condition display

Check the status of the control parameters:

Select folder Analysis Controls


Select sub-folder Solution Controls followed by Equation Behavior

Check the scalar control parameters and then modify some of them:

Open the Additional Scalars panel


Check that CH4 is selected in the Scalar scroll list and then type 0.95 in the
Under-Relaxation Factor box
Type 1.0e-4 in the Residual Tolerance box
Click Apply

Make the residual error tolerances for the temperature and scalar equations the
same. This ensures that both equations are solved to the same level of accuracy:

Run Time
Controls

Check the status of the run time control parameters:

Version 4.02

Open the Primary Variables panel


Select the Solver Parameters tab and type 0.0001 in the Residual
Tolerance box corresponding to the temperature (Temp.) equation
Click Apply

Select folder Analysis Preparation/Running and open the Set Run Time
Controls panel
Enter 200 for the maximum number of iterations
Click Apply

5-7

Tutorial 5.1

STEADY 3-D FLOW

CFD Analysis
Final Operations

Final
Operations

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the geometry and problem files and exit from
pro-STAR, as shown below. Remember that, for convenience, the model geometry
units were specified in inches. This must be changed into meters by applying the
appropriate conversion factor before writing data to the geometry file.
Alternatively, you may continue with the CFD analysis, using the STAR GUIde
facilities for running STAR interactively. This process is described in the next
section.

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, enter 0.0254 in the Scale Factor box
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
To perform the analysis interactively, proceed as follows:

In the main pro-STAR panel, select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Check that the units in which the model was built are correctly selected
(option button inches). Leave all other settings at their default values
Click Start New Analysis

The analysis will then start automatically. Convergence should be achieved within
the specified maximum number of iterations.
Post-Processing
Preliminaries Read in the results of the analysis from file tut.ccm:

Postprocessing

Load velocity vector components for plotting and then display them on your screen
using the Quick Hidden Line mode:

5-8

Select folder Post-Processing


Open the Load Data panel to display the File(s) tab
Click Open Post File

Go to the Data tab and check that Data Type Cell is selected
In the Vector Data list, select item Velocity Components UVW to load all
three velocity components
In the Scalar Data list, check that the default setting is None
Click Get Data
Select Go To > Create Plots to open the Create Plots panel
In the 3-D Surface tab, select Vector from the Option menu and Grid from
the Edge/Mesh menu
Click Plot to Screen
In the main window, select cell plot type Quick Hidden Line to display
Version 4.02

Tutorial 5.1

STEADY 3-D FLOW

Post-Processing
Post- processing

Figure T5.1-3

Figure T5.1-3

Velocity magnitude plot

Load vertex-based pressure values, select the contour plotting option and plot in
Hidden Surface mode:

Version 4.02

Go back to the Load Data panel by clicking Go To Load Data


In the Data tab, select option Cell & Wall/Bound (Smooth) from the Data
Type menu
In the Vector Data list, check that the default setting is None
In the Scalar Data list, select item Pressure and then click Get Data
Select Go To > Create Plots to display the Create Plots panel
In the 3-D Surface tab, select plot options Contour (filled) and Edge
Click Plot to Screen to display Figure T5.1-4

5-9

Tutorial 5.1

STEADY 3-D FLOW

Post-Processing
Post- processing

Figure T5.1-4

Pressure plot

Load vertex-based temperatures and plot:

Go back to the Load Data panel by clicking Go To Load Data


In the Scalar Data list, select item Temperature and then click Get Data
In the main pro-STAR window, click Replot to display Figure T5.1-5

Figure T5.1-5
5-10

Temperature plot
Version 4.02

Tutorial 5.1

STEADY 3-D FLOW

Post-Processing
Post- processing

A multi-section plot of a variable can be made using the following procedure:

Select Go To > Create Plots


Select tab Section Clipped
Choose Contour (filled) from the Option menu and Edge from the
Edge/Mesh menu
Select the Multiple Plane Plot sub-tab
The default number (10) of section planes to be plotted in succession is shown
in the Increments box. Accept this value.
Define the normal direction to these planes to be the direction of a coordinate
axis, as follows:
(a) Click the coordinate system selection button to display the Coordinate
Systems dialog
(b) Select the toroidal coordinate system (no. 4) and then click Close
(c) Note that the entry in the Coordinate System box changes to show that
system no. 4 has been selected. A pop-up menu (DIR) also appears,
inviting you to choose the desired direction.
(d) Select direction no. 2 (the - direction) from this menu and then click
Apply

Click Sweep to see 10 section plots of temperature plotted in quick


succession, starting at one end of the model and finishing at the other

Once the sections are defined, they can be re-used to produce plots of any other
variable. For example, velocity magnitude plots can be generated as follows:

Click Go To Load Data


In the Calculated Scalar Data list, select item Velocity Magnitude and then
click Get Data
Select Go To > Create Plots
In the Section Clipped tab, choose Contour (filled) from the Option menu
and Edge from the Edge/Mesh menu
Click Plot to Screen to see the velocity magnitude distribution plotted on the
model surface
Click Sweep to see the same distribution plotted on a series of cross-sections
through the model

To produce the best display of the calculated methane mass fraction distribution,
load cell-based values and then average them at the vertex positions:

Version 4.02

Click Go To Load Data


In the Data tab, select Cell from the Data Type menu
Select On from the Smooth Option menu
In the Scalar Data list, select item CH4 and then click Get Data
Select Go To > Create Plots
Select the 3-D Surface tab and then choose Contour (filled) from the Option
menu and Edge from the Edge/Mesh menu
Click Plot to Screen to display Figure T5.1-6

5-11

Tutorial 5.1

STEADY 3-D FLOW

Post-Processing
Final Operations

Figure T5.1-6

Final
Operations

5-12

Methane mass fraction plot

In the main window, select File > Quit, Nosave

Version 4.02

Tutorial 5.2

TRANSIENT 3-D FLOW

Pre-Processing
Preliminaries

Tutorial 5.2

TRANSIENT 3-D FLOW

The problem geometry and mesh for this tutorial is the same as for Tutorial 5.1. The
model also has the same boundaries and boundary region definitions. The only
difference is that transient boundary conditions are now imposed at the inlet planes.
As shown in Figure T5.2-1, the air inlet velocity increases linearly from 5 m/s to 9
m/s over a period of 2 seconds. At the same time, the methane inlet velocity
decreases from 10 m/s to 2 m/s, simulating the gradual shut down of an upstream
valve. At the end of this tutorial it is expected that users will be able to:

Set up a transient calculation


Set up a table that defines the changing boundary conditions
Perform some basic post-processing appropriate to transient calculations

Pre-Processing
Preliminaries A number of initial file copying operations are needed for proper operation of this
tutorial, as follows:

Create a sub-directory for the tutorial called tut5-2 and copy the model file
generated in Tutorial 5.1 (dil_pipe_ss.mdl) into it
Rename this file as dil_pipe_tr.mdl
Since the solution obtained in Tutorial 5.1 will act as the starting point of the
present analysis, it is also necessary to copy the solution file for the
steady-state case (dil_pipe_ss.ccm) to the current directory

Start up the pro-STAR interface:

Type prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Accept the default case name (dil_pipe_tr) displayed in the Casename text
box
Select the Resume existing .mdl file option
Deselect the Append to .echo file option
Click Continue

This will read all data in file dil_pipe_tr.mdl and will set up the model as it
was at the end of Tutorial 5.1.

In the main window, select File > Model Title


In the Title text box, change the title to:
TURBULENT MIXING IN A DILUTION PIPE (TRANSIENT)

Click Apply

Check the geometry and boundary conditions visually to confirm that the model has
been read in correctly:

Version 4.02

Select C > All


Click Cell Plot

5-13

Tutorial 5.2

TRANSIENT 3-D FLOW

Pre-Processing
Transient Solution Setting

Transient
Solution
Setting

The modifications needed to change to a transient analysis are as follows:


1. Select the transient solution mode
2. Define transient boundary conditions
To set up the STAR GUIde environment for a transient simulation, proceed as
follows:

Table
Definition

Go to the STAR GUIde window and open the Select Analysis Features panel
Select Transient from the Time Domain menu and then click Apply

As indicated in the tutorials introduction, the basic requirement of this case is to


simulate a time variation in the inlet stream velocities, as shown in Figure T5.2-1
below:

Velocity (m/s)

10
Outer Inlet

9
8
7
6
5
4
3

Inner Inlet

2
1

Time (sec)
1

Figure T5.2-1

Velocity changes over a 2 sec. period at the two inlet planes

The above variation may be defined using pro-STAR tables and then applied to the
two inlet boundaries. To set up a table for the inner inlet:

5-14

Click the Table Editor button in the main pro-STAR window

In the Table Editor dialog, enter INNER_INLET in the Table Title box
Click the Coordinate System button and then select system no. 1 (the global
Cartesian coordinate system) in the scroll list, as velocities will be specified in
Version 4.02

Tutorial 5.2

TRANSIENT 3-D FLOW

Pre-Processing
Boundary Re-definition

this system
Click Close. The new coordinate system choice will appear on the Table
Editor dialog.
Select Extrapolate from the Out of bound value option menu
Select the V component of velocity from the Dependent Variables scroll list
Select TIME as the independent variable
Click Setup
Enter two values in the TIME column, 0.0 for the 1st time point and 2.0 for
the 2nd time point
Click the red FILL button. A warning message pops up asking you to confirm
your choice of independent variable, so click Yes
Enter two end-point values for the V-velocity, 10.0 and 2.0, corresponding to
the two time points specified above
Click Save Data to confirm your entries
Enter a new name, in1.tbl, in the File Name box at the bottom of the panel
Click Write Table to save the table data just entered in the above file
Click Graph to display a graph of the inner inlet V-velocity variation, which
should be as shown in Figure T5.2-1

Now set up a table for the outer inlet by editing the one currently on display:

Enter a new name, OUTER_INLET, in the Table Title box


Enter two new end-point values for the V-velocity, 5.0 and 9.0, corresponding
to the previously defined time points of 0.0 and 2.0
Click Save Data to confirm your entries
Enter a new name, in2.tbl, in the File Name box at the bottom of the panel
Click Write Table to save the table data just entered in the above file
Click Graph to display a graph of the outer inlet V-velocity variation, which
should be as shown in Figure T5.2-1
Close the Table Editor dialog

Boundary
Apply the time variation in velocity defined above to the inner inlet:
Re-definition

Go to the STAR GUIde window and select folder Define Boundary


Conditions

Open the Define Boundary Regions panel

Select region no. 1 (Inner_inlet) in the boundary regions scroll list

Select Table from the Options menu

Open the pro-STAR file browser by clicking the button next to the Table
Name box, choose file in1.tbl from the file list and click OK. The selected
file name will now be displayed inside the box.

Click Apply to instruct STAR to read V-velocity boundary values from this
table
Repeat for the outer inlet:

Version 4.02

Select region no. 2 (Outer_inlet) in the boundary regions scroll list


Select Table from the Options menu
Open the pro-STAR file browser by clicking the button next to the Table
Name box, choose file in2.tbl from the file list and click OK. The selected
5-15

Tutorial 5.2

TRANSIENT 3-D FLOW

Pre-Processing
Analysis Controls

Analysis
Controls

Check the analysis controls status:

Run Time
Controls

file name will now be displayed inside the box.


Click Apply to instruct STAR to read V-velocity boundary values from this
table

Select folder Analysis Controls


Select sub-folder Solution Controls and then open the Solution Method panel.
It will be seen that the PISO algorithm has been selected automatically.
Select sub-folder Output Controls and then open the Analysis Output
(Transient) panel
Go to the Transient tab
Define an output period starting at time t = 0.0 s and a data output frequency
of 0.5 s for the transient post file
Note that, by default, the Velocity and Pressure variables are already
selected for output in the upper scroll list. Choose a number of additional
items for output, Turb Kinetic Energy, Dissipation, Turbulent Viscosity,
Temperature, Density and scalar variable CH4, by selecting each one in
turn and then clicking the Post button.
Check the list display to verify your choices and then click Apply

Check the status of the run time controls and then specify the simulated elapsed time
and the time step to be used:

Select folder Analysis Preparation/Running


Open panel Set Run Time Controls
Select option Run for and type 2 in the adjacent input box
Click Apply
Enter 0.0 in the Period Start Time box and 0.025 in the Time Step for Period
box
Click Set Period

Specify that the analysis is to start from the previously calculated steady-state
solution:

Final
Operations

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the geometry and problem files and exit from
pro-STAR, as shown below. Alternatively, you may continue with the CFD
analysis, using the STAR GUIde facilities for running STAR interactively. This
process is described in the next section.

5-16

Open the Analysis (Re)Start panel


Select option Standard Restart from the Restart File Option menu
Click the browser button next to the Restart File box, select file
dil_pipe_ss.ccm from the browser dialog and then click OK
Click Apply

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, enter 0.0254 in the Scale Factor box
Click Apply and then Close
Version 4.02

Tutorial 5.2

TRANSIENT 3-D FLOW

CFD Analysis
Preliminaries

Select File > Write Problem File


In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
To perform the analysis interactively, proceed as follows:

In the main pro-STAR panel, select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Check that the units in which the model was built are correctly selected
(option button inches)
Click Write New Geometry File
Click Restart Analysis

The analysis will then start automatically and will stop after 80 time steps. Bear in
mind that transient solutions can involve lengthy computer runs. Therefore, the
analysis for this tutorial will take much longer than for Tutorial 5.1.
Post-Processing
Preliminaries Open the file containing the transient post data (dil_pipe_tr.pstt):

Postprocessing

In the STAR GUIde window, select folder Post-Processing


Open the Load Data panel
Select option Transient from the Analysis menu
Check that file dil_pipe_tr.pstt is displayed in the File Name box and
then select the first position in the Transient Post File(s) list
Click Add File to List
Select file dil_pipe_tr.pstt on the list again and then click Open
Transient Post File; the time steps at which flow data were stored during the
run should appear in the Select Time Step scroll list

The next step in transient post-processing is to identify the point in time at which
results are to be manipulated and displayed. This is done as follows:

In the Select Time Step list, select the required time (0.5 sec in this case) and
then click Store Iter/Time. This loads results calculated after 20 time steps.

Load velocity vector components, select the cross-sectional plotting option and
reduce the size of all vectors:

Version 4.02

Go to the Data tab and select item Velocity Components UVW in the Vector
Data list
Click Get Data
Select Go To > Create Plots
In the Create Plots panel, go to tab Section Clipped
Accept the default section definition and then click Plot to Screen
Go to the Vectors tab and then type 0.7 in the Scale Factor box
Click Apply
5-17

Tutorial 5.2

TRANSIENT 3-D FLOW

Post-Processing
Post- processing

Change the viewpoint and replot:

In the main window, change the viewpoint to (0, 0, -1) by selecting View >
Axis > -Z to display Figure T5.2-2

Figure T5.2-2

Velocity magnitude plot at t = 0.5 s

The methane mass fraction can be plotted as follows:

5-18

In the Create Plots panel, click Go To Load Data


Select On from the Smooth Option menu
Select item CH4 in the Scalar Data list
Click Get Data
Select Go To > Create Plots
In the Section Clipped tab, select Contour (filled) from the Option menu
Click Plot to Screen to display Figure T5.2-3

Version 4.02

Tutorial 5.2

TRANSIENT 3-D FLOW

Post-Processing
Post- processing

Figure T5.2-3

Methane mass fraction plot at t = 0.5 s

The results after 2.0 seconds (80 time steps) may be plotted in the same manner:

Version 4.02

Click Go To Load Data and then select the File(s) tab


In the Select Time Step list, highlight the desired time (2.0 secs) and then click
Store Iter/Time. This loads results calculated after 80 time steps.
Go to the Data tab and select Smooth Option Off
In the Vector Data list, select item Velocity Components UVW
Click Get Data
Select Go To > Create Plots
In the Section Clipped tab, select Option Vector
Click Plot to Screen to display Figure T5.2-4

5-19

Tutorial 5.2

TRANSIENT 3-D FLOW

Post-Processing
Post- processing

Figure T5.2-4

5-20

Velocity magnitude plot at t = 2.0 s

Click Go To Load Data


Select On from the Smooth Option menu
Select item CH4 in the Scalar Data list
Click Get Data
Select Go To > Create Plots
Select Contour (filled) from the Option menu
Click Plot to Screen to display Figure T5.2-5

Version 4.02

Tutorial 5.2

TRANSIENT 3-D FLOW

Post-Processing
Final Operations

Figure T5.2-5

Final
Operations

Version 4.02

Methane mass fraction plot at t = 2.0 s

In the main window, select File > Quit, Nosave

5-21

Tutorial 6 SUPERSONIC AND TRANSONIC FLOWS


Tutorials in this section are designed to demonstrate the application of STAR-CD
to compressible flow problems. Tutorial 6.1 involves flow over an idealised
two-dimensional wing geometry, shown in Figure T6.0-1.

inflow

Figure T6.0-1

Version 4.02

9 cm

Symmetrical diamond-shaped wedge used in supersonic flow tutorial

6-1

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Physical Problem Description


Preliminaries

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC


FLOW

This tutorial aims to demonstrate:

A method of adaptive mesh refinement


How to set up a model of inviscid supersonic compressible flow
How to calculate gradients of scalar post data

Physical Problem Description


In this tutorial, the wing geometry is a diamond wedge with major length 9 cm and
half-angle 5 (see Figure T6.0-1). The inlet flow direction is parallel to the major
length (zero angle of attack) so the flow is symmetrical. Therefore, a symmetry
plane may be placed along the major length to reduce the computational cost of the
simulation.
The flow is assumed to be inviscid and the inlet velocity is set at Mach 1.893,
which is sufficiently large to ensure that the flow is supersonic across the entire
solution domain. For air at a temperature of 293 K, this is equivalent to a velocity
of 650 m/s, as calculated from the equation below:
u
u
M = --- = --------------c
RT
where is the adiabatic index and R is the gas constant for air, taken as 1.402 and
287.05 Jkg-1K-1, respectively.
Initially, the case is run with a simple, coarse mesh. This is then refined in the
areas where the pressure gradient is greatest. This process is repeated until the mesh
is sufficiently fine to give a reasonable resolution of the shock and expansion waves.
Pre-Processing
Preliminaries The two analyses described in this tutorial will be performed in separate directories.
Create a sub-directory for the first analysis, called tut6-1a. The initial mesh for
this problem has already been created and the relevant cell, vertex, boundary and
problem setup files are provided with the STAR-CD installation (files
super.cel, super.vrt, super.bnd and super.inp respectively).
Therefore, before starting the tutorial, make sure these files are copied into your
current directory.

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name, super1, in the Casename text box
Click Continue

Read in the available problem data:

6-2

Select File > Read File... in the main pro-STAR window


In the Input Coded Command File dialog check that the File Name is
super.inp
Version 4.02

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Pre-Processing
Material Properties

Click Apply and then Close

This will read default problem settings from file super.inp as well as the
problem geometry and boundary location definitions from the remaining three files.

In the main window, select File > Model Title


Type ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW in the
Title text box
Click Apply
Select C > All then Cell Plot to display the mesh shown in Figure T6.1-1

Figure T6.1-1

Coarse mesh geometry

The coarseness of the mesh leads to highly smeared shock waves in the first run but
the refinement procedure will correct this. First though, a complete model for the
problem must be set up.
Material
Properties

Since the flow is compressible, the fluid density will be modelled using the ideal gas
law. The inviscid assumption also needs to be specified and the temperature
calculation needs to be turned on:

In the STAR-GUIde panel select the Thermophysical Models and Properties


folder, followed by the Liquids and Gases sub-folder
Open the Molecular Properties panel
Change the Density setting to Ideal-f(T,P)
Change the Molecular Viscosity setting to Inviscid
Click Apply
Go to the Thermal Models panel and turn Temperature Calculation On
Click Apply

In order to obtain a solution as quickly as possible, it is advisable to specify a


Version 4.02

6-3

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Pre-Processing
Boundary Locations and Types

suitable initial flow field. This can be particularly important in compressible flow
simulations. A simple, but often effective, initialisation strategy is to assign the inlet
conditions to the entire solution domain:

Boundary
Locations
and Types

Open the Initialization panel


Set the U velocity to 650 m/s
Click Apply

The boundary locations and types have already been specified in the coded file
super.bnd. To display them on the screen:

Select View > Isometric > -1,1,1


Select B > All
Turn on Bound in Cell Plot Display Options to display Figure T6.1-2

Figure T6.1-2

Boundaries displayed on mesh geometry

Four boundary regions can be distinguished in Figure T6.1-2, each of a different


type:
1.
2.
3.
4.

The red-coloured region on the left is an inlet


The green-coloured region on the right is an outlet
The turquoise-coloured region on the wing is a wall
The fourth region, opposite the wing and coloured pale blue, is a free-stream
boundary. This type of boundary allows shock waves produced by supersonic
flows to be transmitted out of the domain without reflection. Free-stream
boundaries can only be used in models involving supersonic free streams. The
velocity at such boundaries is usually assumed to be the same as that at the
inlet.
All remaining external faces of the mesh are assigned to the default boundary region
6-4

Version 4.02

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

CFD Analysis - Coarse Mesh


Boundary Conditions

0 which, in this case, is defined as a symmetry plane.


The boundary types listed above constitute an appropriate boundary region
combination for this problem. For further information about the suitability of
various boundary region combinations for compressible flow applications see
Compressible Flow on page -9 of the CCM User Guide.
Boundary
Conditions

To set the desired conditions for the inlet and free-stream regions:

In the Define Boundary Conditions folder open the Define Boundary Regions
panel
Select Inlet from the scroll list
Change the U velocity to 650 m/s
Change the Density to 1.189 kg/m3
Click Apply
Select Free Stream from the scroll list
Change the U velocity to 650 m/s
Click Apply

The default settings are suitable for all other boundary regions.
Analysis
Controls

Solving the momentum equation in the z-direction is not necessary in this case as
the model is two-dimensional. Therefore:

Final
Operations

Select the Analysis Controls folder


Select the Solution Controls sub-folder followed by the Equation Behaviour
sub-folder and open the Primary Variables panel
Under the Equation Status tab, turn off the solution of the z-momentum
equation by unchecking the W-Mom tick box
Click Apply

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the problem and geometry files and exit from
pro-STAR, as shown below. Alternatively, you may run STAR interactively, as
described in the next section.

Select File > Write Geometry File


The geometry was created in centimetres, so set the Scale Factor to 0.01
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close

CFD Analysis - Coarse Mesh


To perform the analysis interactively, proceed as follows:

File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Leave all settings at their default values and click Start New Analysis

The analysis will then start automatically. The solution should converge within the
specified maximum number of iterations.
Version 4.02

6-5

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Mesh Refinement
Preliminaries

Mesh Refinement
Preliminaries In order to perform mesh refinement, the current analysis results need to be read into
pro-STAR:

Select folder Post-Processing


Open the Load Data panel to display the File(s) tab
Click Open Post File

Adaptive mesh refinement can be performed automatically using the Adaptive


Refinement STAR GUIde panel or manually using the Cell Refine... option in the
Cell Tool. Both methods will be demonstrated in this section.
Cell set
collection

Load the pressure data into pro-STAR using STAR GUIde:

In the Data tab select Data Type Cell and Smooth Option On
Select Pressure from the Calculated Scalar Data list
Click Get Data
Select Go To > Create Plots
In the 3-D Surface tab, select options Contour (filled) and None
Click Plot to Screen
Turn off the Bound Cell Plot Display Option
Select View > SNORMAL to display Figure T6.1-3

Figure T6.1-3

Pressure contours obtained using coarse mesh

As expected, the coarse mesh results show a lot of smearing in the shock waves at
the two wing tips and also in the fan-shaped expansion wave at the wings widest
point. To improve the resolution of these flow features, the mesh will be refined in
the regions exhibiting the greatest pressure gradients:

6-6

Select the Analysis Preparation/Running folder and open the Adaptive


Version 4.02

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Mesh Refinement
Cell set collection

Refinement panel
Under the Gradient sub-tab of the Refinement Criteria tab, select the Top 40
Percent of Cells for refinement
Select Pressure as the Variable to Apply Criteria
Click New Set
Turn on mesh plotting by clicking the mesh button in the main pro-STAR
window
Click Cell Plot to display Figure T6.1-4

Figure T6.1-4

Cells to be refined and corresponding pressure gradient values

Not all cells shown in Figure T6.1-4 need to be refined in the same manner: the main
body of cells should be refined in two directions (x and y) but the near-wall cells
only need refinement in the direction perpendicular to the wall (x). For this reason,
refinement has to be performed in two stages, starting with the main body of cells.
Prior to this, the selected cell set should be stored so that it can be recalled for the
second refinement:

In the main pro-STAR window, select INFO > Store Set/Surface/View to


open the Store Information dialog
Under the Sets tab, type to_refine in the Set Name box
Click Write and then Close the dialog

To refine the main body of cells:

Version 4.02

Select C > Subset > Type... and click on one of the cells near the top of the
window
Go to STAR GUIde and select the Refine tab in the Adaptive Refinement panel
Change the New Casename entry to super2
Click Refine/Update Model to refine the cells
6-7

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Mesh Refinement
Cell set collection

Now, to select the near-wall cell set due for refinement, read in the previously stored
cell set and define a new subset:

In the main pro-STAR window, select INFO > Recall Set/Surface/View to


open the Recall Information dialog
Under the Sets tab, change the Set File entry to super1.set
Click Refresh
Select to_refine from the Select Entry list
Click Recall
Close the dialog
Select the Geometry Plot option in the main window
Click Cell Plot

Note that as a result of the refinement just completed, the original main-body cells
in the set no longer exist so only the near-wall cells are now displayed. These are
refined manually using the Cell Tool:

Select Tools > Cell Tool


In the Cell Tool window, click Cell Refine
In the Cell Refine dialog, enter 2, 1 and 1 for the Number of divisions in the I,
J and K directions, respectively
Choose Cset as the Cells to Refine
Choose Merge for the Vertex Merge Option
Choose Couple for the Couple Option
Click Apply and then Close
In the main window, select C > All
Click Cell Plot to display the refined mesh, shown in Figure T6.1-5

Figure T6.1-5
6-8

Geometry plot showing mesh after a single refinement


Version 4.02

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

CFD Analysis - Refined Mesh


Final Operations

Final
Operations

Write the geometry and problem files and save the model file:

Select File > Write Geometry File...


In the Geometry File Write dialog click Apply then Close
Select File > Write Problem File...
In the Problem File Write dialog click Apply then Close
Select File > Save Model

Run the case in STAR, either at the command line or interactively, as described
previously.
Examination of the analysis results in the post data file (super2.ccm) will
show that the mesh is still too coarse to fully resolve the shock and expansion
waves. A suitable mesh may be obtained by repeating the mesh refinement process
described above until the position of the shock and expansion waves is clear.
The rest of this tutorial will proceed with a mesh that has resulted from a total of
four refinement cycles using this method. Some cells adjacent to the free-stream
boundary have also been further refined manually. This is sometimes necessary
because, as a result of the constant pressure defined on that boundary, the calculated
pressure gradient in such cells is not sufficiently high to trigger their inclusion in the
code-selected refinement set.
You may perform all the refinement operations if desired and, once you are
satisfied that you understand the process, save your refined mesh data and terminate
the session as follows:

Select File > Save As Coded...


Click Apply and then Close
Quit pro-STAR by selecting File > Quit > Quit, Nosave

Alternatively, you may terminate the session without saving any data and continue
instead from the cell, vertex, boundary and problem setup files provided with the
STAR-CD installation, as described in the next section.
CFD Analysis - Refined Mesh
Preliminaries For the second part of this tutorial, create a new subdirectory called tut6-1b. The
cell, vertex, boundary and problem setup files for the final refined mesh are called
super_ref.cel, super_ref.vrt, super_ref.bnd and
super_ref.inp, respectively. Therefore, before starting this part of the tutorial,
make sure these files are copied into the tut6-1b directory.
Start up pro-STAR and enter the new case name and title:

Type prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter case name super_ref
Click Continue

Read in the available problem data:

Version 4.02

Select File > Read File...


In the Input Coded Command File dialog check that the filename is
super_ref.inp and then click Apply
6-9

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

CFD Analysis - Refined Mesh


Final Operations

This will read all the current model settings from file super_ref.inp as well as
the problem geometry and boundary location definitions from the remaining three
files.

In the main window, select File > Model Title


Type 2D SUPERSONIC FLOW OVER A DIAMOND WEDGE in the Title
text box
Click Apply
Select C > All then Cell Plot to display the mesh shown in Figure T6.1-6. The
latter also includes a magnification of the near-wall region so that the details
of the mesh structure can be seen more clearly.

Figure T6.1-6

Mesh geometry, including magnification of the near-wall region

It can be seen that the mesh is very fine in places where shock waves are expected
to occur. Refinement is used to a lesser extent near the wing surface and in the
expansion wave region. The regions upstream and far downstream of the wing do
not need to be finely meshed as the flow there will be relatively undisturbed.
Final
Operations

The model setup for this problem was described earlier in this tutorial and will not
be repeated. All the information necessary to run the case is contained within the
files provided, so it is only necessary to save the model data and write the problem
and geometry files, as shown below. A description of how to run STAR
interactively is also given below. Alternatively, you may exit from pro-STAR and
run STAR from the command line.

6-10

Select File > Write Geometry File


The geometry was created in centimetres, so set the Scale Factor to 0.01
Click Apply and then Close
Select File > Write Problem File
Version 4.02

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Post-Processing
Running the Analysis

Running the
Analysis

In the Problem File Write dialog, click Apply and then Close

To perform the analysis interactively, proceed as follows:

File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Leave all settings at their default values and click Start New Analysis

The analysis will then start automatically. The solution should converge within the
specified maximum number of iterations.
Post-Processing
Preliminaries Read in the results of the analysis:

Select folder Post-Processing


Open the Load Data panel to display the File(s) tab
Click Open Post File

You are now ready to post-process the results.


Postprocessing

Version 4.02

Display a contour plot of pressure:

In the Data tab select Data Type Cell and Smooth Option On
Select Pressure from the Scalar Data list
Click Get Data
Select Go To > Create Plots
In the 3-D Surface tab, select Contour (filled) and Edge
Click Plot to Screen to display Figure T6.1-7

6-11

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Post-Processing
Post- processing

Figure T6.1-7

Pressure contour plot

The rapid changes in pressure that form shock waves at both wing tips and the
fan-shaped expansion wave at the wings widest point are clearly visible in Figure
T6.1-7. The resolution of these flow features is vastly superior to that produced with
the unrefined mesh of Figure T6.1-3. The improved results may also be displayed
as a Mach number plot:

6-12

Click Go To Load Data


In the Data tab select Mach Number from the Calculated Scalar Data list
Click Get Data
Click Replot in the main pro-STAR window to display Figure T6.1-8

Version 4.02

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Post-Processing
Post- processing

Figure T6.1-8

Mach number contour plot

The extent of the solution accuracy improvement can be demonstrated by creating


a graph of pressure on the wing and comparing it with similar data produced using
the coarse mesh:

In the Load Data panel, choose Data Type Boundary and Smooth Option On
Select Pressure from the Scalar Data list
Choose Absolute from the Press. Ref. list
Click Get Data
Select Go To > Field Data
Click Graph Reset
Choose Yes in the box that appears
Choose Select data along Entire Cell Set
In the Data Type tab, select Post 4 from the Post data to load pop-up menu
In the Graph Data section, select Graph data vs. X-axis
To isolate the wall shells, type the following in the I/O window:
CSET NEWS TYPE 13

Also add some of the shells on the symmetry boundary to the set:
CSET ADD GRAN -1.5 12.0 -0.01 0.01

In the Field Data panel, click Create Graph

The graph that now appears is not particularly useful. This is because data are sorted
by cell number rather than by position. To sort the data by position on the x-axis and
improve the plot appearance change the graph formatting as follows:

Version 4.02

Click Go To Customize Graph


6-13

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Post-Processing
Post- processing

Under the Registers tab, click Register Operations


In the Graph Register Operations dialog, click Sort Data...
Enter 3, 1, 9 and 1, in that order, in the four boxes of the Graph Sort dialog
Click Apply and then Close
Close the Graph Register Operations dialog
Under the Axis tab, select the X-Axis Parameters sub-tab
Enter appropriate values in the various text boxes, as shown below:

Click Apply
Select the Y-Axis Parameters tab and enter the details shown below:

Click Apply and then Redraw

The wall pressure data from the coarse mesh are stored in file coarse.xy. This is
also provided with the STAR-CD installation and should be copied to your current
directory. To plot both sets of data onto a single graph:

6-14

Select Go To > External Data


Use the file browser at the top of the External Data panel to locate the
coarse.xy file
Choose xyxyxy for Establish x-y pairs
Click Create Graph to display Figure T6.1-5

Version 4.02

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Post-Processing
Post- processing

Figure T6.1-9

Graph of wall pressure along the wing

Even through the results from the fine mesh show some oscillations near the shocks,
the improvement in their sharpness is dramatic when compared to those from the
coarse mesh.

Version 4.02

Quit pro-STAR by selecting File > Quit > Quit, Nosave

6-15

Tutorial 6.1

ADAPTIVE MESH REFINEMENT FOR SUPERSONIC FLOW

Post-Processing
Post- processing

6-16

Version 4.02

Introduction

Tutorial 7 MULTIPLE ROTATING REFERENCE FRAMES


Introduction
This tutorial outlines the steps needed to set up and run a rotating radial fan analysis.
It uses the multiple rotating frame methodology (implicit formulation), a
steady-state approach involving two or more frames of reference that can be
stationary or spinning. In this case, two frames are used to perform the analysis
a spinning one representing the fan and blades and a stationary one representing the
fan body and inlet.
Physical Problem Description
The radial fan geometry to be used is shown below:

Figure T7.0-1

Radial fan geometry

The fan consists of three parts: the inlet pipe leading into the main solution domain,
the rotating fan body and blades, plus the stationary body section leading to the
outlet. The models mesh is saved in three separate Nastran files corresponding to
each of the above parts. The spinning effect of the fan axis will be ignored in the
inlet section but will be accounted for in the rotating housing.
Baffle cells are used to represent the 12 equally-spaced blades. The rotation
speed is 2,000 RPM and the fluid within the fan is air at atmospheric conditions.

Version 4.02

7-1

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing
Preliminaries

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

The tutorial aims to show the user how to:

Import grids from CAD files


Create and transform cell couples between mismatched grid regions
Define multiple rotating reference frames
Define rotating and non-rotating walls
Change the coordinate reference frame for vector plots

Pre-Processing
Preliminaries Create a sub-directory for the tutorial. The mesh for this case is supplied as three
separate Nastran files, inlet.nas, fan.nas and body.nas, corresponding to
the three fan regions mentioned earlier. Therefore, before starting the tutorial, make
sure that the supplied files are copied into your current directory.

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (say, fan_mrf) in the Casename text box
Click Continue
In the main window, select File > Model Title
In the Title text box type:
RADIAL FAN SIMULATION USING MULTIPLE ROTATING FRAMES

Click Apply
If the STAR GUIde window does not appear on screen automatically, open it
by clicking the STAR GUIde button on the main window

This completes the preliminary steps for this tutorial.


Setting the
Analysis
Type

The first operation is to set the analysis type for rotating machinery, as follows:

In the STAR GUIde window, open the Select Analysis Features panel
Select option On from the Rotating Reference Frame Status menu
Click Apply

Note that an additional folder called Rotating Reference Frames now appears in the
NavCenter tree. The implicit solution option will be chosen later on using a panel
within this folder.
Mesh Import

You can now continue with importing the grid to be used in the analysis. It is
assumed that its three parts have been created separately and that there is no
continuity between them. In other words, the mesh blocks are not joined together
with common vertex numbering at the block interfaces.
To import the Nastran files:

7-2

In the STAR GUIde window, select the Create and Import Grids folder and
then open the Import Grids panel
Select the Nastran option for Format
Select Type in the Option menu (for cell table types)
Use the selector button to select file inlet.nas for the Bulk Data File
Version 4.02

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing
Mesh Import

Click Import Grid

Following this last operation, the I/O window will indicate that the numbers of
nodes (vertices) and elements (cells) that were read in were 7128 and 5760,
respectively. The current maximum values of vertices and cells in pro-STAR after
reading in the mesh are also shown in this case they are the same as for the
original mesh. These values must be used as offsets for the next Nastran file import,
so that the second part of the mesh does not re-use the vertex and cell numbers
assigned to the first part.
Read in the next part of the mesh:

Turn on the Add to End option. Note that the Vertex Offset and Cell Offset
values are automatically set to mxv and mxc, respectively. These parameters
are internal functions that provide the current highest value + 1 for the entity
of interest. In this case, mxv will be interpreted as being equal to 7129 and
mxc equal to 5761. The user can supply alternative values if desired.
Use the selector button to select file fan.nas for Bulk Data File
Click Import Grid

Again, the I/O window provides the maximum vertex and cell numbers after import
is complete.
The final part of the mesh is then imported as follows:

Use the selector button to select file body.nas for Bulk Data File
Click Import Grid

This completes the import process. You should check the cell table indices set up
during the mesh import.

Click the CTAB button on the main pro-STAR window to open the Cell Table
Editor dialog and inspect its contents. Alternatively, issue the CTLIS,ALL
command in the I/O window which results in the output shown below:

Figure T7.1-1

Cell table listing

As can be seen, there are four cell types defined: three for fluid cells and one for
baffle cells. These cell types were defined within the Nastran files and represent the
following mesh regions:
1. Fluid cells within the rotating fan body
2. Fluid cells within the stationary fan body
3. Baffle cells representing the fan blades
Version 4.02

7-3

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing
Cell Type Properties

4. Fluid cells within the stationary fan inlet duct


You may now inspect the mesh visually as follows:

In the main pro-STAR window, select C > All


Change the mesh orientation by selecting Plot > Up Axis > Z
Change to an isometric viewing direction by selecting View > Isometric >
1,1,1
Click Cell Plot
Select cell plot type Quick Hidden Line; this will allow you to see the fan
blades inside the mesh, as shown in Figure T7.1-2

Figure T7.1-2

Cell Type
Properties

Imported grid

The cells in each part of the mesh must now be correctly defined and named so that
each fan component can be clearly distinguished from the others. To determine
what kind of cells have been created by the import process:

Select option Utility > Count > Cells

As mentioned in the Mesh Import section, cells in the rotating fan body have a
cell table index of 1. Cells in the stationary body domain have cell table index 2 and
those in the inlet pipe index 4. Cells with index 3 are interpreted as baffles
representing the fan blades among the rotating cells.
The desired modifications to the cell type parameters may be done via the cell
table editor, as follows:

7-4

In the main pro-STAR window, click CTAB to open the Cell Table Editor
dialog
Check that table entry #1 is selected in the scroll list
Change the Spin Index value to 2
Version 4.02

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing
Cell Type Properties

Enter ROTATING_FAN in the Name box


Click Apply

The above actions assign a spin index of 2 to the rotating fan body cells. All other
cells will have the default spin index of 1. These will be defined later as the spinning
and stationary frames of reference, respectively.
Next, change the settings for cell type no. 2, corresponding to the stationary body
cells:

Select table entry #2 in the scroll list


Change the Color Table Index to 3 (green)
Enter BODY in the Name box
Click Apply

Note that the spin index is left at a value of 1, so that the BODY cells will remain
stationary.
Check the properties of cell type 3:

Select table entry #3 in the scroll list


Check that the Cell Type setting is Baffle
Check that the Color Table Index setting is 4 (blue)
Enter FAN_BLADES in the Name box
Click Apply

Note that the baffle spin index may be left at 1; this is because they are already part
of the spinning fan body and thus do not require a spin index setting. In fact,
pro-STAR will not allow you to change the spin index for a baffle-type cell.
Finally, the inlet pipe (type 4 cells) can be modified:

Version 4.02

Select table entry #4 in the scroll list


Change the Color Table Index to 5 (cyan)
Enter INLET in the Name box
Click Apply and then Close
In the main pro-STAR window, click Replot and notice the change in cell
colours in the model, shown in Figure T7.1-3

7-5

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing
Mesh Structure

Figure T7.1-3

Mesh
Structure

7-6

Fan model grid showing cell colour changes

In their present form, the three mesh parts are not joined together. As mentioned
earlier, the imported mesh is not continuous in the areas where the rotating fan body
meets the stationary inlet and body mesh. This can be clearly seen in the zoomed-in
view shown in Figure T7.1-4 below.

Version 4.02

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing
Mesh Structure

Mismatched Grid Areas

Figure T7.1-4

Mismatched grid areas in the model

The three meshes should therefore be joined together using pro-STARs cell-face
matching and couple creation facilities, as described below:

In the STARGUIde window, locate the Create and Import Grids folder and
open the Assemble Grids panel
Go to the Create Couples tab

Begin by joining the rotating region (cell type 1) to the stationary body region (cell
type 2).

Check that the Choose Cells option is set to Cell Set


Select Choose Cell Types from the Master/Slave Option menu
Change the Master Cell Type to Specify and enter 1 in the adjacent box
Change the Slave Cell Type to Specify and enter 2 in the adjacent box
Click Apply. The I/O window feedback should indicate that 720 couples were
created along the interface between the two regions.

Next, repeat the steps above in order to couple the rotating region to the stationary
inlet region (cell type 4):

Version 4.02

Change the Slave Cell Type value to 4


Click Apply. The I/O window feedback should indicate that a further 648
couples were created along the second interface.
7-7

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing
Boundary Location

In the main pro-STAR window click Cell Plot to display the joined-up mesh,
as shown in Figure T7.1-5 below.

Figure T7.1-5

Fan model grid display with coupled cells

Complete the mesh re-structuring process by using pro-STARs couple


transformation facility. This creates additional cell faces at the junction between
rotating and stationary regions, resulting in a mesh with one-to-one cell face
connectivity and the elimination of all cell couples.

Boundary
Location

As well as the normal inlet and pressure outflow boundaries, a spinning wall
condition needs to be applied to those areas of the stationary fan casing that form
part of the rotating mesh. Such wall boundaries must be defined as spinning in the
opposite direction to the fan rotation in order to produce a stationary wall relative
to the flow. An effective way of locating the counter-spinning boundary regions is
given below, where use is made of various cell and vertex set options that help
identify their edges.
First, create a new cell set containing just the rotating and inlet cells:

7-8

In the main window, select Tools > Couple Tool


Click Couple Transform
Verify the result of this operation by selecting Cp > All from the main
window. The I/O window feedback should verify that no couples were found
in the model.

Select C > New > Type... and click on any of the rotating (red) cells
Without plotting the new set, select C > Add > Type... and click on any of the
inlet (cyan) cells
Click Cell Plot
Version 4.02

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing
Boundary Location

Now isolate the edge vertices of the above cell set and display them on screen:

Select V > New > Cell Set Edge


Turn on the vertex display by clicking the Vertex Cell Plot Display button to
display Figure T7.1-6

Figure T7.1-6

Inlet and rotating cell types showing edge vertices

Next, remove the inlet cells from the cell set; also remove vertices that are no longer
part of this new cell set from the vertex set:

Select C > Unselect > Type... and click on any one of the cyan inlet cells
Select V > Subset > Cell Set
Click Cell Plot to display the red rotating cells and the set of vertices that
describe the edges of the counter-spinning wall boundaries

We are now in a position to define a separate region for these boundaries.

In the main window, change the viewpoint to be along the negative Z direction
by choosing View > Axis > -Z
In the STAR GUIde window, go to the Locate Boundaries folder and open the
Create Boundaries panel

Follow the instructions below to specify the wall boundaries in four stages. The first
stage defines boundaries on the bottom surface of the fan using the ZONE method.
The last three stages use the FIND method to generate boundaries from a starting
seed vertex on the surface.
In the Create Boundaries panel:

Version 4.02

Select Reg#3 in the Boundary Regions scroll list


Select Wall as the boundary Type from the pull-down menu below
Click Define Region
7-9

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing
Boundary Location

Click Select a Zone


Draw a polygon around the entire visible mesh. This will define the fan base
as part of boundary region 3.

1,152 new boundaries should be created by this method. Next:

In the main window, change the view back to isometric using View >
Isometric > 1,1,1
In the Create Boundaries panel, click the Surface Based on Vset button
Use the cursor to pick a vertex anywhere between the two concentric rings of
vertices at the top of the visible mesh

An additional 576 boundaries should be created by the above operation. Note that
in this particular example, the core axle will be considered as spinning with the fan,
so no additional boundaries need to be defined in that location.
The inlet and pressure boundaries will be defined next. Start by restoring a view
of the entire model:

In the main window, select C > All


Change the plot type to Hidden Surface
Turn off the Vertex display option button
Click Cell Plot

To define the inlet boundary:

Go to the Create Boundaries panel and select Reg#1 in the Boundary Regions
scroll list
Select Inlet as the boundary Type from the pull-down menu
Click Define Region
Click Surface Based on Edges
Pick a vertex on the top surface of the inlet pipe

Define the pressure boundary in a similar way:

7-10

Select Reg#2 in the Boundary Regions scroll list


Select Pressure as the boundary Type from the pull-down menu
Click Define Region
Click Surface Based on Vset
Pick a vertex on the surface of the outlet plane, as shown in Figure T7.1-7

Version 4.02

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing
Boundary Location

Select a Vertex
Here

Figure T7.1-7

Pressure boundary definition

To view all the boundaries created:

Turn on the boundary display option by clicking the Bound button. The result
is shown in Figure T7.1-8

Figure T7.1-8

Version 4.02

Boundary regions displayed on top of the mesh

7-11

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing
Spin Parameters

Turn off the boundary display by clicking the Bound button again

This completes the boundary set-up stage.


Spin
Parameters

The rotating frame of reference in this case should be defined with respect to the Zaxis of the global cylindrical coordinate system. Check where the origin of this
system is positioned within the model:

Click the CSYS button in the main pro-STAR window to display the
Coordinate Systems dialog
Select coordinate system Number 2 in the scroll list
Click Show Triad
Click Close
Position the viewpoint above the mesh by selecting View > Axis > +Z

The triad for the global cylindrical coordinate system shows that the origin is
positioned on the fan axis and that its Z-axis runs parallel to it. Therefore, this
system is correctly aligned and positioned for the models purposes. Had this not
been the case, a new local cylindrical coordinate system would have had to be
defined (via the Coordinate Systems dialog) whose Z-axis would be the axis of
rotation.
We can now specify the implicit solution option and spin parameters for the
analysis as shown below. For this case, cells with a spin index of 1 are to be
stationary ( = 0) while those with a spin index of 2 are to have an angular velocity
of 2000 r.p.m.

In the STAR GUIde window, go to the Rotating Reference Frames folder and
open the Rotating Reference Frames panel
Select option Multiple Frames - Implicit from the Reference Frame
Treatment menu
Select Spin Index 1 in the Spin Parameters scroll list
In the boxes at the bottom of the panel, enter a value of 0 for Omega and 2 for
Co-ord. Sys
Click Apply
Select Spin Index 2
Enter a value of 2000 for Omega and 2 for Co-ord. Sys
Click Apply

The implicit solution method for this multiple rotating reference frame problem has
now been set up. All cells with a spin index of 2 will be treated as rotating at 2000
r.p.m., while those with the default setting of 1 will remain stationary.
Material
Properties

Check the properties of the fluid present in the model. The default fluid for material
no. 1 in pro-STAR is air at standard pressure and temperature. Therefore its
molecular properties do not need to be altered and you can go directly to setting up
the turbulence model.

7-12

Open the Turbulence Models panel in STAR GUIde by selecting the


Thermophysical Models and Properties and Liquids and Gases folders
Select the On switch for turbulence modelling
Choose the K-Epsilon/High Reynolds Number option
Click Apply
Version 4.02

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Pre-Processing
Boundary Conditions

Set up some essential monitoring and reference parameters:

Boundary
Conditions

Open the Monitoring and Reference Data panel


Enter 20938 for the Monitoring cell number
Enter 5669 for the Reference Pressure Cell Number
Click Apply

An inlet velocity of 5 m/s will be specified, with all flow leaving the fan through the
pressure outlet.

Locate the Define Boundary Regions panel in the Define Boundary Conditions
folder
Select Reg# 1 Inlet in the Boundary Regions scroll list
Enter a value of -5 for the W-velocity component
Select option TI/Length from the Turb. Switch menu
Enter a Turb. Intensity of 0.05 and a Length of 0.001
Click Apply

The pressure boundary is defined next:

Select Reg# 2 Pressure in the Boundary Regions scroll list


Choose the Static pressure Option
Retain the default relative pressure (0) at the boundary. This means that the
absolute pressure at the boundary is equal to the reference pressure.
Select option TI/Length from the Turb. Switch menu
Enter a Turb. Intensity of 0.05 and a Length of 0.001. These values would be
used if there is any inflow through the boundary faces.
Click Apply

Finally, define conditions at the counter-rotating wall regions:

Select Reg# 3 Wall in the Boundary Regions scroll list


Enter 2 for the Coord. System defining the axis of rotation
Enter -2000 for Omega
Click Apply

Turning on the boundary display by clicking Bound in the main window enables
you to verify the boundary conditions entered above. Check that an inflow velocity
component is displayed across the inlet plane, plus a rotational component on each
of the boundaries on the counter-rotating part of the wall. This can be most easily
done by selecting each region in turn and displaying it.
Analysis
Controls

Most of the default control parameters are adequate for the analysis to follow. The
only items that need to be modified are concerned with solution output.

Version 4.02

In the STAR GUIde window, select the Analysis Controls folder followed by
the Output Controls sub-folder
Open the Analysis Output panel
Set the Solution Output Frequency to 10
Select Additional Output item Shear Force and then click the Post button
Click Apply
7-13

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

CFD Analysis
Running the Model

The actions above will tell STAR to update the solution data file every 10 iterations
and write wall shear forces as well as the normal flow field variables into it.
Running the
Model

Set the run time controls, i.e. the maximum number of iterations to be performed,
for this case:

Go to the Analysis Preparation/Running folder and open the Set Run Time
Controls panel
Set the Number of Iterations to 200
Click Apply

The solution should satisfy the convergence criteria within 200 iterations.
Final
Operations

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the geometry and problem files and exit from
pro-STAR as shown below. Alternatively, you may run STAR interactively as
described in the next section.

In the main window, select File > Write Geometry File


Check that the Scale Factor is set to 0.001, as the geometry was originally
specified in millimetres
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
To perform the analysis interactively, proceed as follows:

Select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Check that the Scale Factor is 0.001
Click Start New Analysis

The analysis will then start automatically and will converge within the 200 iteration
limit. Convergence information can be viewed while the analysis is still running by
using the StarWatch utility. Results may also be viewed part-way through the
analysis by using the Post-Processing facilities in the STAR GUIde window.
Post-Processing
First, display a plot of the velocity vectors on the mesh surface:

7-14

Select folder Post-Processing


Open the Load Data panel to display the File(s) tab
Click Open Post File
In the Data tab, select Velocity Components UVW from the Vector Data list
Click Get Data
Select Go To > Create Plots
In the 3-D Surface tab, select options Vector and Edge
Version 4.02

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Post-Processing
Final Operations

Click Plot To Screen


Select View > Isometric > 1,1,1 to display Figure T7.1-9

Figure T7.1-9

Velocity vectors displayed on the mesh surface

This plot is not an accurate depiction of the flow field because the reference frame
in which the results are presented is, by default, the computational frame. This
means that, within the rotating mesh region, the results are viewed from the
perspective of someone spinning with the fan blades, i.e. a component equal to r
is automatically subtracted from the velocity magnitude. This is apparent upon
close examination of this region.
To obtain a velocity vector plot with all velocities measured relative to the same
frame, a stationary reference frame needs to be selected prior to any results being
loaded into pro-STAR. To do this:

Version 4.02

Select the Coordinate Systems tab in the Load Data panel. This controls the
reference frame in which the solution is viewed.
Select the Static option
Click Apply
Go to the Data tab and select Velocity Components UVW from the Vector
Data list
Click Get Data
Click Replot in the main pro-STAR window to display Figure T7.1-10

7-15

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Post-Processing
Final Operations

Figure T7.1-10

Velocity vectors relative to a static reference frame

The difference between the plots is apparent in the displayed maximum velocity.
Now display contour plots of some scalar flow parameters in a plane bisecting
the main flow region (inlet region excluded).

7-16

In the Data tab, select Smooth Option On


Select Pressure from the Scalar Data list
Click Get Data
Select Go To > Create Plots
In the Section Clipped tab, select Contour(filled) and None
To define the plane, enter 0, 0, 34 as the Point and 0, 0, 1 as the Normal
parameters
Click Apply
Click Plot To Screen
Select View > SNORMAL to display Figure T7.1-11

Version 4.02

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Post-Processing
Final Operations

Figure T7.1-11

Pressure contours displayed in a plane parallel to the inlet plane

Note that the relative pressure at the pressure boundary is roughly zero.
Now display the turbulence kinetic energy distribution:

Version 4.02

Click Go To Load Data


Select Turb Kinetic Energy from the Scalar Data list
Click Get Data
Click Replot to display Figure T7.1-12

7-17

Tutorial 7.1

ROTATING-FRAME FAN ANALYSIS

Post-Processing
Final Operations

Figure T7.1-12

Final
Operations

7-18

Contours of turbulence kinetic energy

End the pro-STAR session:

File > Quit > Quit, Nosave

Version 4.02

Tutorial 8 LAGRANGIAN TWO-PHASE FLOW


The next two tutorials model steady and transient Lagrangian two-phase flow with
fuel spray injection. The model geometry consists of an intake port and part of a
cylinder for an idealised internal combustion engine, with an intake valve
separating the two regions. The air inlet and pressure boundary are shown in Figure
T8.0-1. Also shown is the fuel spray injector, located between the inlet and the
valve.

Injector

Inlet

Pressure
boundary

Figure T8.0-1

Version 4.02

Engine intake port geometry

8-1

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Physical Problem Description


Preliminaries

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

This tutorial is intended to show the user how to:

Set up a steady-state Lagrangian two-phase problem


Choose droplet thermophysical models
Model droplet evaporation
Define a spray injector
Display droplet plots
Use the Overlay plotting option
Display animated and still plots of particle tracks

Physical Problem Description


In this tutorial, a constant stream of air flows into the chamber at 5 m/s. A nozzle,
positioned 5 mm away from the inlet and near the centre of the channel, injects
heptane droplets into the air stream at a mass flow rate of 0.001 kg/s. The nozzle has
a diameter of 1 mm and emits the droplets in a spray cone with an angle of 10o. The
droplets are grouped into 50 parcels; this number is chosen as a reasonable
compromise between computational cost and solution accuracy.
Outflow occurs through a notional pressure boundary shown in Figure T8.0-1,
and gravity is assumed to be acting in a direction normal to it. All walls in the model
are at a fixed temperature of 400K, while the incoming air and heptane fuel are at
350K. The fuel is assumed to evaporate instantly upon contact with the walls.
Pre-Processing
Preliminaries Create a sub-directory for this tutorial called tut8-1. The mesh filling the model
geometry has already been created and the relevant data may be found in the cell,
vertex, boundary and problem files supplied for the tutorial (files intake.cel,
intake.vrt, intake.bnd and intake.inp). Copy these files into your
working directory.
Start pro-STAR and enter the case name:

Type prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (say intake_ss) in the Casename text box
Click Continue

Read in the available problem data:

Select File > Read File... in the main pro-STAR window


In the Input Coded Command File dialog check that the File Name is
intake.inp
Click Apply
Click Close

This will read in the mesh geometry and boundary locations, plus some basic
problem settings. Now name the model:

8-2

In the main pro-STAR window, select File > Model Title


Version 4.02

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Pre-Processing
Mesh Checking

Mesh
Checking

Type STEADY FLOW WITH LIQUID SPRAY INJECTION in the Title


box
Click Apply

Check the imported polyhedral mesh visually:

Select C > All


Change the viewpoint by selecting View > Isometric > -1,-1,1
Click Cell Plot to display Figure T8.1-1

Figure T8.1-1

Mesh geometry

Analysis
Features

Specify that the problem involves Lagrangian two-phase flow:

Material
Properties

Turn on gravity and specify its magnitude and direction:

In the STAR-GUIde window, open the Select Analysis Features panel


Under Multi-Phase Treatment, select Lagrangian Multi-Phase
Click Apply. You should notice that an extra folder will now appear in the
STAR-GUide tree.

Select the Thermophysical Models and Properties folder and then open the
Gravity panel
Enter a value of 9.8 m/s2 in the Acceleration box
Check that the Coordinate System is set to 1 and that the Direction of Gravity
Force is 0, 0, -1
Click Apply

The default fluid for the continuous phase is air, so its molecular properties do not
require alteration. However, turbulence and thermal models still need to be
Version 4.02

8-3

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Pre-Processing
Scalar Definition

specified:

Select the Liquids and Gases folder


Open the Turbulence Models panel and turn On turbulence modelling
Select the k-Epsilon/High Reynolds Number model from the pull-down
menu
Click Apply
Open the Thermal Models panel and select Temperature Calculation On
Click Apply

Specify the monitoring and pressure reference cells:

Scalar
Definition

Assign scalar no. 1 to the product of droplet evaporation, i.e. heptane vapour, and
import its physical properties from pro-STARs built-in database:

Dispersed
Phase
Models

Select the Additional Scalars folder


Open panel Molecular Properties (Scalar)
Check that the Scalar # slider at the bottom of the panel is set to 1 and then
choose option Select scalar from database from the menu at the top of the
panel
Select the appropriate physical substance, HEPTANE(V) in this case, from
the Scalar Database scroll list and then click Select Scalar
The physical properties of heptane vapour are read in from pro-STARs
property database and entered into the appropriate boxes of panel Molecular
Properties (Scalar). Check that the displayed values are reasonable and then
click Apply.

Now specify the properties of the dispersed phase using the Lagrangian
Multi-Phase folder:

8-4

Open the Monitoring and Reference Data panel


Enter 10054 for the Monitoring cell number. This cell is near the valve.
Enter 4337 for the Reference Pressure Cell Number. This cell is adjacent to
the pressure boundary.
Click Apply

Open the Droplet Controls panel and check the default settings, all of which
are appropriate for this problem
Open the Droplet Physical Models & Properties panel
Under the Global Physical Models tab, turn On Turbulent Dispersion
Turn On Gravity Effects
Click Apply
Under the Droplet Physical Models tab, select Standard Momentum Transfer
Change the Slip Factor to 0
For Mass Transfer, select option Standard
For Heat Transfer, select option Standard
Select the Reitz Droplet Breakup model
In the Droplet-Wall Interaction section, set the droplets to Evaporate upon
contact with the walls
Click Apply
Version 4.02

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Pre-Processing
Injector Properties

Injector
Properties

Under the Droplet Properties tab, click Select from Database


Choose # HEPTANE(L) as the droplet material from the Choose Database
Material list
Click Select Material, then Close
Change the Saturation Pressure to 1e5 Pa
Specify the previously-defined scalar (HEPTANE(V)) as the product of
evaporation by clicking the Select button next to Evaporates to Scalar
Click on scalar 1 in the list and click Close
Click Apply in the Droplet Properties tab

The droplet thermophysical models and properties are now fully defined, so move
on to specifying the properties of the spray injector. First, though, a new coordinate
system needs to be defined, centred at the injection point:

In the main pro-STAR window, click the CSYS button


Select number 4 from the Coordinate System List
Select Cylindrical from the pull-down menu at the bottom left of the
Coordinate Systems box
Enter the following values in the seven boxes to the right of this menu: 100,
19, 35, 0, 0, -100, 0. These position the coordinate systems origin at the
injector location.
Click New (Global)
Click Show Triad
Close the Coordinate Systems dialog
Click Cell Plot

The triad for the newly-defined coordinate system should now be visible at the start
of the refined mesh region. The spray cone will be centred around its Z-axis.
Now enter the spray injector properties:

Boundary
Conditions

Specify the fixed wall temperature:

Version 4.02

Open the Spray Injection with Atomisation panel


The default Spray Options are satisfactory, so click Apply Spray Options
Change the Injection Temperature to 350 K
Change the Hole Diameter to 0.001 m
Enter 4 for the injector Coordinate System
Check that the Cone Angle is set to 10o
Enter a Mass Flow Rate of 0.001 kg/s
Change the Number of Parcels/Injector to 50
Check that the Droplet Type is number 1, Heptane (L)
Click Update Injector

Go to the Define Boundary Conditions folder and open the Define Boundary
Regions panel
Select Region 0 from the boundary regions list
Change the Wall Heat option to Fixed
Enter 400 in the Temp. (K) box
Click Apply

8-5

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

CFD Analysis
Run Time Controls

The inlet velocity and temperature also need to be specified:

Select Region 1 from the boundary regions list


Enter a U velocity of -5 m/s
Change the Temp. to 350 K
Click Apply

The mean temperature and heptane mass fraction at the pressure boundary are
estimated on the basis of temperatures and mass flow rates at the inlet and in the
injector. To specify these values:

Select Region 2 from the boundary regions list


Change the Temp. to 360 K
Click Apply
Open the Scalar Boundaries panel
Select Boundary Region 2, Pressure, from the list
Change the Mass Fraction value to 0.155
Click Apply

Run Time
Controls

Increase the maximum number of iterations to allow the analysis to converge:

Final
Operations

The pre-processing task for this tutorial is now complete. If you wish to terminate
the session at this stage, save all model data, write the problem and geometry files
and exit from pro-STAR, as shown below. Alternatively, you may run STAR
interactively, as described in the next section.

Select the Analysis Preparation/Running folder


Open the Set Run Time Controls panel
Change the Number of Iterations to 200
Click Apply

In the main pro-STAR window, select File > Write Geometry File
Check that the Scale Factor is set to 0.001, as the geometry was created in
millimetres
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
To perform the analysis interactively, proceed as follows:

Select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Choose Double Precision and check that the Scale Factor is 0.001
Click Start New Analysis

The analysis will then start automatically. The solution should satisfy the default
convergence criteria within the specified maximum number of iterations.
8-6

Version 4.02

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Post-Processing
Preliminaries

Post-Processing
Preliminaries Read in the analysis results:

Continuous
Phase

In the Post-Processing folder, open the Load Data panel


Check that intake_ss.ccm is displayed in the Steady State Post File box
Click Open Post File

Plot velocity vectors on a plane bisecting the valve:

Go to the Data tab and select Velocity Components UVW from the Vector
Data list
Click Get Data
Select Go To > Create Plots
Under the Section Clipped tab, select Vector and Edge
Define the cross-section plane by entering 0, 19, 0 for the Point and 0, 1, 0 for
the Normal values
Click Apply and then Plot to Screen
Under the Vectors tab, change the Scale Factor to 0.5
Click Apply
In the main pro-STAR window, select View > SNORMAL to display Figure
T8.1-2

Figure T8.1-2

Velocity vectors on a plane bisecting the valve

Now create a temperature contour plot on the same plane:

Version 4.02

Click Go To Load Data


Select Data Type Cell
Turn On the Smooth Option
Select Temperature from the Scalar Data list
8-7

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Post-Processing
Continuous Phase

Click Get Data


Select Go To > Create Plots
Under the Section Clipped tab, choose Contour (filled) and Edge
Click Plot To Screen to display Figure T8.1-3

Figure T8.1-3

Temperature contours on a plane bisecting the valve

In addition, plot contours of the heptane vapour mass fraction:

8-8

Click Go To Load Data


Select C7H16 from the Scalar Data list
Click Get Data
Click Replot to display Figure T8.1-4

Version 4.02

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Post-Processing
Dispersed Phase

Figure T8.1-4

Dispersed
Phase

Contours of heptane vapour concentration on a plane bisecting the valve

The dispersed phase can be visualised by creating droplet plots. In this instance, the
droplet tracks will be plotted on top of the previous contour plot of heptane vapour
concentration using the Overlay option:

In the Post-Processing folder, open the Particle Tracks sub-folder


Open the Plot Droplets/Particle Tracks panel
In the Load Droplet Data section, choose Load From Track File and accept
the default intake_ss.trk file
Click Load Data
In the Droplet Plot Options section, select Off under Edge Plot Options
Select a Diameter dependent Droplet Radius and enter 1.0 as the Size
Select None from the Vectors pull-down menu
Click Apply
In the interests of display clarity, select a subset of the computed droplet
tracks by typing the following command in the I/O window:
DSET NEWS DRAN 2 50 3

Select Plot > Display > Overlay from the main pro-STAR windows menu
bar to turn on the Overlay option
Enter command
PLFIX ON

Version 4.02

in the I/O window to prevent the display from automatically adjusting to the
scale of the plot that follows
Click Droplet Plot to display Figure T8.1-5

8-9

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Post-Processing
Dispersed Phase

Figure T8.1-5

Heptane droplets overlaid onto a heptane vapour concentration plot

The droplets can also be displayed as particle tracks:

Turn off the Overlay and Plot Fix options by entering the following
commands in the I/O window:
OVERLAY OFF
PLFIX OFF

8-10

Return to the Load Data panel and, under the File(s) tab, click Open Post
File
Select Geometry Plot and Quick Hidden Line as the plot attributes in the
main pro-STAR window
Click Cell Plot
Go back to the Plot Droplets/Particle Tracks panel and select the Particle
Tracks tab
Select Display Option Segments
Click Plot Tracks to produce an animated display of the droplet trajectories
Select Display Option Continuous
Click Plot Tracks to display Figure T8.1-6

Version 4.02

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Post-Processing
Dispersed Phase

Figure T8.1-6

Particle tracks showing paths of heptane droplets

Figure T8.1-5 and Figure T8.1-6 show that all droplets evaporate before they reach
the cylinder. This leads to the cool region of high heptane vapour concentration near
the valve and low concentration in parts of the cylinder. The region of high
concentration can be shown effectively in three dimensions by plotting an
isosurface:

Version 4.02

Go back to the Particle Tracks tab of the Plot Droplets/Particle Tracks panel
Click Clear Tracks
Open the Create Plots panel
Under the IsoSurf tab, select Edge On
Enter a Value of 0.3
Click Apply
In the main pro-STAR window, select a Quick Hidden Line plot
Click Cell Plot to display Figure T8.1-7
Rotate the view to examine the details of the isosurface shape

8-11

Tutorial 8.1

STEADY FLOW WITH FUEL SPRAY INJECTION

Post-Processing
Final Operations

Figure T8.1-7

Final
Operations

8-12

Isosurface of heptane vapour concentration with mass fraction = 0.3

End the pro-STAR session:

Select File > Quit > Quit, Nosave

Version 4.02

Tutorial 8.2

TRANSIENT FLOW WITH FUEL SPRAY INJECTION

Physical Problem Description


Preliminaries

Tutorial 8.2

TRANSIENT FLOW WITH FUEL SPRAY INJECTION

This tutorial is intended to show the user how to:

Set up a transient Lagrangian two-phase flow problem


Produce on-screen animations using command loops
Save screen shots for creating animations externally

Physical Problem Description


The problem geometry and flow conditions in this tutorial are the same as in
Tutorial 8.1. However, the injection is more complex, with the heptane fuel no
longer injected in a constant stream but in two short bursts. For the first burst, the
mass flow rate through the injector starts at 0.001 kg/s (the mass flow rate in the
steady-state solution) and then falls linearly to 0.0001 kg/s. The same pattern is then
repeated for the second burst. The total injection period is 0.05 s.
Pre-Processing
Preliminaries Create a sub-directory for this tutorial called tut8-2. Most of the case set-up has
already been performed in Tutorial 8.1 so the model file, intake_ss.mdl,
should be copied across to the new working directory and renamed
intake_tr.mdl before continuing.
Start up pro-STAR and open the model file:

Type prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Check that the case name is intake_tr and that the Resume existing .mdl file
option is selected
Deselect the append to .echo file option
Click Continue

Now change the model title:

Select File > Model Title...


In the Title box, enter
TRANSIENT FLOW WITH LIQUID SPRAY INJECTION
and click Apply

Analysis
Features

Change to a transient analysis setting:

Injector
Properties

The injector position and droplet properties have already been defined in the
previous tutorial. However, the flow rate profile during the injection period must be
created from scratch:

Version 4.02

In the STAR-GUIde window, open the Select Analysis Features panel


Select Transient as the Time Domain
Click Apply

Click on the Lagrangian Multi-Phase folder


Open the Spray Injection with Atomisation panel
8-13

Tutorial 8.2

TRANSIENT FLOW WITH FUEL SPRAY INJECTION

Pre-Processing
Analysis Output

In the Define Injectors section, select Table from the Mass Flow Rate
pull-down menu and click the New button displayed to its right
The Table Editor should now appear. Enter the data shown below:

Click Write Table, then Graph to display Figure T8.2-1


Close the Table Editor
Click the file browser button in the Spray Injection with Atomisation panel to
display the available injection table files
Choose intake_tr.tbl from the Files list and then click OK. The
selected file will now appear in the file name box.
Change the Number of Parcels/Injector to 1000 /s
Click Update Injector

Figure T8.2-1

Analysis
Output

Instruct STAR to write the analysis results in the transient post data file
(intake_tr.pstt) at every single time step. In addition, specify what cell data
(including scalar variable data) are to be written during the run.

8-14

Graph showing the mass flow rate profile over the injection period

Go to the Analysis Controls folder and select sub-folder Output Controls


Open the Analysis Output panel and then select the Transient tab
Specify the frequency of writing data to the transient post file by typing 0.001
Version 4.02

Tutorial 8.2

TRANSIENT FLOW WITH FUEL SPRAY INJECTION

CFD Analysis
Set Run Time Controls

in the Write data every box. As discussed below, this is equivalent to


outputting data at every time step.
As can be seen in the scroll list, velocity and pressure are already selected by
default. Change this selection by
(a) removing Pressure
(b) adding Temperature
(c) adding the mass fraction of scalar C7H16

In each case, click the Post button to include or exclude the desired item
Click Apply

Set Run Time The time interval of interest in this case is 0 t 0.05 seconds. Specify that it is to
Controls
be covered in steps of 0.001 seconds, i.e. 50 time steps in total.

Final
Operations

Select folder Analysis Preparation/Running and open the Set Run Time
Controls panel
Type 0.05 s in the Run for box
Click Apply
Type 0.001 s in the Time Step for Period box
Click Set period

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the problem and geometry files and exit from
pro-STAR, as shown below. Alternatively, you may continue with the CFD
analysis, using the STAR GUIde facilities for running STAR interactively. This
process is described in the next section.

Select File > Write Geometry File


Accept the default value, 0.001, shown in the Scale Factor text box
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
To perform the analysis interactively, proceed as follows:

File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Select the Double Precision option for the STAR executable
Click Start New Analysis

Inspect the information written in files intake_tr.run and


intake_tr.info once the run has finished.

Version 4.02

8-15

Tutorial 8.2

TRANSIENT FLOW WITH FUEL SPRAY INJECTION

Post-Processing
Preliminaries

Post-Processing
Preliminaries Read in the results of the analysis:

Select folder Post-Processing


Open the Load Data panel to display the File(s) tab
Select the Transient Analysis option
Choose position number 1 in the Transient Post File(s) list
Click Add File to List
Select the file intake_tr.pstt from the Transient Post File(s) list and
click Open Transient Post File

Droplet Plots As in Tutorial 8.1, the droplet plots will be overlaid on contour plots of heptane
vapour concentration. A combined plot of this type will be produced for each time
step using a command loop. The resulting sequence of plots will then form an
on-screen animation. First, set the droplet plot options:

In the STAR-GUIde window, select the Particle Tracks folder


Open the Plot Droplets/Particle Tracks panel
Under the Droplets tab, turn Off Edge Plot Options
Specify the displayed Droplet Radius to be proportional to the actual droplet
Diameter and enter a Size of 1.2
Specify the Fill Color to be dependent upon the Mass
Change the Vectors option to None
Click Apply

Set the cell plot characteristics:

In the main pro-STAR window, turn on the Edge plot option


Select Contour Plot and Section (Surface). Ignore the warning stating that
no scalar data are stored
Enter the commands:
SNORMAL 0 1 0
SPOINT 0 19 0

The command loop used to produce the plots will now be entered into the I/O
window. It utilises the OVERLAY and PLFIX commands demonstrated in Tutorial
8.1. Also, the CSCALE command is used to enable droplet and contour plots to have
different colour scales.

Enter the following commands:


*SET IT 1 1
*DEFINE
STORE ITER IT
CSCALE 14 USER 0 0.8
GETV CONC
CPLOT
OVERLAY ON
PLFIX ON
SCDUMP GIF IT

8-16

Version 4.02

Tutorial 8.2

TRANSIENT FLOW WITH FUEL SPRAY INJECTION

Post-Processing
Final Operations

CSCALE 14 USER 0.4e-7 0.2e-5


GETD POST
DSET ALL
DPLOT
OVERLAY OFF
SCDUMP OFF
*END
*LOOP 1 49
PLFIX OFF
The SCDUMP command in the above loop saves a screen shot of each combined plot
in a file with extension .gif. It is turned on and off again at each time step because
otherwise it would save screen shots of the contour plots as well as the combined
plots. The .gif files produced may subsequently be combined into an animation
sequence using an external package. For more details on pro-STARs animation
capabilities, see Animation Sequence Definition and Display on page -2 of the
Post-Processing User Guide.
Final
Operations

Version 4.02

End the pro-STAR session:

Select File > Quit > Quit, Nosave

8-17

Physical Problem Description

Tutorial 9 COMBUSTION
Physical Problem Description
A model of an idealised CAN type gas turbine combustion chamber is chosen to
familiarise users with STAR-CDs combustion modelling capabilities and
introduce various recommended practices for computing combusting flows.
The mesh used in this case is shown in Figure T9.0-1 and was created in Tutorial
7.2 of the Meshing Tutorials volume. The problem geometry consists of three sets
of air inlets placed circumferentially at the combustor head to promote maximum
mixing and flame stabilisation. Swirling air enters the primary combustion zone
through the two sets of inlets nearest to the axis of symmetry. Non-swirling air
enters the upper inlet and thence the primary, secondary and dilution zones via five
injection holes on the liner. This liner, separating the cooling passage from the main
combustion area, is represented in the model by baffle cells.
Air is assumed to be composed of 23.2% oxygen and 76.8% nitrogen, by mass,
and to be at a pressure of 1 bar and temperature of 293 K throughout this tutorial.
Unless stated otherwise, its physical properties are assumed to be as follows:
Density
Molecular viscosity
Specific heat
Thermal conductivity

Ideal gas with pressure dependence


Pa s
1.81 105
1006
J/kg K
W/m K
2.637 102

Only a sixty-degree sector of the combustor is simulated (see Figure T9.0-1). This
is achieved by using STAR-CDs cyclic boundary option which allows the
transmission of information across boundaries of this type.
To demonstrate the full combustion capabilities of STAR-CD, both gaseous and
liquid fuels are employed in the simulation. Gaseous fuels are supplied through an
inlet at the combustor head whilst liquid fuels are injected as droplets from a single
injector located on the axis. The physical properties of air and fuel and details of the
individual simulations are presented in the corresponding sub-tutorials.

Version 4.02

9-1

Physical Problem Description

Figure T9.0-1

9-2

Mesh structure for the combustion chamber model

Version 4.02

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing
Preliminaries

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

In this tutorial, a propane combustion case is set up using the Presumed Probability
Density Function (PPDF) reaction model for unpremixed flames. The model
assumes adiabatic conditions (no heat loss) and a local instantaneous chemical
equilibrium. The main aim is to:

Familiarise users with the adiabatic PPDF model setup


Demonstrate the use of the CEA package for calculating polynomial
coefficients required by the model
Evaluate the accuracy of the analysis results and suggest a way of improving
them
Illustrate the use of user-defined panels as a way of facilitating
post-processing operations

For adiabatic PPDF, the physical properties of the fuel (pure propane in this case)
are not utilised as no additional transport equations requiring these properties are
solved. Temperature, density and species mass fractions are evaluated using the
function formulation outlined in the Methodology volume (see Presumed-PDF
(PPDF) Model for Unpremixed Turbulent Reaction in Chapter 10).
Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut9-1. The mesh for this problem
has already been created in the Meshing Tutorials volume (Tutorial 7.2) and the
relevant cell, vertex, boundary and problem setup files are already available (files
combustor.cel, combustor.vrt, combustor.bnd and
combustor.inp, respectively). Therefore, before starting the tutorial, make sure
that the supplied files are copied into your current directory.

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (say, PPDF_ad) in the Casename text box
Click Continue

Read in the available problem data:

Select File > Read File... in the main pro-STAR window


In the Input Coded Command File dialog check that the File Name is
combustor.inp
Click Apply
Click Close

This will read default problem settings from file combustor.inp plus the
problems cell, vertex and boundary location definitions from the remaining three
files.

In the main window, select File > Model Title


In the Title text box type:
PROPANE COMBUSTION (ADIABATIC PPDF)

Version 4.02

9-3

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing
Material Properties

Click Apply

Plot the mesh to confirm the data read in:

In the main pro-STAR window, select Plot > Up Axis followed by X


Select C > All
Select View > Isometric > 1, 1, -1
Click Cell Plot

Make sure that the STAR GUIde window is displayed on your screen, next to the
main pro-STAR window. If not, activate it by clicking the special Open STAR
GUIde panel button shown below:

Specify the key feature of this case, i.e. chemically reacting flow:

Material
Properties

In the STAR GUIde window, go to panel Select Analysis Features


Select option Chemical Reaction from the Reacting Flow menu
Click Apply
Select folder Thermophysical Models and Properties and note that an extra
sub-folder called Reacting Flow now appears in the STAR GUIde tree. This
will be used in this and all subsequent sub-tutorials to supply chemical
reaction definitions.

Set up material properties and thermofluid models using the appropriate STAR
GUIde panels. The required actions are as follows:
1.
2.
3.
4.
5.
6.

9-4

Select the Ideal Gas Law density variation (with pressure dependence)
Select the standard k- turbulence model
Turn on the temperature solver
Set the initial temperature distribution
Choose the monitoring cell location
Choose the reference pressure and its location
Select sub-folder Liquids and Gases
Open the Molecular Properties panel
Select option Ideal-f(T,P) from the Density menu
Click Apply
Open the Turbulence Models panel
Click On to switch on turbulence modelling
Select option K-Epsilon/High Reynolds Number from the model menu
Click Apply
Open the Thermal Models panel
Turn on the solution of the energy equation by clicking Temperature
Calculation On
Click Apply
Open the Initialization panel
Version 4.02

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing
Combustion Model

Combustion
Model

In the Flow Conditions tab, confirm that a value of 293.0 is displayed in the
Temperature box
Go to the Turbulence tab and select option TI/Mixing Length from the
Turbulence Parameters menu
Enter 0.05 and 0.2 in the Intensity and Mixing Length boxes, respectively
Click Apply
Open the Monitoring and Reference Data panel
Choose a monitoring cell location (say, half way between the axis and the
outer casing and towards the outlet). This may be done by entering a cell
number in the text box. Alternatively, click the mouse icon and then use the
screen cursor to select the required cell on the mesh plot. In this case, we
assume that the chosen cell no. is 1760
Make the reference pressure location the same as the monitoring cell location
by entering 1760 in the Reference Pressure Cell Number box. Confirm that
1.0e+5 appears in the Pressure box.
Click Apply

Use STAR GUIdes Reacting Flow folder to set up the combustion model as
follows:

Select sub-folder Reacting Flow followed by Chemical Reactions


Open the Scheme Definition panel
Select option Unpremixed/Diffusion from the Reaction Type menu
Select option PPDF Single Fuel from the Reaction Model menu. Note that
scheme no. 1 is selected by default in the Chemical Scheme # slider at the
bottom of the panel
Accept the Chemical Equilibrium setting in the Option menu and click
Apply.
A pop-up window will now appear warning you that the default chemical
reaction settings will be changed. Click Continue. A message will appear at
the bottom of the STAR GUIde panel confirming your combustion model
selection.

Continue by using the CEA package to specify the fuel (C3H8) and its combustion
products. In a non-adiabatic PPDF model, only chemical species polynomial
coefficients are required. These are derived separately using an equilibrium
calculation for a mixture of pure propane and air at a temperature of 293 K and
pressure of 1 bar. To read these values into pro-STAR, proceed as follows:

Version 4.02

Open the Reaction System panel


In the Parameter Definition tab, check that option CEA is selected in the
Input/Control menu
Supply the names of all chemical substances involved plus relevant reaction
parameters, as shown below:
Pressure 1.0e+5
Select Stream to Define -> Stream1 (Fuel) and then enter the following data
in the boxes underneath:
Species Name 1 C3H8
Mass Fraction 1 1
Temperature 293
9-5

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing
Combustion Model

Click Define Stream


Select Stream to Define -> Stream2 (Oxidizer) and then enter the following
data in the boxes underneath:
Species Name 1 O2
Mass Fraction 1 0.232
Species Name 2 N2
Mass Fraction 2 0.768
Temperature 293
Click Define Stream
Go to the All Species scroll list and enter the following data by selecting each
species line in turn:
1 C3H8
2 O2
3 N2
4 CO
5 CO2
6 H2O
Click Apply

Note that all chemical names, such as C3H8, should be entered exactly as they
appear in the material names file (material.list) supplied under the
STAR-CD installation directory.
Define the basic character of the reaction:

Go to the Heat Option tab


Check that option Adiabatic is selected in the Heat Option menu

Start up the CEA application:

Go to the Integration Control tab


Check that option Polynomial is selected in the Integration Method menu.
Note that all items in the PPDF Dependent Variables list are initially flagged
as Undefined
Click Apply

Updated items will now appear on the PPDF Dependent Variables scroll list.
Selecting each item in turn will display the corresponding coefficients in the PPDF
Polynomial Coefficients scroll list. Confirm that there are 20 coefficients each for
density, temperature and all chemical species involved (CO, CO2, C3H8, H2O, N2,
O2). To check these coefficients graphically:

9-6

Click Graph Data to generate plots of the available data automatically, as


shown in Figure T9.1-1

Version 4.02

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing
Scalar Properties

Figure T9.1-1

PPDF polynomial coefficient plots

Reset the graph registers before proceeding further

In the main pro-STAR window, select Graph > Greset


Click OK to confirm your action

The CEA output is passed to pro-STAR which in turn generates suitable scalar
variables and maps them automatically to the constituents of the reaction scheme.
The reaction scheme is also assigned automatically to the current fluid domain
(material no. 1). To check the results of this operation:

Scalar
Properties

Open the Scheme Association panel. Note that chemical scheme no. 1 (the
non-adiabatic PPDF defined above) is assigned to material no. 1 (the
background fluid in the current domain)
Select sub-folder Liquids and Gases in the Thermophysical Models and
Properties folder
Open the Molecular Properties panel. Note that as a result of the chemical
scheme definition, the setting of the Density menu has changed automatically
to PPDF.

Check the properties of the scalar variables that were automatically set up by the
combustion models mapping process, described above:

Select sub-folder Additional Scalars and then open the three panels under it in
turn
In the Molecular Properties (Scalar) panel, use the Scalar # scroll bar to
inspect the available scalars.

It will be seen that a total of 8 scalars are present and that, in addition to the species
Version 4.02

9-7

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing
Boundary Conditions

from the PPDF database (C3H8, O2, CO, CO2, H2O and N2), scalar nos. 1 and 2 (for
mixture fraction and variance) have also been created automatically. This because
transport equations for these variables need to be solved, as can be seen from the
formulation of the PPDF model in Chapter 10 of the Methodology volume.
Boundary
Conditions

Check the current boundary definitions and specify boundary conditions where
appropriate.

Select folder Define Boundary Conditions


Open the Define Boundary Regions panel

Specify boundary conditions for the inlet boundaries, choosing the Mixing Length
option for turbulence parameter input. Note that all fluid streams except the one
flowing through the cooling passage have swirl velocity components on entry into
the combustor. Starting with the fuel inlet:

Select region 3 In the boundary regions scroll list


Select option TI/Length from the Turb. Switch menu
Enter inlet boundary values for the fuel stream in the appropriate boxes as
shown below:

Click Apply

Specify conditions at the remaining boundaries:

9-8

Select region 4 in the scroll list


Select option TI/Length from the Turb. Switch menu
Enter inlet conditions in the appropriate boxes, as shown below:

Version 4.02

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing
Boundary Conditions

Version 4.02

Click Apply
Highlight region 5 in the scroll list
Select option TI/Length from the Turb. Switch menu
Enter inlet conditions in the appropriate boxes, as shown below:

Click Apply
Highlight region 6 in the scroll list
Select option TI/Length from the Turb. Switch menu
Enter inlet conditions in the appropriate text boxes, as shown below:

9-9

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Pre-Processing
Control Parameters

Click Apply

Check the wall boundary conditions for the first inlet-side wall (region 7)

Select region 7 in the scroll list. The default settings are acceptable, so no
further action is required

This is also true of the wall boundary conditions assigned to regions 8 to 13.
Check region 14 (the outlet) and region 15 (the baffle boundaries):

Highlight region 14 in the scroll list. The default settings are acceptable, so no
further action is required
Highlight region 15 in the scroll list. The default settings for side no. 1 are
acceptable, so no further action is required. The settings for side no. 2 are
automatically made the same as side no. 1

Specify a boundary condition for the mixture fraction variable at the fuel inlet:

Open the Scalar Boundaries panel


Select region no. 3 in the boundary regions scroll list
Select MIXTURE_FRACTION in the Scalar scroll list, type 1.0 in the Mass
Fraction box and then click Apply

Modify the air inlet boundary values (regions 4, 5 and 6) for the O2 and N2 scalars
as follows:

Select region no. 4 in the boundary regions scroll list


Select N2 in the Scalar scroll list, type 0.768 in the Mass Fraction box and
click Apply
Select O2 in the Scalar scroll list, type 0.232 in the Mass Fraction box and
click Apply

Repeat the above sequence of steps for regions 5 and 6.


Control
Parameters

Check the solution control parameters and then change the under-relaxation factor
and residual tolerance for the mixture fraction and variance:

9-10

Select folder Analysis Controls


Version 4.02

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

CFD Analysis
Run Time Controls

Run Time
Controls

Select sub-folder Solution Controls and then Equation Behavior


Open the Additional Scalars panel
Select MIXTURE FRACTION in the Scalar scroll list
Type 0.7 in the Under-Relaxation Factor box
Type 0.001 in the Residual Tolerance box
Click Apply
Select VARIANCE in the Scalar scroll list
Type 0.7 in the Under-Relaxation Factor text box
Type 0.001 in the Residual Tolerance text box
Click Apply

Check the status of the run time control parameters:

Final
Operations

Select folder Analysis Preparation/Running and open the Set Run Time
Controls panel
Enter 500 for the maximum number of iterations and then click Apply.
Open the Analysis (Re)Start panel. The setting of the Restart File Option
menu should be None, confirming that this is a run from initial conditions.

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the geometry and problem files and exit from
pro-STAR, as shown below. Alternatively, you may continue with the CFD
analysis, using the STAR GUIde facilities for running STAR interactively. This
process is described in the next section.

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
For flows involving chemical reactions, it is recommended that STAR is run in
double precision mode, as follows:

In the main pro-STAR panel, select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Select the Double Precision option button. Leave all other settings at their
default values
Click Start New Analysis

The analysis will then start automatically. Convergence should be achieved within
the specified maximum number of iterations.
Post-Processing
Preliminaries Start the post-processing task by re-plotting the mesh:
Version 4.02

9-11

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Post-Processing
Preliminaries

In the main window, select C > All


Click Cell Plot

This tutorial employs two user-defined panels, Pgetc and Pgetv, that are specially
designed to facilitate post-processing operations. These may already be available to
you, ready-to-use, in a local or global panel sub-directory (see Panels in Chapter
16 of the CCM User Guide). If the panels are not available, or if you want to practice
creating panels, see Panel Definition on page 9-17 for a general discussion of the
subject and for specific instructions on how to create these particular panels.
Use the panels to generate a 3-D display of the velocity magnitude distribution:

Click Panels in pro-STARs menu bar to display the available panels and then
select Pgetc. Note that the name of the menu item may be L Pgetc or G
Pgetc, depending on whether a local or global panel sub-directory is being
used. If no items appear in the menu, either the required panel does not exist
or it is necessary to specify the name and location of the above
sub-directories. In either case, you will need to refer to the section on Panel
Definition in this tutorial for further instructions.
Select option Case from the Pgetc panels Load menu to get the current case
name
Select option Load St. to read in the analysis results
In the main window, select plot option Contour Plot and plot type Hidden
Surface
In the Pgetc panel, click VM
In the main window, click the Edge plotting button to display Figure T9.1-2

Figure T9.1-2

Velocity magnitude plot

Define a section whose plane bisects the mesh and passes through the axis of
9-12

Version 4.02

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Post-Processing
Preliminaries

symmetry:

In the main window, select View > Axis > +X


Click Edge Plotting again to deselect it
Click Section Slice and then use the screen cursor to draw a vertical line that
bisects the visible mesh (mark the end points of the line using the screen
cursor). This represents the trace of a longitudinal section plane through the
middle of the mesh and passing through the axis.
Select a viewpoint at right angles to the section by choosing View >
SNORMAL
Select cell plot type Section (Surface)

Use the Pgetc panel to create a cell-averaged temperature profile in the section:

On the Pgetc panel, click button TA to display the absolute temperature


distribution
Average the cell values by selecting Post > Caverage > Cset from the main
pro-STAR window
Click Replot to display the temperature profile shown in Figure T9.1-3

Figure T9.1-3

Temperature distribution

Note that the cell-averaged temperature contours continue unbroken across the
baffle. This implies a heat flow situation that is unrealistic (given that the baffle is
adiabatic) and is solely due to the interpolation technique employed by pro-STAR
to create a smooth-looking plot. You should be aware of this when creating
smoothed contour plots in geometries containing baffles and solid-fluid interfaces.
Close the Pgetc panel:

Version 4.02

Select File > Close


9-13

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Post-Processing
Preliminaries

Open panel Pgetv and plot the vertex-based mass fraction profiles for the fuel and
one of the combustion products (CO2) in the section:

Select Panels > Pgetv


Click button Conc5 to display the propane distribution, shown in Figure
T9.1-4
Click button Conc4 to display the carbon dioxide distribution, shown in
Figure T9.1-5

Figure T9.1-4

9-14

Propane distribution

Version 4.02

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Post-Processing
Analysis of Results

Figure T9.1-5

Carbon dioxide distribution

As for the cell-averaged temperature plot, the vertex-averaged CO2 plot shows
unrealistic values in the vicinity of the baffle. This effect could be minimised by
using a finer mesh.
Analysis of
Results

The predicted maximum temperature in the model is lower than would normally be
expected from this type of combustor. It is therefore instructive to consider the
likely accuracy of the temperature distribution obtained here. A good quality
measure to use for this purpose is the ratio
gf
f -2 = ------------------f
f
where f is the mean mixture fraction (calculated as scalar no. 1) and gf its variance
(scalar no. 2). To display the distribution of the above variable over the combustion
region (encompassing approximately the first six cell layers in the radial direction)
proceed as follows:

Change the plot option setting to Geometry Plot


Change the cell plot type to Section (All)
Select C > New > Zone and then draw a closed rectangle encompassing the
entire mesh in the z-direction and the first six cell layers in the x-direction,
starting from the axis

Load the variance in post register no. 1 and take its square root:

Version 4.02

In the main window, select Post > Operate


In the Post Register Operations dialog, go to the Function pop-up menu and
9-15

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Post-Processing
Analysis of Results

select option Load Cell Data > Scalar Concentration


Accept the default Register 1 as the destination register for the data and type
2 in the Scalar # text box
Click Apply
In the Function pop-up menu, select option Single-Register > Sqrt( )
Click Apply

Load the mixture fraction in post register no. 2:

In the Post Register Operations dialog, go to the Function pop-up menu and
select option Load Cell Data > Scalar Concentration
Select Register 2 as the destination register and type 1 in the Scalar # text box
Click Apply

Calculate the required ratio by dividing the contents of register 1 by those of register
2 and putting the results in register 4 (reserved for scalar data).

Go to the Function pop-up menu and select option Multi-Register > Divide
Choose appropriate register numbers in the register pop-up menus so that the
end result is Register 4 = Register 1/Register 2
Click Apply and then Close

Now plot the distribution:

Change the plot option setting to Contour Plot


Turn off mesh plotting
Click Cell Plot to display Figure T9.1-6

Figure T9.1-6

Distribution of quality measure ratio

It will be seen that the value of the ratio is generally rather high, implying that the
9-16

Version 4.02

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Definition
Analysis of Results

predicted maximum temperature is considerably lower than the adiabatic flame


temperature. In a realistic modelling exercise, a considerably finer mesh would be
needed to increase confidence in the calculated temperatures.
Terminate the session:

In the main window, select File > Quit, Nosave

Panel Definition
Panel Pgetc is designed as an aid to post-processing cell-centre based data. To set
up the panel, shown below, proceed as follows:

Panels > Define Panel


Click on the text box at the bottom of the dialog and type Pgetc, the
panels name
Click New. This adds a new panel with that name in the scroll list. Note
that the full stop (.) in front of the name signifies that the panel
definition is placed by default in the present working directory, in a file
called Pgetc.PNL
With the panel name still highlighted, click Open to display the new
(blank) panel

Specify the basic panel appearance via the panel menu options, as follows:

File > Layout


In the Define Panel Layout dialog box, type 7 in the Number of Buttons
Horizontally text box
Type 4 in the Number of Buttons Vertically text box
Type 260 in the Panel Height text box
Type 550 in the Panel Width text box
Click Apply and then move the panel to the screen location where you
want it to appear every time you enter pro-STAR

Proceed with the definition of panel buttons. The latter are numbered in column
order, so that buttons nos. 0-3 appear on the left-hand side of the panel and nos.
24-27 on the right-hand side. To create the first column:

Version 4.02

Click on button no. 0


Type SU in the Button Name text box
Click on the Definition sub-window and type:
getc u v w su$repl
Click File > Save

9-17

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Definition
Analysis of Results

Click on button no. 1


Type SV in the Button Name text box
Click on the Definition sub-window and type:
getc u v w sv$repl
Click File > Save
Click on button no. 2
Type SW in the Button Name text box
Click on the Definition sub-window and type:
getc u v w sw$repl
Click File > Save
Click on button no. 3
Type VM in the Button Name text box
Click on the Definition sub-window and type:
getc u v w vmag$repl
Click File > Save

The remaining columns are created in a similar manner, according to the definitions
given below:
ID= 4
Label= P
Command=
getc u v w p$repl
ID= 5
Label= PA
Command=
getc u v w p abso$repl
ID= 6
Label= Pstat
Command=
getc u v w pstat$repl
ID= 7
Label= PstatA
Command=
getc u v w pstat abso$repl
ID= 8
Label= Ptot
Command=
getc u v w ptot$repl
ID= 9
Label= PtotA
Command=
getc u v w ptot abso$repl
ID= 10
9-18

Version 4.02

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Definition
Analysis of Results

Label= T
Command=
getc u v w t rela$repl
ID= 11
Label= TA
Command=
getc u v w t abso$repl
ID= 12
Label= Ttot
Command=
getc u v w ttot rela$repl
ID= 13
Label= TtotA
Command=
getc u v w ttot abso$repl
ID= 14
Label= K
Command=
getc u v w te$repl
ID= 15
Label= E
Command=
getc u v w ed$repl
ID= 16
Label= Visc
Command=
getc u v w vis$repl
ID= 17
Label= Dens
Command=
getc u v w dens$repl
ID= 18
Label= Conc1
Command=
getc u v w conc 1$repl
ID= 19
Label= Conc2
Command=
getc u v w conc 2$repl
ID= 20
Label= Conc3
Version 4.02

9-19

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Definition
Analysis of Results

Command=
getc u v w conc 3$repl
ID= 21
Label= Conc4
Command=
getc u v w conc 4$repl
ID= 22
Label= Conc5
Command=
getc u v w conc 5$repl
ID= 23
Label= Conc6
Command=
getc u v w conc 6$repl
ID= 24
Label= Conc7
Command=
getc u v w conc 7$repl
ID= 25
Label= Conc8
Command=
getc u v w conc 8$repl
ID= 26
Label= Conc9
Command=
getc u v w conc 9$repl
ID= 27
Label= Conc10
Command=
getc u v w conc 10$repl
The panel also provides additional facilities for executing common data loading
operations, in the form of a local, user-defined menu (ee Panels in Chapter 16 of
the CCM User Guide). The definition of this special menu is as follows:
Menu Load
MENU_ITEM 0 Case
*get name,case
MENU_ITEM 1 Event
evfi conn
MENU_ITEM 2 Load St.
load {name}.ccm
MENU_ITEM 3 Load Tr.
9-20

Version 4.02

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Definition
Analysis of Results

trload {name}.pstt
Complete the panel definition as follows:

File > Layout


Type 160 in the Panel Height text box and then click Apply
Close the Define Panel dialog

Note that, in going through this process, you have the choice of leaving the panel in
your present working directory, where it will be available only to the case you are
working on at the moment, or copying/moving it to a local or global panel directory.
You might do the latter if you want the panel to be available for use by other
members of your team (global) or by yourself in all your case directories (local).
If the panel is moved or copied to a local or global directory, you need to make
sure that pro-STAR knows the latters name and location. This information may be
available already in the form of environment variable definitions in your operating
system set-up. In such a case, next time you enter pro-STAR you will see the panel
name displayed (preceded by L or G, as appropriate) when you click Panels in
the main menu bar.
If environment variables are not set, it is still possible to supply the required
information as part of the current session, as follows:

Panels > Environment


Type the full filename path in the PANEL_GLOBAL or PANEL_LOCAL
text box, depending on the location of the panel definition file
Click Apply

SETENV PANEL LOCAL

Panels > Define Panel > Re-Scan


The above operation causes the View panel name to be displayed in the
list, preceded by L or G, as appropriate
Click Close
Choose Panels from the main menu bar to confirm that Pgetc is included
as a menu option

Note that, if you are working with a local or global directory, any new panels you
create can be placed directly in that directory simply by prefixing the new panel
name with an L or G, as appropriate.

Panel Pgetv is essentially identical to Pgetc apart from the fact that it performs
vertex based post-processing operations. The appearance and button definitions for
this panel is given below:

Version 4.02

9-21

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Definition
Analysis of Results

ID= 0
Label= SU
Command=
getv u v w su$repl
ID= 1
Label= SV
Command=
getv u v w sv$repl
ID= 2
Label= SW
Command=
getv u v w sw$repl
ID= 3
Label= VM
Command=
getv u v w vmag$repl
ID= 4
Label= P
Command=
getv u v w p$repl
ID= 5
Label= PA
Command=
getv u v w p abso$repl
ID= 6
Label= Pstat
Command=
getv u v w pstat$repl
ID= 7
Label= PstatA
Command=
getv u v w pstat abso$repl
ID= 8
Label= Ptot
Command=
9-22

Version 4.02

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Definition
Analysis of Results

getv u v w ptot$repl
ID= 9
Label= PtotA
Command=
getv u v w ptot abso$repl
ID= 10
Label= T
Command=
getv u v w t rela$repl
ID= 11
Label= TA
Command=
getv u v w t abso$repl
ID= 12
Label= Ttot
Command=
getv u v w ttot rela$repl
ID= 13
Label= TtotA
Command=
getv u v w ttot abso$repl
ID= 14
Label= K
Command=
getv u v w te$repl
ID= 15
Label= E
Command=
getv u v w ed$repl
ID= 16
Label= Visc
Command=
getv u v w vis$repl
ID= 17
Label= Dens
Command=
getv u v w dens$repl
ID= 18
Label= Conc1
Command=
getv u v w conc 1$repl
Version 4.02

9-23

Tutorial 9.1

PROPANE COMBUSTION (ADIABATIC PPDF)

Panel Definition
Analysis of Results

ID= 19
Label= Conc2
Command=
getv u v w conc 2$repl
ID= 20
Label= Conc3
Command=
getv u v w conc 3$repl
ID= 21
Label= Conc4
Command=
getv u v w conc 4$repl
ID= 22
Label= Conc5
Command=
getv u v w conc 5$repl
ID= 23
Label= Conc6
Command=
getv u v w conc 6$repl
ID= 24
Label= Conc7
Command=
getv u v w conc 7$repl
ID= 25
Label= Conc8
Command=
getv u v w conc 8$repl
ID= 26
Label= Conc9
Command=
getv u v w conc 9$repl
ID= 27
Label= Conc10
Command=
getv u v w conc 10$repl

9-24

Version 4.02

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Tutorial 9.2

Additional Modelling Notes

PROPANE COMBUSTION (THREE-STEP EDBR)

The main aim of the tutorial is to:

Familiarise users with the eddy break-up model setup


Demonstrate a simulation in which the overall combustion reaction is
represented by several steps, describing fuel pyrolysis and the subsequent
oxidation into combustion products
Illustrate the use of the numerical scheme for modelling the ignition process

Thus, the simulation performed in Tutorial 9.1 is repeated using a three-step


reaction of the following form:
C 3 H 8 + 1.5O 2 3CO + 4H 2
CO + 0.5O 2 CO 2
H 2 + 0.5O 2 H 2 O
The mesh set up in Tutorial 7.2 of the Meshing Tutorials volume is utilised and
boundary conditions that are appropriate for this type of model are applied.
The physical properties of air (23.2% oxygen and 76.8% nitrogen, by mass),
leading reactants (C3H8, CO, H2) and products (CO2, H2O) are assumed to be as
follows:
Molecular weights

Air

C3H8

CO

H2

CO2

H2O

28.96

44.0

28.0

2.0

44.0

18.0

Density
Molecular viscosity

Ideal gas
1.81
105

Specific heat

8.27
106

1.79
105

8.88
106

1.49
105

1.27
105

Polynomial function of temperature

Thermal conductivity 2.637 1.769 2.497 18.62 1.696 2.533


102
102
102
102
102
102
It is assumed that both air and fuel enter the combustion chamber at a pressure of
1 bar and temperature of 293 K.
Additional Modelling Notes

Version 4.02

Transport equations are solved for the leading reactants and their mixture
fractions (Mixture fraction = Unburnt fuel mass fraction + Burnt fuel mass
fraction)
The oxygen mass fraction may be obtained from its fixed fraction in the inlet
air stream and the amount of fuel burnt. Thus, an internal linear equation is
employed to compute this quantity. The nitrogen mass fraction is obtained
from its fixed fraction in the inlet air stream.
9-25

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Numerical Considerations
Preliminaries

The mass fraction of products (carbon dioxide and water vapour) is obtained
from the amount of burnt fuel and is therefore also computed from a linear
equation
Using linear equations for oxygen and product mass fractions implies that the
molecular diffusivities of all species are assumed to be identical
It is assumed that the combustion rate is controlled by turbulent mixing of fuel
and air and is calculated via the eddy break-up model
The mixtures specific heat is assumed to be dependent on component specific
heats, i.e.
Cp =

C pi Y i
i

where Yi is the species mass fraction and


i

C p C p( T )

for all i

In this model, it is necessary to initiate combustion by an ignition mechanism.


A flow domain region lying downstream of the inlets is chosen for this
purpose. Ignition comprises an artificial reduction of the fuel mass fraction
used to determine the combustion rate and is performed over a pre-defined
number of iterations. It is expected that the final solution will be independent
of the choice of ignition cells, the fuel mass fraction reduction mentioned
above and the duration of the ignition process.

Numerical Considerations

The combustion source term in the leading reactant transport equations is


large; therefore, the fuel mass fraction requires under-relaxation.
Using the chemico-thermal option for enthalpy, the enthalpy and mixture
fraction variables must develop numerically at the same rate as the fuel
fraction. Therefore, the under-relaxation factors for enthalpy and transported
species must be identical.
Small errors in calculating the fuel mass fraction can strongly influence the
computed temperature. Therefore, it is necessary to solve the transport
equations for species and enthalpy to a tight solver tolerance.

Pre-processing
Preliminaries Create a sub-directory for the tutorial called tut9-2. The mesh for this problem
has already been created in the Meshing Tutorials volume (Tutorial 7.2) and the
relevant cell, vertex, boundary and problem setup files are already available (files
combustor.cel, combustor.vrt, combustor.bnd and
combustor.inp, respectively). Therefore, before starting the tutorial, make sure
that the above files are copied into your current directory. Also copy the
user-defined panels Pgetc and Pgetc defined in Tutorial 9.1. These are stored in files
Pgetc.PNL and Pgetv.PNL.

9-26

Start up pro-STAR by typing prostar at the command line


Version 4.02

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing
Ignition Region

Specify your preferred graphics driver (xm, mesa or glm)


Enter the case name (say, EDBR_va) in the Casename text box
Click Continue

Read in the available problem data:

Select File > Read File... in the main pro-STAR window


In the Input Coded Command File dialog check that the File Name is
combustor.inp
Click Apply
Click Close

This will read default problem settings from file combustor.inp plus the
problems cell, vertex and boundary location definitions from the remaining three
files.

In the main window, select File > Model Title


In the Title text box type:
PROPANE COMBUSTION (3-STEP EDBR)

Click Apply

Plot the mesh to confirm the data read in:

In the main pro-STAR window, select Plot > Up Axis > X


Select C > All
Select View > Isometric > 1, 1, -1
Click Cell Plot

Specify the key feature of this case, i.e. chemically reacting flow:

Ignition
Region

In the STAR GUIde window, go to panel Select Analysis Features


Select option Chemical Reaction from the Reacting Flow menu
Click Apply
Select folder Thermophysical Models and Properties and note that an extra
sub-folder called Reacting Flow now appears in the STAR GUIde tree. This
will be used in this tutorial to supply chemical reaction definitions.

As explained in the Additional Modelling Notes section, an ignition region needs


to be defined for this type of model. To do this, collect the cells to be designated as
ignition cells as follows:

In the I/O window, type command


CSET NEWS GRAN 0.049 0.0751,,,-0.1 0.51 2

Click Cell Plot

A total of 90 cells will be selected. Now assign a separate cell type with a different
colour to them so that they can be distinguished easily from the rest of this models
cells:

Version 4.02

In the main window, select Tools > Cell Tool


Select Table # 4 in the Cell Table scroll list
9-27

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing
Material Properties

Material
Properties

Click Edit Types to display the Cell Table Editor


Enter 5 in the Color Table Index box
Enter Ignition_cells in the Name box
Click Apply and then Close
In the Cell Tool, select Modify Type > Cell Set
Click Replot and notice the change of cell colour in the ignition region
Close the Cell Tool
In the main window, select C > All and then Cell Plot to see all cells in the
model

Set up material properties and thermofluid models using the appropriate STAR
GUIde panels. The required actions are as follows:
1. Select the Ideal Gas Law density variation (with pressure dependence)
2. Since this is a high-temperature combustion case, assign a polynomial
variation to the specific heat of the background fluid (air) as a function of
temperature. In this tutorial, we assume that the specific heat polynomial for
air is virtually identical to that for N2
3. Select the standard k- turbulence model
4. Turn on the chemico-thermal enthalpy equation solver
5. Set the initial temperature and turbulence distribution
6. Choose the monitoring cell location
7. Choose the reference pressure and its location

9-28

In the STAR GUIde window, select sub-folder Liquids and Gases


Open the Molecular Properties panel
Select option Ideal-f(T,P) from the Density menu
Select option Polynomial in the Specific Heat menu. Note that pro-STAR
displays an additional Molecular Weight box whose default value, 28.96, is
appropriate for air.
Click Apply. A pop-up panel will appear, warning you that pro-STAR was not
able to find the background material name (AIR) in its built-in database and
suggesting an alternative action.
Click OK to close the panel and then click Define/Edit Polynomial to open
the Polynomial Function Definition dialog
Find a substance called N2 in the scroll list on the left-hand side of this
dialog, select it, and then click Apply Database Substance. pro-STAR will
retrieve the corresponding polynomial coefficients and assign them to
material no. 1, i.e. the background material.
Click Graph Data to display a graph of specific heat versus temperature,
together with corresponding graphs for normalised enthalpy and entropy
Click Close to exit from the dialog
Open the Turbulence Models panel
Click On to switch on turbulence modelling
Select option K-Epsilon/High Reynolds Number from the model menu
Click Apply
Open the Thermal Models panel
Turn on the solution of the energy equation by clicking Temperature
Calculation On and then click Show Options
Select option Chemico-Thermal from the Enthalpy menu
Version 4.02

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing
Combustion Model

Click Apply
Open the Initialization panel
In the Flow Conditions tab, confirm that a value of 293.0 is displayed in the
Temperature box
Go to the Turbulence tab and select option TI/Mixing Length from the
Turbulence Parameters menu
Enter 0.05 and 0.2 in the Intensity and Mixing Length boxes, respectively
Click Apply

It is good practice to define one of the ignition cells as the monitoring point. This
makes checking for the onset of ignition easier, as temperature and product mass
fractions build-up rapidly at that point once ignition begins.

Combustion
Model

Open the Monitoring and Reference Data panel


Type 114 in the Monitoring cell number box
Choose the same reference pressure location as Tutorial 9.1, i.e. half way
between the axis and the outer casing and towards the outlet, by entering 1760
in the Reference Pressure Cell Number box. Confirm that 1.0e+5 appears in
the Pressure box.
Click Apply

Use STAR GUIdes Reacting Flow folder to set up the combustion model as
follows:

Select sub-folder Reacting Flow followed by Chemical Reactions


Open the Scheme Definition panel
Select option Unpremixed/Diffusion from the Reaction Type menu
Accept the default EBU Standard option from the Reaction Model menu.
Note that scheme no. 1 is selected by default in the Chemical Scheme # slider
at the bottom of the panel
Click Apply
A pop-up window will now appear warning you that the default chemical
reaction settings will be changed. Click Continue. A message will appear at
the bottom of the STAR GUIde panel confirming your combustion model
selection.

Specify the chemical reaction equations and other basic model parameters:

Version 4.02

Open the Reaction System panel. Note that reaction no. 1 is selected by
default in the Reaction scroll box.
Type the first reaction definition, C3H8 + 1.5O2 -> 3CO + 4H2, in the
adjacent box
Accept the default settings on the Status, Tscale and Rate Equation menus
and then click Update Reaction 1. pro-STAR will fill in default values for
parameters Amix, Bmix, confirm the chemical names entered above and enter
them in the appropriate list (Leading Reactants, Products and Reactant
parameters) at the bottom of the panel
Increment the scroll box setting to 2 and type the second reaction definition,
CO + 0.5O2 -> CO2, in the box
Click Update Reaction 2. pro-STAR will update the various lists as
necessary
9-29

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing
Scalar Properties

Increment the scroll box setting to 3 and type the third reaction definition, H2
+ 0.5O2 -> H2O in the box
Click Update Reaction 3. pro-STAR will update the various lists as
necessary

Check the treatment to be applied to the ordinary reactant (oxygen):

In the Reactant Parameters list, select reactant no. 1


Check that option Fixed-Fraction is shown in the drop-down menu
underneath
Check that the (fixed) oxygen mass fraction in the incoming air stream is
0.233

This completes the specification of leading reactants and combustion products.


pro-STAR will automatically map scalar variables to the constituents of the reaction
scheme, define their initial conditions and assign physical properties using its
built-in database (props.dbs).
If a chemical species cannot be mapped to a scalar variable, a warning will be
displayed in the I/O window and a new scalar of that name (but with default, i.e. air,
properties) will be created and added to the scalars list. A stoichiometric check
under this condition will fail, indicating that the assigned properties (molecular
weights, in particular) are not appropriate. It is therefore advisable to check the I/O
window to confirm that the model and chemical species have been correctly set up.
Finally, specify the ignition parameters as follows:

Open the Ignition panel


Accept the default setting (Numerical) in the Model/Treatment panel
Type 4 in the Cell Type box
Type 0.05 in the Fraction Burnt box
Accept the default option, Time Step/Iteration, in the When? menu
Type 50 and 150 in the Start and End boxes, respectively
Click Apply

Assign the chemical reaction scheme just defined to the models fluid domain:

Scalar
Properties

Open the Scheme Association panel


Select option Chemical Scheme Number and then type 1 in the adjacent box
Click Apply

Check the properties of the scalar variables set up as a result of the scalar mapping
described earlier:

Select the Additional Scalars folder and then open the Molecular Properties
(Scalar) panel

Use the Scalar # scroll bar to scroll through the available scalars. It will be seen that
a total of 10 scalars have been created, including three passive scalars representing
the mixture fractions of the leading reactants. Note that a solution for this group of
scalars is required by the EDBR formulation (see Chapter 10 of the Methodology
volume). Inspect each of the remaining scalars in turn to verify that they have been
set up as active, i.e. their influence on the flow field will be taken into account
through the density calculation.
9-30

Version 4.02

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing
Boundary Conditions

As a result of the Polynomial setting for the background fluid, you need to
assign a polynomial specific heat function to the scalar variables representing the
chemical reaction species and display this graphically for verification purposes.

Boundary
Conditions

Select scalar no. 1 (C3H8) with the Scalar # slider


Clicking Apply causes pro-STAR to search for the coefficients of this
substance in its internal database. In this case, they are found and a message
to that effect appears in the I/O window.
Click the Define/Edit Polynomials button for specific heat to open the
Polynomial Function Definition dialog. This will display the coefficients just
retrieved.
Click Graph Data to display a graph of specific heat .vs. temperature,
together with corresponding graphs for normalised enthalpy and entropy
Click Close to exit from the dialog
In the Molecular Properties (Scalar) panel, retrieve polynomial coefficients
for the remaining species (i.e. scalar nos. 3, 4, 5, 6, 8 and 10) by selecting
them in turn with the Scalar # slider and then following the same procedure as
for scalar no. 1

Check the current boundary definitions and specify boundary conditions where
appropriate.

Select folder Define Boundary Conditions


Open the Define Boundary Regions panel

Specify boundary conditions for the inlet boundaries, choosing the Mixing Length
option for turbulence parameter input. Note that all fluid streams except the one
flowing through the cooling passage have swirl velocity components on entry into
the combustor. Starting with the fuel inlet:

Version 4.02

Select region 3 In the boundary regions scroll list


Select option TI/Length from the Turb. Switch menu
Enter inlet boundary values for the fuel stream in the appropriate boxes as
shown below:

Click Apply

9-31

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing
Boundary Conditions

Specify conditions at the remaining boundaries:

9-32

Select region 4 in the scroll list


Select option TI/Length from the Turb. Switch menu
Enter inlet conditions in the appropriate boxes, as shown below:

Click Apply
Select region 5 in the scroll list
Select option TI/Length from the Turb. Switch menu
Enter inlet conditions in the appropriate boxes, as shown below:

Click Apply
Select region 6 in the scroll list
Select option TI/Length from the Turb. Switch menu
Enter inlet conditions in the appropriate text boxes, as shown below:

Version 4.02

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Pre-processing
Control Parameters

Click Apply

Check the wall boundary conditions for the first inlet-side wall (region 7)

Select region 7 in the scroll list. The default settings are acceptable, so no
further action is required

This is also true of the wall boundary conditions assigned to regions 8 to 13.
Check region 14 (the outlet) and region 15 (the baffle boundaries):

Highlight region 14 in the scroll list. The default settings are acceptable, so no
further action is required
Highlight region 15 in the scroll list. The default settings for side no. 1 are
acceptable, so no further action is required. The settings for side no. 2 are
automatically made the same as side no. 1

Specify scalar boundary conditions at the fuel inlet:

Control
Parameters

Check the solution control parameter settings and specify new values for
under-relaxation factors and tolerances where appropriate:

Version 4.02

Open the Scalar Boundaries panel


Select region no. 3 in the boundary regions scroll list
Select MIX_FRAC-FUEL_1 in the Scalar scroll list, type 1.0 in the Mass
Fraction box and then click Apply
Select C3H8 in the Scalar scroll list, type 1.0 in the Mass Fraction box and
then click Apply

Select folder Analysis Controls


Select sub-folder Solution Controls and then Equation Behavior
Open the Primary Variables panel and then select the Solver Parameters tab
Type 0.7 in the Relaxation Factor box for Temperature
Type 0.001 in the Residual Tolerance box for Temperature
Type 0.8 in the Relaxation Factor box for Density
Click Apply
Open the Additional Scalars panel
Select all scalars in the scroll list one-by-one and check the under-relaxation
9-33

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

CFD Analysis
Run Time Controls

factor and the residual tolerance settings. It will be seen that they are the same
as those for temperature. This is because, when option Chemico-Thermal is
selected for enthalpy, pro-STAR changes these values automatically to match
those for temperature. This ensures that enthalpy and all transported scalars
are developed numerically at the same rate.
Run Time
Controls

Check the status of the run time control parameters:

Final
Operations

Select folder Analysis Preparation/Running and open the Set Run Time
Controls panel
Enter 500 for the maximum number of iterations and 0.0001 for the maximum
residual tolerance
Click Apply
Open the Analysis (Re)Start panel. The setting of the Restart File Option
menu should be None, confirming that this is a run from initial conditions.

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the geometry and problem files and exit from
pro-STAR, as shown below. Alternatively, you may continue with the CFD
analysis, using the STAR GUIde facilities for running STAR interactively. This
process is described in the next section.

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
As in Tutorial 9.1, a double precision STAR executable needs to be employed, as
follows:

In the main pro-STAR panel, select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Select the Double Precision option button. Leave all other settings at their
default values
Click Start New Analysis

The analysis will then start automatically. Convergence should be achieved within
the specified maximum number of iterations.
Post-Processing
Preliminaries Read in the results of the analysis from file EDBR_va.ccm:

9-34

Select folder Post-Processing


Open the Load Data panel and display the File(s) tab
Click Open Post File

Version 4.02

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Post-Processing
Basic Plots

Basic Plots

Start by re-plotting the mesh:.

In the main pro-STAR window, select C > All


Click Cell Plot

The user-defined panels, Pgetc and Pgetv, described in Tutorial 9.1 are to be used
to generate a 3-D display of the velocity magnitude distribution:

Select Panels > Pgetc


In the Pgetc panel, click VM
Select Contour Plot as the cell plot type
In the main window, click the Edge plotting button to display Figure T9.2-1

Figure T9.2-1

Contours of velocity magnitude

Close the Pgetc panel

File > Close


In the main window, click the Edge Plotting button again to deactivate it

Define a section whose plane bisects the mesh and passes through the axis of
symmetry:

Version 4.02

In the main window, select View > Axis > +X


Click Section Slice and then use the screen cursor to draw a vertical line that
bisects the visible mesh (click the end points of the line). This represents the
trace of a longitudinal section plane through the middle of the mesh and
passing through the axis.
Select a viewpoint at right angles to the section by choosing View >
SNORMAL
Select cell plot type Section (Surface)
9-35

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Post-Processing
Basic Plots

Open panel Pgetv and plot the vertex-based temperature profile in the section:

Select Panels > Pgetv


On the Pgetv panel, click button TA to display the absolute temperature
distribution shown in Figure T9.2-2

Figure T9.2-2

Temperature distribution

Note that the temperature contours continue unbroken across the baffle. This
implies a heat flow situation that is unrealistic (given that the baffle is adiabatic) and
is solely due to the interpolation technique employed by pro-STAR to create a
smooth-looking plot. You should be aware of this when creating smoothed contour
plots in geometries containing baffles and solid-fluid interfaces.
Repeat for the mass fraction profiles of the fuel and one of the combustion
products (CO2). This time use panel Pgetc to read in the cell-based values and then
obtain the vertex-based values by averaging:

9-36

Select Panels > Pgetc


Click Conc1
Select Post > Caverage > Cset
In the main window, click Replot to display the propane distribution shown in
Figure T9.2-3
Click Conc8
Select Post > Caverage > Cset
In the main window, click Replot to display the carbon dioxide distribution
shown in Figure T9.2-4

Version 4.02

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Post-Processing
Basic Plots

Figure T9.2-3

Contour plot of C3H8 concentration

Figure T9.2-4

Contour plot of CO2 concentration

As with the temperature plot, the CO2 contour plot incorrectly suggests that the
scalar concentration is continuous across the baffle.
To terminate the session:

Version 4.02

9-37

Tutorial 9.2

PROPANE COMBUSTION (THREE-STEP EDBR)

Post-Processing
Basic Plots

9-38

Select File > Quit > Quit, Nosave

Version 4.02

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing
Preliminaries

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

In Tutorial 9.2, a three-step eddy break-up model was used to simulate propane
combustion. This sub-tutorial employs the same reaction model but under a
significantly different set of conditions, as follows:
1. The fuel is toluene (C7H8) and is injected into the combustor in the form of
droplets that subsequently evaporate into the combustible vapour.
2. An externally supplied subroutine is used to model the physical process
involved in fuel droplet evaporation
3. A single-step chemical reaction of the following form is used:
C 7 H 8 + 9O 2 7CO 2 + 4H 2 O
4. Radiation effects are introduced. Some preparatory work for this feature, in
the form of extra boundary region definitions, was done in Tutorial 7.2 of the
Meshing Tutorials volume where the basic mesh setup is described. This
sub-tutorial makes use of those definitions. It also introduces participating
media radiation (due to the gases within the combustor) in addition to
radiative heat transfer between the various boundary surfaces.
5. Some boundary condition modifications are made to represent the combustion
conditions, droplet injection and surface radiation properties.
The aim of this tutorial is therefore to demonstrate:

The combination of several advanced STAR-CD features (chemical reaction,


Lagrangian two-phase and radiation simulation) in building a physically
realistic model of a typical combustion problem
The importance of user subroutines in enhancing the accuracy of droplet
material property models

Pre-processing
Preliminaries Create a sub-directory for the tutorial called tut9-3. The mesh for this problem
has already been created in the Meshing Tutorials volume (Tutorial 7.2) and the
relevant cell, vertex, boundary and problem setup files are already available (files
combustor.cel, combustor.vrt, combustor.bnd and
combustor.inp, respectively). Therefore, before starting the tutorial, make sure
that the above files are copied into your current directory.

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (say, EDBR_dr) in the Casename text box
Click Continue

Read in the available problem data:

Version 4.02

Select File > Read File... in the main pro-STAR window


In the Input Coded Command File dialog check that the File Name is
combustor.inp
Click Apply
Click Close
9-39

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing
Ignition Region

This will read default problem settings from file combustor.inp plus the
problems cell, vertex and boundary location definitions from the remaining three
files.

In the main window, select File > Model Title


In the Title text box type:
TOLUENE COMBUSTION (1-STEP EDBR,DROPLETS,RADIATION)

Click Apply

Plot the mesh to confirm the data read in:

In the main pro-STAR window, select Plot > Up Axis followed by X


Select C > All
Select View > Isometric > 1, 1, -1
Click Cell Plot

Specify the key features of this case, i.e. chemically reacting flow in the presence
of droplets:

Ignition
Region

In the STAR GUIde window, go to panel Select Analysis Features


Select option Lagrangian Multi-Phase from the Multi-Phase Treatment
menu
Select option Chemical Reaction from the Reacting Flow menu
Click Apply. An additional folder called Lagrangian Multi-phase will appear
in the NavCenter tree.
Select folder Thermophysical Models and Properties and note that an extra
sub-folder called Reacting Flow now appears in the STAR GUIde tree. This
will be used in this tutorial to supply chemical reaction definitions.

Given that an eddy break-up model is to be used here, an ignition region needs to
be specified for this model, similar to the one described in Tutorial 9.2. To do this,
collect together the cells to be designated as ignition cells as follows:

In the I/O window, type command


CSET NEWS GRAN 0.074 0.101,,,-0.1 0.51 2

Click Cell Plot

A total of 90 cells will be selected. Now assign a separate cell type with a different
colour to them so that they can be distinguished easily from the rest of this models
cells:

9-40

In the main window, select Tools > Cell Tool


Select Table # 4 in the Cell Table scroll list
Click Edit Types to open the Cell Table Editor
Enter 5 in the Color Table Index box
Select On from the Radiation menu. This is a necessary setting for
performing radiation calculations, as explained below
Type Ignition_cells in the Name box
Click Apply
Version 4.02

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing
Thermal Options

Thermal
Options

In the Cell Tool, select Modify Type > Cell Set


Click Replot and notice the change of cell colour in the ignition region
Close the Cell Tool
In the main window, select C > All and then Cell Plot to see all cells in the
model

The radiation model in this tutorial includes the effects of the intervening gas, using
default gaseous radiation properties, as well as surface-to-surface radiation. This
requires the use of beams that can be tracked only through cell types that are
explicitly defined as participating in radiative heat transfer. Since ignition cells have
already been prepared for this type of analysis, all cells in the rest of the fluid
domain need to be re-set for this purpose:

Go to the Cell Table Editor and select Table# 1 in its scroll list
Select On from the Radiation menu
Click Apply
Close the Cell Table Editor

Turn radiation on, choosing the Discrete Transfer analysis method in conjunction
with the participating media calculation option:

Radiation
Patches

Select the Thermophysical Models and Properties folder and open the
Thermal Options panel
In the Radiation section of the panel, select option Discrete Transfer
Enter 100 in the Beams per patch box
Select option Participating to include gaseous radiation effects in the
calculations
Accept the remaining default settings and then click Apply

To use the discrete beam radiation model, it is necessary to subdivide all boundary
regions present in the problem (except for cyclic boundaries) into so-called
patches. These are used both during view factor calculations and for evaluating the
radiative heat transfer.
Assign a unique patch to every boundary in every relevant region. This can be
done most conveniently by means of a pro-STAR command loop, shown below:
typed into the I/O window:

In the I/O window, type the following commands:


BSET NONE
*SET NREG 3 1
*DEFINE
BPATCH NREG,,BYFA
BSET ADD REGI NREG
*END
*LOOP 1 12

The above loop will create 535 patches. Display the patches to confirm that the
operation has been carried out correctly:

Version 4.02

In the main window, select the Patch plot display option


Verify that patches appear in the right places and then deselect the Patch plot
9-41

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing
Material Properties

display option
Material
Properties

Set up material properties and thermofluid models using the appropriate STAR
GUIde panels. The required actions are as follows:
1. Select the Ideal Gas Law density variation (with pressure dependence)
2. Since this is a high-temperature combustion case, assign a polynomial
variation to the specific heat of the background fluid (air) as a function of
temperature. In this tutorial, we assume that the specific heat polynomial for
air is virtually identical to that for N2
3. Select the standard k- turbulence model
4. Turn on the chemico-thermal enthalpy equation solver
5. Set the initial temperature and turbulence distribution
6. Choose the monitoring cell location
7. Choose the reference pressure and its location

9-42

Go to the STAR GUIde window and open the Molecular Properties panel in
sub-folder Liquids and Gases
Select option Ideal-f(T,P) from the Density menu
Select option Polynomial in the Specific Heat menu. Note that pro-STAR
displays an additional Molecular Weight box whose default value, 28.96, is
appropriate for air.
Click Apply. A pop-up panel will appear, warning you that pro-STAR was not
able to find the background material name (AIR) in its built-in database and
suggesting an alternative action.
Click OK to close the panel and then click Define/Edit Polynomial to open
the Polynomial Function Definition dialog
Find a substance called N2 in the scroll list on the left-hand side of this
dialog, select it, and then click Apply Database Substance. pro-STAR will
retrieve the corresponding polynomial coefficients and assign them to
material no. 1, i.e. the background material.
Click Graph Data to display a graph of specific heat .vs. temperature,
together with corresponding graphs for normalised enthalpy and entropy
Click Close to exit from the dialog
Open the Turbulence Models panel
Click On to switch on turbulence modelling
Select option K-Epsilon/High Reynolds Number from the model menu
Click Apply
Open the Thermal Models panel
Turn on the solution of the energy equation by clicking Temperature
Calculation On and then click Show Options
Select option Chemico-Thermal from the Enthalpy menu
Note that the panel includes a section labelled Participating Media. Check the
radiative properties assigned to the gas. In this case the Radiative Properties
setting should be Constant, the Absoption coefficient 0.1 and the Scattering
coefficient 0.0
Click Apply
Open the Initialization panel
In the Flow Conditions tab, type a value of 500.0 in the Temperature box
Click Apply
Version 4.02

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing
Combustion Model

Go to the Turbulence tab and select option TI/Mixing Length from the
Turbulence Parameters menu
Enter 0.05 and 0.2 in the Intensity and Mixing Length boxes, respectively
Click Apply

It is good practice to define one of the ignition cells as the monitoring point. This
makes checking for the onset of ignition easier, as temperature and product mass
fractions build-up rapidly at that point once ignition begins. Begin by inspecting the
cell numbers in the region of interest:

Combustion
Model

In the main window, select Plot > Numbers and then click option Cell on the
dialog displayed
Zoom in on the mesh shown on-screen to have a closer look at the displayed
numbers and then choose cell no. 482 as the monitoring cell
Click Zoom Off
Deselect option Cell on the Plot Numbers dialog and then click Close
Go back to the STAR GUIde window and open the Monitoring and Reference
Data panel
Type 482 in the Monitoring cell number box
Choose the same reference pressure location as Tutorial 9.1, i.e. half way
between the axis and the outer casing and towards the outlet, by entering 1760
in the Reference Pressure Cell Number box. Confirm that 1.0e+5 appears in
the Pressure box.
Click Apply

Use STAR GUIdes Reacting Flow folder to set up the combustion model as
follows:

Select sub-folder Reacting Flow followed by Chemical Reactions


Open the Scheme Definition panel
Select option Unpremixed/Diffusion from the Reaction Type menu
Accept the default EBU Standard option from the Reaction Model menu.
Note that scheme no. 1 is selected by default in the Chemical Scheme # slider
at the bottom of the panel
Click Apply
A pop-up window will now appear warning you that the default chemical
reaction settings will be changed. Click Continue. A message will appear at
the bottom of the STAR GUIde panel confirming your combustion model
selection.

Specify the reaction equation for this scheme and other basic model parameters:

Version 4.02

Open the Reaction System panel. Note that reaction no. 1 is selected by
default in the Reaction scroll box.
Type the required reaction definition, C7H8 + 9O2 -> 7CO2 + 4H2O, in the
Reaction 1 box
Accept the default settings on the Status, Tscale and Rate Equation menus
and then click Update Reaction 1. pro-STAR will fill in default values for
parameters Amix, Bmix, confirm the chemical names entered above and enter
them in the appropriate list (Leading Reactants, Products and Reactant
parameters) at the bottom of the panel
9-43

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing
Droplet Properties

Check the treatment to be applied to the ordinary reactant (oxygen):

In the Reactant Parameters list, select reactant no. 1


Check that option Fixed-Fraction is shown in the drop-down menu
underneath
Check that the (fixed) oxygen mass fraction in the incoming air stream is
0.233

This completes the specification of leading reactants and combustion products.


pro-STAR will automatically map any required scalar variables to the constituents
of the reaction scheme. Note that appropriate scalar variables already exist for all
the chemical species constituents, so no additional scalar definitions for them are
necessary.
Specify the ignition parameters as follows:

Open the Ignition panel


Accept the default setting (Numerical) in the Model/Treatment panel
Type 4 in the Cell Type box
Type 0.05 in the Fraction Burnt box
Select option Time Step/Iteration in the When? menu
Type 20 and 120 in the Start and End boxes, respectively
Click Apply

Assign the chemical reaction scheme defined earlier (no. 1) to the models fluid
domain:.

Open the Scheme Association panel


Select option Chemical Scheme Number and then type 1 in the adjacent box
Click Apply

Check the properties of the scalar variables set up as a result of the scalar mapping
described earlier:

Select sub-folder Additional Scalars


Open the Molecular Properties (Scalar) panel and scroll through the available
scalars using the Scalar # scroll bar at the bottom of the panel

It will be seen that a total of 6 scalars have been defined, including an additional
passive scalar (no. 2) representing the mixture fraction of the fuel. Note that a
solution for this scalar is required by the EDBR formulation (see Chapter 10 of the
Methodology volume).
Droplet
Properties

Check the basic control settings for droplets and then re-define the maximum size
of the droplet track file (in Mb), taking into account droplet trajectories and the
maximum tracking times:

9-44

Select folder Lagrangian Multi-Phase and open the Droplet Controls panel
Check that option Coupled is set in the Two-Phase Lagrangian Calculations
menu
Type 100 in the Droplet Trajectory Max File Size box
Accept the default value (100) for Maximum Tracking Time
Select option Explicitly defined parcel injection
Version 4.02

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing
Droplet Properties

Accept all other default settings on the panel and click Apply
A panel will appear warning you that the current injection definitions will be
overwritten. Since no definitions have been supplied yet, you may continue
by clicking Yes.

Activate the turbulent dispersion model and define transport mechanisms and
physical properties for the droplets on the basis of:
1. STARs standard methodology for momentum, heat and mass transfer
between the dispersed and continuous phases
2. STARs default model for droplet break-up
3. Droplets bouncing off solid obstacles in the event of a collision
The above parameters are set as follows:

Open the Droplet Physical Models and Properties panel


Select the Global Physical Models tab
Turn On the Turbulent Dispersion option and then click Apply
Select the Droplet Physical Models tab and check that the Droplet Type #
slider is set to 1
For Momentum Transfer, select option Standard and accept the default Mass
Coef. and Slip Factor values
For Mass Transfer select option Standard
For Heat Transfer select option Standard
For Droplet Breakup select option Reitz and accept the default values for
We(Bag), We(Strip), Te(Bag), Te(Strip)
For Droplet-Wall Interaction select option Rebound
Click Apply

Specify droplet physical properties corresponding to liquid toluene. The heat of


vaporisation and saturation pressure is to be defined by user coding in subroutine
DROPRO, as discussed in section User Subroutines of this tutorial:

Version 4.02

Select the Droplet Properties tab


Click Select from Database to open the Droplet Properties Database dialog
Scroll down the database material list to locate item TOLUENE(L), highlight
it and then click Select Material
Close the Droplet Properties Database dialog
Check the contents of the Droplet Properties tab. All property values retrieved
from the database are now displayed in the appropriate boxes. Since these are
valid for a lower (room) temperature, adjust the values for the actual droplet
injection temperature (350 K) as follows:
Density 725
Surface Tension Coef. 0.0262
Viscosity 0.00035
Specific Heat 2107.86
Select option Subroutine Usage for both the Heat of Vaporisation and
Saturation Pressure properties
Click the Evaporates to Scalar Select button
Define scalar no. 1 (i.e. the toluene fuel vapour) as representing the product of
evaporation by selecting it in the Scalars list.
9-45

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing
Droplet Creation

Click Close. The chosen scalar number (1) will now appear in the Evaporates
to Scalar box
Click Apply

Note that the effect of toluene vapour on the mixture density will be taken into
account by virtue of the fact that the scalar variable representing toluene (no. 1) is
designated as an active scalar.
Make a local copy of user subroutine DROPRO and put it in a sub-directory
called ufile under your current working directory, as described in Chapter 14 of
the CCM User Guide.

In the main window, select File > System Command


Type ufiles in the text box, click Apply and then Close
Go back to the Droplet Properties tab and click Define User Coding

Once you have exited from pro-STAR at the end of this session, this subroutine
should be edited as shown in section User Subroutines of this tutorial. Note that
DROPRO in turn calls two auxiliary subroutines, CALHVP and CALSVP, that
supply values for the heat of evaporation and saturation pressure, respectively.
These should also be included in the ufile directory. All subroutines will be
included automatically as part of the STAR executable before the model is run.
Droplet
Creation

Create the required number of parcels (each parcel is represented by a typical


droplet) and specify their initial conditions. The parcels are to be injected into the
combustor via an annular slit of radius 5 mm, centred around the axis of symmetry
and projecting 2 cm into the combustion chamber. It is therefore convenient to use
a cylindrical coordinate system (no. 2) when specifying initial parcel positions and
velocities.
All parcels in this model are to be included in a single injection group. Define the
groups injection characteristics, including the initial diameter, velocity magnitude
and temperature of a typical droplet:

Open the Injection Definition panel


Specify injection data as indicated below:
Diameter 250.0e-6
Velocity Magnitude 4.4721 (based on initial velocity components Unit,
Vinit, Winit of 2, 0, 4 in coordinate system no. 2)
Temperature 350
Mass Flowrate applies to Each Injection Point
Mass Flowrate 4.152e-4 (based on an injection rate of 7.0e+4 droplets
per parcel per second)
No. of Parcels/injection point 1
Click Apply

Specify the injection location for 21 parcels, uniformly distributed over an arc of 50
around the injector ring so that the interval between them is 2.5. All parcels are to
have identical injection directions given by (0.4472, 0, 0.8944) in coordinate system
no. 2:

9-46

Open the Injection Points panel


Select option Line from the Set Type menu
Version 4.02

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing
Boundary Conditions

Enter 2 in the Coordinate System box


Enter 21 in the Number of Points box
Select option Specify for Point 1 (the first end-point of the circular arc) and
enter its coordinates (0.005, -25.0, 0.02) in the X, Y, Z boxes
Enter coordinates (0.005, 25.0, 0.02) for Point 2 (the second end-point of the
arc) in the other set of X, Y, Z boxes
Specify the entrance velocity direction in terms of unit vector components by
entering (0.4472, 0, 0.8944) in the DX, DY, DZ boxes
Click Add New Set. The injection points list at the top of the panel will
confirm that a group of 21 injection points has been created.

For a visual check of particle initial conditions:

Select the parcel group (set no. 1) in the Injection Points list
Click Plot points in set

Make the droplet size and colour dependent on particle diameter.

Boundary
Conditions

Select folder Post-Processing followed by sub-folder Particle Tracks


Open panel Plot Droplets/Particle Tracks and then select the Droplets tab
Select option Diameter in the Droplet Radius menu and type in 1. and 0.025
in the Size and Ref. Value boxes, respectively
Select option Diameter in the Fill Color menu
Click Apply
Click Droplet Plot

Check the current boundary definitions and specify boundary conditions where
appropriate.

Select folder Define Boundary Conditions


Open the Define Boundary Regions panel

In view of the fact that fuel is injected a short distance into the combustion chamber,
it is necessary to close off the fuel stream inlet previously defined in Tutorial 7.2.
This is done by re-defining region 3 from type Inlet to type Wall. Surface
temperature and radiation property data should also be supplied:

In the boundary regions scroll list, select region 3


Select option Wall from the Region Type menu
Choose option Fixed in the Wall Heat pop-up menu
Enter surface temperature and radiation property data in the appropriate boxes
as shown below:
Temp. 600.0
Resis. 0.8
Emissivity 0.8
Ther. Reflect. 0.2
Ther. Transmis. 0.0
Click Apply

Specify conditions at the air inlet boundaries, including surface radiative data such
as emissivity and reflectivity:

Version 4.02

Select region 4 in the scroll list


9-47

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing
Boundary Conditions

9-48

Select option TI/Length from the Turb. Switch menu


Enter inlet conditions in the appropriate boxes, as shown below:

Click Apply
Select region 5 in the scroll list
Select option TI/Length from the Turb. Switch menu
Enter inlet conditions in the appropriate boxes, as shown below:

Click Apply
Highlight region 6 in the scroll list
Select option TI/Length from the Turb. Switch menu
Enter inlet conditions in the appropriate text boxes, as shown below:

Version 4.02

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Pre-processing
Boundary Conditions

Click Apply

Supply surface radiative data for the outlet (region 14):

Select region 14 in the scroll list


Type 900.0 in the T Radiation box, 1.0 in the Emissivity box and click Apply

Specify radiation conditions for the walls (regions 7 to 13) via a pro-STAR
command loop. Walls are defined as thermally conducting with emissivity and
reflectivity of 0.8 and 0.2, respectively.

In the I/O window, type the following commands:


*SET NREG 7 1
*DEFINE
RMOD NREG
U
U U
U U U U U
FIXE 600.0 0.8
0.8 0.2
0.0
*END
*LOOP 1 6

Finally, define the baffles as thermally conducting boundaries having the same
radiation properties as the walls.

Version 4.02

Select region no. 15 in the Boundary Regions scroll list


Choose option Conduction in the Wall Heat pop-up menu
Type 0.8 in the Resistance box
Enter radiation property data in the appropriate boxes as shown below:
Emissivity box 0.8
Ther. Reflect. box 0.2
Ther. Transmis. box 0.0
Click Apply
Enter radiation property data for the reverse side of the baffle in the
9-49

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

User Subroutines
Control Parameters

Control
Parameters

Check the solution control parameters and then change the under-relaxation factor
for temperature and density and the residual tolerance for temperature:

Run Time
Controls

appropriate dialog text boxes, as shown below:


Emissivity box 0.8
Ther. Reflect. box 0.2
Click Apply again to apply the boundary conditions to this side of the baffle

Select folder Analysis Controls


Select sub-folder Solution Controls and then Equation Behavior
Open the Primary Variables panel and then select the Solver Parameters tab
Type 0.7 in the Relaxation Factor box for Temperature
Type 0.001 in the Residual Tolerance box for Temperature
Type 0.8 in the Relaxation Factor box for Density
Click Apply
Open the Additional Scalars panel
Select each scalar in turn and check that the Under-Relaxation Factor and
Residual Tolerance values are set to 0.7 and 0.001, respectively

Check the status of the run time control parameters:

Final
Operations

Select folder Analysis Preparation/Running and open the Set Run Time
Controls panel
Enter 800 for the maximum number of iterations and 0.0001 for the maximum
residual tolerance
Click Apply
Open the Analysis (Re)Start panel. The setting of the Restart File Option
menu should be None, confirming that this is a run from initial conditions.

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the geometry and problem files and exit from
pro-STAR, as shown below. Alternatively, you may run STAR interactively, as
described in the next section.

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

User Subroutines
As explained previously, sub-directory ufile should contain a file called
dropro.f, corresponding to subroutine DROPRO. Use pro-STARs built-in
editor to edit this subroutine and introduce the required code, as follows:

9-50

In the main pro-STAR panel, select File > Edit File


In the pro-STAR Editor dialog, click File > Open
When the File Selection dialog appears, choose sub-directory ufile and
then file dropro.f
Click OK
Edit the contents of the subroutine so that it looks exactly as shown below
Version 4.02

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

User Subroutines
Final Operations

Click File > Save to save the new version of the subroutine

C***********************************************************************
SUBROUTINE DROPRO(DENDR,CPDR,HV,PS,SFTC,DRVIS,DRCOND)
C
Droplet properties
C***********************************************************************
C--------------------------------------------------------------------------*
C
STAR-CD VERSION 4.02
C--------------------------------------------------------------------------*
INCLUDE comdb.inc
COMMON/USR001/INTFLG(100)
INCLUDE usrdat.inc
INTEGER IFTYPE,RON
COMMON /FULTYP/ IFTYPE,RON
DIMENSION DRMAFR(50)
EQUIVALENCE( UDAT08(001), DRMAFR(01) )
EQUIVALENCE( UDAT07(001), DRM )
EQUIVALENCE( UDAT04(005), PR )
EQUIVALENCE( UDAT05(001), IDR )
EQUIVALENCE( UDAT05(002), IDRT )
EQUIVALENCE( UDAT06(004), TD )
EQUIVALENCE( UDAT06(009), XD )
EQUIVALENCE( UDAT06(010), YD )
EQUIVALENCE( UDAT06(011), ZD )
EQUIVALENCE( UDAT05(004), ICO )
EQUIVALENCE( UDAT05(005), NDRCO )
C----------------------------------------------------------------------C
C
This subroutine enables the user to calculate the droplet
C
physical properties.
C
C
** Parameters to be returned to STAR: DENDR, CPDR, HV, PS, SFTC,
C
DRVIS and DRCOND
C
C----------------------------------------------------------------------C
C..... Droplet heat of evaporation
CALL CALHVP(NDRCO,ICO,TD,HV)
C..... Droplet saturation pressure
CALL CALSVP(NDRCO,ICO,TD,PS)
C
c
WRITE(76,(A19,2I6,1P3E16.5)) IP,ICO,TD,HV,PS : ,
c
+
IP,ICO,TD,HV,PS
C
C----------------------------------------------------------------------RETURN
END
C***********************************************************************

Note that this subroutine calls two auxiliary routines, CALHVP and CALSVP.
These routines are fuel-specific and should therefore not be used for other chemical
species. Two additional files called calhvp.f and calsvp.f containing the
necessary code should now be created, as shown below:

Version 4.02

In the pro-STAR Editor dialog, click File > Open


When the File Selection dialog appears, and under sub-directory ufile,
9-51

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

User Subroutines
Final Operations

enter a new file name called calhvp.f


Click OK
Input the contents of the new subroutine exactly as shown below
Click File > Save to save the subroutine contents
Repeat the above steps for the second subroutine, calsvp.f
Click File > Quit to exit from the editor

C***********************************************************************
SUBROUTINE CALHVP(NDRCO,ICO,TDRP,HV)
C
Droplet heat of evaporation
C
See Reid pg 228 eqt 7-12.1
C***********************************************************************
INCLUDE comdb.inc
C
PARAMETER (NDRCL=1)
DIMENSION WTMOL(NDRCL),TBOIL(NDRCL),TCRIT(NDRCL),PCRIT(NDRCL),
+
OMEGA(NDRCL)
C.... Properties of C7H8 droplet vapour components
DATA WTMOL/ 92.1410 /
DATA TBOIL/ 383.8000 /
DATA TCRIT/ 591.8000 /
DATA PCRIT/ 41.0000 /
DATA OMEGA/
0.2630 /
C
C.... Other required data
PARAMETER (RCONS=8.3143)
DIMENSION TREFL(NDRCL)
DATA TREFL/ 450.0 /
C
C------------------------------------------------------------------------C
IF(NDRCO.GT.NDRCL) THEN
WRITE(6,*) SUBROUTINE CALHVP: NDRCO.GT.NDRCL
WRITE(6,*)
NDRCO=, NDRCO
WRITE(6,*)
NDRCL=, NDRCL
STOP
ENDIF
C
IF(TDRP.LT.TCRIT(ICO)) THEN
TRED1=TREFL(ICO)/TCRIT(ICO)
THAW1=1.0-TRED1
TERM1=7.08*(THAW1)**0.354
TERM2=10.95*OMEGA(ICO)*(THAW1)**0.456
HV1=(RCONS*TCRIT(ICO)*(TERM1+TERM2))*(1.0E+3/WTMOL(ICO))
C
TRATIO=TBOIL(ICO)/TCRIT(ICO)
TTE=(LOG(PCRIT(ICO))-1.013)/(0.93-TRATIO)
DELHVB=1.093*RCONS*TCRIT(ICO)*TRATIO*TTE
C
TERM=0.00264*(DELHVB/(RCONS*TBOIL(ICO)))
PN=(TERM+0.8794)**10
TRED2=TDRP/TCRIT(ICO)
THAW2=1.0-TRED2
HV=HV1*(THAW2/THAW1)**PN
ELSE
HV=0.0
9-52

Version 4.02

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

User Subroutines
Final Operations

ENDIF
C
C------------------------------------------------------------------------RETURN
END

C***********************************************************************
SUBROUTINE CALSVP(NDRCO,ICO,TDRP,PS)
C
Droplet saturation pressure
C
See Reid pg 212 eqt 7-5.2
C***********************************************************************
INCLUDE comdb.inc
C
C------------------------------------------------------------------------C
C.... Constants for the reference fluids
C
1=PROPANE ; 2=OCTANE ; 3=Benzene ; 4=Pentafluorotolnene
PARAMETER (NRFL=4)
DIMENSION ARFL(NRFL),BRFL(NRFL),CRFL(NRFL),DRFL(NRFL),ORFL(NRFL)
DATA ARFL/ -6.72219,-7.91211,-6.98273,-8.05688 /
DATA BRFL/ 1.33236, 1.38007, 1.33213, 1.46673 /
DATA CRFL/ -2.13868,-3.80435,-2.62863,-3.82439 /
DATA DRFL/ -1.38551,-4.50132,-3.33399,-2.78727 /
DATA ORFL/ 0.15300, 0.39800, 0.21200, 0.41500 /
C
PARAMETER (NDRCL=1)
DIMENSION TBOIL(NDRCL),TCRIT(NDRCL),PCRIT(NDRCL), OMEGA(NDRCL)
C.... Properties of C7H8 droplet vapour components
DATA TBOIL/ 383.8000 /
DATA TCRIT/ 591.8000 /
DATA PCRIT/ 41.0000 /
DATA OMEGA/
0.2630 /
C
C.... Calculated data
DIMENSION PVPR(NRFL)
C
C------------------------------------------------------------------------C
IF(NDRCO.GT.NDRCL) THEN
WRITE(6,*) SUBROUTINE CALSVP: NDRCO.GT.NDRCL
WRITE(6,*)
NDRCO=, NDRCO
WRITE(6,*)
NDRCL=, NDRCL
STOP
ENDIF
C
IF(TDRP.LT.TCRIT(ICO)) THEN
TRED=TDRP/TCRIT(ICO)
THAW=1.0-TRED
DO 200 JR=3,NRFL
T1NU=ARFL(JR)*THAW
T2NU=BRFL(JR)*THAW**1.5
T3NU=CRFL(JR)*THAW**3.0
T4NU=DRFL(JR)*THAW**6.0
PVPR(JR)=(T1NU+T2NU+T3NU+T4NU)/TRED
200
CONTINUE
OTERM=(OMEGA(ICO)-ORFL(3))/(ORFL(4)-ORFL(3))
Version 4.02

9-53

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

CFD Analysis
Preliminaries

PVPRC=PVPR(3)+(PVPR(4)-PVPR(3))*OTERM
PS=EXP(PVPRC)*PCRIT(ICO)*1.0E+05
ELSE
PS=PCRIT(ICO)*1.0E+05
ENDIF
C
C------------------------------------------------------------------------RETURN
END

CFD Analysis
As in Tutorial 9.1, a double precision STAR executable needs to be employed, as
follows:

In the main pro-STAR panel, select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Select the Double Precision option button. Leave all other settings at their
default values
Click Start New Analysis

The analysis will then start automatically. Convergence should be achieved within
the specified maximum number of iterations.
Post-Processing
Preliminaries Start the post-processing task by loading the post file (EDBR_dr.ccm) and
re-plotting the mesh:.

In STAR-GUIde, open the Post Processing folder and click on the Load Data
panel
Click Open Post File
In the main window, select C > All
Click Cell Plot

Activate the user-defined panels Pgetc and Pgetv as described in Tutorial 9.2 and
use them to generate a 3-D display of the velocity magnitude distribution:

9-54

Select Panels > Pgetc


In the main window, select plot option Contour Plot
In the Pgetc panel, click VM
In the main window, click the edge plotting button to display Figure T9.3-1

Version 4.02

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Post-Processing
Preliminaries

Figure T9.3-1

Cell-centred plot of velocity magnitude

Close the Pgetc panel:

File > Close


In the main window, click the Edge Plotting button again to deactivate it

Plot the steady-state droplet distribution by choosing plot options such that droplet
colour and radius depend on temperature and calculated diameter, respectively. The
droplet velocity is not displayed.

Version 4.02

In the STAR GUIde window, select folder Post-Processing followed by


sub-folder Particle Tracks
Open panel Plot Droplets/Particle Tracks and then select the Droplets tab
In the Load Droplet Data section, select option Track File from the Load
From menu and then click the file browser button underneath
Select file EDBR_dr.trk from the Files list and then click OK. The
contents of the File Name box will be updated to confirm your choice.
Accept the default option (Particles) in the Plot Option menu and then click
Load Data
In the Droplet Options section, select After, Unhidden and Cplot from the
Edge Plot Options menus
Select Diameter in the Droplet Radius menu and enter 1. and 0.025 in the
Size and Ref. Value boxes, respectively
Select Temperature in the Fill Color menu
Select None in the Vectors menu
Click Apply
In the Collect/Plot section, select Dp > All
In the Plot Droplets panel, click Droplet Plot to display Figure T9.3-2
9-55

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Post-Processing
Preliminaries

Figure T9.3-2

Plot of toluene droplets with the droplets coloured by their temperature

Now make the droplet colour dependent on droplet mass and replot:

In the Droplet Plot Options section, select Mass in the Fill Color menu
Click Apply and then Droplet Plot to display Figure T9.3-3

Figure T9.3-3
9-56

Plot of toluene droplets with the droplets coloured by their mass


Version 4.02

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Post-Processing
Preliminaries

The above plot shows that the vast majority of the droplets have evaporated before
they reach the combustor outlet.
To view the fuel and combustion product distribution, first define a section
whose plane bisects the mesh and passes through the axis of symmetry:

In the main window, select D > None


Select plot option Geometry Plot and then click Cell Plot
View > Axis > +X
Click Section Slice and then use the screen cursor to draw a vertical line that
bisects the visible mesh (click the end points of the line). This represents the
trace of a longitudinal section plane through the middle of the mesh and
passing through the axis.
Select a viewpoint at right angles to the section by choosing View >
SNORMAL
Select cell plot type Section (Surface)

Open panel Pgetv and use it to plot the vertex-based temperature profile in the
section:

In the main window, select plot option Contour Plot


Select Panels > Pgetv
On the Pgetv panel, click button TA to display the absolute temperature
distribution shown in Figure T9.3-4

Figure T9.3-4

Absolute temperature distribution

For the reason described in Tutorial 9.2, the temperature plot is somewhat
misleading as it implies that heat is flowing through the adiabatic baffle. The same
is also true for the CO2 distribution shown in Figure T9.3-6 below.
Version 4.02

9-57

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Post-Processing
Preliminaries

Produce contour plots for the concentration profiles of fuel and carbon dioxide.
This time use panel Pgetc to read in the cell-based values and then obtain the
vertex-based values by averaging:

Select Panels > Pgetc


Click Conc1
Post > Caverage > Cset
In the main window, click Replot to display the toluene distribution shown in
Figure T9.3-5
Click Conc4
Post > Caverage > Cset
In the main window, click Replot to display the carbon dioxide distribution
shown in Figure T9.3-6

Figure T9.3-5

9-58

Toluene distribution

Version 4.02

Tutorial 9.3

C7H8 DROPLET COMBUSTION (EDBR, RADIATION)

Post-Processing
Preliminaries

Figure T9.3-6

CO2 distribution

To terminate the run:

Version 4.02

Select File > Quit > Quit, Nosave

9-59

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing
Preliminaries

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

In this tutorial, a hydrogen combustion case is modelled using a Laminar Flamelets


model for unpremixed flames. Unlike PPDF models that assume chemical
equilibrium, this model allows for non-equilibrium effects such as flame stretch and
detailed chemical kinetics. The model also assumes adiabatic conditions (no heat
loss). The main aims of the tutorial are to:

Familiarise users with the Laminar Flamelets model setup


Demonstrate the process of specifying chemical species that are not included
in pro-STARs species database (props.dbs)
Demonstrate how to set up boundary conditions and analysis controls for
scalars used in the simulation

Pre-Processing
Preliminaries Create a new directory for the tutorial called tut9-4. The mesh for this problem
has already been created in the Meshing Tutorials volume (Tutorial 7.2) and the
relevant cell, vertex, boundary and problem setup files are already available (files
combustor.cel, combustor.vrt, combustor.bnd and
combustor.inp, respectively). Therefore, before starting the tutorial, make sure
that these files are copied into your current directory.

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (say, flamelet) in the Casename text box
Click Continue

Read in the available problem data:

Select File > Read File... in the main pro-STAR window


In the Input Coded Command File dialog, check that the File Name is
combustor.inp
Click Apply
Click Close

This will read default problem settings from file combustor.inp, plus the
problems cell, vertex and boundary location definitions from the remaining three
files.

In the main window, select File > Model Title


In the Title text box type:
HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Click Apply

Plot the mesh to confirm that the data have been read in correctly:

Version 4.02

In the main pro-STAR window, select Plot > Up Axis followed by X


Select C > All
Select View > Isometric > 1, 1, -1
Click Cell Plot
9-61

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing
Material Properties

Specify the key feature of this case, i.e. chemically reacting flow:
In the STAR GUIde window, go to panel Select Analysis Features
Select option Chemical Reaction from the Reacting Flow menu
Click Apply
Select folder Thermophysical Models and Properties and note that an extra
sub-folder called Reacting Flow now appears in the STAR GUIde tree.

Material
Properties

Set up material properties and thermofluid models using the appropriate STAR
GUIde panels. The necessary actions are as follows:
1.
2.
3.
4.
5.

Combustion
Model

Select sub-folder Liquids and Gases


Open the Turbulence Models panel
Click On to switch on turbulence modelling
Select option K-Epsilon/High Reynolds Number from the model menu
Click Apply
Open the Thermal Models panel
Turn on the solution of the energy equation by clicking Temperature
Calculation On
Click Apply
Open the Initialization panel
In the Flow Conditions tab, confirm that a value of 293.0 is displayed in the
Temperature box
Go to the Turbulence tab and select option TI/Mixing Length from the
Turbulence Parameters menu
Enter 0.05 and 0.2 in the Intensity and Mixing Length boxes, respectively
Click Apply
Open the Monitoring and Reference Data panel
Specify the Monitoring cell number as 1760. This is roughly in the centre of
the outlet boundary region.
Make the reference pressure location the same as the monitoring cell location
by entering 1760 in the Reference Pressure Cell Number box
Check that 1.0e+5 appears in the Pressure box
Click Apply

Use STAR GUIdes Reacting Flow folder to set up the combustion model, as
follows:

9-62

Select the standard k- turbulence model


Turn on the temperature solver
Set the initial temperature distribution
Choose the monitoring cell location
Choose the reference pressure and its location

Select sub-folder Reacting Flow followed by Chemical Reactions


Open the Scheme Definition panel
Select option Unpremixed/Diffusion from the Reaction Type menu
Select option PPDF Single Fuel from the Reaction Model menu. Note that
scheme no. 1 is selected by default on the Chemical Scheme # slider at the
Version 4.02

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing
Combustion Model

bottom of the panel.


Select the Laminar Flamelet Model Option and click Apply
A pop-up window will now appear warning you that the default chemical
reaction settings will be changed. Click Continue. A message will appear at
the bottom of the STAR GUIde panel confirming your combustion model
selection.

The next step is to specify an appropriate reaction mechanism for the Laminar
Flamelet model. This must be written in CHEMKIN format, which requires a listing
of all participating elements, species and reactions. For a detailed description of
how to specify reaction mechanisms in this format, see , Laminar flamelet model
in the CCM User Guide.
Supply the basic data required as follows:

Open the Reaction System panel


In the Reaction Mechanism tab, copy the description given below into the
displayed box:

ELEMENTS H O N END
SPECIES H HO2 H2 H2O H2O2 N2 O OH O2 END
REACTIONS
H+O2+M=HO2+M
3.61E+17 -0.720
H2O/18.6/ H2/2.86/
H+H+M=H2+M
1.00E+18 -1.000
H+H+H2=H2+H2
9.20E+16 -0.600
H+H+H2O=H2+H2O
6.00E+19 -1.250
H+OH+M=H2O+M
1.60E+22 -2.000
H2O/5/
H+O+M=OH+M
6.20E+16 -0.600
H2O/5/
O+O+M=O2+M
1.89E+13 0.000
H2O2+M=OH+OH+M
1.30E+17 0.000
H2+O2=2OH
1.70E+13 0.000
OH+H2=H2O+H
1.17E+9
1.300
O+OH=O2+H
3.61E+14 -0.500
O+H2=OH+H
5.06E+04 2.670
OH+HO2=H2O+O2
7.50E+12 0.000
H+HO2=2OH
1.40E+14 0.000
O+HO2=O2+OH
1.40E+13 0.000
2OH=O+H2O
6.00E+08 1.300
H+HO2=H2+O2
1.25E+13 0.000
HO2+HO2=H2O2+O2
2.00E+12 0.000
H2O2+H=HO2+H2
1.60E+12 0.000
H2O2+OH=H2O+HO2
1.00E+13 0.000
END

Version 4.02

0.000
0.000
0.000
0.000
0.000
0.000
-1788.000
45500.000
47780.000
3626.000
0.000
6290.000
0.000
1073.000
1073.000
0.000
0.000
0.000
3800.000
1800.000

Click Save Mechanism. Confirm that you wish to proceed with this operation
in the displayed pop-up warning panel. pro-STAR will then store the supplied
data in file chemf.inp01 in a sub-directory called PPDF.
9-63

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing
Combustion Model

Click Apply to validate the file contents and create the chemistry libraries
needed subsequently by the flamelet calculations. Again, confirm that you
wish to proceed with this operation in the displayed pop-up warning panel.

Now that the reaction mechanism has been specified, the flamelets description
needs to be created:

In the Flamelet Setup tab, select the Composition sub-tab


Click Generate Flamelet file to generate and store the first flamelet
description in file flame01.inp01 within the PPDF sub-directory
Examine the Mole Fractions and Valences for the Fuel, Oxidizer and
Product streams by selecting each of them in turn from the Select Stream to
Define pop-up menu. The default values displayed are suitable for this case.

Four flamelets are to be generated for this problem, as follows:

Move the Flamelet No. slider to 2 and click Generate Flamelet file again.
This will generate a new flamelet description and store it in file
flame02.inp01within the PPDF sub-directory
Repeat this procedure for Flamelet Nos. 3 and 4, thus generating files
flame03.inp01 and flame04.inp01
Select the Flow Conditions sub-tab
For Flamelet No. 2, change the Strain Rate of Oxidizer to 200
Click Apply to store the updated flamelet description in file
flame02.inp01
For Flamelet No. 3, change the Strain Rate of Oxidizer to 300
Click Apply to store the updated flamelet description in file
flame03.inp01
For Flamelet No. 4, change the Strain Rate of Oxidizer to 0, which
corresponds to the equilibrium condition
Click Apply to store the updated flamelet description in file
flame04.inp01

Flamelet libraries must now be calculated from the above flamelet descriptions and
stored in a set of files called flame$$.lib01. Output information for this
calculation is written to a set of corresponding files called flame$$.out01.

9-64

Select the Flamelet Generation tab


Select Flamelet No. 1 from the list. Note that option New is selected by
default.
Click Apply to calculate the corresponding flamelet library. This process may
take a few seconds.
Select Flamelet No. 2 from the list
Choose option Restart From Flamelet No. 1. This should reduce the
computation time because the two flamelets have similar properties.
Click Apply
Select Flamelet No. 3 from the list
Choose option Restart From Flamelet No. 2
Click Apply
Select Flamelet No. 4 from the list
Click Apply
Version 4.02

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing
Scalar Properties

The STAR-CD solver requires that flamelet library data should be provided in
tabular form. The relevant table is created as follows:

Select the Look-up Table tab


Check that the Plot Flamelet Data for Flamelet Number option is set to 1
Click Plot to display graphs of flamelet data for flamelet number 1, as shown
in Figure T9.4-1.

Figure T9.4-1

Scalar
Properties

Plot similar graphs for flamelets 2, 3 and 4. There should be a few slight
differences between the four graphs.
Change the Mixture Fraction Dimension to 40. This is the number of points
used to define the mixture fraction profile in the table.
Change the Mixture Fraction Variance Dimension to 30
Select flamelets 1, 2, 3 and 4 from the Flamelet No list and use the arrow
button,
, to add them to the Selected flamelet No list
Click Apply to create the required look-up table and store it in file
flamelet.tbl01 in your working directory. An error message will appear
stating that some of the species included in the mechanism have not been
found in pro-STARs built-in property database file props.dbs. Data for
these species must be specified next.

The I/O window lists the problem species as OH, O, H, HO2 and H2O2. As
props.dbs does not contain property data for such species, and since their
molecular weights are needed to calculate polynomial distributions of their mole
fractions, the required properties must be specified explicitly:

Version 4.02

Graphs of flamelet data for flamelet number 1

Select the Additional Scalars sub-folder from within the Thermophysical


9-65

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing
Boundary Conditions

Models and Properties folder


Open the Molecular Properties (Scalar) panel
Select Scalar # 7 using the slider at the bottom of the panel
Change the Molecular Weight of Scalar # 7 to 17
Click Apply
Change the Molecular Weight of Scalar # 8 to 16
Click Apply
Change the Molecular Weight of Scalar # 9 to 1
Click Apply
Change the Molecular Weight of Scalar # 10 to 33
Click Apply
Change the Molecular Weight of Scalar # 11 to 34
Click Apply

All the properties and parameters of the chosen chemical reaction scheme have now
been specified, so it can now be assigned to the fluid material in the model:

Boundary
Conditions

The next step is to specify boundary conditions, starting with the fluid inlet
conditions:

9-66

Open the Scheme Association panel in the Reacting Flow folder


Select Chemical Scheme Number and enter 1 in the box
Click Apply

Select the Define Boundary Conditions folder


Open the Define Boundary Regions panel
Select Reg# 3, Fuel_inlet from the boundary regions list
Specify the U, V and W velocity components as -28, -60 and 100 m/s,
respectively
Change the Coord. System to 2
Select TI/Length from the Turb. Switch pull-down menu
Change the Turb. Intensity to 0.1 and the Length to 0.01 m
Change the Density to 1.8 kg/m3
Click Apply
Select Reg# 4, Air_inlet1 from the boundary regions list
Specify the U, V and W velocity components as -11, -24 and 42 m/s,
respectively
Change the Coord. System to 2
Select TI/Length from the Turb. Switch pull-down menu
Change the Turb. Intensity to 0.1 and the Length to 0.01 m
Change the Density to 1.19 kg/m3
Click Apply
Select Reg# 5, Air_inlet2 from the boundary regions list
Specify the U, V and W velocity components as -11, -24 and 42 m/s,
respectively
Change the Coord. System to 2
Select TI/Length from the Turb. Switch pull-down menu
Change the Turb. Intensity to 0.1 and the Length to 0.01 m
Change the Density to 1.19 kg/m3
Click Apply
Version 4.02

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Pre-Processing
Analysis Controls

Select Reg# 6, Air_inlet3 from the boundary regions list


Specify the W velocity component as 15 m/s
Change the Coord. System to 2
Select TI/Length from the Turb. Switch pull-down menu
Change the Turb. Intensity to 0.1 and the Length to 0.01 m
Change the Density to 1.19 kg/m3
Click Apply

The scalar concentrations at the inlet boundaries must also be specified:

Analysis
Controls

Some of the analysis controls need to be changed to ensure a reasonably rapid


convergence rate:

Run Time
Controls

Select the Analysis Controls folder followed by the Solution Controls


sub-folder
Select the Equation Behavior sub-folder
Open the Additional Scalars panel
Select MIXTURE_FRACTION from the Scalar list
Change the Under-Relaxation Factor to 0.7
Change the Residual Tolerance to 0.001
Click Apply
Select VARIANCE from the Scalar list
Change the Under-Relaxation Factor value to 0.7
Change the Residual Tolerance to 0.001
Click Apply

The run time controls must also be adjusted:

Version 4.02

Open the Scalar Boundaries panel


Select region number 3 from the Boundary Region list
Select MIXTURE_FRACTION from the Scalar list
Change the Mass Fraction to 1
Click Apply
Select region number 4 from the Boundary Region list
Select N2 from the Scalar list
Change the Mass Fraction to 0.79
Click Apply
Select O2 from the Scalar list
Change the Mass Fraction to 0.21
Click Apply
For regions 5 and 6, set the N2 and O2 Mixture Fractions to 0.79 and 0.21,
respectively, as for region number 4

Select folder Analysis Preparation/Running and open the Set Run Time
Controls panel
Enter 400 for the maximum Number of Iterations
Change the Max. Residual Tolerance to 0.0001
Click Apply

9-67

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

CFD Analysis
Final Operations

Final
Operations

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the geometry and problem files and exit from
pro-STAR, as shown below. Alternatively, you may continue with the CFD analysis
using the STAR GUIde facilities for running STAR interactively. This process is
described in the next section.

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
For problems involving chemical reactions, it is recommended that STAR is run in
double precision mode as follows:

In the main pro-STAR panel, select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Select the Double Precision option button. Leave all other settings at their
default values
Click Start New Analysis

The analysis will then start automatically. Convergence should be achieved within
the specified maximum number of iterations.
Post-Processing
Preliminaries Start the post-processing task by re-plotting the mesh:

In the main window, select C > New > Fluid


Click Cell Plot

Now load the solution results and plot velocity vectors on an x-z plane bisecting the
model geometry:

9-68

Go to the STAR GUIde window and select the Post-Processing folder


Open the Load Data panel
Under the File(s) tab, click Open Post File
Under the Data tab, select Velocity Components UVW from the Vector Data
list
Click Get Data
Select Go To > Create Plots
Under the Section Clipped tab, change the Normal values to 0, 1, 0
Click Apply
Click Plot To Screen
In the main pro-STAR window, select View > SNORMAL to display Figure
T9.4-2

Version 4.02

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Post-Processing
Preliminaries

Figure T9.4-2

Section Clipped plot of velocity vectors

Contour plots of temperature and mixture fraction can now be plotted as follows:

Under the Data tab of the Load Data panel, select Smooth Options On and
All
Select Temperature from the Scalar Data list
Click Get Data
Select Go To > Create Plots
Under the Section Clipped tab, select the Option Contour(filled)
Click Plot To Screen to display Figure T9.4-3
Under the Data tab of the Load Data panel, select MIXTURE_FRACTION
from the Scalar Data list
Click Get Data
Click Replot to display Figure T9.4-4

As explained in Tutorial 9.1, the contour plot smoothing effect leads to a physically
unrealistic temperature profile in the vicinity of the baffle.

Version 4.02

9-69

Tutorial 9.4

HYDROGEN COMBUSTION (LAMINAR FLAMELETS)

Post-Processing
Preliminaries

Figure T9.4-3

Section Clipped plot of temperature contours

Figure T9.4-4

Section Clipped plot of contours of mixture fraction

Terminate the session:

9-70

In the main pro-STAR window, select File > Quit, Nosave

Version 4.02

Introduction

Tutorial 10 BUOYANCY AND RADIATION EFFECTS


Introduction
This tutorial illustrates various STAR-CD facilities for simulating a heat transfer
problem involving natural convection, conduction, solid-fluid heat transfer and
radiation. The example used in the tutorial consists of a heated aluminium alloy fin
placed within a rectangular box filled with air (see Figure T10.0-1).

T = 293 K

T = 293 K

1
10

4
T = 343 K

Figure T10.0-1

Heated fin geometry (all dimensions in cm)

The problem is simulated in two dimensions for ease of mesh generation and speed
of numerical calculation. The mesh employed is shown in Figure T10.0-2.

Version 4.02

10-1

Material Properties

Figure T10.0-2

Mesh structure for the heated fin model

Material Properties
Three variants of this problem are considered, with different modes of heat transfer
applying in each. Material properties for the solid fin and the surrounding air are as
follows:
Aluminium alloy fin:
Density () = 2800 kg/m3
Specific heat (Cp) = 880 J/kg K
Thermal conductivity () = 180 W/m K
Surrounding air (incompressible, turbulent):
Density () = variable, based on Ideal Gas Law for molecular weight 28.96
Specific heat (Cp) = 1006 J/kg K
Thermal conductivity () = 0.0264 W/m K
Molecular viscosity () = 1.81E5 Pa s

10-2

Version 4.02

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Pre-Processing
Preliminaries

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

This sub-tutorial employs a simple, uniform two-dimensional mesh to model the


shape and size of the solid fin, followed by cell indexing and specification of
material properties for the fin and surrounding fluid.
Heating of the fin is achieved by fixing the temperature at the base to 343 K. The
sides of the surrounding box are set to a fixed temperature of 293 K and the
remaining wall boundaries are assumed to be either conducting (at solid/fluid
interfaces) or adiabatic (at the top and bottom walls of the box), as shown in Figure
T10.0-1.
This tutorial aims to show the user how to:

Model solid-fluid heat transfer


Model buoyancy-driven flows
Create streamline plots

Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut10-1. The mesh for this problem
is supplied in advance, i.e. cell, vertex, boundary and problem setup files
(fin.cel, fin.vrt, fin.bnd and fin.inp, respectively) are available in the
STAR-CD installation directories. Therefore, before starting the tutorial, make sure
that these files are copied into your current directory.

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (say, fin_bu) in the Casename text box
Click Continue

Read in the available problem data:

Select File > Read File... in the main pro-STAR window


In the Input Coded Command File dialog check that the File Name is
fin.inp
Click Apply
Click Close

This will read default problem settings from file fin.inp plus the problems cell,
vertex and boundary location definitions from the remaining three files.

In the main window, select File > Model Title


In the Title text box type:
BUOYANCY DRIVEN FLOW ROUND A HEATED FIN

Mesh
Checking

Verify that the correct mesh has been imported by selecting all cells and plotting the
mesh in Hidden Surface mode:

Version 4.02

Click Apply

In the main window, select C > All. The I/O window output shows that 2,500
cells were read in
Check that Hidden Surface is the default cell plot type
10-3

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Pre-Processing
Cell Type Properties

Click Cell Plot


Change the viewpoint to approximately (0.4, 0.5, 1) by dragging with the left
mouse button to display Figure T10.1-1

It will be seen that the mesh matches that shown in Figure T10.0-2 and that it
contains two cell types, corresponding to fluid and solid cells. Note that because of
the difference in cell type, fluid and solid cells are displayed in different colours.

Figure T10.1-1

Cell Type
Properties

Check and, if necessary, specify appropriate material property indices, colours and
names for cell types 2 and 1, representing the solid fin and its surrounding fluid,
respectively:

Thermal and
Gravity
Options

In the main window, click the CTAB button to open the Cell Table Editor
In the Cell Table Editor, select Table# 1 in the scroll list
Type AIR in the Name box
Accept the current settings for all other parameters and click Apply
Select Table# 2 and change the following parameters:
Material Number 2 (the solid properties index)
Color Table Index 4
Name AL
Click Apply and then Close
Click Replot to confirm the change (the solid cell colour will change)

Turn on the solid-fluid heat transfer option. This also has the effect of switching on
the temperature solver inside the solid fin:

10-4

Mesh geometry

In the STAR GUIde window, select the Thermophysical Models and


Properties folder and then open the Thermal Options panel
Choose Heat Transfer On in the Solid-Fluid Heat Transfer section
Version 4.02

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Pre-Processing
Fluid Properties

Click Apply

In order to take buoyancy effects into account, you need to specify the gravitational
force in the global Cartesian y-direction. Check the current setting:

Fluid
Properties

Open the Gravity panel


Type 9.81 in the Acceleration box to specify the gravitational acceleration
value to be used for this problem
Specify the correct direction of gravity in the model by typing -1 in the Y box
and 0 in the Z box
Click Apply

Check the material properties of the models fluid substance:

In the Thermophysical Models and Properties folder, select the Liquids and
Gases folder
Open the Molecular Properties panel and check that the material number
shown on the Material # scroll bar is 1.
It can be seen that material no. 1 is, by default, a fluid whose properties are
those of air. This is what is required in this case.

The density variation is assumed to follow the Ideal Gas Law. However, the fluid
itself is incompressible since the pressure effect on density variations is deemed to
be negligible.

Select option Ideal-f(T) in the Density pop-up menu and click Apply.

Default values are accepted for the remaining properties. Assuming the flow is
turbulent, select the k- model:

Open the Turbulence Models panel


Click the On button and then choose K-Epsilon/High Reynolds Number in
the Turbulence menu
Click Apply

Check the temperature equation setting:

Open the Thermal Models panel. Note that the temperature calculation has
been turned on as a result of selecting the solid-fluid heat transfer option.

Choose cell number 927 as the monitoring location for the fluid cells:

Open the Monitoring and Reference Data panel


Type 927 in the Monitoring cell number box
Click Apply

Specify a datum location and density for the purpose of calculating buoyancy
effects:

Version 4.02

Open the Buoyancy panel


Click On to turn on the buoyancy calculation
Select option Enter Coordinates from the Define Datum Location menu
Enter coordinates 0, 0, 0 in the X, Y, Z boxes
Select option Specify from the Define Datum Density menu
10-5

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Pre-Processing
Solid Properties

Solid
Properties

Define properties for the solid cells making up the fin (i.e. for material property
reference no. 2):

Checks

Select the Solids sub-folder within the Thermophysical Models and


Properties folder
Open the Material Properties panel and select material no. 2 using the
Material # scroll bar. This will display properties for the default solid material
(Carbon Steel).
Change the property values to those for aluminium as follows:
Name AL
Density 2800
Conductivity 180
Specific Heat 880
Click Apply
Select the Monitoring and Reference Data panel and choose a monitoring
location within the solid by typing 924 in the Monitoring cell number box
Click Apply

Check the boundaries by listing their properties and then displaying them
graphically:

10-6

Type 1.27588 in the Density box for the required datum density. As noted in
the STAR GUIde on-line Help (Useful Points), it is important to calculate
body forces as accurately as possible; hence the high degree of precision for
the density value.
Click Apply

In the main window, choose Utility > Count > Boundaries and then check
the information displayed in the I/O window, i.e. number and type of regions
and number of boundaries in each region
Select Cell Plot Display Option Bound
Select B > All and then B > Unselect > Symplane to exclude the symmetry
planes from the boundary plot that is about to be produced
Click Replot to display Figure T10.1-2. Only regions 1 and 2 are shown; all
other boundary surfaces are allocated to region 0 by default.

Version 4.02

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Pre-Processing
Boundary Conditions

Figure T10.1-2

Boundary
Conditions

Boundary region display

You can now impose the required thermal boundary conditions. Define fixed
temperature boundaries at 293 K for the containers side walls, as follows:

Select the Define Boundary Conditions folder and open the Define Boundary
Regions panel
Select region no. 1 in the scroll list
Select option Fixed in the Wall Heat pop-up menu
Type the required fixed wall temperature, 293, in the Temperature box
Accept the default values for the remaining parameters and click Apply

Define a fixed temperature boundary at 343 K for the base of the fin:

Select region no. 2 in the scroll list


Select option Fixed in the Wall Heat pop-up menu
Type the required fixed wall temperature, 343, in the Temperature box
Accept the default values for the remaining parameters and click Apply

The remaining boundary surfaces, i.e. those allocated to region 0, default to


adiabatic walls (at external surfaces) or conducting walls (at solid/fluid interfaces).
Control
Parameters

In buoyancy-driven flow calculations there is very strong coupling between the


temperature and flow fields. It is therefore advisable to use the PISO algorithm (see
the STAR GUIde on-line Help, Useful Points) which is more suitable for this type
of problem:

Version 4.02

Select the Analysis Controls folder, followed by the Solution Controls


sub-folder
Open the Solution Method panel and choose option PISO from the Solution
10-7

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Pre-Processing
Run Time Controls

Algorithm menu
Click Apply

As the model is two-dimensional, we need not solve the W-momentum equation:

Select the Equation Behavior folder and open the Primary Variables panel
On the Equation Status tab, deselect the Solve button for W-Mom
Click Apply

Given the strong effect of temperature and density variations on flow development,
it is important to apply some under-relaxation to these variables. This helps in
avoiding potential numerical stability problems.

Go to the Solver Parameters tab


Type a new under-relaxation factor, 0.95, in the Density box under the
Relaxation Factor column (note that this value must equal that for
temperature, to ensure that the calculated magnitudes for the two variables are
in step)
Click Apply

Choose the MARS differencing scheme for some of the variables to be solved. This
gives an optimum combination of stability and accuracy.

Go to the Differencing Schemes tab


Choose option MARS in all active menus under the Differencing Scheme
column, with the exception of Turb. KE and Turb. Diss which should be left to
the default setting (UD). Accept the default value of 0.5 for the blending
factor.
Click Apply

Choose the type of data output and dumping frequency. For post-processing
purposes, it is generally useful to save additional flow and thermal wall data (in this
case, heat transfer coefficients at the walls):

Run Time
Controls

Set the number of iterations to 300:

Final
Operations

10-8

Select the Output Controls sub-folder and open the Analysis Output panel
Accept the default option (On) for Write solution (restart) file and type 20 in
the Output frequency box
Go to the Additional Output Data section and then select item Heat Transfer
Coef. from the Wall Data scroll list
Click option button Post
Repeat the above for item Heat Flux
Click Apply

Select the Analysis Preparation/Running folder and then open the Set Run
Time Controls panel
Type 300 in the Number of Iterations box
Click Apply

The pre-processing task is now complete. If you wish to terminate the session at this
stage, write the geometry file, making sure that the scaling factor for the problem
units (centimetres) is specified. Then write the problem file and exit from
Version 4.02

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

CFD Analysis
Preliminaries

pro-STAR, saving all model data as shown below.


Alternatively, you may continue with the CFD analysis, using the STAR GUIde
facilities for running STAR interactively. This process is described in the next
section.

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, enter 0.01 in the Scale Factor box
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
To perform the analysis interactively, proceed as follows:

In the main pro-STAR panel, select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Check that option other has been selected for the model units; 0.01 should
appear inside the Scale Factor box

For simulations involving buoyancy, it is usually advisable to run STAR in Double


Precision mode. This prevents relatively small buoyancy source terms which
dominate the flow from being discarded as round-off error.

Select option Double Precision


Leave all other settings at their default values and then click Start New
Analysis

The analysis will then start automatically. This run should produce a converged
solution within the specified maximum number of iterations.
Post-Processing
Preliminaries Launch pro-STAR (if the analysis was run outside pro-STAR). Read in the results
of the analysis from file fin_bu.ccm:

Postprocessing

Version 4.02

In the STAR GUIde window select the Post-Processing folder


Open the Load Data panel
Click Open Post File

First look at the velocity field in the fluid surrounding the fin:

In the main window, select C > New > Fluid


Click Cell Plot
Deselect the Bound Cell Plot Display Option button
Change the viewpoint to (0, 0, 1) by selecting View > Axis > +Z
In the Load Data panel, go to the Data tab
Select item Velocity Components UV option for Vector Data list and then
click Get Data to load the velocity field
10-9

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Post-Processing
Post- processing

Select Go To > Create Plots, where the plot style will be defined
In the 3-D Surface tab, check that Option Vector is selected and then choose
Edge from the Edge/Mesh menu
Click Plot to Screen to display Figure T10.1-3

Figure T10.1-3

Velocity vector plot

Now view the streamlines:

10-10

Click Go To Load Data


Select Cell & Wall/Bound (Smooth) from the Data Type menu
Select option Stream Function from the Calculated Scalar Data list
Click Get Data
Select Go To > Create Plots
In the 3-D Surface tab, select Option Contour (line)
Click Plot to Screen to display Figure T10.1-4

Version 4.02

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Post-Processing
Post- processing

Figure T10.1-4

Streamline plot

Examine the temperature profiles, first in the surrounding fluid and then in the solid
fin:

Version 4.02

Click Go To Load Data


Select item Temperature from the Scalar Data list
Click Get Data and then select Go to > Create Plots
In the Create Plots panel, choose Option Contour (filled)
Click Plot to Screen to display Figure T10.1-5
In the main window, select C > New > Solid
In the Create Plots panel, click Go To Load Data
In the Data tab, select Data Type Cell
Select item Temperature in the Scalar Data list and then click Get Data
To plot a smooth distribution ignoring boundary values, the cell data are
averaged by selecting Post > Caverage > Cset in the main window
Click Cell Plot to display Figure T10.1-6

10-11

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Post-Processing
Post- processing

Figure T10.1-5

Temperature plot in the fluid region

Figure T10.1-6

Temperature plot in the solid region

Heat flux data at the walls can be plotted as follows:

10-12

In the Data tab, select Data Type Wall


Select item Heat Flux from the Scalar Data list
Version 4.02

Tutorial 10.1

BUOYANCY DRIVEN FLOW AROUND A HEATED FIN

Post-Processing
Final Operations

Click Get Data

Collect the shells created by pro-STAR at the walls (i.e. cells of type 5) and plot:

Tools > Cell Tool


Select cell type 5 in the Cell Table scroll list
In the main window, select C > New > Type (Current)
Select Post > Caverage > Cset
Set the viewpoint to (1, 1, 1) by selecting View > Isometric > 1, 1, 1
Switch off the edge and mesh plotting facilities by clicking the edge and
mesh buttons
Select Plot > Wall Plot to display Figure T10.1-7

Figure T10.1-7

Final
Operations

Version 4.02

Wall plot of heat flux

Terminate the session

File > Quit > Quit, Nosave

10-13

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Pre-Processing
Preliminaries

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

This sub-tutorial examines the effect of surface-to-surface radiation on heat transfer


and temperature distribution. The boundary conditions remain the same as in
Tutorial 10.1, except that radiative surface properties such as emissivity and
reflectivity are now added. A surface-to-surface mode of radiative heat transfer is
assumed.
The aim of this tutorial is to show the user how to:

Model radiative heat transfer between walls through non-participating media


Use the Initial Field Restart option when resuming from a previous analysis
Compare results of different runs
Use pro-STARs OPERATE utility

Pre-Processing
Preliminaries A number of initial file copying operations are needed for proper operation of this
tutorial, as follows:

Create a sub-directory for the tutorial called tut10-2 and copy the model
file generated in Tutorial 10.1 (fin_bu.mdl) into it
Rename this file as fin_ra.mdl You will use this as a starting point for a
revised model that introduces radiation to the heat transfer calculations.
Since the solution obtained in Tutorial 10.1 will act as the starting point of the
present analysis, it is also necessary to copy the solution file for the
non-radiating case (fin_bu.ccm) to the current directory

Start up the pro-STAR GUI interface:

Type prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Accept the default case name (fin_ra) displayed in the Casename text box
Select the Resume existing .mdl file? option
Deselect the Append to .echo file? option
Click Continue

This will read all data contained in file fin_ra.mdl and will set up the model as
it was at the end of Tutorial 10.1.

In the main window, select File > Model Title


In the Title text box, change the title to:
BUOYANCY DRIVEN FLOW ROUND A HEATED FIN WITH
RADIATION

New
Boundary
Definitions

Click Apply

In problems where surface-to-surface radiation is being modelled, it is necessary to


provide radiative boundary information such as emissivity and reflectivity, for all
wall surfaces including solid-fluid interfaces.
Solid-fluid interface
This region is currently assigned to the default wall region (no. 0). You therefore

Version 4.02

10-15

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Pre-Processing
Thermal Options

need to define a new boundary region for it, extending round the entire fin
perimeter.

In the main window, turn off the Bound option in the Cell Plot Display
Options section
Select C > New > Solid
Click Cell Plot to display just the solid cells
In the STAR GUIde window, select folder Locate Boundaries and then open
the Create Boundaries panel
In the Regions tab, select region no. 4 in the scroll list
Select option Wall from the Type menu
Enter a region name (S-F_interface) in the Name box
Click Define region
In the main window, change the viewpoint to (1, 0, 0) by selecting View >
Axis > +X
Click Select a Zone and draw a closed polygon around the visible mesh
In the main window, change the viewpoint to (-1, 0, 0) by selecting View >
Axis > -X
Click Select a Zone and draw a closed polygon around the visible mesh
In the main window, change the viewpoint to (0, 1, 0) by selecting View >
Axis > +Y
Again, click Select a Zone and draw a closed polygon around the visible
mesh

The top and bottom adiabatic walls also need to be assigned explicitly to a separate
region, no. 5. This is because radiation patches (to be defined later) cannot be
applied to boundaries assigned to the default wall region 0.
Top wall

In the main window, select C > All


Click Cell Plot
In the Create Boundaries panel, select region no. 5 in the scroll list
Select option Wall from the Type menu
Enter a region name (T-B_wall) in the Name box
Click Define region
Click Select a Zone and draw a closed polygon around the visible mesh

Bottom wall

Thermal
Options

Switch radiation on, choosing the Discrete Transfer analysis method (DTRM). For
this case, use the default number of beams per patch (100) and neglect radiative
effects from the intervening gas:

10-16

Change the viewpoint to (0, -1, 0) by selecting View > Axis > -Y
Select C > Unselect > Zone and then draw a closed polygon around the (blue)
cells belonging to the fin
Click Cell Plot to display only cell faces belonging to the bottom wall
In the Regions tab, click Select a Zone and then draw a closed polygon
around the visible mesh

Select folder Thermophysical Models and Properties and then open the
Version 4.02

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Pre-Processing
Boundary Conditions

Thermal Options panel


In the Radiation section of the panel, select option Discrete Transfer Internal VF Calc.
Enter 100 in the Beams per patch box
Accept the displayed default settings in the rest of the panel and click Apply

For the chosen calculation method, surface-to-surface radiation can be tracked only
through cell types that are explicitly defined as participating in radiative heat
transfer. In this case, we assume that the fin is opaque and hence we only track
radiation through the fluid:

Boundary
Conditions

Open the Cell Table Editor using the CTAB button on the main window
Select Table# 1 in the scroll list
Select On from the Radiation pop-up menu
Click Apply
Close the Cell Table Editor

We must revisit the boundary conditions for all wall regions participating in
radiative heat transfer in order to define their emissivity and reflectivity. In this
case, we have not chosen to track radiation through the solid so we can ignore region
2 (the fin base). However, boundary conditions for the side walls need to be
updated.

Select folder Define Boundary Conditions and open the Define Boundary
Regions panel
Select region no. 1 in the scroll list
Specify the required radiation properties by entering the following data:
Emissivity box 0.5
Ther. Reflect. box 0.5
Accept the current values for the remaining parameters and click Apply

The boundary conditions for the solid-fluid interface should correspond to a


conducting wall with emissivity and reflectivity of 0.2 and 0.8, respectively.

Select region no. 4 in the scroll list


Select option Conduct. in the Wall Heat pop-up menu. This is essential for
solid-fluid interfaces that are not part of region 0.
Specify the required radiation properties:
Emissivity box 0.2
Ther. Reflect. box 0.8
Accept the current values for the remaining parameters and click Apply

Similarly, the top and bottom walls will be adiabatic radiative walls with emissivity
and reflectivity of 0.5:

Version 4.02

Select region no. 5 in the scroll list


Specify the required radiation properties:
Emissivity box 0.5
Ther. Reflect. box 0.5
Accept the current values for the remaining parameters and click Apply

10-17

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Pre-Processing
Patch Specification

Patch
All non-symmetry boundary regions need to be divided into radiation patches; these
Specification are used both during view factor calculations and for simulating radiative heat
transfer. The number of patches per region can be anything between a minimum of
one patch covering the entire region to a maximum of one patch per boundary face.
The accuracy of radiation calculations is directly proportional to the number of
patches per region. Given the two-dimensional character of the problem, it is
computationally reasonable to use the maximum number of patches. Patches will be
defined for all wall boundaries, with the exception of the fin base; no patches are
needed there as this surface does not participate in radiative heat transfer.

Checks

Check the boundaries by listing their properties and then displaying them
graphically:

10-18

In the main window, select the Bound Cell Plot Display Option. The fin base
boundaries should now be visible, lying in between the two sections of the
bottom wall boundaries.
Select B > New > Wall
Select B > Unselect > Region (Cursor Select) and then click on any
boundary belonging to the fin base. This removes all base boundaries from the
current set.
Select folder Locate Boundaries and open the Create Boundaries panel
Go to the Patches tab to create patches using one of the Automatic options
Check that option Current Boundary Set is selected in the Boundaries to
Patch menu
Select By Individual Boundary from the Patch Option menu
Click Apply

In the main window, choose Utility > Count > Boundaries and then check
the information displayed in the I/O window, i.e. number and type of regions
and number of boundaries in each region. You will need to type c in the I/O
window to scroll to the end of the list of boundary patches.
Select B > New > Wall
Select C > All
Change the viewpoint to (1, 1, 1) by selecting View > Isometric > 1, 1, 1
Switch on the edge plotting facility by clicking the edge button and then
click Cell Plot to display Figure T10.2-1

Version 4.02

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Pre-Processing
Checks

Figure T10.2-1

Wall boundary plot

Check the patch distribution:

Select Cell Plot Display Option Patch to display Figure T10.2-2

Figure T10.2-2

Version 4.02

Radiation patch plot

10-19

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

CFD Analysis
Final Operations

Final
Operations

It is possible to restart the analysis from the previous non-radiating solution, but
since new boundaries have been added we need to use the initial field restart
option.

In the STAR GUIde window, select the Analysis Preparation/Running folder


and open the Analysis (Re)Start panel
Choose Restart File Option Initial Field Restart.
Click the browser button next to the Restart File box, select file
fin_bu.ccm from the browser dialog and then click OK
Check that the Initial Field Restart menu is set to Restart (New Boundary
Types)
Click Apply

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the geometry and problem files and exit from
pro-STAR, as shown below. Alternatively, you may continue with the CFD
analysis, using the STAR GUIde facilities for running STAR interactively. This
process is described in the next section.

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, enter 0.01 in the Scale Factor box
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
To perform the analysis interactively, proceed as follows:

In the main pro-STAR panel, select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Accept the default Scale Factor of 0.01
Select the Double Precision option
Click Write New Geometry File
Click the Restart Analysis button

Note that the starting iteration number is shown as no. 1 despite the fact that this is
a restart run. This is because we have chosen the initial field restart option.
The analysis will start with the calculation of view factors which are then stored
in file fin_ra.vfs. These can be used again in future runs as long as the
boundaries and patch definitions have not changed. If, however, such changes have
been made, you can instruct STAR to re-calculate the view factors through the
-noskip option.
Post-Processing
Preliminaries Check that both the solution file from this tutorial (fin_ra.ccm) and the one from
the previous tutorial (fin_bu.ccm) are present in your working directory.
10-20

Version 4.02

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Post-Processing
Post- processing

Comparisons will be drawn between the two.


Postprocessing

First look at the temperature distribution in the fluid:

In the STAR GUIde window, select the Post-Processing folder and open the
Load Data panel
In the File(s) tab, click Open Post File
Deselect the Patch Cell Plot Display Option in the main window
Click Cell Plot
Change the viewpoint to (0, 0, 1) by selecting View > Axis > +Z
Select C > New > Fluid
In the Load Data panel, go to the Data tab
Choose Cell & Wall/Bound (Smooth) as the Data Type
Select item Temperature from the Scalar Data list
Click Get Data and then select Go To > Create Plots
In the 3-D Surface tab, choose plot options Contour (filled) and Edge
Click Plot to Screen to display Figure T10.2-3

Figure T10.2-3

Temperature contours in the fluid region

To compare the temperatures of the radiation and no-radiation cases, first load the
no-radiation solution file:

Click Go To Load Data


In the Load Data panel, select the File(s) tab
Use the built-in browser to select file fin_bu.ccm, whose name should
then appear inside the Steady State Post File box
Click Open Post File

To examine the temperature differences, you will need to use pro-STARs


OPERATE utility as follows:
Version 4.02

10-21

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Post-Processing
Post- processing

In the main window, select Post > Operate


In the Post Register Operations dialog, select Function > Load Cell Data >
Temperature
Select Load Cell Temperature into Register 2 using Absolute Values
Click Apply

Re-load the results of the radiation case by reading the calculated cell temperatures
stored in file fin_ra.ccm and then store them in post register 1:

In the File(s) tab, use the built-in browser to select file fin_ra.ccm, whose
name should appear inside the Steady State Post File box
Click Open Post File
In the Post Register Operations dialog, select Register 1 from the registers
pop-up menu
Click Apply

Calculate the required differences by subtracting the no-radiation from the radiation
temperatures and putting the results in register 4 (the one normally used for scalar
data contour plots).

In the Post Register Operations dialog, select Function > Multi-Register >
Subtract
In the Post Register Operations dialog, select Register 4 = Register 1 Register 2
Click Apply
Close the Post Register Operations dialog

Now plot the differences:

10-22

Select Post > Caverage > Cset


In the main window, click Replot to display Figure T10.2-4

Version 4.02

Tutorial 10.2

SURFACE-TO-SURFACE RADIATION

Post-Processing
Final Operations

Figure T10.2-4

Contour plot of temperature difference caused by use of radiation model

It can be seen that the introduction of the radiation model has a significant effect on
the fluid temperature distribution across the domain.
The temperature differences in the solid region can be examined in a similar way.
However, they are much less significant, with the variation less than 0.1% of the
no-radiation temperature value.
Final
Operations

Version 4.02

Terminate the session.

File > Quit > Quit, Nosave

10-23

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Pre-Processing
Preliminaries

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

This sub-tutorial examines the effect of replacing the aluminium fin present in the
previous two tutorials of this set by an identically-shaped fin made of transparent
material (Pyrex glass). As in Tutorial 10.2, the analysis includes the effects of
surface-to-surface radiation on heat transfer and temperature distribution. This time,
however, the effect of the intervening media (air and transparent solid) on the
thermal radiation passing through and being absorbed by them is also investigated.
This tutorial aims to show the user how to:

Model radiative heat transfer in the presence of participating media


Specify material properties (including radiative properties) for transparent
solid domains
Use the Discrete Ordinates method (DORM) to solve the problem. Unlike the
Discrete Transfer method (DTRM) employed in Tutorial 10.2, DORM does
not require radiation patches on the boundaries.

Pre-Processing
Preliminaries A number of initial file copying operations are needed for proper operation of this
tutorial, as follows:

Create a sub-directory for this tutorial called tut10-3 and copy the model
file generated in Tutorial 10.1 (fin_bu.mdl) into it
Rename this file as fin_dorm.mdl You will use this as a starting point for
a revised model that includes the transparent solid.
Since the solution obtained in Tutorial 10.1 will act as the starting point of the
present analysis, it is also necessary to copy the solution file for the
non-radiating case (fin_bu.ccm) to the current directory

Start up the pro-STAR GUI interface:

Type prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Accept the default case name (fin_dorm) displayed in the Casename text box
Select the Resume existing .mdl file? option
Deselect the Append to .echo file? option
Click Continue

This will read all data contained in file fin_dorm.mdl and will set up the model
as it was at the end of Tutorial 10.1.

In the main window, select File > Model Title


In the Title text box, change the title to:
BUOYANCY DRIVEN FLOW ROUND A HEATED TRANSPARENT FIN

Click Apply

Radiative and As mentioned in Tutorial 10.2, radiation can be tracked only through cell types that
Thermal
are explicitly defined as participating in radiative heat transfer. Since in this case the
Properties
solid cells are transparent, both fluid and solid cells need to be given this property:
Version 4.02

10-25

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Pre-Processing
New Boundary Definitions

Open the Cell Table Editor using the CTAB button on the main window
Select Table# 1 (the Fluid cell type) in the scroll list
Select On from the Radiation menu
Click Apply
Select Table# 2 (the Solid cell type) in the scroll list
Select On from the Radiation menu
Type Pyrex in the Name box
Click Apply
Close the Cell Table Editor

Specify that both fluid and solid regions will participate in the radiative heat
exchange:

Go to the STAR GUIde window and select the Thermophysical Models and
Properties folder
Open the Thermal Options panel
Select Discrete Ordinates for the Radiation option
In the Radiation section, change the Discrete Ordinate Set option to S2. This
is the lowest accuracy setting but will ensure that a solution can be reached
relatively quickly (see Capabilities and Limitations of the DORM Method
on page 7-7 of the CCM User Guide).
In this panel, note that option (Solid-Fluid) Heat Transfer On is already
selected
Click Apply

Define relevant material properties:

New
Boundary
Definitions

The top and bottom adiabatic walls as well as the solid-fluid interface are currently
assigned to the default wall region (no. 0). You therefore need to define a separate
boundary region for the interface, extending round the entire fin perimeter, in order
to assign the appropriate radiative surface properties to it.

10-26

Select the Liquids and Gases folder


Open the Thermal Models panel and then click Show Options
Check the default values for the absorption and scattering coefficients (0.1
and 0, respectively). These are reasonable for air.
Click Apply
Select the Solids folder
Open the Material Properties panel and select Material # 2 using the slider at
the bottom of the panel
Type the transparent solid name (Pyrex) in the Name box
Specify appropriate thermal properties for the solid material as follows:
Density 2230
Conductivity 1.35
Specific Heat 837.4
Click Apply
Open the Radiative Properties panel
Enter 0 for both the absorption and scattering coefficients of the solid material
Click Apply

In the main window, turn off the Bound option in the Cell Plot Display
Version 4.02

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Pre-Processing
Boundary Conditions

Boundary
Conditions

Options section
Select C > New > Solid
Click Cell Plot to display just the solid cells
In the STAR GUIde window, select folder Locate Boundaries and then open
the Create Boundaries panel
In the Regions tab, select region no. 4 in the scroll list
Select option Wall from the Type menu
Enter a region name (S-F_interface) in the Name box
Click Define region
In the main window, change the viewpoint to (1, 0, 0) by selecting View >
Axis > +X
Click Select a Zone and draw a closed polygon around the visible mesh
In the main window, change the viewpoint to (-1, 0, 0) by selecting View >
Axis > -X
Click Select a Zone and draw a closed polygon around the visible mesh
In the main window, change the viewpoint to (0, 1, 0) by selecting View >
Axis > +Y
Again, click Select a Zone and draw a closed polygon around the visible
mesh

You must now revisit the boundary conditions of all wall regions in order to define
their emissivity, reflectivity and transmissivity.
Region 1 (side walls)
Specify surface properties for the side walls:

Select folder Define Boundary Conditions and open the Define Boundary
Regions panel
Select region no. 1 in the scroll list
Specify the required radiation properties by entering the following data:
Emissivity box 0.5
Ther. Reflect. box 0.5
Accept the current values for the remaining parameters and click Apply

Region 2 (the fin base)


Define surface properties for the fin base. In addition, change its temperature to 593
K to compensate for the lower thermal conductivity of the glass:

Select region no. 2 in the scroll list


Specify the required temperature and radiation properties:
Temperature box 593
Emissivity box 0.5
Ther. Reflect. box 0.5
Accept the current values for the remaining parameters and click Apply

Region 4 (the fluid-solid interface)


The solid-fluid interfaces properties have to be set so as to reflect the fact that the
solid is transparent:

Version 4.02

Select region no. 4 in the scroll list


Change the Wall Heat option to Conduct. This is essential for solid-fluid
10-27

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Pre-Processing
Final Operations

interfaces that are not part of region 0.


Specify appropriate radiation properties:
Emissivity box 0.0
Ther. Reflect. box 0.0
Ther. Transmis. box 1.0, i.e. the interface is totally transparent
Accept the current values for the remaining parameters and click Apply

Note that the above values imply that the absorptivity of the interface (1 transmissivity - reflectivity = 0) is consistent with the absorptivity defined earlier
for the new solid material.
Region 0 (top amd bottom walls)
As for the side walls, the top and bottom walls will be assigned an emissivity and
reflectivity of 0.5:

Final
Operations

Select region no. 0 in the scroll list


Specify the required radiation properties:
Emissivity box 0.5
Ther. Reflect. box 0.5
Accept the current values for the remaining parameters and click Apply

It is possible to restart the analysis from the previous non-radiating solution, but
since new boundaries have been added we need to use the initial field restart
option.

In the STAR GUIde window, select the Analysis Preparation/Running folder


and open the Analysis (Re)Start panel
Choose Restart File Option Initial Field Restart.
Click the browser button next to the Restart File box, select file
fin_bu.ccm from the browser dialog and then click OK
Check that the Initial Field Restart menu is set to Restart (New Boundary
Types)
Check that the Iteration Counter option is set to Reset
Click Apply

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the geometry and problem files and exit from
pro-STAR, as shown below. Alternatively, you may continue with the CFD
analysis, using the STAR GUIde facilities for running STAR interactively. This
process is described in the next section.

10-28

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, check that 0.01 appears in the Scale Factor
box
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

Version 4.02

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

CFD Analysis
Preliminaries

CFD Analysis
To perform the analysis interactively, proceed as follows:

In the main pro-STAR panel, select File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Accept the default Scale Factor of 0.01
Select the Double Precision option
Click Write New Geometry File
Click the Restart Analysis button

Note that the starting iteration number is shown as no. 1 despite the fact that this is
a restart run. This is due to the initial field restart options specified.
Post-Processing
Preliminaries Read in the results of the analysis from file fin_dorm.ccm:

Postprocessing

First look at the velocity field in the fluid surrounding the fin:

Version 4.02

In the STAR GUIde window select the Post-Processing folder


Open the Load Data panel
Click Open Post File

In the main window, select C > New > Fluid


Click Cell Plot
Change the viewpoint to (0, 0, 1) by selecting View > Axis > +Z
In the Load Data panel, go to the Data tab
Select item Velocity Components UV option for Vector Data list and then
click Get Data to load the velocity field
Select Go To > Create Plots, where the plot style will be defined
In the 3-D Surface tab, check that Option Vector is selected and then choose
Edge from the Edge/Mesh menu
Click Plot to Screen to display Figure T10.3-1

10-29

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Post-Processing
Post- processing

Figure T10.3-1

Velocity vectors

Examine the temperature profiles, both in the surrounding fluid and in the solid fin:

10-30

Click Go To Load Data


Select Cell & Wall/Bound (Smooth) from the Data Type menu
Select item Temperature from the Scalar Data list
Click Get Data and then select Go to > Create Plots
In the 3-D Surface panel, choose Option Contour (filled)
Click Plot to Screen to display Figure T10.3-2
In the main window, select C > New > Solid
In the Create Plots panel, click Go To Load Data
In the Data tab, select Data Type Cell
Select On and Cset for the Smooth Option
Select item Temperature from the Scalar Data list
Click Get Data
Click Cell Plot to display Figure T10.3-3

Version 4.02

Tutorial 10.3

RADIATION THROUGH A TRANSPARENT SOLID

Post-Processing
Final Operations

Final
Operations

Version 4.02

Figure T10.3-2

Temperature contours in the fluid region

Figure T10.3-3

Temperature contours in the solid region

Terminate the session.

File > Quit > Quit, Nosave

10-31

Tutorial 11 MOVING GRIDS


To be included in the next STAR-CD 4 release.

Version 4.02

11-1

11-2

Version 4.02

Tutorial 12 EULERIAN TWO-PHASE FLOW


The following tutorials are intended to familiarise users with the process of setting
up Eulerian two-phase simulations. The four cases presented are:
1. Bubble terminal velocity simulation
2. Bubbly flow in which bubbles are allowed to escape through the free surface
of the liquid
3. Fluidised bed simulation
4. Boiling simulation

Version 4.02

12-1

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

In this case, air bubbles and water are injected at the bottom of a vertical channel at
1 m/s. The main forces acting on the bubbles are buoyancy and drag. Starting at the
inlet, the bubbles are accelerated due to buoyancy but pulled back due to drag from
the surrounding water and reach their terminal rise velocity when the drag force is
balanced by the buoyancy force. Mathematically, we can express this force balance
as:
2
3
C
d
2d
---------- g = ------D- c u r ---------4
6
2

where d is the bubble diameter, the density, = c d the density


difference between the two phases, g the acceleration of gravity, C D the drag
coefficient and u r = u c u d the relative velocity between the two phases.
Subscripts c and d denote the continuous and dispersed phase, respectively.
The above equation can be re-arranged to give an expression for the relative
velocity between the phases, which in this case is also the bubble terminal rise
velocity:
ur =

4 gd
-- ------ ------3 c C D

In this tutorial we will use the following data for the two phases:

Phase 1 is water with density of 1000 kg/m3 and viscosity of 0.001 kg/m/s
Phase 2 is air bubbles of 2 mm diameter with density of 1 kg/m3 and viscosity
of 1 105 kg/m/s

Assuming C D = 0.44 and substituting the physical properties of the two phases into
the above equation, we obtain:
ur =

29.7d

For 2mm bubbles, the relative velocity is 0.24 m/s. Since the water phase is moving
up the channel at 1 m/s, the terminal rise velocity of the bubbles is 1.24 m/s.
We will now set up this case, carry out an Eulerian two-phase flow calculation
and check whether the computed bubble rise velocity agrees with the value given
by the equations above.

12-2

Version 4.02

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Pre-Processing
Preliminaries

0.1 m
Outlet
gy

1.0 m
Slip wall on
all side walls

x
Inlet
Figure T12.1-1

Schematic of vertical flow channel

Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut12-1. The mesh for this problem
is supplied in advance, i.e. cell, vertex, boundary and problem setup files
(channel.cel, channel.vrt, channel.bnd and channel.inp,
respectively) are available in the STAR-CD installation directories. Therefore,
before starting the tutorial, make sure that these files are copied into your current
directory.

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (say, ter_vel) in the Casename text box
Click Continue

Read in the available problem data:

Select File > Read File... in the main pro-STAR window


In the Input Coded Command File dialog check that the File Name is
channel.inp
Click Apply
Click Close

This will read default problem settings from file channel.inp plus the
problems cell, vertex and boundary location definitions from the remaining three
files.

In the main window, select File > Model Title


In the Title text box type:
TERMINAL VELOCITY OF BUBBLES

Version 4.02

12-3

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Pre-Processing
Material Properties and Thermofluid Models

Click Apply

Verify that the correct mesh has been imported by selecting all cells and plotting the
mesh in Hidden Surface mode:

In the main window, select C > All


Check that Hidden Surface is the default cell plot type
Select View > Isometric > 1, 1, 1. A 2D mesh corresponding to Figure
T12.1-1 should appear on your screen.
Click Cell Plot
Select View > Axis > +Z

Make sure that the STAR-GUIde window is displayed on your screen, next to the
main pro-STAR window.

Open the Select Analysis Features panel

This enables you to set the basic features of your model and ensures that only those
panels that are essential for your analysis are activated. For this tutorial, the
following special settings are required:

Material
Properties
and
Thermofluid
Models

Select option Eulerian Multi-Phase from the Multi-Phase Treatment menu


Click Apply

We now assign physical properties to the two phases:

Select the Thermophysical Models and Properties folder


Open the Gravity panel and change the Direction of Gravity Force to (0, -1, 0)
Click Apply
Select the Liquid and Gases folder
Open the Molecular Properties panel
Make sure the Phase# slider at the bottom of the panel is in the Phase#1
position
Assign appropriate property values for phase 1. Thermal properties are not
relevant in this case so they may be left at their default values:
Name Water
Density 1000
Molecular Viscosity 0.001
Click Apply
Move the Phase# slider to the Phase#2 position
Assign appropriate property values for phase 2 as follows:
Name Air
Density 1
Molecular Viscosity 1.0e-5
Click Apply

Initialize phase 1 field values as follows:

12-4

Open the Initialization panel


Make sure the Phase# slider at the bottom of the panel is in the Phase#1
position
Set the V velocity to 1 m/s
Version 4.02

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Pre-Processing
Boundary Conditions

Click Apply

Initialize phase 2 field values as follows:

Move the Phase# slider to the Phase#2 position


Set the V velocity to 1 m/s
Set the Volume fraction to 0.001
Click Apply

Select locations for the pressure reference and monitoring cells as follows:

Open the Monitoring and Reference Data panel


Click the mouse icon button next to the Monitoring cell number box and then
pick the top middle cell in the main window (or enter 150 in the box).
Click the mouse button next to the Reference Pressure Cell Number box and
then pick the top right hand corner cell in the main window (or enter 250 in
the box).
Click Apply

Turn on the buoyancy force as follows:

Open the Buoyancy panel


Click On
Select option Centroid of pressure reference cell for the datum location
Select option Use reference and/or initial values, together with Reference
pressure and Reference temperature for the datum density value
Click Apply

We now define the interaction between the two phases:

Select the Eulerian Multi-Phase folder followed by the Interphase Momentum


Transfer sub-folder
Open the Drag Forces panel
Select Constant in the menu at the top of the panel and accept the default
Drag Coefficient value of 0.44 shown in the Constant box
Click Apply

Set the bubble diameter to 2 mm:

Boundary
Conditions

First we re-define all walls as slip walls:

Version 4.02

Open the Particle Size panel


Enter 0.002 in the Mean Diameter box.
Click Apply

Select the Define Boundary Conditions folder and then open the Define
Boundary Regions panel
Select Reg#0 for Wall in the scroll list
Move the Phase# slider at the bottom of the panel to the Phase#1 position
Select Slip from the Slip Option menu
Click Apply
Move the Phase# slider to the Phase#2 position
Select Slip from the Slip Option menu
Click Apply
12-5

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Pre-Processing
Analysis Controls

We now define the inlet conditions:

Select Reg#1 in the scroll list


Move the Phase# slider at the bottom of the panel to the Phase#1 position
Enter 1 m/s for the V velocity and 1000 kg/m3 for the Density
Click Apply
Move the Phase# slider to the Phase#2 position
Enter 1 m/s for the V velocity, 1 kg/m3 for the Density and 0.001 for the Vol.
Fraction
Click Apply

No extra input is needed for the Outlet boundary.


Analysis
Controls

We will now specify various solver parameters required for this case:

Run Time
Controls

Set the number of iterations to 1000 for this case:

Final
Operations

Select the Analysis Preparation/Running folder


Open the Set Run Time Controls panel
Change the Number of Iterations to 1000 and the Max. Residual Tolerance to
1.0e-5
Click Apply

If you wish to terminate the session at this stage, write the geometry and problem
files and exit from pro-STAR, saving the model data as shown below:

12-6

Select folder Analysis Controls followed by Solution Controls followed by


Equation Behavior
Open the Primary Variables panel and go to the Equation Status tab
Move the Phase# slider at the bottom of the panel to the Phase#1 position
Deselect item W-mom since we are solving a 2D flow in the x-y plane only
Click Apply
Move the Phase# slider to the Phase#2 position
Deselect item W-mom
Click Apply
Go to the Solver Parameters tab
Move the Phase# slider to the Phase#1 position
Change the Relaxation Factor to 0.3 for Momentum and 0.1 for Pressure
Click Apply
Move the Phase# slider to the Phase#2 position
Change the Relaxation Factor to 0.3 for Momentum and 0.1 for Volume
Fraction
Click Apply

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

Version 4.02

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

CFD Analysis
Final Operations

CFD Analysis
You can now continue with the CFD analysis, using the STAR GUIde facilities for
running STAR interactively without quitting pro-STAR. Alternatively, you may
run the CFD analysis (in double precision) by typing
star -dp
in your session window.
Post-Processing
Examine the velocities of the two phases at the channel exit: the water velocity
(phase 1) should remain close to 1 m/s and the bubble velocity (phase 2) should be
around 1.24 m/s, as calculated by equation above. This can be done very effectively
by plotting the monitored value for the V velocity as follows:

Select folder Analysis Preparation/Running


Open the Run History of Previous Analysis panel
Select item V-Component and then move the Phase# slider to the Phase#1
position
Click Plot Monitor History to display monitored values for the V-velocity
component of phase 1, as shown in Figure T12.1-2

Figure T12.1-2

Version 4.02

V-velocity history plot for phase 1

Move the Phase# slider to the Phase#2 position


Click Plot Monitor History to display monitored values for the V-velocity
component of phase 2, as shown in Figure T12.1-3
In the main window, select File > Quit > Quit,Nosave
12-7

Tutorial 12.1

TERMINAL VELOCITY OF BUBBLES

Suggestions for Further Exercises


Final Operations

Figure T12.1-3

V-velocity history plot for phase 2

Suggestions for Further Exercises


Other bubble rise cases
You may wish to repeat this tutorial with different input parameters; for example,
change the density of the fluid or use a different bubble diameter. Recalculate the
terminal velocity using equation and compare the answer with the simulation
results.
Terminal velocity of solid particles
Another exercise you may want to perform is to simulate the terminal velocity of a
falling solid sphere. In this case, both phases are moving in the same direction as
gravity (downwards). To re-use the setup described above, you can simply change
the gravity vector direction to (0, 1, 0). Try this exercise with the following
parameters:

Phase 1 is water, density = 1000, viscosity = 0.001


Phase 2 is steel spheres, density = 8000, viscosity = 1.0e-5, diameter = 1.0e-4

Substituting these parameters into equation , we get:


ur =

208.1d

For steel spheres of 1.0e-4m diameter, the terminal velocity is 1.144 m/s with the
background fluid moving at 1 m/s. The terminal velocity relative to the background
fluid is 0.144 m/s.

12-8

Version 4.02

Tutorial 12.2

AERATION TANK

Pre-Processing
Preliminaries

Tutorial 12.2

AERATION TANK

Aeration is used in many process industries. Air or gas bubbles are injected into a
liquid to promote mixing and mass transfer of chemical species between the phases.
An example of this is the transfer of oxygen from air bubbles to a liquid for
oxidation reactions.
In this tutorial, we consider an aeration tank commonly used in the treatment of
waste water.
2m
Degassing
outlet
gy
1m

x
Air inlet
Figure T12.2-1

Outline of an aeration tank

Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut12-2. The mesh for this problem
is supplied in advance, i.e. cell, vertex, boundary and problem setup files
(tank.cel, tank.vrt, tank.bnd and tank.inp, respectively) are available
in the STAR-CD installation directories. Therefore, before starting the tutorial,
make sure that these files are copied into your current directory.

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (say, aer_tank) in the Casename text box
Click Continue

Read in the available problem data:

Select File > Read File... in the main pro-STAR window


In the Input Coded Command File dialog check that the File Name is
tank.inp
Click Apply
Click Close

This will read default problem settings from file tank.inp plus the problems
cell, vertex and boundary location definitions from the remaining three files.
Version 4.02

12-9

Tutorial 12.2

AERATION TANK

Pre-Processing
Material Properties and Thermofluid Models

In the main window, select File > Model Title


In the Title text box type:
AERATION TANK

Click Apply

Verify that the correct mesh has been imported by selecting all cells and plotting the
mesh in Hidden Surface mode:

In the main window, select C > All


Check that Hidden Surface is the default cell plot type
Select View > Isometric > 1, 1, 1. A 2D mesh corresponding to Figure
T12.2-1 should appear on your screen.
Click Cell Plot
Select View > Axis > +Z

Make sure that the STAR-GUIde window is displayed on your screen, next to the
main pro-STAR window. This enables you to set the basic features of your model
and ensures that only those panels that are essential for your analysis are activated.

Material
Properties
and
Thermofluid
Models

Open the Select Analysis Features panel and check the current settings. It will
be seen that option Eulerian Multi-Phase is already selected from the
Multi-Phase Treatment menu so no further adjustment is necessary.

We now assign physical properties to the two phases.

Select the Thermophysical Models and Properties folder


Open the Gravity panel and change the Direction of Gravity Force to (0, -1, 0)
Click Apply
Select the Liquid and Gases folder
Open the Molecular Properties panel
Make sure the Phase# slider at the bottom of the panel is in the Phase #1
position
Assign appropriate property values for phase 1. Thermal properties are not
relevant in this case so they may be left at their default values:
Name Water
Density 1000
Molecular Viscosity 0.001
Click Apply
Move the Phase# slider to the Phase#2 position
Assign appropriate property values for phase 2 as follows:
Name Air
Density 1
Molecular Viscosity 1.0e-5
Click Apply

Specify that the flow is turbulent and set up the turbulence drag force:

12-10

Open the Turbulence Models panel


In the Turbulence tab, click On and then Apply
Go to the Multiphase Options tab
Version 4.02

Tutorial 12.2

AERATION TANK

Pre-Processing
Boundary Conditions

Select option Bubble-Eddy Interaction from the Ct Model menu


Select On for Turbulence Drag and then click Apply

Initialise phase 1 field values as follows:

Open the Initialization panel


Move the Phase# slider at the bottom of the panel to the Phase#1 position
Click Apply, since the default values are all acceptable.

Initialise phase 2 values as follows:

Move the Phase# slider to the Phase#2 position


Set the Volume fraction to 0.001
Click Apply

Select locations for the pressure reference and monitoring cells as follows:

Go to the Monitoring and Reference Data panel


Click the mouse icon button next to the Monitoring cell number box and then
pick a cell above the air injector in the top row of cells (or enter 650 in the
box).
Click the mouse button next to the Reference Pressure Cell Number box and
then pick the top right hand corner cell in the main window (or enter 5000 in
the box).
Click Apply

Turn on the buoyancy force as follows:

Open the Buoyancy panel


Click On
Select option Centroid of pressure reference cell for the datum location
Select option Use reference and/or initial values, together with Reference
pressure and Reference temperature for the datum density value
Click Apply

We now define the interactions between the two phases:

Select the Eulerian Multi-Phase folder followed by the Interphase Momentum


Transfer sub-folder
Open the Drag Forces panel
Select Bubbles in the menu at the top of the panel
Click Apply

Set the bubble diameter to 3 mm:

Boundary
Conditions

We now define boundary conditions at the inlet:

Version 4.02

Open the Particle Size panel


Enter 0.003 in the Mean Diameter box
Click Apply

Select the Define Boundary Conditions folder and then open the Define
Boundary Region panel
Select Reg#1 in the scroll list
12-11

Tutorial 12.2

AERATION TANK

Pre-Processing
Analysis Controls

Move the Phase# slider at the bottom of the panel to the Phase#1 position
Enter 1000 kg/m3 for Density
Click Apply

Define the injection of air bubbles (phase 2) at the inlet:

Move the Phase# slider to the Phase#2 position


Enter 0.25 m/s for the V velocity, 1 kg/m3 for Density and 0.5 for the Vol.
Fraction
Click Apply

No user input is needed for Reg#2 in the scroll list which is already defined as the
Degassing outlet.
Analysis
Controls

We will now specify appropriate solver parameters for this case:

Run Time
Controls

Set the number of iterations to 6,000 for this case:

Final
Operations

Select the Analysis Preparation/Running folder


Open the Set Run Time Controls panel
Change the Number of Iterations to 6000 and the Max. Residual Tolerance to
1.0e-4
Click Apply

If you wish to terminate the session at this stage, write the geometry and problem
files and exit from pro-STAR, saving the model data as shown below:

12-12

Select folder Analysis Controls followed by Solution Controls followed by


Equation Behavior
Open the Primary Variables panel and go to the Equation Status tab
Move the Phase# slider at the bottom of the panel to the Phase#1 position
Deselect item W-mom since we are solving a 2D flow in the x-y plane only.
Click Apply
Move the Phase# slider to the Phase#2 position
Deselect item W-mom
Click Apply
Go to the Solver Parameter tab
Move the Phase# slider to the Phase#1 position
Change the Relaxation Factor to 0.3 for Momentum and 0.1 for Pressure.
Click Apply
Move the Phase# slider to the Phase#2 position
Change the Relaxation Factor to 0.3 for Momentum and 0.1 for Volume
Fraction.
Click Apply

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

Version 4.02

Tutorial 12.2

AERATION TANK

CFD Analysis
Preliminaries

CFD Analysis
You may continue with the CFD analysis, using the STAR GUIde facilities for
running STAR interactively without quitting pro-STAR. Alternatively, you may
run the CFD analysis (in double precision) by typing
star -dp
in your session window.
Post-Processing
Preliminaries Use pro-STAR to check the analysis results by first reading in the data stored in file
aer_tank.ccm:

Postprocessing

First, examine the velocity of phase 1:

Version 4.02

Select folder Post-Processing


Open the Load Data panel to display the File(s) tab
Click Open Post File

Go to the Data tab and check that Data Type Cell is selected
Check that the Phase# slider is in the Phase #1 position
In the Vector Data list, select item Velocity Components UV to load the two
velocity components in the plane of analysis for phase 1
Click Get Data
Select Go To > Create Plots to open the Create Plots panel
In the 3-D Surface tab, select Vector from the Option menu and Edge from
the Edge/Mesh menu
Click Plot to Screen to display Figure T12.2-2

12-13

Tutorial 12.2

AERATION TANK

Post-Processing
Post- processing

Figure T12.2-2

Velocity vector plot for phase 1

Next, plot velocity vectors of phase 2:

12-14

Go back to the Load Data panel by clicking Go To Load Data


Move the Phase# slider to the Phase #2 position
In the Vector Data list, select item Velocity Components UV to load the two
velocity components in the plane of analysis for phase 2
Click Get Data
In the main window click Replot to display Figure T12.2-3

Version 4.02

Tutorial 12.2

AERATION TANK

Post-Processing
Post- processing

Figure T12.2-3

Velocity vector plot for phase 2

Finally, display a contour plot of the phase 2 volume fraction:

Version 4.02

In the Data tab, select option Cell & Wall/Bound (Smooth) from the Data
Type menu
In the Vector Data list, select None
In the Scalar Data list, select item Volume Fraction and then click Get Data
Select Go To > Create Plots to display the Create Plots panel
In the 3-D Surface tab, select plot options Contour (filled) and Edge
Click Plot to Screen to display Figure T12.2-4

12-15

Tutorial 12.2

AERATION TANK

Suggestions for Further Exercises


Post- processing

Figure T12.2-4

Phase 2 volume fraction contour plot

It will be seen that bubbles rise from the injection point to the top surface. The rising
bubbles also lift the water around them and create an up-flow of liquid above the
injector. Under the top surface, the flow turns horizontally to the right and then
downwards on the right-hand-side of the tank. The bubbles are carried by the flow
and spread across the top surface, some being carried downwards again by the
down-flow on the right-hand-side.
Suggestions for Further Exercises
Bubble columns
Changing the geometry of this tutorial to a cylindrical tank results in a model for a
bubble column.
Gas-liquid mixing vessels
Adding a rotating impeller to the tank results in a model for a gas-liquid mixing
vessel (see Tutorial 11.2 describing the setup of a moving-mesh case involving a
rotating impeller).

12-16

Version 4.02

Tutorial 12.3

FLUIDISED BED RISER

Pre-Processing
Preliminaries

Tutorial 12.3

FLUIDISED BED RISER

This tutorial is intended to familiarise users with the process of setting up an


Eulerian two-phase calculation for fluidised beds.
Fluidised beds are used in many process industries for drying, gasification and
burning of coal particles and in fluidised catalytic crackers (FCCs). Usually the
lower portion of the equipment is loaded with solid particles. The particle
concentration is close to the maximum packing limit, around 63% in volume
fraction. A gas is blown through the bottom inlet boundary and through the
particles, lifting and moving them by virtue of drag forces. The particle motions are
random and constantly changing with time, hence it is necessary to model fluidised
beds in transient mode. Often, the gas moves through the particles in the form of
large gas pockets called bubbles.
In this tutorial, we consider a simple fluidised bed similar to the riser of a
fluidised catalytic cracker unit.
0.15m 0.15m
Pressure
outlet
Free board

gy
1m

Fluidised bed
y
x
Air inlet
Figure T12.3-1

Outline of a FCC riser

Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut12-3. The mesh for this problem
is supplied in advance, i.e. cell, vertex, boundary and problem setup files
(riser.cel, riser.vrt, riser.bnd and riser.inp, respectively) are
available in the STAR-CD installation directories. Therefore, before starting the
tutorial, make sure that these files are copied into your current directory.

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (say, fcc_riser) in the Casename text box
Click Continue

Read in the available problem data:

Version 4.02

Select File > Read File... in the main pro-STAR window


12-17

Tutorial 12.3

FLUIDISED BED RISER

Pre-Processing
Material Properties

In the Input Coded Command File dialog check that the File Name is
riser.inp
Click Apply
Click Close

This will read default problem settings from file riser.inp plus the problems
cell, vertex and boundary location definitions from the remaining three files.

In the main window, select File > Model Title


In the Title text box type:
FLUIDISED BED RISER

Click Apply

Verify that the correct mesh has been imported by selecting all cells and plotting the
mesh in Hidden Surface mode:

In the main window, select C > All


Check that Hidden Surface is the default cell plot type
Select View > Isometric > 1, 1, 1. A 2D mesh corresponding to Figure
T12.3-1 should appear on your screen.
Click Cell Plot
Select View > Axis > +Z

Make sure that the STAR-GUIde window is displayed on your screen, next to the
main pro-STAR window.

Open the Select Analysis Features panel

This enables you to set the basic features of your model and ensures that only those
panels that are essential for your analysis are activated. For this tutorial, the
following special settings are required:

Material
Properties

Select option Transient from the Time Domain menu


Select option Eulerian Multi-Phase from the Multi-Phase Treatment menu
Click Apply

We now assign physical properties to the two phases:

Select the Thermophysical Models and Properties folder


Open the Gravity panel and change the Direction of Gravity Force to (0, -1, 0)
Click Apply
Select the Liquid and Gases folder
Open the Molecular Properties panel

Assign appropriate property values to phase 1. Thermal properties are not relevant
in this case so they may be left at their default values.

12-18

Make sure the Phase# slider at the bottom of the panel is in the Phase#1
position
Enter the following values:
Name Air
Density 1.205
Version 4.02

Tutorial 12.3

FLUIDISED BED RISER

Pre-Processing
Initialisation

Molecular Viscosity 1.81e-5


Click Apply

Assign appropriate property values to phase 2. In this case, the only relevant
property is the particle density. However, in the Other Model Settings section, the
kinetic theory model will be used to calculate solid-phase forces and this employs
an internally calculated solid-phase viscosity. Since the value supplied in the current
panel is added to the calculated one and in order not to affect the latter, the panels
phase viscosity should to be set to a very small value.

Initialisation

Move the Phase# slider to the Phase#2 position


Enter the following values:
Name Solid
Density 2600
Viscosity 1.0e-6
Click Apply

As can be seen in Figure T12.3-1, the particles are initally situated in the lower half
of the riser. Therefore, all cells in the model below 0.5m in the vertical (y-direction)
need to be assigned a value for the initial particle volume fraction, 0.58 in this case.
Above the 0.5m level, the volume fraction has to be set to a small value, say 0.001,
in order to ensure the stability of the numerical solution algorithm.
The above initialisation is performed using subroutine INITFI, as shown below:

Signal to pro-STAR that this case requires a user subroutine by choosing File
> System Command from the main window
Type ufiles in the text box, click Apply and then Close
Open the Initialization panel
Move the Phase# slider at the bottom of this panel to Phase#1 position
Select option User from the Values menu and then click Define user coding
Accept the default values in the rest of the panel by clicking Apply

The complete contents of INITFI for this case are shown in the User Subroutine
section below.
Other Model
Settings

Select locations for the pressure reference and monitoring cells as follows:

Go to the Monitoring and Reference Data panel


Click the mouse icon button next to the Monitoring cell number box and then
pick a cell in the lower half of the model geometry (or enter 1121 in the box).
Click the mouse button next to the Reference Pressure Cell Number box and
then pick the top right hand corner cell (or enter 2000 in the box).
Click Apply

Turn on the buoyancy force as follows:

Open the Buoyancy panel


Click On
Accept the default setting by clicking Apply

We now define the interaction between the two phases:

Version 4.02

Select the Eulerian Multi-Phase folder followed by the Interphase Momentum


12-19

Tutorial 12.3

FLUIDISED BED RISER

Pre-Processing
Boundary Conditions

Transfer sub-folder
Open the Drag Forces panel
Select option High Particle Loading, leaving the default values unchanged
Click Apply
Open the Other Forces panel
Select option Kinetic Theory Model from the Solid Particle Stress menu
Accept the defaults shown for Maximum Volume Fraction and Restitution
Coefficient
Click Apply

Finally, set the particle diameter to 0.3 mm:

Boundary
Conditions

Open the Particle Size panel


Enter 0.0003 in the Mean Diameter text box.
Click Apply

Define boundary conditions at the inlet:

Select the Define Boundary Conditions folder, then open the Define Boundary
Regions panel
Select Reg#1 in the scroll list
Move the Phase# slider at the bottom of the panel to Phase#1 position
Enter 0.35 m/s for the V velocity
Click Apply

Now define particle (phase 2) conditions at the inlet:

Move the Phase# slider l to the Phase#2 position


Enter 2600 kg/m3 for Density and 0 for Vol. Fraction
Click Apply

Finally, define boundary conditions at the pressure outlet:

Select Reg#2 in the scroll list


Move the Phase# slider at the bottom of the panel to the Phase#2 position
Select option Vol. Frac. from the VF Switch menu and enter 0 in the Vol.
Fraction box
Click Apply

Analysis
Controls

Specify various solver parameters relevant to this case:

Output
Controls

Set the frequency of outputting calculated transient data during the analysis:

12-20

Select folder Analysis Controls followed by Solution Controls


Select sub-folder Equation Behavior
Open the Primary Variables panel and go to the Equation Status tab
Move the Phase# slider at the bottom of the panel to the Phase#1 position
Deselect option W-Mom since we are only solving a 2D flow in the x-y plane
Click Apply
Move the Phase# slider to the Phase#2 position
Deselect option W-mom
Click Apply

Select the Output Controls folder and then open the Analysis Output panel
Version 4.02

Tutorial 12.3

FLUIDISED BED RISER

User Subroutine
Run Time Controls

In the Post tab, enter 1000 for both the Output frequency and Backup
frequency
Click Apply
In the Transient tab, enter 0.025 (seconds) in the Write data every box. As can
be seen on the panel, velocity and pressure data will be written by default at
the above frequency.
Move the Phase# slider to the Phase#2 position and select item Volume
Fraction from the list of data items shown
Click the Post button, which selects this item (along with the phase velocity)
for output to the transient post file
Click Apply

Run Time
Controls

Set the run duration to 2 seconds and the time step to 1 x 10-4 seconds:

Final
Operations

If you wish to terminate the session at this stage, write the geometry and problem
files and exit from pro-STAR, saving the model data as shown below.

Select the Analysis Preparation/Running folder


Open the Set Run Time Controls panel
Enter 2 in the Run for box
Click Apply
Enter 1e-4 in the Time Step for Period box
Click Set Period at the bottom of the panel

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

User Subroutine
Introduce the user code needed to initialise particle volume fractions and gas
velocities via pro-STARs built-in editor. For this purpose, edit subroutine INITFI
(in file initfi.f, sub-directory ufile) as follows:

In the main pro-STAR panel, select File > Edit File


In the pro-STAR Editor dialog, click File > Open
In the File Selection dialog, enter sub-directory ufile and select file initfi.f
Click OK
Edit the contents of the subroutine by adding extra lines of code after the
explanatory section, as shown below
Click File > Save
In the File Selection dialog, re-specify ufile / initfi.f as the save location of the
modified subroutine
Click File > Quit to exit from the editor

C*************************************************************************
SUBROUTINE INITFI(U,V,W,PR,TE,ED,T,SCALAR,XVF2)
C
Initialise fields
C*************************************************************************
C--------------------------------------------------------------------------*
Version 4.02

12-21

Tutorial 12.3

FLUIDISED BED RISER

CFD Analysis
Final Operations

C
STAR-CD VERSION 4.00
C--------------------------------------------------------------------------*
INCLUDE 'comdb.inc'
COMMON/USR001/INTFLG(100)
DIMENSION SCALAR(50)
INCLUDE 'usrdat.inc'
EQUIVALENCE( UDAT12(001), ICTID )
EQUIVALENCE( UDAT03(001), CON )
EQUIVALENCE( UDAT04(001), CP )
EQUIVALENCE( UDAT04(002), DEN )
EQUIVALENCE( UDAT04(062), VISM )
EQUIVALENCE( UDAT04(063), VIST )
EQUIVALENCE( UDAT04(067), X )
EQUIVALENCE( UDAT04(068), Y )
EQUIVALENCE( UDAT04(069), Z )
C------------------------------------------------------------------------C
C
This subroutine enables the user to initialise the following
C
dependent variables: U,V,W,PR,TE,ED,T,SCALAR,XVF2 to arbitrary
C
values.
C
C
** Parameters to be returned to STAR: U,V,W,PR,TE,ED,T,
C
SCALAR,XVF2
C
C
The returned velocity components (U, V and W) are in the
C
coordinate system requested for initialisation.
C
C-------------------------------------------------------------------------C
C.....HEIGHT OF FLUIDISED BED
HBED=0.5
C.....SOLID VOLUME FRACTION IN BED
VFSOL=0.58
C.....MINIMUM VOLUME FRACTION
VFMIN=0.001
C
U=0.0
V=0.0
W=0.0
IF (IPHA.EQ.2) THEN
IF (Y.LE.HBED) THEN
XVF2=VFSOL
ELSE
XVF2=VFMIN
END IF
ENDIF
C
RETURN
END

CFD Analysis
You may continue with the CFD analysis, using the STAR GUIde facilities for
running STAR interactively without quitting pro-STAR. Alternatively, you may
run the CFD analysis (in double precision) by typing
12-22

Version 4.02

Tutorial 12.3

FLUIDISED BED RISER

Post-Processing
Final Operations

star -dp
in your session window.
Post-Processing
Use pro-STAR to display the results stored in the .pstt file and check the volume
fraction of the second phase:

Version 4.02

In the STAR GUIde window, select folder Post-Processing


Open the Load Data panel to display the File(s) tab
Select option Transient from the Analysis menu
Check that file fcc_riser.pstt appears in the File Name box and then
select the first position in the Transient Post File(s) list
Click Add File to List
Select the first position in the list again and then click Open Transient Post
File; the time steps at which analysis results were stored during the run should
appear in the Select Time Step scroll list
In the Select Time Step list, select the fourth step at which data are available
(i.e. at time 0.1 s)
Click Store Iter/Time
Go to the Data tab and select Cell & Wall/Bound (Smooth) in the Data Type
menu
Move the Phase# slider to the Phase#2 position and select item Volume
Fraction from the Scalar Data list
Click Get Data at the bottom of the panel
Select Go To > Create Plots
In the 3-D Surface tab select Contour (filled) for Option and Edge for
Edge/Mesh
Click Plot to Screen to display the particle volume fraction at the chosen time
step, as shown in Figure T12.3-2

12-23

Tutorial 12.3

FLUIDISED BED RISER

Post-Processing
Final Operations

Figure T12.3-2

Phase 2 volume fraction at time 0.1s

Now fix the colour scale to a range between 0 and 1:

Go to the Options tab


In the Color Scale section, select User from the Range menu and enter 0 in
the first box and 1 in the second
Click Apply
In the main graphics window, click Replot

The above process may be repeated for each of the results calculated every 0.025
seconds in the analysis. However, the best way of displaying these is by instructing
pro-STAR to loop over the entire post file. To do this, type the following commands
in the I/O window:
*set itno 250 250
*define
stor iter itno
egev 2 none vf
cset news fluid
cplot
*end
*loop 1 79 1
Examine the volume fraction plots in the time sequence of your outputs. You should
see gas bubbles rise through the particle bed. The flow is rather random and
chaotic, with particles pushed around by the gas flow. The maximum particle
volume fraction should be around the maximum packing value set in the model
(typically 0.63). From time to time a higher maximum volume fraction can occur in
one or two spots.
12-24

Version 4.02

Tutorial 12.4

BOILING SIMULATION

Pre-Processing
Preliminaries

Tutorial 12.4

BOILING SIMULATION

This tutorial is intended to familiarise users with the process of setting up an


Eulerian two-phase model for boiling problems.
The solution domain is a vertical channel whose geometry is shown below. The
flow regime consists of superheated water entering the channel at the bottom, some
of the water evaporating into steam bubbles, and a water/steam mixture emerging
from the pressure boundary outlet at the top.
0.1m 0.1m
Steam/water
outlet
Steam bubbles

gy
2m

y
x
Superheated water
Figure T12.4-1

Outline of flow channel with boiling

Pre-Processing
Preliminaries Create a sub-directory for the tutorial called tut12-4. The mesh for this problem
is supplied in advance, i.e. cell, vertex, boundary and problem setup files
(channel2.cel, channel2.vrt, channel2.bnd and channel2.inp,
respectively) are available in the STAR-CD installation directories. Therefore,
before starting the tutorial, make sure that these files are copied into your current
directory.

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name (say, boil) in the Casename text box
Click Continue

Read in the available problem data:

Select File > Read File... in the main pro-STAR window


In the Input Coded Command File dialog check that the File Name is
channel2.inp
Click Apply
Click Close

This will read default problem settings from file channel2.inp plus the
Version 4.02

12-25

Tutorial 12.4

BOILING SIMULATION

Pre-Processing
Material Properties and Thermofluid Models

problems cell, vertex and boundary location definitions from the remaining three
files.

In the main window, select File > Model Title


In the Title text box type:
CHANNEL FLOW WITH BOILING

Click Apply

Verify that the correct mesh has been imported by selecting all cells and plotting the
mesh in Hidden Surface mode:

In the main window, select C > All


Check that Hidden Surface is the default cell plot type
Select View > Isometric > 1, 1, 1. A 2D mesh corresponding to Figure
T12.4-1 should appear on your screen.
Click Cell Plot
Select View > Axis > +Z

Make sure that the STAR-GUIde window is displayed on your screen, next to the
main pro-STAR window.

Open the Select Analysis Features panel

This enables you to set the basic features of your model and ensures that only those
panels that are essential for your analysis are activated. For this tutorial, the
following special settings are required:

Material
Properties
and
Thermofluid
Models

Assign physical properties to the two phases.

12-26

Select option Eulerian Multi-Phase from the Multi-Phase Treatment menu


Click Apply

Select the Thermophysical Models and Properties folder


Open the Gravity panel and change the Direction of Gravity Force to (0, -1, 0)
Click Apply
Select the Liquid and Gases folder
Open the Molecular Properties panel
Make sure the Phase# slider at the bottom of the panel is in the Phase#1
position
Assign appropriate property values for phase 1 as follows:
Name Water
Density 958
Molecular Viscosity 0.000283
Specific Heat 4218
Conductivity 0.681
Molecular Weight 18
Click Apply
Move the Phase# slider to the Phase#2 position
Assign appropriate property values for phase 2 as follows:
Name Steam
Density 0.6
Version 4.02

Tutorial 12.4

BOILING SIMULATION

Pre-Processing
Material Properties and Thermofluid Models

Molecular Viscosity 1.2e-5


Specific Heat 2034
Conductivity 0.0248
Molecular Weight 18
Click Apply

Turn on the solution of the energy equation:

Open the Thermal Models panel


For each of the two phases:
Click Temperature Calculation On
Click Apply

Initialise field values as follows:

Open the Initialization panel


Move the Phase# slider at the bottom of the panel to the Phase#1 position
Check that Values option is Constant and then enter the following values:
V velocity 0.5 m/s
Temperature 375
Accept the default values for the remaining parameters and then click Apply
Move the Phase# slider to the Phase#2 position
Enter the following values:
V velocity 0.5 m/s
Volume Fraction 0.01
Temperature 373
Accept the default values for the remaining parameters and then click Apply

Select locations for the pressure reference and monitoring cells as follows:

Go to the Monitoring and Reference Data panel


Click the mouse icon button next to the Monitoring cell number box and then
pick a cell in the lower half of the geometry (or enter 44 in the box).
Click the mouse button next to the Reference Pressure Cell Number box and
then pick the top right hand corner cell in the main window (or enter 100 in
the box).
Enter 273 for Temperature
Click Apply

Turn on the buoyancy force as follows:

Open the Buoyancy panel


Click On
Select option Centroid of pressure reference cell for the datum location
Select option Use reference and/or initial values, together with Reference
pressure and Reference temperature for the datum density value
Click Apply

Define the interactions between the two phases:

Version 4.02

Select the Eulerian Multi-Phase folder followed by the Interphase Momentum


Transfer sub-folder
Open the Drag Forces panel
12-27

Tutorial 12.4

BOILING SIMULATION

Pre-Processing
Boundary Conditions

Select Bubbles in the menu at the top of the panel


Click Apply

Interphase heat transfer will be defined later via a user subroutine, so the Nusselt
Number shown in STAR GUIde may be set to zero:

Open the Interphase Heat Transfer panel


Select Constant and enter 0 in Nusselt number box
Click Apply

Set the bubble diameter to 1 mm:

Open the Particle Size panel


Enter 0.001 in the Mean Diameter box
Click Apply

The boiling heat and mass transfers are to be defined as source terms via user
subroutines. First, you need to create a ufile sub-directory in your working
directory to store the subroutines:

Signal to pro-STAR that this case requires user subroutines by choosing File
> System Command from the main window
Type ufiles in the text box, click Apply and then Close

Prepare the user subroutines for mass and energy sources as follows:

Boundary
Conditions

Select the Sources folder and then open the Source Terms panel
In the Mass tab, click On, select User Coding and then click Apply and
Define User Coding
In the Enthalpy tab, click On, select User Coding and then click Apply and
Define User Coding

Define boundary conditions at the inlet:

Select the Define Boundary Conditions folder and then open the Define
Boundary Region panel
Select Reg#1 in the scroll list
Move the Phase# slider at the bottom of the panel to the Phase#1 position
Enter the following values:
V velocity 0.5
Dens. 958
Temp. 375
Click Apply
Move the Phase# slider to the Phase#2 position
Enter the following values:
V velocity 0.5
Dens. 0.6
Temp. 373
Vol. Fraction 0.01
Click Apply

Define boundary conditions at the pressure outlet:

12-28

Select Reg#2 in the scroll list


Version 4.02

Tutorial 12.4

BOILING SIMULATION

User Subroutines
Analysis Controls

Analysis
Controls

Move the Phase# slider at the bottom of the panel to Phase#1 position
Select Zero Grad for the Temp. Switch
Click Apply
Move the Phase# slider to the Phase#2 position
Select Zero Grad for the Temp. Switch
Select Zero Grad for the VF Switch
Click Apply

Specify various solver parameters required for this case:

Run Time
Controls

Select folder Analysis Controls followed by Solution Controls followed by


Equation Behavior
Open the Primary Variables panel and go to the Equation Status tab
Move the Phase# slider at the bottom of the panel to the Phase#1 position
Deselect item W-mom since we are solving a 2D flow in the x-y plane.
Click Apply
Move the Phase# slider to the Phase#2 position
Deselect item W-mom
Click Apply
Go to the Solver Parameter tab
Move the Phase# slider to the Phase#1 position
Change the Relaxation Factor to 0.3 for Momentum, 0.1 for Pressure, 0.3 for
Temp.
Click Apply
Move the Phase# slider to the Phase#2position
Change the Relaxation Factor to 0.3 for Momentum, 0.1 for Volume Fraction,
0.3 for Temp.
Click Apply

Set the number of iterations to 1000 for this case:

Final
Operations

Select the Analysis Preparation/Running folder


Open the Set Run Time Controls panel
Change the Number of Iterations to 1000 and the Max. Residual Tolerance to
2.0e-5
Click Apply

If you wish to terminate the session at this stage, write the geometry and problem
files and exit from pro-STAR, saving the model data as shown below:

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

User Subroutines
The boiling model is implemented in user subroutines FLUINJ for interphase mass
transfer and SORENT for interphase heat transfer. These are located in files
fluinj.f and sorent.f, respectively, of sub-directory ufile. The mass
Version 4.02

12-29

Tutorial 12.4

BOILING SIMULATION

User Subroutines
Final Operations

transfer rate due to evaporation is defined in subroutine UBOIL, called from


FLUINJ, so this subroutine should also be resident in file fluinj.f. For further
details of the boiling model, see the Eulerian Multiphase Flows Training Notes.

Replace the default contents of both files with the code shown below, using
pro-STARs built-in editor or any other editor. For file fluinj.f the
appropriate code is as follows:

C*******************************************************************
SUBROUTINE FLUINJ(FLUXI,UI,VI,WI,TEI,EDI,TI,SCINJ,IPMASS)
C
Fluid injection
C*******************************************************************
C--------------------------------------------------------------------------*
C
STAR-CD VERSION 4.00
C--------------------------------------------------------------------------*
INCLUDE 'comdb.inc'
DIMENSION SCINJ(50)
COMMON/USR001/INTFLG(100)
C
C.....USER'S ADDITIONAL DEFINITIONS
REAL DENL,VISL,CPL,TKL,SLIP,DIAP,TL,VFG,TG
REAL TSAT,H1SAT,H2SAT,QLATEN
REAL SMASS,UR,VR,WR
COMMON/UBOIL1/ DENL,VISL,CPL,TKL,SLIP,DIAP,TL,VFG,TG
COMMON/UBOIL2/ TSAT,H1SAT,H2SAT,QLATEN
C
INCLUDE 'usrdat.inc'
DIMENSION SCALAR(50)
EQUIVALENCE( UDAT12(001), ICTID )
EQUIVALENCE( UDAT03(001), CON )
EQUIVALENCE( UDAT03(019), VOLP )
EQUIVALENCE( UDAT04(001), CP )
EQUIVALENCE( UDAT04(002), DEN )
EQUIVALENCE( UDAT04(003), ED )
EQUIVALENCE( UDAT04(005), PR )
EQUIVALENCE( UDAT04(008), TE )
EQUIVALENCE( UDAT04(009), SCALAR(01) )
EQUIVALENCE( UDAT04(059), U )
EQUIVALENCE( UDAT04(060), V )
EQUIVALENCE( UDAT04(061), W )
EQUIVALENCE( UDAT04(062), VISM )
EQUIVALENCE( UDAT04(063), VIST )
EQUIVALENCE( UDAT04(007), T )
EQUIVALENCE( UDAT04(067), X )
EQUIVALENCE( UDAT04(068), Y )
EQUIVALENCE( UDAT04(069), Z )
C------------------------------------------------------------------------C
C
This subroutine enables the user to specify fluid injection
C
(addition or removal) into live cells. In the case of mass
C
removal (sink), only the mass flux (FLUXI) can be specified. In
C
the case of mass addition (source), the fluid will bring all its
C
user-specified properties (momentum, turbulence, temperature and
C
concentrations). Zero will be assumed for omitted properties.
C
C
** Parameters to be returned to STAR:
12-30

Version 4.02

Tutorial 12.4

BOILING SIMULATION

User Subroutines
Final Operations

C
(Sink)
FLUXI (<0)
C
(Source) FLUXI (>0),UI,VI,WI,TEI,EDI,TI,
C
SCINJ,IPMASS
C
C
IPMASS is an interphase mass transfer indicator used in
C
Eulerian two-phase (E2P) simulations only.
C
The default value, passed from STAR to FLUINJ, is always zero.
C
IPMASS=0: no interphase heat transfer - the mass sources specified
C
in FLUINJ are independent for each phase.
C
IPMASS=1: the phases are exchanging mass - the mass source specified
C
is directed from one phase into the other phase.
C
For more information, please refer to the E2P sections of the
C
manuals.
C
C------------------------------------------------------------------------C
C
Sample coding: Fluid injection and removal
C
C
IF(ICTID.EQ.3) THEN
CC Injection
C
FLUXI=0.1
C
WI=0.05
C
TI=373.0
C
SCINJ(1)=1.0
C
ELSE IF(ICTID.EQ.4) THEN
CC Removal
C
FLUXI=-0.05
C
ENDIF
C-------------------------------------------------------------------------C
C
DENL=DEN
VISL=VISM
CPL=CP
TKL=CON
UR=U-UCEL2
VR=V-VCEL2
WR=W-WCEL2
SLIP=SQRT(UR*UR+VR*VR+WR*WR)
DIAP=DIAM
TL=T
TG=TCEL2
VFG=VFCEL2
C
CALL UBOIL(SMASS)
C
C.....SET INTERPHASE MASS FLUX
IF(IPHA.EQ.1) THEN
FLUXI=-SMASS
UI=UCEL2
VI=VCEL2
WI=WCEL2
TI=TSAT
ELSE IF(IPHA.EQ.2) THEN
FLUXI=SMASS
UI=U
VI=V
WI=W
Version 4.02

12-31

Tutorial 12.4

BOILING SIMULATION

User Subroutines
Final Operations

TI=TSAT
ENDIF
IPMASS=0
C
RETURN
END
SUBROUTINE UBOIL(SMASS)
C============================================================
C
C
CALCULATE EVAPORATION/CONDENSATION RATE
C
C
CREATED BY SIMON LO 27/04/04
C
C============================================================
C
C
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
C
REAL DENL,VISL,CPL,TKL,SLIP,DIAP,TL,VFG,TG
REAL TSAT,H1SAT,H2SAT,QLATEN
REAL AI,HTCOEF,HTCGAS,QLIQ,QGAS
REAL REY,PRT,RNU,SMASS
C
COMMON/UBOIL1/ DENL,VISL,CPL,TKL,SLIP,DIAP,TL,VFG,TG
COMMON/UBOIL2/ TSAT,H1SAT,H2SAT,QLATEN
COMMON/UBOIL3/ AI,HTCOEF,HTCGAS,QLIQ,QGAS
C
C******************************************************************
CHAPTER 1
MODEL DATA
C
C.....SET ADDITIONAL MODEL DATA HERE
C
TSAT = SATURATION TEMPERATURE (K)
C
H1SAT = SATURATION ENTHALPY OF PHASE 1 (J/KG)
C
H2SAT = SATURATION ENTHALPY OF PHASE 2 (J/KG)
C
TSAT=100.0+273.0
H1SAT=419.2E3
H2SAT=2676.0E3
QLATEN=H2SAT-H1SAT
C
C******************************************************************
CHAPTER 2
MASS TRANSFER RATE
C
C.....SIMPLE BULK BOILING/CONDENSATION MODEL
C
(ASSUME GAS PHASE AT SATURATION TEMPERATURE,
C
IF T(LIQ) < TSAT, I.E. SUB-COOLED LIQUID, WE HAVE CONDENSATION
C
IF T(LIQ) > TSAT, I.E. SUPER-HEATED LIQUID, WE HAVE EVAPORATION
C
C
COMPUTE MASS TRANSFER RATE SMASS
C
PHASE 1 IS LIQUID AND PHASE 2 IS VAPOUR
C
IF SMASS < 0, CONDENSATION, MASS GOES FROM PHASE 2 TO PHASE 1
C
IF SMASS > 0, EVAPORATION, MASS GOES FROM PHASE 1 TO PHASE 2
C
C
C.........REYNOLDS NUMBER
REY=DENL*SLIP*DIAP/VISL
C
C.........PRANDTL NUMBER
12-32

Version 4.02

Tutorial 12.4

BOILING SIMULATION

User Subroutines
Final Operations

PRT=CPL*VISL/TKL
C
C.........NUSSELT NUMBER
C
RNU=2.0+0.6*REY**0.5*PRT**0.3
C.........USE CONSTANT RNU=2.0 FOR SIMPLICITY
RNU=2.0
C
C.........LIQUID-SIDE HEAT TRANSFER COEFFICIENT
HTCOEF=RNU*TKL/DIAP
C
C.........INTERFACIAL AREAM IN CELL
AI=6.0*VFG/DIAP
C
C.........HEAT TRANSFER ACROSS INTERPHASE
QLIQ=HTCOEF*AI*(TL-TSAT)
C
C.........GAS-SIDE HEAT TRANSFER COEFFICIENT
HTCGAS=10.0
C
C.........HEAT TRANSFER FROM GAS TO INTERPHASE
QGAS=HTCGAS*AI*(TG-TSAT)
C
C.........MASS TRANSFER RATE
SMASS=(QLIQ+QGAS)/QLATEN
C
RETURN
END

For file sorent.f the appropriate code is as follows:

C*******************************************************************
SUBROUTINE SORENT(S1P,S2P)
C
Source-term for enthalpy
C*******************************************************************
C--------------------------------------------------------------------------*
C
STAR-CD VERSION 4.00
C--------------------------------------------------------------------------*
INCLUDE 'comdb.inc'
COMMON/USR001/INTFLG(100)
C.....USER'S ADDITIONAL DEFINITIONS
REAL DENL,VISL,CPL,TKL,SLIP,DIAP,TL,VFG,TG
REAL TSAT,H1SAT,H2SAT,QLATEN
REAL AI,HTCOEF,HTCGAS,QLIQ,QGAS
REAL SMASS,UR,VR,WR
COMMON/UBOIL1/ DENL,VISL,CPL,TKL,SLIP,DIAP,TL,VFG,TG
COMMON/UBOIL2/ TSAT,H1SAT,H2SAT,QLATEN
COMMON/UBOIL3/ AI,HTCOEF,HTCGAS,QLIQ,QGAS
INCLUDE 'usrdat.inc'
DIMENSION SCALAR(50)
EQUIVALENCE( UDAT12(001),
EQUIVALENCE( UDAT03(001),
EQUIVALENCE( UDAT03(019),
EQUIVALENCE( UDAT04(001),
Version 4.02

ICTID )
CON )
VOLP )
CP )
12-33

Tutorial 12.4

BOILING SIMULATION

User Subroutines
Final Operations

EQUIVALENCE( UDAT04(002), DEN )


EQUIVALENCE( UDAT04(003), ED )
EQUIVALENCE( UDAT04(004), HP )
EQUIVALENCE( UDAT04(006), P )
EQUIVALENCE( UDAT04(008), TE )
EQUIVALENCE( UDAT04(009), SCALAR(01) )
EQUIVALENCE( UDAT04(059), U )
EQUIVALENCE( UDAT04(060), V )
EQUIVALENCE( UDAT04(061), W )
EQUIVALENCE( UDAT04(062), VISM )
EQUIVALENCE( UDAT04(063), VIST )
EQUIVALENCE( UDAT04(007), T )
EQUIVALENCE( UDAT04(067), X )
EQUIVALENCE( UDAT04(068), Y )
EQUIVALENCE( UDAT04(069), Z )
C----------------------------------------------------------------------C
C
This subroutine enables the user to specify a source term (per unit
C
volume) for enthalpy in linearized form:
C
C
Source = S1P-S2P*T, (W/m3)
C
C
in an arbitrary manner.
C
C
If temperature is to be fixed to a given value T, then the
C
following may be used:
C
C
S1P=GREAT*T
C
S2P=GREAT,
C
C
where T can be a constant or an arbitrary function of the
C
parameters in the parameter list.
C
C
** Parameters to be returned to STAR: S1P,S2P
C
C------------------------------------------------------------------------C
C
Sample coding: Fix temperature to the value of 300 K in solid
C
No 3 (IMAT=-3)
C
C
IF(IMAT.EQ.-3) THEN
C
S1P=GREAT*300.
C
S2P=GREAT
C
ENDIF
C------------------------------------------------------------------------C
DENL=DEN
VISL=VISM
CPL=CP
TKL=CON
UR=U-UCEL2
VR=V-VCEL2
WR=W-WCEL2
SLIP=SQRT(UR*UR+VR*VR+WR*WR)
DIAP=DIAM
TL=T
TG=TCEL2
12-34

Version 4.02

Tutorial 12.4

BOILING SIMULATION

CFD Analysis
Final Operations

VFG=VFCEL2
C
CALL UBOIL(SMASS)
C
C.....SET HEAT TRANSFER BETWEEN PHASE AND INTERFACE
IF(IPHA.EQ.1) THEN
S1P=HTCOEF*AI*TSAT
S2P=HTCOEF*AI
ELSE IF(IPHA.EQ.2) THEN
S1P=HTCGAS*AI*TSAT
S2P=HTCGAS*AI
ENDIF
C
RETURN
END

CFD Analysis
You may continue with the CFD analysis, using the STAR GUIde facilities for
running STAR interactively without quitting pro-STAR. Alternatively, you may
run the CFD analysis (in double precision) by typing
star -dp
in your session window.
Post-Processing
Use pro-STAR to check and examine the results.

Select folder Post-Processing


Open the Load Data panel to display the Files(s) tab
Click Open Post File

Plot the volume fraction for phase 2 as follows:

Version 4.02

Go to the Data tab and check that Data Type Cell is selected
Set the Smooth Option to On
Move the Phase# slider to the Phase#2 position and select item Volume
Fraction from the Scalar Data list
Click Get Data
Select Go To > Create Plots to open the Create Plots panel
In the 3-D Surface tab, select Contour (filled) from the Option menu and
Edge from the Edge/Mesh menu
Click Plot to Screen to display Figure T12.4-2

12-35

Tutorial 12.4

BOILING SIMULATION

Post-Processing
Final Operations

Figure T12.4-2

Contours of phase 2 volume fraction

The steam volume fraction at the exit should be about 0.85. Now plot the
temperature as follows:

12-36

Go back to the Load Data panel by clicking Go To Load Data


Select item Temperature from the Scalar Data list
Click Get Data
In the main pro-STAR window click Cell Plot to display Figure T12.4-3

Version 4.02

Tutorial 12.4

BOILING SIMULATION

Post-Processing
Final Operations

Figure T12.4-3

Phase 2 temperature contour plot

Note that the steam temperature remains within its saturation value of 373 K
throughout the solution domain. Repeat the above steps to obtain a phase 1
temperature plot:

Version 4.02

Move the Phase# slider to the Phase#1 position and select item Temperature
from the Scalar Data list
Click Get Data
In the main pro-STAR window click Cell Plot to display Figure T12.4-4

12-37

Tutorial 12.4

BOILING SIMULATION

Post-Processing
Final Operations

Figure T12.4-4

Phase 1 temperature contour plot

Note that the water temperature drops to the saturatiuon value (373 K) in the upper
part of the solution domain. Finally, obtain a V-velocity component plot for the
second phase:

12-38

Move the Phase# slider to the Phase#2 position and select item Velocity
Component V from the Scalar Data list
Click Get Data
In the main pro-STAR window click Cell Plot to display Figure T12.4-5

Version 4.02

Tutorial 12.4

BOILING SIMULATION

Discussion of Results
Final Operations

Figure T12.4-5

Contour plot of velocity component V

Discussion of Results
In we can see that water enters at 375 K. As energy is lost due to steam generation,
the water temperature drops gradually to the saturation value of 373K. In , the
volume fraction of steam shows an immediate increase from its inlet value of 0.01
to 0.425 and peaks at 0.852. When the water temperature reaches saturation no
further steam is generated. shows that the steam temperature remains at the
saturation value of 373 K.
Validation Check
According to the inlet boundary conditions, water enters the channel with a two
degrees superheat (i.e. two degrees above saturation). The volume fraction for water
is 0.99 and inlet velocity is 0.5 m/s. The amount of thermal energy above saturation
can be calculated as:
qliq = m liq c p, liq ( T liq T sat )
The water flow rate is:
m liq = liq liq A v liq
Substituting appropriate values into the above formulae, we obtain
qliq = 40 kJ/s

Version 4.02

12-39

Tutorial 12.4

BOILING SIMULATION

Suggestions for Further Exercises


Final Operations

Assuming that all this excess energy is used in generating steam, the latters
generation rate is:
qliq
m g = ------h fg
where h fg is the latent heat, in this case 2256.7 kJ/kg. The steam generation rate is
therefore 0.0177 kg/s.
We can check this result against the exit conditions of steam shown in the plots
above. From these plots, the volume fraction equals 0.8522 and the V-velocity
equals 3.445 m/s. Using the specified density value of 0.6 kg/m3 and the channel
cross-sectional area of 0.01 m2., the mass flow rate of steam calculated from these
results is 0.0176 kg/s.
Suggestions for Further Exercises
Condensation
The same model can be used to study condensation.
0.1m 0.1m
Water
outlet
gy
2m
Steam bubbles
y
x
Sub-cooled water
+ steam
Figure T12.4-6

Outline of flow channel

Start by copying the entire working directory for boiling tutorial tut12-4 to
another directory, say tut12-4b, as follows:
cp -r tut12-4 tut12-4b
Enter the tut12-4b directory and start a pro-STAR session as normal, re-using
the model settings of tut12-4. Now make the following changes:

12-40

Initial and inlet conditions:


Water temperature = 372 K (i.e. one degree subcool)
Steam volume fraction = 0.1
Version 4.02

Tutorial 12.4

BOILING SIMULATION

Suggestions for Further Exercises


Final Operations

Version 4.02

Save the problem and model files


Run STAR and post-process the results as described above.

12-41

Introduction

Tutorial 13 AEROACOUSTIC ANALYSIS


Introduction
The tutorials in this group illustrate STAR-CDs facilities for performing an
aeroacoustic analysis. The problem analysed is air flow around a cylinder which, for
simplicity, is modelled as a two-dimensional problem. The air density and laminar
viscosity are 1.205 kg/m3 and 1.81 x 10-5 Pa s, respectively. The circle representing
the cylinder has a diameter of 0.15 m and the inlet velocity is 5 m/s. These values
are chosen to produce a flow with a Reynolds number of 50,000, based on the
cylinder diameter. The mesh employed is refined in the vicinity of the cylinder and
also in the region where the wake is expected to appear.

inflow

Figure T13.0-1

Flow around a cylinder

The features demonstrated in these tutorials provide only basic data on the
aeroacoustic properties of a flow system. More detailed aeroacoustic analyses may
be performed using STAR-CD in conjunction with CD-adapcos es-acoustics tool.

Version 4.02

13-1

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Pre-Processing
Preliminaries

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

This tutorial aims to demonstrate:

The application of an aeroacoustic model in a steady-state problem


Methods for determining whether an analysis has converged to a steady-state
solution

The aeroacoustic properties of the flow will be analysed by calculating a Lilley


source term representing broadband shear noise (see Aeroacoustic Analysis on
page -7 of the Methodology volume). This scalar is useful in identifying those areas
of the problem geometry where shear noise dominates and hence can assist in
design modification to minimise noise. However, being a steady-state method, it
cannot be expected to capture the acoustic effects of large-scale transient features
such as vortex shedding. Thus, the method can only assist in a qualitative
examination of the acoustic features of the flow system.
Turbulence is modelled using the low-Reynolds number k- model (see
Standard low Reynolds number two-equation k- models on page -13 of the
Methodology volume).
Pre-Processing
Preliminaries Create a directory for the tutorial named tut13-1. The mesh to be used has
already been created and the relevant cell, vertex, boundary and problem setup files
are supplied with STAR-CD (files cyl.cel, cyl.vrt, cyl.bnd and
cyl.inp, respectively). Therefore, before starting the tutorial, make sure these
files are copied into your current directory.
Start up pro-STAR and enter the case name and title:

Type prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Type aac in the Casename text box
Click Continue

Read in the available problem data:

In the main pro-STAR window, select File > Read File...


Check that the name displayed in the File Name box is cyl.inp
Click Apply and then Close

This will read default problem settings from file cyl.inp as well as the problem
geometry and boundary location definitions from the remaining three files.

13-2

In the main window, select File > Model Title


Type AEROACOUSTIC ANALYSIS OF FLOW AROUND A CYLINDER
in the Title text box
Click Apply
Select C > All
Select B > All
Select B > Unselect > Symplane
Choose Bound as the Cell Plot Display Options setting
Click Cell Plot to display the mesh and the inlet and pressure boundaries, as
Version 4.02

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Pre-Processing
Material Properties

shown in Figure T13.1-1. The symmetry boundaries omitted from the plot are
placed on the two surfaces lying in the plane of view.

Figure T13.1-1

Mesh geometry

Turn on the aeroacoustic analysis option:

Open the Select Analysis Features STAR GUIde panel


Turn On Aeroacoustic Analysis
Click Apply

Note that an additional folder called Aeroacoustic Analysis now appears in the
NavCenter tree.

Material
Properties

The aeroacoustic source term calculation depends upon a fluctuating velocity,


obtained from calculated or derived values of k and using the Synthetic
turbulence method described in Chapter 16 of the Methodology volume. In this
case, the low-Reynolds number k- turbulence model, which calculates both these
quantities directly, will be used. If a model that does not calculate k and directly
is chosen, these quantities would be derived indirectly by STAR prior to performing
the aeroacoustic analysis.

Version 4.02

Go to this folder and open the Aeroacoustic Analysis panel. All default
settings and parameter values shown are appropriate for this case, so no
changes are needed here.

Go to the Thermophysical Models and Properties folder and select sub-folder


Liquids and Gases
Open the Turbulence Models panel
Turn On turbulence modelling
Select the k-Epsilon/Low Reynolds Number model from the Turbulence
13-3

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Pre-Processing
Boundary Conditions

menu
Click Apply
Under the Near-Wall Treatment tab, select option Hybrid Wall
Click Apply

Initialize the flow field (the initial velocity is chosen to match that at the inlet
boundary, as set below) and specify the monitoring and pressure reference cells:

Boundary
Conditions

Specify the velocity and turbulence parameters at the inlet. The former is set such
that, based on the diameter of the cylinder, the Reynolds number is 50,000:

Analysis
Controls

13-4

Select the Define Boundary Conditions folder


Open the Define Boundary Regions panel
Select the inlet, Reg# 1, from the list
Enter 5 m/s as the U velocity
Change the Turb. Switch to TI/Length
Enter a Turb. Intensity of 0.001
Enter a Length of 0.05 m
Click Apply

Since the flow is two-dimensional, solving the momentum equation in the


z-direction is unnecessary. To turn this off and activate a second-order differencing
scheme for the other two momentum equations:

Run Time
Controls

Open the Initialization panel


Specify the U velocity as 5 m/s
Click Apply
Under the Turbulence tab, select option TI/Mixing Length from the
Turbulence Parameters menu
Set the Intensity and Mixing Length values to 0.01 and 0.005, respectively
Click Apply
Open the Monitoring and Reference Data panel
Enter 6275 as the Monitoring cell number
Enter 7213 as the Reference Pressure Cell Number
Click Apply

Select the Analysis Controls folder followed by the Solution Controls


sub-folder
Select the Equation Behaviour folder
Open the Primary Variables panel
Under the Equation Status tab, deselect the W-Mom option to make the
analysis two-dimensional
Click Apply
Under the Differencing Schemes tab, change the momentum Differencing
Scheme to MARS
Click Apply

The run time controls must also be adjusted as follows:

Select folder Analysis Preparation/Running and open the Set Run Time
Version 4.02

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

CFD Analysis
Final Operations

Final
Operations

Controls panel
Enter 600 for the maximum Number of Iterations
Click Apply

Write the geometry and problem files:

Select File > Write Geometry File...


In the Geometry File Write dialog, click Apply and then Close
Select File > Write Problem File...
In the Problem File Write dialog, click Apply and then Close

CFD Analysis
To perform the analysis interactively, proceed as follows:

File > Save Model


In the Analysis Preparation/Running folder, open the Run Analysis
Interactively panel
Leave all settings at their default values and click Start New Analysis

The analysis will then start automatically. At the end of the run, note that the
normalised residual sums will not have satisfied the convergence criterion within
the specified maximum number of iterations. The reason for this will be discussed
in the post-processing section.
Post-Processing
Preliminaries Begin by reading in the results of the analysis:

Flow Field

Given that the analysis has so far failed to satisfy the convergence criterion, the
results may not represent a true steady-state. To evaluate this possibility, examine
the flow field by displaying the velocity vectors:

Version 4.02

Select folder Post-Processing


Open the Load Data panel to display the File(s) tab
Click Open Post File

Under the Data tab of the Load Data panel, select Data Type Cell
Select Velocity Components UV from the Vector Data list
Click Get Data
Choose Go To > Create Plots
Under the 3-D Surface tab, select options Vector and Edge
Click Plot To Screen
Turn off the Bound Cell Plot Display Option
In order to be able to see the flow field details, zoom in using the middle
mouse button until the values at the bottom of the display window show the
plot Center to be approximately 0.1, 0, 0 and the viewing Distance
approximately 0.25. The resulting plot should resemble Figure T13.1-2

13-5

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Post-Processing
Monitor History Plots

Figure T13.1-2

Plot of velocity vectors near to the cylinder

The flow field is clearly not symmetrical despite the geometry being so. This
suggests that a converged steady-state solution has not been reached.
Monitor
Examining history plots of the monitored flow variables is a good way to reveal
History Plots whether a steady-state solution has been reached and, if not, why not. To create a
suitable history plot:

Select the Analysis Preparation/Running folder


Open the Run History of Previous Analysis panel
Check the U-Component box
Click Plot Monitor History

By default, the graph frame fills only half the screen. To make it larger:

13-6

Select the Graphs sub-folder in the Post-Processing folder


Open the Customize Graphs panel
Under the Display tab, change the frame Location to Default
Click Apply
Click Redraw to display Figure T13.1-3

Version 4.02

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Post-Processing
Turbulence Energy

Figure T13.1-3

History plot for the U velocity component

The oscillating graph shows that a steady-state solution was not reached and
suggests that the real solution to this problem is periodic. In order to obtain a full
solution, a transient analysis would need to be run. Such an analysis is the basis of
Tutorial 13.2. Despite the absence of a steady-state solution, the results obtained
from this run (which effectively show the instantaneous solution at a point within
the periodic cycle) can be used to discuss some aspects of an aeroacoustic analysis.
Turbulence
Energy

A plot of the turbulence kinetic energy will show the shape and position of the wake
downstream of the cylinder:

Version 4.02

Open the Load Data panel


Under the Data tab, select Data Type Cell and Smooth Option On
Select Turb. Kinetic Energy from the Scalar Data list
Click Get Data
Choose Go To > Create Plots
Under the 3-D Surface tab, select options Contour (filled) and None
Click Plot To Screen
Click Zoom Off to display Figure T13.1-4

13-7

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Post-Processing
Aeroacoustic Source Term

Figure T13.1-4

Contour plot of the turbulence kinetic energy

Aeroacoustic The aeroacoustic Lilley source term is loaded from the results file in the same way
Source Term as any other scalar. Therefore, a contour plot of it can be produced as follows:

13-8

Open the Load Data panel


Under the Data tab, select Data Type Cell and Smooth Option On
Select Aeroacoustic Source from the Scalar Data list
Click Get Data
Click Replot to display Figure T13.1-5

Version 4.02

Tutorial 13.1

STEADY FLOW AROUND A CYLINDER

Post-Processing
Aeroacoustic Source Term

Figure T13.1-5

Contour plot of the aeroacoustic Lilley source term

Figure T13.1-5 shows that the shear noise produced by the flow is primarily in the
wake of the cylinder. The shape of the noise wake is similar to that of the turbulence
wake shown in Figure T13.1-4. This is due to the Lilley source dependence on the
turbulence parameters k and .
A separate analysis using the es-acoustics tool shows that the mesh provided for
this case is only capable of resolving noise resulting from turbulent eddies for
frequencies of up to about 500 Hz. Therefore, the next tutorial (Tutorial 13.2) will
analyse the same case as a transient problem and with a finer mesh, enabling
frequencies of up to about 1,000 Hz to be captured.
Quit pro-STAR by selecting:

Version 4.02

File > Quit > Quit, Nosave

13-9

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

This tutorial aims to demonstrate:

The application of a Detached Eddy Simulation (DES) turbulence model


How to monitor cell behaviour using an .ecd file
The solution mapping (SMAP) process
The specification of boundary conditions based on mapped solution data
How to check a transient analysis for stability
How to create animations using the Animation module and a neutral plot file

Such techniques are typically used in external aerodynamics problems where


analyses involving refined meshes around individual components (for example,
wing mirrors, spoilers, wiper blades, high-lift devices and landing gear) are
performed with boundary conditions mapped from a coarser global simulation.
As a demonstration of these techniques, this tutorial models the same
two-dimensional flow around a cylinder as Tutorial 13.1, but this time as a transient
simulation. Examination of the time-dependent pressure profile at specified
locations will allow for assessment of the acoustic and structural excitation via the
frequency and amplitude of the unsteady pressure fluctuations.
To reduce the computational cost, the solution domain extent is reduced to cover
only the important flow regions in the vicinity of the cylinder and wake, and the
mesh within is refined. The analysis restarts from the steady state solution of the
previous tutorial which is mapped onto the new mesh. The conditions on the inlet
and pressure boundaries are also mapped from the steady state result using user
subroutines.
Besides the above changes to domain, mesh and boundary conditions, the only
other change in the problem specification is the use of the Detached Eddy
Simulation (DES) option based on the low-Reynolds number k- model employed
in Tutorial 13.1. This means that the results can include large eddy structures that
would not appear if a RANS model was used. Due to the hybrid nature of DES,
using such a model rather than full LES also benefits from not having to resolve the
boundary layer fully.
Given a cylinder radius of 0.15 m, a bulk flow velocity of ~5 m/s and the
knowledge that, for flow around a cylinder, vortex shedding at Reynolds number
50,000 occurs at a Strouhal number
fd
St = ----u
of ~0.2, it is possible to estimate the vortex shedding frequency as
f = 6.67Hz
To produce a well-resolved waveform for these oscillations, the time step should be
at least one tenth of the inverse of the frequency, i.e. 1.5 x 10-2 seconds. Stability
considerations based on the Courant number require the time step to be much
smaller than this, so a value of 5 x 10-5 seconds is chosen. This should enable
oscillations with frequencies of up to 2,000 Hz to be resolved faithfully.

Version 4.02

13-11

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Pre-Processing
Preliminaries

Pre-Processing
Preliminaries Create a directory for the tutorial named tut13-2 and copy the model and results
files created in Tutorial 13.1 (aac.mdl and aac.ccm, respectively) into it. In
addition, make a copy of aac.mdl named aac_tr.mdl, ensuring that you do not
delete the original aac.mdl model file as this will be required for the solution
mapping operation. You should also copy a command macro called REFINE.MAC
into the working directory, which will be used to create the new mesh.
Start up pro-STAR using the aac_tr.mdl file created above:

Type prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Check that the Case Name is aac_tr
Click Continue

To give the case a new title:

Mesh
Refinement

A command macro, which deletes those cells lying outside the desired solution
domain, refines the remaining cells and creates new boundaries, is provided as part
of the installation. To execute the macro:

Analysis
Features

Select Panels > Define Macro


Select REFINE in the Define Macro panel
Click Execute

The next step is to change the analysis type to transient:

Material
Properties

In the main pro-STAR window, select File > Model Title...


Type ANALYSIS OF AEROACOUSTIC EFFECTS IN TRANSIENT
FLOW in the Title box
Click Apply

Open the Select Analysis Features panel


Change the Time Domain option to Transient
Click Yes in the dialog that appears, warning that aeroacoustic modelling
cannot be performed in a transient analysis. This refers to the calculation of
the Lilley source term, which is a steady state feature.
Click Apply

Switch on the DES variant of the current turbulence model:

Select the Thermophysical Models and Properties folder


Select the Liquids and Gases sub-folder and open the Turbulence Models
panel
Check the DES box
Click Apply

The monitoring and pressure reference cells must be redefined, as those used in the
steady-state analysis no longer exist:

13-12

Open the Monitoring and Reference Data panel


Change the Monitoring cell number to 9419
Change the Reference Pressure Cell Number to 6232. This cell is at one end
of the pressure boundary.
Version 4.02

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Pre-Processing
Boundary Conditions

Boundary
Conditions

The mapping of the inlet and pressure boundary conditions is performed via user
subroutines. These must be activated as follows:

Analysis
Controls

Click Apply

In the main window, choose File > System Command


Type ufiles in the text box, click Apply and then Close
In STAR GUIde, select the Define Boundary Conditions folder
Open the Define Boundary Regions panel
Select Reg# 1, the inlet, from the boundary regions list
Select User from the Options menu
Click Define User Coding to write the default version of subroutine BCDEFI
in sub-directory ufile, ready for editing later
Click Apply
Select Reg# 2, the pressure boundary, from the boundary regions list
Select User from the Options menu
Click Define User Coding to write the default version of subroutine BCDEFP
in sub-directory ufile, ready for editing later
Click Apply

Specify what transient data will be written to the .pstt file and how often:

Select the Analysis Controls folder followed by the Solution Controls folder
Select the Equation Behavior sub-folder and then open the Primary Variables
panel
Change the momentum Differencing Scheme to CD. This should provide
greater accuracy as, despite being second-order, the MARS gradient limiter
has been shown to be diffusive when used with LES sub-grid scale turbulence
models.
Click Apply
Select the Output Controls folder and open the Analysis Output panel
Under the Transient tab, choose to Write data every 0.015 s
Select Turb Kinetic Energy from the Choose data to write list. The data will
be used to create an animation in the Post-Processing part of this tutorial.
Check the Post box
Click Apply

Pressure data will be monitored at a location about 1.5 cylinder radii downstream of
the cylinder and the monitor data stored in an .ecd file. Define the location by
creating a cell set containing a single cell:

Enter the following command in the I/O window:


CSET NEWSET CLIST 9419

Store the location in a .set file:

In the main pro-STAR window, select INFO > Store Set/Surface/View


Enter pmon as the Set Name
Click Write and then Close

Specify which data are to be stored in the .ecd file:


Version 4.02

13-13

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Pre-Processing
Run Time Controls

In the Output Controls folder, select the Monitor Engineering Behavior


sub-folder
Open the Monitor Cell Behavior panel
Select On
Using the file browser to the right of the Set File box, choose the file
aac_tr.set
Select pmon from the Select Entry list
Select Pressure in the Select Monitoring Information section
Click Apply

Run Time
Controls

Specify the time step size and the length of the run:
Select the Analysis Preparation/Running folder and open the Set Run Time
Controls panel
Change the Time Step for Period to 5e-5 s
Click Set Period
Change the Run Time to 1.5 s. This is equivalent to 30,000 time steps.
Click Apply

Solution
Mapping

The solution mapping process involves the following stages:


1.
2.
3.
4.
5.
6.
7.

Save the new mesh geometry created above in its corresponding .ccm file
Save the new model file
Resume the original model file and load the corresponding solution file
Perform the solution mapping (SMAP) operation
Resume the new model file
View and check the restart solution data
Set up the run to start from the mapped solution

Write the new geometry and model files and load the model and results files from
Tutorial 13.1:

In the main pro-STAR window, select File > Write Geometry File...
In the Geometry File Write dialog, click Apply then Close
Select File > Save Model
Select File > Resume From...
In the Resume From dialog, enter aac.mdl
Click Apply and then Close
Select the Post-Processing folder in STAR GUIde
Open the Load Data panel to display the File(s) tab
Change the Steady State Post File name to aac.ccm
Click Open Post File to load the results from Tutorial 13.1

To perform the solution mapping:

13-14

In the main pro-STAR window, select Utility > Solution Mapping...


In the Smap/Tsmap dialog, specify the options shown below:

Version 4.02

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Pre-Processing
Solution Mapping

Click Apply. The solution mapping operation may take a few minutes,
depending upon the speed of your computer. Once it is complete, click Close.

The new model file can now be resumed and the mapped results displayed:

Version 4.02

Select File > Resume From...


In the Resume From dialog, enter aac_tr.mdl
Click Apply then Close
Select C > All
Select the Post-Processing folder in STAR GUIde
Open the Load Data panel to display the File(s) tab
Change the Steady State Post File name to aac_tr.ccm
Change the State Name to smap
Click Open Post File to load the mapped results
Under the Data tab, select Velocity Magnitude from the Calculated Scalar
Data list
Click Get Data
Select Go To > Create Plots
Under the 3-D Surface tab, select options Contour (filled) and None
Click Plot to Screen to display Figure T13.2-1

13-15

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

User Subroutines
Final Operations

Figure T13.2-1

Velocity magnitude profile resulting from the solution mapping

You must now specify that the transient run should restart from the above mapped
solution:

Select the Analysis Preparation/Running folder in STAR GUIde


Open the Analysis (Re)Start panel
Select Initial Field Restart as the Restart File Option
Enter aac_tr.ccm as the Restart File
In the Initial Field Restart section, select Restart (Smapped) from the
drop-down menu
Check that the State Name is smap and then click Apply

This completes the solution mapping process.


Final
Operations

The geometry file has already been written but it is also necessary to write the
problem file:

Select File > Write Problem File...


In the Problem File Write dialog click Apply then Close

User Subroutines
The boundary mapping process requires two user subroutines, one for the inlet
boundary and one for the pressure boundary. These are supplied in files bcdefi.f
and bcdefp.f which should be copied into the ufile directory, replacing the
default subroutines. Alternatively, you may edit the default subroutines so that they
match those shown below.

13-16

Version 4.02

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

User Subroutines
Inlet Boundary

Inlet
Boundary

The user subroutine mapping the inlet boundary data is BCDEFI, given below:

C*************************************************************************
SUBROUTINE BCDEFI(SCALAR,U,V,W,TE,ED,T,DEN,TURINT)
C
Maps inlet boundary conditions from cell data
C*************************************************************************
C
C
STAR VERSION 4.02.000
C
C*************************************************************************
INCLUDE comdb.inc
COMMON/USR001/INTFLG(100)
DIMENSION SCALAR(50)
LOGICAL TURINT
INCLUDE usrdat.inc
DIMENSION SCALC(50)
EQUIVALENCE( UDAT12(001), ICTID )
EQUIVALENCE( UDAT04(002), DENC )
EQUIVALENCE( UDAT04(003), EDC )
EQUIVALENCE( UDAT02(005), PR )
EQUIVALENCE( UDAT04(005), PRC )
EQUIVALENCE( UDAT04(009), SCALC(01) )
EQUIVALENCE( UDAT04(007), TC )
EQUIVALENCE( UDAT04(008), TEC )
EQUIVALENCE( UDAT04(059), UC )
EQUIVALENCE( UDAT04(060), VC )
EQUIVALENCE( UDAT04(061), WC )
EQUIVALENCE( UDAT04(064), UCL )
EQUIVALENCE( UDAT04(065), VCL )
EQUIVALENCE( UDAT04(066), WCL )
EQUIVALENCE( UDAT02(070), X )
EQUIVALENCE( UDAT02(071), Y )
EQUIVALENCE( UDAT02(072), Z )
c-inclusion_1 start ---------------------------------------------------PARAMETER(MAXPB=209528)
DIMENSION USTORE(MAXPB),VSTORE(MAXPB),WSTORE(MAXPB),
* TESTORE(MAXPB),EDSTORE(MAXPB)
SAVE USTORE,VSTORE,WSTORE,TESTORE,EDSTORE,ITFLAG,IFILEFLAG
LOGICAL FILEEXIST
c-inclusion_1 end -----------------------------------------------------C----------------------------------------------------------------------c-inclusion_2 start ---------------------------------------------------IF (INTFLG(1).EQ.0) THEN
INTFLG(1) = 1
ITFLAG = ITER
END IF
IF(IREG.EQ.1) THEN
IF (ITER.EQ.ITFLAG) THEN
IF (IBP.GT.MAXPB)STOPBCDEFI:MAXPB too small
IF (INTFLG(2).EQ.0) THEN
INTFLG(2) = 1
INQUIRE(FILE=inlet.inp, EXIST=FILEEXIST)
IF (FILEEXIST) THEN
Version 4.02

13-17

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

User Subroutines
Inlet Boundary

IFILEFLAG = 1
ELSE
IFILEFLAG = 0
END IF
END IF
IF (IFILEFLAG.EQ.0) THEN
IF (INTFLG(3).EQ.0) THEN
WRITE(*,*) *** WARNING: Setting inlet boundary
*
// to near cell value and writing inlet.inp file
INTFLG(3) = 1
END IF
USTORE(IBP)=UC
VSTORE(IBP)=VC
WSTORE(IBP)=WC
TESTORE(IBP)=TEC
EDSTORE(IBP)=EDC
call freeunit(iunit)
OPEN (iunit,FILE=inlet.inp,FORM=formatted,
*
STATUS=unknown)
10
CONTINUE
READ(iunit,*,END=11) TMP
GO TO 10
11
CONTINUE
WRITE(iunit,*) IBP,UC,VC,WC,TEC,EDC
CLOSE (iunit)
ELSE
IF (INTFLG(4).EQ.0) THEN
WRITE(*,*) *** WARNING: Reading inlet profile
*
// from inlet.inp
INTFLG(4) = 1
END IF
OPEN (iunit,FILE=inlet.inp,FORM=formatted,
*
STATUS=unknown)
12
CONTINUE
READ(iunit,*,END=13) IBPR,UR,VR,WR,TER,EDR
IF (IBP.NE.IBPR) THEN
GO TO 12
ELSE
USTORE(IBP)=UR
VSTORE(IBP)=VR
WSTORE(IBP)=WR
TESTORE(IBP)=TER
EDSTORE(IBP)=EDR
END IF
CLOSE (iunit)
END IF
C-SPOT CHECK
IF(IBP.EQ.690) PRINT *,STARTU,V,W,IBP=,U,V,W,IBP
END IF
U=USTORE(IBP)
V=VSTORE(IBP)
W=WSTORE(IBP)
TE=TESTORE(IBP)
ED=EDSTORE(IBP)
T=293.0
DEN=1.205
C-SPOT CHECK
IF(IBP.EQ.690) PRINT *,U,V,W,IBP=,U,V,W,IBP
END IF
13-18

Version 4.02

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

User Subroutines
Pressure boundary

c-inclusion_2 end -----------------------------------------------------RETURN


13
CONTINUE
WRITE(*,*) ***ERROR: Could not find pro-STAR boundary ,
* IBP, in file inlet.inp
WRITE(60,*) ***ERROR: Could not find pro-STAR boundary ,
* IBP, in file inlet.inp
CALL STQUIT(1)
END

Pressure
boundary

The user subroutine mapping the pressure boundary data is BCDEFP, given below:

C*************************************************************************
SUBROUTINE BCDEFP(UB,VB,WB,PR,TE,ED,T,SCALAR,TURINT)
C
Maps pressure boundary conditions from cell data
C*************************************************************************
C
C
STAR VERSION 4.02.000
C
C*************************************************************************
INCLUDE comdb.inc
COMMON/USR001/INTFLG(100)
DIMENSION SCALAR(50)
LOGICAL TURINT
INCLUDE usrdat.inc
DIMENSION SCALC(50)
EQUIVALENCE( UDAT12(001),
EQUIVALENCE( UDAT02(002),
EQUIVALENCE( UDAT04(002),
EQUIVALENCE( UDAT04(003),
EQUIVALENCE( UDAT04(005),
EQUIVALENCE( UDAT04(009),
EQUIVALENCE( UDAT04(007),
EQUIVALENCE( UDAT04(008),
EQUIVALENCE( UDAT04(059),
EQUIVALENCE( UDAT04(060),
EQUIVALENCE( UDAT04(061),
EQUIVALENCE( UDAT04(064),
EQUIVALENCE( UDAT04(065),
EQUIVALENCE( UDAT04(066),
EQUIVALENCE( UDAT02(070),
EQUIVALENCE( UDAT02(071),
EQUIVALENCE( UDAT02(072),

ICTID )
DEN )
DENC )
EDC )
PRC )
SCALC(01) )
TC )
TEC )
UC )
VC )
WC )
UCL )
VCL )
WCL )
X )
Y )
Z )

SAVE PSTOR, ITFLG, IFILEFLAG


LOGICAL FILEEXIST
PARAMETER (MAXPB = 209528)
DIMENSION PSTOR(MAXPB), TESTOR(MAXPB), EDSTOR(MAXPB)
IF (INTFLG(41).EQ.0) THEN
INTFLG(41) = 1
C
C set the starting iteration
Version 4.02

13-19

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

User Subroutines
Pressure boundary

C
ITFLG = ITER
END IF
IF (IREG.EQ.2) THEN
C
C Check is array pstor has been sized correctly
C
IF (IBP.GT.MAXPB) STOP BCDEFP: MAXPB TOO SMALL
C
C If in the first iteration of run
C
IF (ITER.EQ.ITFLG) THEN
IF (INTFLG(42).EQ.0) THEN
INTFLG(42) = 1
C
C check if file containing pressure data exists
C
INQUIRE(FILE=pressure.inp, EXIST=FILEEXIST)
IF (FILEEXIST) THEN
IFILEFLAG = 1
ELSE
IFILEFLAG = 0
END IF
END IF
C
C If file pressure.inp does not exist write warning message to screen.
C
IF (IFILEFLAG.EQ.0) THEN
IF (INTFLG(43).EQ.0) THEN
INTFLG(43) = 1
WRITE(*,*) ***WARNING: Setting pressure boundary
*
// to near cell value and writing pressure.inp file
END IF
C
C Get pressure from cell value and store
C
PSTOR(IBP) = PRC
TESTOR(IBP) = TEC
EDSTOR(IBP) = EDC
call freeunit(iunit)
OPEN(iunit,FILE=pressure.inp,FORM=formatted,
*
STATUS=unknown)
10
CONTINUE
READ(iunit,*,END=11) TMP
GO TO 10
11
CONTINUE
WRITE(iunit,*) IBP, PRC, TEC, EDC
CLOSE (iunit)
ELSE
IF (INTFLG(44).EQ.0) THEN
INTFLG(44) = 1
WRITE (*,*) *** WARNING: Reading pressure boundary
*
// profile from file pressure.inp
END IF
OPEN (iunit,FILE=pressure.inp,FORM=formatted,
*
STATUS=unknown)
12
CONTINUE
13-20

Version 4.02

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

CFD Analysis
Preliminaries

13

READ(iunit,*,END=13) IBPR,PRCR, TECR, EDCR


IF (IBPR.NE.IBP) THEN
GOTO 12
ELSE
PSTOR(IBP) = PRCR
TESTOR(IBP) = TECR
EDSTOR(IBP) = EDCR
END IF
CLOSE (iunit)
END IF
END IF
END IF
PR = PSTOR(IBP)
TE = TESTOR(IBP)
ED = EDSTOR(IBP)
T = 293.0
RETURN
CONTINUE
WRITE (*,*) ***ERROR: Cannot find pressure boundary in file
CALL STQUIT()
END

CFD Analysis
The description in the next two sections assumes that STAR will be run from the
command line whilst leaving pro-STAR running in the background. If possible, you
should also run the analysis on multiple CPUs to minimise the elapsed run time.
To run the analysis in parallel, on two local CPUs and in double precision, type:
star -dp 2
To run the analysis sequentially, in double precision mode, type:
star -dp
However you choose to run the analysis, it will take at least a few hours to complete.
In our experience, the run takes 9 hours on a dual-processor Pentium 4 Xeon 2.8Ghz
running under Linux. Long run times are typical for DES cases as they require very
fine meshes and a large number of time steps (in this case 30,000).
Post-Processing
Preliminaries Before post-processing the results, it is advisable to check the performance of the
run by examining the information in the .info file:

Version 4.02

In STAR GUIde, select the Analysis Preparation/Running folder


Open the Run History of Previous Analysis panel
Click Browse Additional Output File to display the .info file contents
Examine the Maximum Courant number and the Mean Courant number at a
selection of time steps through the run. You should see that these two
quantities stay within the ranges 1.0 to 9.0 and 0.15 to 0.5, respectively.
Ideally, the Courant number should not exceed 1.0 but, in this case, it is
reasonable to assume that large Courant numbers are found only in a few very
13-21

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Post-Processing
Animated Plots

small cells near the cylinder surface.


Examine the NUMBER OF PISO CORRECTORS at a selection of time steps
through the run. This should be either 2 or 3. A stable transient calculation
will not regularly exceed 4 PISO correctors.

Begin the post-processing session by opening the transient post data file:

Animated
Plots

In STAR GUIde, select the Post-Processing folder and open the Load Data
panel
Under the File(s) tab, select Transient as the Analysis option
Select the first empty position, 1, in the Transient Post File(s) list
Click Add File to List
Select file aac_tr.pstt from the Transient Post File(s) list
Click Open Transient Post File

An animation of turbulence kinetic energy contours will now be created to help


visualize the unsteady character of the flow. The animation may be defined by
writing a sequence of plots to a neutral plot file, which are then played back. These
operations are performed using the Animation module as follows:

Under the File(s) tab of the Load Data panel, select the first time step from
the Select Time Step list
Click Store Iter/Time
Under the Data tab, select Data Type Cell & Wall/Bound (Smooth)
Select Turb Kinetic Energy from the Scalar Data list
Click Get Data
Select Go To > Create Plots
Under the Options tab of the Create Plots panel, change the Range option to
User and specify a range of 0 to 4
Click Apply. This will fix the legend scale for all animation frames.
Click Replot to display a contour plot of turbulence kinetic energy at time =
0.015 seconds
In the main pro-STAR window, select Modules > Animation
In the Animation module, change the Number of Frames in Sequence to 100
Select Edit Frame Definitions.. > First Frame...
In the Animation Graphics Parameter Block dialog window, select Copy >
Current Plot. This will set the plotting options for the first animation frame
to be the same as those of the current plot
Change the Time to 0.015
Click Apply
Select the End of Animation Sequence radio button
Select Copy > First Frame
Change the Time to 1.5
Click Apply and then Close
In the Animation module, click Edit Sequence Parameters
Enter the following commands in the first two lines of the Post-Animation
Sequence Commands box:
STORE NEXT
GETV TE

13-22

Version 4.02

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Post-Processing
Pressure Trace

Change the Command For Initial Plot to Replot


Click Close
Click Record to write the animation data to the neutral plot file
Once the data have been written, click Play to view the animation

You should notice that the vortex shedding in the wake of the cylinder is quite
irregular. This is due to the random fluctuations introduced by the DES turbulence
model.
Pressure
Trace

The vortex shedding irregularity can also be seen in a plot of pressure at the
monitoring point:

Increase the maximum number of available graph register locations by typing


MEMORY MXSTOR 1000000

at the command line


Select the Post-Processing folder in STAR GUIde
Select the Graphs folder followed by the Extract/Graph Data folder
Open the Engineering Data panel
Change the Read ... file option to Cell
Click the read file button, , to display the contents of the .ecd file
Select PMON from the Select Entry list
Select PMAX in the Select data to graph section. As there is only one cell in
the set, PMAX = PMIN = PVAV = PMAV.
Click Add data to list
Click Create Graph
Click Yes when asked if you wish to continue
Select Draw Frame > Current

The default graph setting does not show the profile clearly enough. To obtain a
better view of this profile, resize the graph and adjust the axes:

Version 4.02

Select the Graphs sub-folder in the Post-Processing folder


Open the Customize Graphs panel
Under the Axis tab, select the Y-Axis Parameters sub-tab
Change Ymin to -80 and Ymax to 20
Change the Title to Pressure - Pa
Click Apply
Under the Axis tab, change Xmin to 0, Xmax to 1.5, Xmajor to 0.15 and #ticks
to 2
Change the Numbers option to Real
Change the Title to Time (s)
Click Apply
Click Redraw to display Figure T13.2-2

13-23

Tutorial 13.2

TRANSIENT FLOW AROUND A CYLINDER

Post-Processing
Pressure Trace

Figure T13.2-2

Pressure profile at the monitoring point

Figure T13.2-2 shows that the frequency of pressure fluctuations due to vortex
shedding is regular even though the amplitude is not. By measuring the time
between pressure peaks on the graph, the frequency of these oscillations is found to
be around 6.2 Hz. This is fairly close to the value predicted in the introduction to
this tutorial. It is also possible to calculate the sound pressure level (volume) of
these fluctuations using the following equation:
p 2
SPL = 10 log ---------
p ref
Using p = 45Pa (the approximate average amplitude of the pressure
5
oscillations) and P ref = 2 10 Pa (the lower limit of human perception), this
gives a sound pressure level of 127 dB.
The tutorial is now complete. Further analysis of the results may be performed
using a specialised acoustics package. For example, es-acoustics may be used to
perform a Fourier Transform on the pressure profile to derive a frequency profile
for the aeroacoustic noise.
To exit from pro-STAR:

13-24

Select File > Quit > Quit, Nosave

Version 4.02

Tutorial 14 LIQUID FILM SIMULATION


The following tutorials are intended to familiarise users with the process of setting
up liquid film simulations. The two cases presented are:
1. Evolution of a rectangular, two-dimensional, and initially stationary liquid
blob flowing under gravity down a vertical wall, and comparison with the
analytical solution
2. 3D film formation and transport due to spray impingement

Version 4.02

14-1

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Tutorial 14.1

Physical Problem Description

2D FILM FLOW DOWN A VERTICAL WALL

Physical Problem Description


In this tutorial, we consider the evolution of a rectangular, two-dimensional and
initially stationary blob of liquid flowing down a vertical wall under the action of
gravity and forming a liquid film in the process, as shown in Figure T14.1-1. The
calculation is compared with an analytical solution for film thickness as a function
of position x and time t given in [1]:
12

12 x
-------- = ---------
12
gf
t
where is the film viscosity, f the film density and g the value of gravity. The
solution is independent of initial values, i.e. it is valid regardless of initial film
profile, film thickness and wall area covered at the start of the calculation.
y
Initial blob

Air

2m

Wall

Gravity

Film
Figure T14.1-1

Schematic of vertical film flow and CFD mesh

In the problem we assume that the initial 2D blob has a film thickness of 1 mm and
covers a wall length of 250 mm. The case is run for a simulated time of 10 seconds,
which is long enough for the similarity condition given by the above equation to be
satisfied. Heat and mass transfer simulations are deactivated. The solution domain
is 2 m long in the vertical direction and 50 cm wide in the wall-normal direction. A
uniform mesh is used, as shown in Figure T14.1-1.
[1] D.A. Acheson, Elementary Fluid Dynamics. Oxford University Press, 1992

14-2

Version 4.02

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Pre-Processing
Preliminaries

Pre-Processing
Preliminaries Create a sub-directory for this tutorial called tut14-1 and copy file
liquid_film.ccm supplied with the STAR-CD installation into it. In this
directory:

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name, blob, in the Casename text box
Click Continue

Make sure that the STAR GUIde window is displayed on your screen, next to the
main pro-STAR window:

Open the Select Analysis Features panel in STAR GUIde


Select Transient from the Time Domain menu
Select On from the Liquid Films menu
Click Apply
In the main window, select File > Model Title
In the Title text box type:
TRANSIENT 2D FLOW DOWN A VERTICAL WALL

Mesh Import
& Checking

The mesh used in this case is two-dimensional, extending 2 m in the x-direction of


the global Cartesian coordinate system and 50 cm in the y-direction and has 120 and
20 cells in each direction, respectively. The thickness of the mesh is set to 5 cm but
will have no effect on the result, given the two-dimensional nature of the simulation.
To import and display the mesh:

Version 4.02

Click Apply

Select the Create and Import Grids folder in STAR GUIde


Open the Import Grids panel
Select the CCM button from the Format list. liquid_film.ccm will be
selected as the CCM File name
Check that the State Name entry is set to default
Click Import Grid
In the main window, select C > All to put all cells into the current cell set
Check that the Geometry Plot mode and Hidden Surface plot type are
selected
Click Cell Plot
Click View > Isometric and select 1, 1, 1 to display the grid shown in Figure
T14.1-2

14-3

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Pre-Processing
Boundary Locations

Figure T14.1-2

Boundary
Locations

2D hexahedral mesh

In addition to mesh data, file liquid_film.ccm also contains information on


boundary region locations. The latter can be displayed on the grid plot as follows:

Select the Locate Boundaries folder in STAR GUIde


Open the Create Boundaries panel
Select each entry on the Boundary Regions list in turn (except no. 0) and then
click Plot Region to display its location

Note that the wall boundary is split into two regions, of which no. 1 is that part of
the wall where film is initially present, and no. 2 the part where film appears at a
later time once the analysis begins. This subdivision is necessary purely for the
purposes of specifying film initial conditions (see Initial and Boundary
Conditions)
Display the location of all the key boundaries in the problem:

14-4

In the main window, select B > New > Wall and B > Add > Pressure to
display the boundaries shown in Figure T14.1-3
Turn off the Bound Cell Plot Display Option

Version 4.02

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Pre-Processing
Material Properties and Physical Models

Figure T14.1-3

Wall and pressure boundaries

Material
The following properties are used for the two phases:
Properties
1. The gas phase is ambient air with a density of 1.205 kg/m3 and viscosity of
and Physical
1.81 10-5 Pas
Models
2. The liquid phase is pure water with a density of 1000 kg/m3 and viscosity of
0.00089 Pas
Define the direction of gravity and assign physical properties to the two phases:

Select the Thermophysical Models and Properties folder


Open the Gravity panel
Change the Acceleration due to gravity to 9.81 m/s2
Change the gravity Direction to (1, 0, 0) in coordinate system 1
Click Apply
Select the Liquid and Gases folder
Open the Molecular Properties panel. The displayed default properties of air
are acceptable so no input is needed for this panel.
Open the Initialization panel. Again, the displayed defaults are appropriate for
this case so no input is needed.

Select locations for the pressure reference and monitoring cells as follows:

Open the Monitoring and Reference Data panel


Enter 501 in the Monitoring cell number box
Enter 501 in the Reference Pressure Cell Number box
Click Apply

Define liquid film physical properties and model controls:


Version 4.02

14-5

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Pre-Processing
Initial and Boundary Conditions

Initial and
Boundary
Conditions

Select the Liquid Film folder and then open the Film Controls panel
Select the Gravity Force option
Click Apply
Check that both wall regions (nos. 1 and 2) are set up for liquid film support
by scrolling the Region # slider at the bottom of the panel
Open the Film Physical Models and Properties panel
On the Film Models tab, turn On the Liquid Film (Type) Activation option and
then click Select from Database
In the Droplet Properties Database list, select H2O_l [Water (L)] and click
Select Material
Click Close to exit from the Droplet Properties Database panel and return to
the Film Models tab. Note that your selection is now displayed in the First
component name box and thus defines the film material to be used in this
problem.
Check that the Evaporation and Condensation option is deselected and then
click Apply
On the Film Properties tab enter 1000 for Density and 0.00089 for Viscosity.
The rest of the property values displayed are not used in this case.
Click Apply

Define the films initial conditions:

Open the Film Initialization panel


Check that the Region # scroll bar is set to 1 (the region initially occupied by
the film) and click Initialize
Enter 0.001 in the Thickness box (leaving all other initial conditions at their
defaults) and click Apply
Set the Region # scroll bar to 2 (the rest of the wall region) and click Initialize
Enter 0 in the Thickness box (leaving all other initial conditions at their
defaults) and click Apply. This signifies that initially there is no film on this
part of the wall.

Define film boundary conditions for all wall regions. Before doing this, you may
want to review all boundaries again, as done in section Boundary Locations, to
remind yourself of the relevant region numbers and locations:

Analysis
Controls

Specify various solver parameters and output controls required for this case:

14-6

Open the Film Boundaries panel and check that the Condition # scroll bar at
the bottom of the panel is set to 1
Enter 2 (the wall region where a film will form at a later stage) in the Film
Region # box and 6 (the pressure region next to it) in the Adjacent Region #
box and select Outlet for the film boundary condition.
Click Apply

Select folder Analysis Controls followed by Solution Controls followed by


Equation Behavior
Open the Primary Variables panel
On the Equation Status tab, deselect option W-Mom since we are solving a
2D flow in the x-y plane only
Click Apply
Version 4.02

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

CFD Analysis
Run Time Controls

Run Time
Controls

Select folder Output Controls and open the Analysis Output panel
Under the Post tab, check that option Write final solution (restart) file is
selected with an Output Frequency of 100 time steps
Click Apply
Select the Transient tab. Enter 0 in the Starting at time box and 0.1 in the
Write data every box. In view of the time step size chosen below, this will
result in transient post data being saved every 10 time steps.
Select the Wall data button
Scroll down to find Film Thickness in the variable list
Select this item and also the Post option (if not selected)
Repeat this process for Film Velocity
Click Apply

Run the analysis for a total of 10 seconds using two time periods. The first period
covers 1 s and uses a time step of 0.001 s in order to ensure computational stability.
The second period covers the remaining 9 s and uses a time step of 0.01 s.

Select the Analysis Preparation/Running folder


Open the Set Run Time Controls panel
Select the Run for button, enter 10 in the adjacent box and click Apply
In the Time Step Option section, enter 0 for the Period Start Time and 0.001
for the Time Step for period entry
Click Set Period
Now enter 1.0 for the Period Start Time and 0.01 for the Time Step for Period
entry and click Set Period again

These settings will be listed in the Time Periods window.


Final
Operations

You can run this simulation from STAR GUIde. However, it is more common to
run (lengthy) transient cases from the command line. Write the geometry and
problem files and save the model file:

In the main pro-STAR window, select File > Write Geometry File
In the Geometry File Write dialog, check that 1.0 is entered as the Geometry
Scale Factor
Click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
Check that you are in the current working sub-directory (tut14-1) and run the
CFD analysis in double precision by typing
star -dp
at the command line.

Version 4.02

14-7

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Post-Processing
Preliminaries

Post-Processing
Preliminaries When the simulation is complete and whilst in the tut14-1 sub-directory:

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name, blob, in the Casename text box
Select the Resume existing .mdl file? option
Select the Append to .echo file? option
Click Continue

Open the file containing the transient post data (blob.pstt):

Basic Plots

Read in the last set of results and make a contour plot of film thickness:

14-8

In the STAR GUIde window, select the Post-Processing folder and then open
the Load Data panel
Under the File(s) tab, select Transient as the Analysis option
Select entry no. 1 in the Transient Post File(s) list and click Add File to List
Select file blob.pstt from the list and then click Open Transient Post
File. All the stored transient time step data will now be displayed in the Select
Time Step window

In the Select Time Step list, scroll to the end of the list, select step number
1900 and click Store Iter/Time
Go to the Data tab and select Wall for the Data Type
In the Scalar Data list, select item Film Thickness
Click Get Data
In the main window, select plot option Contour Plot
Click Plot > Wall Plot
Turn mesh plotting Off by clicking the mesh on/off button
Rotate the plot using the mouse controls so that it is displayed approximately
as shown in Figure T14.1-4 (View 0, -1, 0.5, Angle -90)

Version 4.02

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Post-Processing
Animations

Figure T14.1-4

Animations

Film thickness contour at t=10 seconds

pro-STAR loops can be used to produce on-screen animations, as described in


Tutorial 8.2 and Tutorial 12.3. However, in this tutorial we will use pro-STARs
macro facility (see Chapter 16 of the CCM User Guide) to produce an animation of
the film thickness development. Before proceeding further, ensure that film
thickness contours are displayed as shown above.

Select Panels > Define Macro ... from the menu bar on the main pro-STAR
window
Enter anim as the macro name and click New
Click Open and then type in the following commands:
store first
*define noex
store next
getw lfthk
bset news regi 1
bset add regi 2
vset news bset
cset news name wall
cset subs vset any
wplot
*end
*loop 1 99

Version 4.02

On the [MACRO] anim.MAC panel, click File > Save followed by File >
Quit. File anim.MAC file will be saved to your local directory.
Click Execute on the Define Macro ... panel
14-9

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Post-Processing
Graphs

The resulting animation shows the movement of the film from rest over a 10 second
period.
Graphs

The spatial distribution of film thickness at a particular time (e.g. at 10 seconds) can
be plotted using pro-STARs graph facilities. Again, it is more convenient to save
the relevant commands in a pro-STAR macro file:

Select Panels > Define Macro ...


Enter graph as the macro name and click New
Click Open and then type in the following commands:
! *** select the wall film cells
bset news region 1
bset add region 2
vset news bset
cset news name wall
cset subs vset all
! *** reset the graph properties
greset
y
! *** load x value
gload,1,wall,cset,0,0,1
gvalue,2,1,wall,x,2
! *** load film thickness
gvalue,4,1,wall,pst4,0
! *** draw the graph
frame,1,locate,1.70,2.10,9.65,9.45
frame,1,legend,none
frame,1,xrange,0,2
frame,1,xtick,0,0,real,noindent,bottom
frame,1,xtitle,5.25,1.3
Distance (m)
frame,1,yrange,0,0
frame,1,ytick,2.5e-05,0,real,left
frame,1,ytitle,0.28,7.58
Film thickness (m)
frame,1,legend,none
frame,1,xreg,init, 2,
frame,1,yreg,init, 4,
gdraw,1
! *** save the data in a ASCII file named fthick.grf
sdata,fthick.grf,2,2,2,coded
close fthick.grf

14-10

On the [MACRO] graph.MAC panel, click File > Save followed by File >
Quit. File graph.MAC file will be saved to your local directory.
On the Define Macro ... panel click Execute to display the graph shown in
Figure T14.1-5

Version 4.02

Tutorial 14.1

2D FILM FLOW DOWN A VERTICAL WALL

Suggestions for Further Exercises


Graphs

Figure T14.1-5

Spatial distribution of film thickness

The data saved in file fthick.grf may then be used for comparison against
analytical solutions.

Select File > Quit > Quit, Nosave

Suggestions for Further Exercises


The agreement between model predictions and the analytical solution can be
improved further if a smaller time step is used. The user may also wish to test the
theory that the similarity solution for film thickness is independent of the initial film
profile by setting up a film covering the full length of the wall at the start of the
simulation.

Version 4.02

14-11

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Problem Description
Preliminaries

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Problem Description
In this tutorial, a diesel fuel spray (n-Dodecane, C12H26) is injected into the closed
box shown in Figure T14.2-1 (dimensions 16 16 44 mm). The injection point is
a nozzle with its axis perpendicular to the bottom of the box and located 24 mm
above it. The nozzle diameter is 0.3 mm. The injection lasts for 1.2 ms, the total fuel
injected is approximately 8 mg and the fuel temperature is 293 K. The fluid in the
box is quiescent air at room temperature (293 K) and at an elevated pressure of 15
bar. The Huh atomisation and Reitz-Diwakar break-up models are used for the
spray simulation. Furthermore, inter-droplet collisions and spray-wall interactions
are taken into account. Liquid film is formed on the bottom wall due to spray
impingement.
The case will be set up as a transient liquid film simulation and run for 100 time
steps with a time step size of 2.0 105 s.

20 mm

24 mm

16 mm
Figure T14.2-1

16 mm

Problem geometry

Pre-Processing
Preliminaries Create a sub-directory for this tutorial, say tut14-2. The mesh data for the
problem, in the form of cell and vertex definitions, are supplied ready-to-use in files
impinge.cel and impinge.vrt. Therefore, before starting the tutorial, make
sure that the supplied files are copied into your current directory.

Version 4.02

Start up pro-STAR by typing prostar at the command line


Specify your preferred graphics driver (xm, mesa or glm)
Enter the case name, impinge, in the Casename text box
14-13

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing
Mesh Creation

Click Continue
In the main window, select File > Model Title
In the Title box type
SPRAY WALL IMPINGEMENT AND LIQUID FILM

In the Subtitle Line 1 box type


Impingement distance: 24 mm

Click Apply

Make sure that the STAR GUIde window is displayed on your screen, next to the
main pro-STAR window and then:

Mesh
Creation

Open the Select Analysis Features panel in STAR GUIde


Select option Transient from the Time Domain menu
Select option Lagrangian Multi-Phase from the Multi-Phase Treatment
menu
Select On from the Liquid Films menu
Click Apply

The computational mesh data are stored in files impinge.cel and


impinge.vrt. These can be imported using pro-STARs GUI panels as follows:

In the main window, select Tools > Cell Tool to open the Cell Tool
Click Cell Read to open the Cell Read panel
Accept the default values and click Apply (pro-STAR will read in cell data
from file impinge.cel)
Close the Cell Read panel
Close the Cell Tool
In the main window, select Tools > Vertex Tool to open the Vertex Tool
Click on Vertex Read to open the Vertex Read panel
Accept the default values and click Apply (pro-STAR will read in vertex data
from file impinge.vrt)
Close the Vertex Read panel
Close the Vertex Tool
In the main window, collect all cells into a set by selecting C > All
Collect all vertices into a set by selecting V > All

Define the z-axis as the vertical axis and then display the imported mesh:

In the main window, select Plot > Up Axis > Z


Check that the Geometry Plot mode and Hidden Surface plot type are
selected
Click Cell Plot
Select View > Isometric > 1 1 1

Check the coordinate system used to create the mesh:

14-14

In the main window, click the CSYS button


Select coordinate system no. 1 (Cartesian) and then click Show Triad
Change the plot type to Quick Hidden Line to display the mesh, as shown in
Version 4.02

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing
Mesh Creation

Figure T14.2-2

Figure T14.2-2

3D Cartesian mesh

It can be seen that the origin is already at the desired location (the injector nozzle
tip). What is now needed is to define a local cylindrical coordinate system with the
same origin and with its z-axis along the injection direction:

In the Coordinate Systems dialog, click Hide Triad


Select system no. 10
Select Cylindrical from the pop-up menu and enter the following values in
the adjacent boxes:
xc = 0
yc = 0
zc = 0
Rxy = 0
Ryz = 0
Rzx = 180

Version 4.02

Click New (Local)


Click Show Triad
In the main window, click Replot to display the location of this system,
shown in Figure T14.2-3, and confirm that it has been defined correctly
Click Hide Triad
Select system no. 1 and then click Set Active
Close the Coordinate Systems dialog

14-15

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing
Boundary Specification

Figure T14.2-3

3D Cartesian mesh with the injector location at 0, 0, 0, in local


coordinate system number 10

Boundary
We next define the bottom and side walls as distinct boundary regions. The bottom
Specification wall is the only region that can support a liquid film. The side walls are defined as
separate regions only in order to facilitate the film boundary specification.

14-16

Select the Locate Boundaries folder in the STAR GUIde window


Open the Create Boundaries panel
Select Reg#1 in the Boundary Regions scroll list
Select Wall for Type, enter Film_Wall-Z in the Name box and then click
Define region
In the main window, select View > Axis > -Z
In the Create Boundaries panel, select Surface Based on Edges and then
click on any bottom-wall vertex displayed in the main window
Select Reg#2 in the Boundary Regions scroll list
Select Wall for Type, enter Side_Wall+X in the Name box and then click
Define region
In the main window, select View > Axis > +X
In the Create Boundaries panel, select Surface Based on Edges and then
click on any side-wall vertex displayed in the main window
Select Reg#3 in the Boundary Regions scroll list
Select Wall for Type, enter Side_Wall-X in the Name box and then click
Define region
In the main window, select View > Axis > -X
In the Create Boundaries panel, select Surface Based on Edges and then
click on any side-wall vertex displayed in the main window
Select Reg#4 in the Boundary Regions scroll list
Select Wall for Type, enter Side_Wall+Y in the Name box and then click
Version 4.02

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing
Material Properties and Physical Models

Define region
In the main window, select View > Axis > +Y
In the Create Boundaries panel, select Surface Based on Edges and then
click on any side-wall vertex displayed in the main window
Select Reg#5 in the Boundary Regions scroll list
Select Wall for Type, enter Side_Wall-Y in the Name box and then click
Define region
In the main window, select View > Axis > -Y
In the Create Boundaries panel, select Surface Based on Edges and then
click on any side-wall vertex displayed in the main window
Select View > Isometric > 1,1,1
In the main window, select B > All
Click Bound in the Cell Plot Display Options area to check the boundaries
just defined
Click Bound to turn off boundary plotting

The mesh set-up is now complete.


Material
Properties
and Physical
Models

Although the problem in this case is essentially isothermal, the model set-up
described below is for a non-isothermal case. This is done purely in order to prepare
the model in advance for a more general simulation in which heat and mass transfer
occur between the spray droplets, the liquid film, and their surrounding gas.
Assign physical properties to the two gaseous components (air and fuel vapour)
in the solution domain:

Select the Thermophysical Models and Properties folder


Open the Gravity panel
Check that the Direction of Gravity Force is set to (0, 0, -1) in coordinate
system number 1 and then click Apply
Select the Liquid and Gases folder
Open the Molecular Properties panel and check that the Material # slider at
the bottom of the panel is set to 1
Select Ideal-f(T,P) as the Density option and then click Apply
Activate the turbulence calculations by opening the Turbulence Models panel
and selecting On
Choose k-Epsilon/High Reynolds Number from the Turbulence menu and
then click Apply
Open the Thermal Models panel and select Temperature Calculation On
Click Show Options and check that option Thermal is selected in the
Enthalpy menu
Click Apply
Open the Initialization panel and check the values in the Flow Condition tab.
All defaults are acceptable
Open the Monitoring and Reference Data panel
Enter 1.5e6 in the Pressure box and then click Apply

Define scalar no. 1 to be the product of droplet evaporation and import its physical
properties from pro-STARs built-in database:

Version 4.02

In the Thermophysical Models and Properties folder, select the Additional


Scalars sub-folder
14-17

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing
Droplet Properties

Droplet
Properties

Open the Molecular Properties (Scalar) panel and check that the Scalar #
slider at the bottom of the panel is set to 1
Choose option Select scalar from database from the menu at the top of the
panel
Select Dodecane (V) from the Scalar Database scroll list and then click
Select Scalar
The physical properties of dodecane vapour are read in from pro-STARs
property database into the appropriate panel boxes. Check that the displayed
values are reasonable and then click Apply.

The maximum number of droplet parcels required for this case (10,000) is above the
default maximum allowed by the code, so it is necessary at this point to resize
pro-STAR by issuing the following commands from the I/O window:
MEMORY MAXDRP 10000
MEMORY WRITE
Check the basic control settings for droplets:

Select folder Lagrangian Multi-Phase and open the Droplet Controls panel
Check that option Coupled is selected in the Two-Phase Lagrangian
Calculations menu and keep the default Courant number
Check that option Use Gradient is selected in the Interpolation Method menu
Accept the default value of 0.35 for the Under-Relaxation of Lagrangian
Sources term
Type 10000 in the Maximum Number of Parcels box
Select option Spray injection with atomisation
Click Apply

Activate the turbulent dispersion model and define transport mechanisms and
physical properties for the droplets:

Open the Droplet Physical Models & Properties panel and select the Global
Physical Models tab
Activate the Turbulent Dispersion and Gravity Effects options
Select option Standard for the Collision Model
Click Apply
Select the Droplet Physical Models tab
For Momentum Transfer, select option Standard and accept the default Mass
Coef. and Slip Factor values
Select option Standard for the Mass Transfer
Select option Standard for the Heat Transfer
Select option Reitz for the Droplet Breakup and accept the default values of
the model constants
Select option Bai for the Droplet-Wall Interaction and accept the default
values of the model constants
Click Apply

Specify droplet physical properties for n-Dodecane, which in this case are to be
calculated by STAR using its internal fuel property functions:

14-18

Select the Droplet Properties tab


Version 4.02

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing
Boundary Conditions

Click Select from Database to open the Droplet Properties Database dialog
Scroll down the database material list to locate item # DODECANE(L),
select it, check the Use Internal Property Calculation box and then click
Select Material
Close the Droplet Properties Database dialog
Click the Evaporates to Scalar Select button
Define scalar no. 1 as the product of evaporation by selecting it in the Scalars
list
Click Close
In the Droplet Properties tab, click Apply

The injector location was specified earlier using local coordinate system 10. Its
geometric and physical properties can now be specified:

Boundary
Conditions

Specify thermal boundary conditions for the spray impingement plane at the bottom
of the box:

Film Model
Controls

Open the Spray Injection with Atomisation panel


Select 3 Dimensional for the Domain and Huh for the Atomization Model
Accept the default settings in the Nozzle specification section
Click Apply Spray Options
In the Define Injectors section, enter the following parameters:
Injection Temperature 293
Hole Diameter 0.0003
Coordinate System 10
Select option Fixed for the fuel Mass Flow Rate, and then enter a value of
0.007 (kg/s) in the box next to the drop-down menu
Enter 0 in the Start of Injection box
Enter 0.0008 in the End of Injection box
Enter 1.0e+06 in the Number of Parcels/Injector box
Check that the value in the Droplet Type list box is 1 and the name
DODECANE(L) appears next to it
Click Update Injector

Select the Define Boundary Conditions folder and then open the Define
Boundary Regions panel
Select Reg#1 (named Film-Wall-Z) in the scroll list
Select option Fixed from the Wall Heat menu and enter 293 for the boundary
Temperature and 0 for its thermal Resistance
Click Apply

Now define the liquid film model controls. Note that since the film is formed
entirely from wall-impinging droplets, its physical properties will be inherited from
those droplets and therefore do not need to be specified explicitly.

Select the Liquid Film folder followed by the Film Controls panel
Turn On the Gravity Force
Click Apply

Define the films initial conditions:

Version 4.02

Open the Film Initialization panel


14-19

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Pre-Processing
Analysis Controls

Check that the Region # scroll bar is set to 1 and click Initialize
Enter 0 in the Thickness box (leaving all other initial conditions at their
defaults) and click Apply. This signifies that initially there is no film on this
wall.

Define film boundary conditions for all wall regions. Before doing this, you may
want to review all boundaries again, as done in the Boundary Specification
section, to remind yourself of the relevant region numbers and locations:

Open the Film Boundaries panel and check that the Condition # scroll bar at
the bottom of the panel is set to 1
Enter 1 (the wall region where a film will form at a later stage) in the Film
Region # box and 2 (Side_Wall+X) in the Adjacent Region # box and select
Outlet for the boundary condition to be applied to the film.
Click Apply
Set the Condition # scroll bar to 2
Enter 1 in the Film Region # box and 3 (Side_Wall-X) in the Adjacent Region
# box and select Outlet for the film boundary condition.
Click Apply

Repeat the above process for the adjacent regions 1 and 4 (Side_Wall+Y) and 1 and
5 (Side_Wall-Y) to complete the liquid film boundary condition set-up.
Analysis
Controls

Specify various solver parameters and output controls required for this case:

14-20

Select folder Analysis Controls followed by Solution Controls


Open the Solution Method panel and change the Under-Relax. for Press.
Correction value to 0.5
Click Apply
Select the Equation Behavior folder and then open the Primary Variables
panel
Go to the Differencing Schemes tab and select MARS for all Flow Variables,
accepting the default value of the compression level for all equations
Click Apply
Open the Additional Scalars panel and select C12H26 from the Scalar list.
Change the Residual Tolerance to 0.01 and set the Differencing Scheme to
MARS, accepting the default value of the compression level.
Click Apply
Select the Output Controls folder and then open the Analysis Output panel
Select the Transient tab. First enter 0 in the Starting at time and 4.0e-5 in the
Write data every box. The last setting will ensure that post data will be saved
every 2 time steps.
Scroll to locate item C12H26 in the data scroll list. Select it and then click the
Post button
Deselect the Cell Data option and then select Wall data
Locate and select item Film Thickness in the data scroll list
Click Post
Repeat for items Film Velocity and Film Temperature
Click Apply

Version 4.02

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

CFD Analysis
Run Time Controls

Run Time
Controls

Set the run time control parameters:

Final
Operations

Select the Analysis Preparation/Running folder


Open the Set Run Time Controls panel
Select the Run for button and then enter 0.002 in the adjacent box
Click Apply
In the Time Step Option section, enter 0 in the Period Start Time and 2.0e-5 in
the Time Step for Period boxes
Click Set Period

If you wish to terminate the session at this stage, write the geometry and problem
files and exit from pro-STAR, saving the model data as shown below:

Select File > Write Geometry File


Enter 1 in the Geometry Scale Factor box
Click Apply and then Close
Select File > Write Problem File
Click Apply and then Close
Select File > Quit > Save & Quit

CFD Analysis
For flows involving sprays, it is recommended that STAR is run in double precision
mode, by typing
star -dp
in your session window. The analysis will then start automatically. The simulation
should run for 100 time steps and save flow field data to file tut.pstt every 2
time steps.
Post-Processing
Open the file containing the transient post data (impinge.pstt):

In the STAR GUIde window, select folder Post-Processing


Open the Load data panel
Toggle the Analysis option to Transient
Select entry no. 1 in the Transient Post File(s) list and click Add File to List
Select file impinge.pstt from the list and then click Open Transient Post
File. All stored transient time step data will now be displayed in the Select
Time Step window.

Plot the film thickness formed at the 20th time step:

Version 4.02

In the Select Time Step list, scroll down to the 10th entry, select it and click
Store Iter/Time button
Go to the Data tab. Select Wall for the Data Type and On for the Smooth
Option
In the Scalar Data list, select item Film Thickness
Click Get Data
In the main window, select plot options Contour Plot and Hidden Surface
14-21

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Post-Processing
Animations

Select View > Isometric > 1,1,-1


Deselect mesh plotting by clicking off the mesh plotting button
Select edge plotting by clicking on the edge plotting button

Add droplets to this plot:

In the main window, select the droplet display option by choosing Plot > Cell
Display >Droplets
In the STAR GUIde window, select the Particle Tracks folder
Open the Plot Droplets/Particle Tracks panel and go to the Droplets tab
In the Load Droplet Data section, select Current Post Data File from the
Load from menu
Click Load Data
In the Droplet Plot Options section, select Off for the Edge Plot Options
Select Diameter for the Droplet Radius and enter 0.0005 in the Size box
Select None for the Vectors option
Click Apply
In the main window, select D > All to collect all droplets in the domain into a
set
Click Plot > Wall Plot

Figure T14.2-4

Droplet and liquid film thickness contour plot

The above steps may be repeated for other times and variables of interest.
Animations

14-22

As pointed out in Tutorial 14.1, transient results for spray and liquid film problems
are best viewed by means of an on-screen animation. Again, use pro-STARs macro
facility (see Chapter 16 of the CCM User Guide) to produce an animation of the film
and droplet development.

Version 4.02

Tutorial 14.2

SPRAY IMPINGEMENT ON A WALL

Post-Processing
Final Operations

Select Panels > Define Macro ... from the menu bar on the main window
Enter anim as the macro name and click New
Click Open and then type in the following commands:
store first
*define noex
store next
getd post
dset all
getw lfthk
cave all
bset news regi 1
vset news bset
cset news name wall
cset subs vset all
wplot
*end
*loop 1 49

On the [MACRO] anim.MAC panel, click File > Save followed by File >
Quit. File anim.MAC file will be saved in your local directory.
Click Execute on the Define Macro ... panel

The above executes all commands within the loop 50 times to produce successive
snapshots of the spray and liquid film state at every saved time step.
Final
Operations

Version 4.02

Select File

> Quit > Quit,Nosave

14-23

Physical Problem Description

Tutorial 15 COAL COMBUSTION


Physical Problem Description
The following tutorials describe in detail how to set up, run and post-process a
simple CFD problem involving coal combustion.
The problem geometry represents a furnace with three concentric air inlets, a
primary (inner), a secondary (middle) and a tertiary (outer) one, located at one end.
The primary inlet also acts as a pulverised coal carrier. Air enters the solution
domain through the tertiary inlet and has a swirling velocity component. Flow exits
the domain through an outlet situated at the opposite end of the furnace.
A hexahedral mesh is used to model the problem, as shown in Figure T15.0-1.
The mesh was previously generated and stored as a .ccm format file, and this is
provided with the STAR-CD installation.

Primary Inlet

Outlet

Furnace Wall
Secondary Inlet
Tertiary Inlet
Figure T15.0-1

Coal combustion furnace mesh geometry

Modelling Strategy
The following modelling strategy was adopted:

Perform an initial run in non-reacting and isothermal mode (Tutorial 15.1)


Run the model using the Constant Rate Devolatilisation and Eddy Break-Up
gaseous combustion models (Tutorial 15.2)
Run the model using the Two-Competing-Steps Devolatilisation and Eddy
Break-Up gaseous combustion models (Tutorial 15.3)

Using this type of modelling strategy to achieve a solution in three stages is the
Version 4.02

15-1

Modelling Strategy

recommended method for all coal combustion cases. However, for some problems,
it may be possible to reach a good solution by missing out the first or second stages,
or even, for very simple problems, both.

15-2

Version 4.02

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

Pre-Processing
Preliminaries

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

For most coal combustion simulations it is advisable to run the case initially as an
isothermal problem. This will allows a stable flow field to be obtained before the
coal combustion models are introduced. This tutorial gives a detailed account of
how to set up the isothermal, non-reacting coal case for the furnace shown in Figure
T15.0-1.
Pre-Processing
Preliminaries Create a working directory for the tutorial named tut15-1. For this problem, the
mesh geometry data are supplied in file furnace.ccm. Therefore, before starting
the tutorial, make sure that this file is copied into your working directory. Start up
pro-STAR in this directory and begin the modelling task by specifying the case
name and problem title:

Type prostar at the command line


Specify the graphics driver (xm, mesa or glm)
Type coal_iso in the Enter Case Name text box
Click Continue
In the main pro-STAR window, select File > Model Title
In the Title text box type
COAL COMBUSTION - ISOTHERMAL ANALYSIS

Click Apply

Importing the Make sure that the STAR GUIde window is displayed on your screen, next to the
Mesh
main pro-STAR window. If not, activate it by clicking the special Show STAR
GUIde button shown below:

Select folder Create and Import Grids and then open the Import Grids panel
Select CCM as the file Format
Change the CCM File name to furnace.ccm
Click Import Grid

The following information should appear in the I/O window:

Verify that the mesh has been imported correctly by selecting all cells and
boundaries and plotting the mesh in Hidden Surface mode:

Version 4.02

In the main window, select C > All to select all cells


15-3

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

Pre-Processing
Model Specification

Select B > All to select all boundaries


Check that Hidden Surface is the default cell plot type
Select Bound for the Cell Plot Display Option
Click Cell Plot
Change the viewpoint to approximately (-1.0, 0.5, -1.0) using the orientation
cubes slider controls
Remove the wall boundaries from the display by selecting B > Unselect >
Wall and clicking Replot
Zoom in on the red inlet boundaries to create a plot resembling Figure
T15.1-1

Note the positions of the three concentric inlet boundaries.

Figure T15.1-1

Furnace inlet boundaries

Model
Set up the basic models used in the isothermal case:
Specification

Open the Select Analysis Features panel in STAR GUIde

Under Time Domain, check that Steady State is selected. This is essential
because coal combustion simulations are not feasible in transient mode

Click Apply
Material
Assignment
and Thermal
Options

15-4

All fluid cells should already be assigned to material number 1 by default. Check
this via the Cell Table Editor:

In the main pro-STAR window, click CTAB to display the Cell Table Editor
Select cell type no. 1 and verify that the Material Number value is 1
Click Close to exit the Cell Table Editor
Go to the STAR GUIde window and select the Thermophysical Models and
Properties folder followed by sub folder Liquids and Gases
Version 4.02

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

Pre-Processing
Boundary Conditions

Boundary
Conditions

The model consists of inlet, outlet and wall boundary regions. The velocity, thermal
and turbulence boundary conditions need to be specified for these:

Version 4.02

Open the Molecular Properties panel


The default material is air, which is suitable for this case. The flow is
compressible and without pressure dependency so select Ideal-f(T) for the
Density option
Select Polynomial for the Specific Heat option and click on Define/Edit
Polynomial
In the Polynomial Function Definition dialog, select N2 from the CHEMKIN
Database scroll list
Click Apply Database Substance
Close the dialog and then click Apply at the bottom of the Molecular
Properties panel
Open the Turbulence Models panel and turn On turbulent flow
Choose the k-Epsilon/High Reynolds Number model
Leave all settings as their default values and click Apply
Open the Thermal Models panel and select Temperature Calculation On
Click Apply
Open Monitoring and Reference Data panel
The default monitoring location (cell number 1) is suitable. Change the
Reference Pressure Cell number to 8279 and the Pressure to 1.0325E+05 Pa
Click Apply

Select the Define Boundary Conditions folder, then open the Define Boundary
Regions panel
In this panel, select Reg# 1- Inlet. This is the primary air inlet.
Enter an axial velocity value of 10 in the W (m/s) box
Select TI/Length for the Turb. Switch option
Enter a Turb. Intensity of 0.1 and a Length of 0.06 m
Enter a value of 1 in the Dens. (kg/m3) box
Enter a value of 353 in the Temp. (K) box
Click Apply
Select Reg# 2 - Inlet. This is the secondary air inlet.
Enter an axial velocity value of 10 in the W (m/s) box
Select TI/Length for the Turb. Switch option
Enter a Turb. Intensity of 0.1 and a Length of 0.01 m
Enter a value of 1 in the Dens. (kg/m3) box
Enter a value of 353 in the Temp. (K) box
Click Apply
Select Reg# 3 - Inlet. This is the tertiary air inlet.
To specify a swirling flow at this inlet, the velocity components need to be
entered in the global cylindrical coordinate system. Enter 2 in the Coord.
System box
Enter an axial velocity component of 20 in the W (m/s) box and a tangential
velocity component of 10 in the V (m/s) box
Select TI/Length for the Turb. Switch option
Enter a Turb. Intensity of 0.1 and a Length of 0.01 m
Enter a value of 0.616 in the Dens. (kg/m3) box
15-5

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

Pre-Processing
Analysis Controls

Enter a value of 573 in the Temp. (K) box


Click Apply
Select Reg# 4 - Outlet and enter a value of 1 in the Flow Split box
Click Apply

The default conditions for wall boundaries are adiabatic, no-slip and stationary,
which is suitable for this case so no changes are necessary for boundary regions 5
and 6.
Analysis
Controls

The solution and output controls need to specified next:

Run Time
Controls

The aim of this tutorial is to establish a stable, non-reacting flow field which will
help to achieve a stable flame and flow field once coal combustion is turned on.
Therefore, the solver must perform a sufficiently large number of iterations to reach
a converged isothermal flow field. This can be achieved by setting the maximum
iteration number to 1000 and the residual error tolerance to 0.001:

Final
Operations

Select folder Analysis Preparation/Running and open the Set Run Time
Controls panel
Type 1000 in the Number of Iterations box
Check that the Max. Residual Tolerance is 0.001
Click Apply
Open the Analysis (Re)Start panel
The setting of the Restart File Option menu should be None as this run starts
from the default initial conditions
Click Apply

The pre-processing task is now complete. If you wish to terminate the session at this
stage, save all model data, write the geometry and problem files and exit from
pro-STAR, as shown below. Alternatively, you may continue with the CFD analysis
using the STAR GUIde facilities for running STAR interactively.

15-6

Open the Analysis Controls > Solution Controls > Equation Behavior >
Primary Variables panel
In the Solver Parameters tab, check that the Relaxation Factor is 0.3 for
Pressure and 0.7 for Momentum and Turbulence
Click Apply
Select the Output Controls folder and open the Monitor Numerical Behavior
panel
Turn on Print Iteration Residuals and Conservation Checks
Leave all other options at their default values and click Apply

In the main pro-STAR panel, select File > Write Geometry File
In the Geometry File Write dialog, click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close
Select File > Quit > Save & Quit

Version 4.02

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

CFD Analysis
Preliminaries

CFD Analysis
To perform the analysis interactively, proceed as follows:

Select File > Save Model


In the Analysis Preparation/Running folder open the Run Analysis
Interactively panel
Check that the units in which the model was built are correctly selected
(option button meters)
Select Double Precision. Leave all other settings at their default values.
Click Start New Analysis

The analysis will then start automatically. Convergence should be achieved within
the specified maximum number of iterations.
Post-Processing
Preliminaries Read in the results of the analysis from file coal_iso.ccm:

PostProcessing

Begin by displaying a temperature contour plot to show the mixing of the two inlet
streams:

Version 4.02

Select folder Post-Processing


Open the Load Data panel and display the File(s) tab
Click Open Post File

Go to the Data tab of the Load Data panel


Select Cell from the Data Type menu
Select On and All for the Smooth Option
Select Temperature from the Scalar Data list
Click Get Data
In the main pro-STAR window, select plot type Contour Plot
Select View > Axis > -Z
Turn off Bound for the Cell Plot Display Option
Click Zoom Off
Click Section Slice and draw a horizontal cross-section trace through the
centre of the furnace
Select View > SNORMAL
Select plot type Section (Surface) to display Figure T15.1-2

15-7

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

Post-Processing
Post- Processing

Figure T15.1-2

Temperature contours through the centre of the furnace

Next, plot velocity vectors on the surface of the furnace to show the swirling nature
of the flow:

Return to the Data tab of the Load Data panel


Select Cell from the Data Type menu
Turn Off the Smooth Option
Select item Velocity Components UVW from the Vector Data list
Click Get Data
Select Go To > Create Plots
In the 3-D Surface tab select Option Vector
Select Edge from the Edge/Mesh menu
Click Plot to Screen
Type
VIEW -1.0 0.5 -1.0

15-8

in the pro-STAR output window


Click Replot to display Figure T15.1-3

Version 4.02

Tutorial 15.1

ISOTHERMAL, NON-REACTING FLOW

Post-Processing
Final Operations

Figure T15.1-3

Final
Operations

Version 4.02

Velocity vectors shown on the furnace surface

Exit from pro-STAR by choosing File > Quit > Quit, Nosave from the main
window menu.

15-9

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing
Preliminaries

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

This tutorial gives a detailed account of how to set up and run a coal combustion
model. The problem geometry and flow conditions are as described at the beginning
of Tutorial 15 and the analysis is run from the non-reacting solution produced in
Tutorial 15.1.
When running a large-scale simulation, it is generally necessary to employ the
Constant Rate devolatilisation model to establish the combustion conditions and a
stable flame and flow field. Therefore, the strategy in this case is to use the
following sub-models:

Constant rate devolatilisation


First-order char oxidisation
Eddy break-up two-step gas combustion

The model can then be changed to the Single-Step or 2-Competing-Steps


devolatilisation model (as described in Tutorial 15.3) and the analysis continued
from the Constant Rate solution.
Pre-Processing
Preliminaries Before running pro-STAR, create a directory for the tutorial named tut15-2 and
copy the model and solution files obtained in Tutorial 15.1 (coal_iso.mdl and
coal_iso.ccm) into it. Rename the model file coal_const.mdl.
Start up pro-STAR and begin the modelling task by specifying the problem title:

Check that coal_const is shown in the Enter Case Name box


Select the Resume From Existing .mdl File? option
Deselect the Append to Previous .echo File? option
Click Continue
Select File > Model Title
In the Title text box type
COAL COMBUSTION WITH CONSTANT RATE DEVOLATILISATION

Click Apply

As part of setting up a coal combustion case, it is necessary to activate the


Lagrangian Two-Phase and Coal Combustion models. To do this:

Thermal
Options
Version 4.02

Open the Select Analysis Features panel in STAR GUIde


Select Lagrangian Multi-Phase for the Multi-Phase Treatment option
Select Coal Combustion for the Reacting Flow option
Click Apply and then click Yes to proceed. Additional folders named
Lagrangian Multi-Phase and Thermophysical Models and Properties >
Reacting Flow will be created in the STAR GUIde NavCenter tree.
Select C > All and then click Cell Plot
Click Zoom off to display the mesh

An important element in an accurate coal combustion simulation is radiation


modelling. The radiation model in this tutorial includes the effects of the
15-11

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing
Radiation Patches

intervening gas, using default gaseous radiation properties, of particle radiation, and
of surface-to-surface radiation. In STAR-CD, radiation beams are only tracked
through those cells that are explicitly defined as participating in radiative heat
transfer.
To specify that radiation should be tracked through all cells in the furnace
interior:

Click CTAB in the main pro-STAR window to open the Cell Table Editor
Select Table# 1 in the scroll list
Select On from the Radiation menu
Click Apply
Close the Cell Table Editor

Turn radiation on, choosing the Discrete Transfer solution method in conjunction
with the Internal view factor and Participating Media calculation options:

Radiation
Patches

Select the Thermophysical Models and Properties folder and open the
Thermal Options panel
In the Radiation section of the panel, select option Discrete Transfer Internal VF Calc
Select option Participating to include gaseous radiation effects in the
calculation
Change the Under-Relaxation for Wall Temperature to 1
Accept the remaining default settings and click Apply

To use the Discrete Transfer model, it is necessary to subdivide all boundary regions
into radiation patches. These are used both during view factor calculations and for
evaluating the radiative heat transfer.
Assign a unique patch to every boundary in every relevant region. This can be
done most conveniently by means of a pro-STAR command loop, shown below,
typed into pro-STARs I/O window:
BSET NONE
*SET NREG 2 1
*DEFINE
BPATCH NREG,,BYFA
BSET ADD REGI NREG
*END
*LOOP 1 4
The above loop will create 1,984 patches. Display the patches to confirm that the
operation has been carried out properly:

15-12

In the main pro-STAR window select Patch in Cell Plot Display Options. The
radiation patches should appear as shown in Figure T15.2-1.

Version 4.02

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing
Other Settings

Figure T15.2-1

Radiation patches on mesh surface

The entire surface of the mesh is coloured, indicating that radiation patches are
present everywhere. There is also one radiation patch on each boundary face.

Other
Settings

Deselect Patch from the Cell Plot Display Options

It is good practice to define one of the cells near the expected centre of the flame as
the monitoring point. This eases the task of checking for the onset of combustion as
temperature and product concentrations build up rapidly at that point once
combustion begins. Start by inspecting the cell numbers in the region of interest:

In the main window, select Plot > Numbers...


In the Plot Numbers dialog, select Cell and then click Close
Click Replot
Zoom in on the mesh shown on-screen to have a closer look at the displayed
numbers. We will define cell number 5918 as the monitoring cell.
Open the Thermophysical Models and Properties > Liquids and Gases >
Monitoring and Reference Data panel
Type 5918 in the Monitoring cell number box
Click Apply
Return to the Plot Numbers dialog and deselect Cell
Close the Plot Numbers dialog
Click Zoom off

Coal
The next stage is to define the coal composition:
Combustion

Open the Thermophysical Models and Properties > Reacting Flow > Coal
Model Set-up
Combustion > Coal Composition panel
Version 4.02

15-13

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing
Coal Combustion Model Set-up

Select the Proximate tab to enter data for the coals proximate analysis
Enter 34.5% Volatile Matter, 1.4% Moisture, 52.8% Fixed Carbon and
11.3% Ash
Click Apply
Select the Ultimate tab to enter data for the coals ultimate analysis
Enter 84.6% C, 5.06% H, 7.6% O and 1.67% N
Click Apply
Select the Misc. tab
Check that a value of 1.5 is displayed in the Q-factor box (see equation (8-3)
in Chapter 8 of the CCM User Guide for the Q-factor definition)
Enter a Net Calorific Value of 3.444 E+7 J/kg
Check that the Fraction of Total N in Volatiles value is set to 1
Click Apply

The combustion models are specified next:

Open the Sub Models panel


Check that the Constant Rate Scheme is selected under the Volatiles tab
Enter a Devolatilisation Time of 0.01 s and a Devolatilisation Temperature of
353 K. A low temperature is specified to ensure that combustion is initiated
successfully. For most cases, the temperature should be increased to a more
realistic value once a stable flow field is reached. This is not done in this run
but is done for the Two-Competing-Steps case presented in Tutorial 15.3.
Click Apply
Check that the 1st Order Effect Scheme is selected under the Char tab
Leave all options at their default settings and click Apply
Select the Eddy-Break Up Scheme and the 2-step Combustion Mechanism
under the Gas Comb. tab
Click Apply. A warning message will appear telling you that pro-STAR will
delete any existing scalars and reaction mechanisms and will create new ones.
Click Yes.

The NOx and particle radiation model options and coal particle solution controls are
specified next:

15-14

Open the NOx/Radiation panel


Check that option NOx Model Off is selected under the NOx tab. If required,
the NOx solver can be turned on once the analysis is near convergence and the
analysis restarted. This is not done in this run but is done for the
Two-Competing-Steps case presented in Tutorial 15.3.
Click Apply
Select Particle Radiation On under the Radiation tab and enter a Particle
Emissivity of 0.8
Click Apply
Open the Control/Printout panel
Enter a value of 0.1 in the Under-Relaxation Factor for Particle box
Enter a very large value, e.g. 10000, in the Iteration Number to Begin
Averaging box. This ensures that particle averaging does not occur in the
calculation. Particle averaging is no longer recommended for use with
Lagrangian multi-phase calculations in STAR-CD.
Version 4.02

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing
Particle Properties and Injection Location

Click Apply

When a coal combustion model is selected, all scalars associated with that model
are automatically set up by pro-STAR, the number of scalars depending on the
reaction scheme chosen. For the Eddy Break-Up gas combustion scheme with the
2-Step combustion mechanism selected in this tutorial, 11 scalars are created.

Open the Thermophysical Models and Properties > Additional Scalars >
Molecular Properties panel
Use the Scalar # slider to check that 11 scalars have been defined. There is no
need to change any of the molecular properties for these scalars.
Click Apply when you are done

Specify that the initial flow field consists entirely of air:

Open the Additional Scalars > Initialisation panel


Select scalar O2 and enter 0.233 in the Initial Mass Fraction box
Click Apply
Select scalar N2 and enter 0.767 in the Initial Mass Fraction box
Click Apply

Particle
The following steps define the particle properties and the injection rate and location:
Properties

Select folder Lagrangian Multi-Phase


and Injection

Open panel Droplet Controls


Location

Check that Use Gradient is selected for the Interpolation Method and that
Explicitly defined parcel injection is selected at the bottom of the panel

To increase the maximum allowable number of droplets, type the following


commands in the I/O window:
MEMO,MAXDRP,2400
MEMO,WRITE

Return to the Droplet Controls panel and enter a value of 2400 in the
Maximum Number of Parcels box
Click Apply
Open the Droplet Physical Models and Properties panel
Turn On Turbulent Dispersion under the Global Physical Models tab
Click Apply

The component properties shown in the Droplet Properties tab are set internally in
STAR and should not normally be altered. However, the Heat of Vaporization (Hfg)
for each of the seven components should be zero. If any of them do not have this
value:

Go back to the Coal Combustion folder and select the NOx/Radiation panel
Under the NOx tab, select NOx Model On and click Apply
Go back to the Lagrangian Multi-Phase > Droplet Physical Models and
Properties > Droplet Properties tab then, in turn
(a) Select each of the components listed under Component Properties
(b) Enter a value of 0 in the Heat of Vaporisation box

Version 4.02

15-15

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing
Particle Properties and Injection Location

(c) Click Edit Component


(d) After you have done this for every component, click Apply at the bottom
of the panel

Change the Density to 1200 kg/m3 under the Droplet Properties tab
Click Apply
Go back to the NOx tab, select NOx Model Off and click Apply

Next, specify the coal particle injector locations and injection rate:

Select the Injection Definition panel


Check that the Injection Group # slider at the bottom of the panel is set to 1
Enter a value of 1e-4 m in the Diameter box and a value of 10 m/s in the
Velocity Magnitude box
Enter a value of 353 K in the Temperature box
Check that the Mass Flowrate applies to the Injection Group
Enter a value of 0.1 kg/s in the Mass Flowrate box
Enter a value of 300 in the No. of Parcels/injection point box
Click Apply
Open the Injection Points panel
Select Set Type Circle
Select Specify for the Circle option
Check that the Cylindrical Coordinate System value is 2
Define a Circle of Radius 0.02 at Z = -0.19
For the Number of Points, type 1 for R (number of rows) and 8 for Theta. This
will produce a circle of 8 injection points with a radius of 0.02 near to the
primary inlet.
Check that Constant is selected for the Entrance Dir. Vector and type 1 in the
DZ box (DX=0, DY=0, DZ=1)
Click Add New Set at the bottom of the panel

To display the particle injection locations:

15-16

Select the Post-Processing > Particle Tracks > Plot Droplets/Particle Tracks
panel
Under the Droplets tab and in the Load Droplet Data section, select Droplet
Initial Conditions for the Load From option
Click Load Data
Change the Droplet Radius Size to 0.01 in the Droplet Plot Options section
Click Apply
In the Collect/Plot section, choose Dp > All
Click Droplet Plot
Zoom in on the injection points to display Figure T15.2-2

Version 4.02

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing
Boundary Conditions

Figure T15.2-2

Boundary
Conditions

Many of the boundary conditions for inlet, outlet and wall boundaries have already
been set in Tutorial 15.1. However, thermal and radiation boundary conditions still
need to be specified:

Version 4.02

Particle injection positions

In the STAR GUIde window, select folder Define Boundary Conditions and
open the Define Boundary Regions panel
Select Reg# 1- Inlet from the list
Enter 353 in the T Radiation (K) box
Enter a value of 1 in the Emissivity box
Click Apply
Select Reg# 2 - Inlet from the list
Enter 353 in the T Radiation (K) box
Enter a value of 1 in the Emissivity box
Click Apply
Select Reg# 3 - Inlet from the list
Enter 573 in the T Radiation (K) box
Enter a value of 1 in the Emissivity box
Click Apply
Select Reg# 4 - Outlet
Enter 1000 in the T Radiation (K) box
Enter a value of 1 in the Emissivity box
Click Apply
Select Reg# 5 - Wall
Change the Wall Heat option to Fixed and enter a value of 400 in the Temp.
(K) box
Enter a value of 0.3663 for Resistivity
Set the Emissivity to 0.72 and the Ther. Reflectivity to 0.28
15-17

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Pre-Processing
Scalar Boundaries

Scalar
Boundaries

Specify that only air enters through the inlet boundaries:

Control
Parameters

Open the panel Analysis Controls > Other Controls > Switches and Real
Constants
Select the Real Constants tab
Check that a large value, e.g. 10000 appears in the C24 box. This high value
prevents particle averaging taking place, as discussed in the Coal
Combustion Model Set-up section
Enter 2 in the C64 box. This constrains the scalar concentrations to values
between 0 and 1.
Check that a value of 0.8 is shown in the C82 box. This is the particle
emissivity value.
Enter 3000 in the C88 box. This is the maximum allowable particle
temperature.
Enter 283 in the C89 box. This is the minimum allowable gas temperature.
Enter 3000 in the C90 box. This is the maximum allowable gas temperature.
Click Apply at the bottom of the panel

Check the status of the run time control parameters and specify that the analysis
should restart from the solution obtained in Tutorial 15.1:

15-18

Open the Scalar Boundaries panel


Select Reg# 1- Inlet from the Boundary Regions list
Select O2 from the Scalar list
Enter a value of 0.233 in the Mass Fraction box
Click Apply
Select N2 from the Scalar list and enter a value of 0.767 in the Mass Fraction
box
Click Apply
Specify exactly the same scalar boundary conditions for Reg# 2 - Inlet and
Reg# 3 - Inlet

Default values for analysis controls such as under-relaxation factors and


differencing schemes are set when the models are selected. Although these defaults
are suitable for this tutorial, the under-relaxation factors for other cases may need
changing or a second-order differencing scheme may be required.
To run a case involving coal combustion, it is also necessary to set some
pro-STAR Constants that help control the analysis:

Run Time
Controls

Click Apply
Select Reg# 6 - Wall
Change the Wall Heat option to Fixed and enter a value of 400 in the Temp.
(K) box
Enter a value of 0.02 for Resistivity
Set the Emissivity to 0.72 and the Ther. Reflectivity to 0.28
Click Apply

Select folder Analysis Preparation/Running and open the Set Run Time
Controls panel
Version 4.02

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

CFD Analysis
Final Operations

Final
Operations

Change the Number of Iterations to 500 and check that the Max. Residual
Tolerance is set to 0.001
Click Apply
Open the Analysis (Re) Start panel
Select Initial Field Restart for the Restart File Option
Enter coal_iso.ccm as the Restart File
Click Apply

The pre-processing task is now complete. If you wish to terminate the session at this
stage, write the geometry and problem files and exit, saving all model data in file
coal_const.mdl, as shown below. Alternatively, you may run STAR
interactively, as described in the next section.

In the main window, choose File > Write Geometry File


In the Geometry File Write dialog, click Apply and then Close
File > Write Problem File
In the Problem File Write dialog, click Apply
Ignore the warning shown in the I/O window. No ignition model is required.
Close the Problem File Write dialog
File > Quit > Save & Quit

CFD Analysis
To perform the analysis interactively proceed as follows:

Select File > Save Model


Select the Analysis Preparation/Running folder and open the Run Analysis
Interactively panel
Select option Double Precision in the Star Executable Precision section
Select the Write New Geometry File option
Click Restart Analysis

As well as the usual residual and monitoring data, the screen output will show
information about the coal combustion reaction at every iteration.
Note that the analysis will take some time to run (over 1 hour on a 2.8 GHz Linux
machine with 2 GB of RAM) and that the run time cannot be decreased by running
in parallel since cases involving the discrete transfer radiation method with
participating media cannot be run in this mode.
The run should converge within the specified maximum number of iterations.
Post-Processing
Preliminaries Enter pro-STAR and start the post-processing task by re-plotting the mesh:.

Version 4.02

In the main window, select C > New > Fluid


Click Cell Plot
In STAR GUIde, select folder Post-Processing
Open the Load Data panel and display the File(s) tab
Click Open Post File
15-19

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Post-Processing
Preliminaries

First, check the solution obtained by inspecting the velocity plot:

Go to the Data tab and check that Data Type Cell is selected
In the Vector Data list, select item Velocity Component UVW
In the Scalar Data list, check that the setting is None
Click Get Data
Select Go To > Create Plots to open the Create Plots panel
Go to the 3-D Surface tab and choose Vector from the Option menu and Edge
from the Edge/Mesh menu
Click Plot to Screen
Type:
VIEW -1.0 0.5 -1.0

in the pro-STAR I/O window


Click Zoom Off to display Figure T15.2-3

Figure T15.2-3

Velocity vectors inside the furnace

Next, plot the absolute temperatures on a section through the centre of the furnace
and normal to the Y axis:

15-20

Go to the Data tab of the Load Data panel and check that Data Type Cell is
selected
Choose On and All for the Smooth Option
In the Scalar Data list, select item Temperature
Click Get Data
Select Go To > Create Plots and choose Contour (filled) from the Option
menu in the 3-D Surface tab
Click Plot to Screen
Version 4.02

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Post-Processing
Preliminaries

Select View > Axis > -Z in the main pro-STAR window


Select Section Slice, then use the cursor to draw a section trace through the
centre of the furnace and parallel to the X axis
Select plot type Section (Surface)
Select View > SNORMAL
Click Zoom off to display Figure T15.2-4

Figure T15.2-4

Temperature contours on a section bisecting the grid

Next, plot the CO2 mass fraction contours on the same section through the centre
of the furnace:

Version 4.02

Go to the Data tab and select item CO2 from the Scalar Data list
Click Get Data
Click Replot to display Figure T15.2-5

15-21

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Post-Processing
Preliminaries

Figure T15.2-5

CO2 contours on a section bisecting the grid

Plot the steady-state coal particle distribution, specifying that the displayed particle
colour and radius is to depend on temperature and calculated diameter, respectively.
Also choose not to display particle velocity vectors:

Type
VIEW -1.0 0.5 -1.0

15-22

in the pro-STAR I/O window


In STAR GUIde, select folder Post-Processing followed by sub-folder
Particle Tracks
Open panel Plot Droplets/Particle Tracks and then select the Droplets tab
In the Load Droplet Data section, select option Track File from the Load
From menu
Check that file coal_const.trk is shown in the File Name box
Accept the default option (Particles) for the Plot Option menu and then click
Load Data
In the Droplet Plot Options section, select After, Unhidden and Cplot from
the Edge Plot Options menus
Select Diameter in the Droplet Radius menu and enter 1 and 0.001 in the Size
and Ref. Value boxes, respectively
Select Temperature in the Fill Colour menu
Select None in the Vectors menu
Click Apply
In the main pro-STAR window, select D > All
Click Droplet Plot at the bottom of the Droplets tab to display Figure T15.2-6

Version 4.02

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Post-Processing
Preliminaries

Figure T15.2-6

Coal particles coloured by temperature

Now make the droplet colour dependent on droplet mass and replot:

In the Droplet Plot Options section, select Mass from the Fill Color menu
Click Apply
Click Replot to display Figure T15.2-7

Figure T15.2-7
Version 4.02

Coal particles coloured by mass


15-23

Tutorial 15.2

CONSTANT RATE DEVOLATILISATION

Post-Processing
Final Operations

Figure T15.2-6 and Figure T15.2-7 show that the coal particles have essentially
burnt out well before reaching the furnace outlet. This burn-out accounts for all the
char and volatiles in the fuel. By default, STAR stops coal particle tracking once
more than 99.9% of char has been burnt out. By setting Constant 116 to 1 you can
continue tracking the remaining (ash) particles through the rest of the solution
domain but at the expense of additional computation time.
Remember that all results presented in this tutorial were generated with the
devolatilisation temperature set at the unrealistically low value of 353 K. In Tutorial
15.3, the devolatilisation temperature is raised to 550 K and the
Two-Competing-Steps devolatilisation model is used instead of the Constant Rate
model. NOx modelling is also turned on and the analysis is restarted from the
solution obtained in this tutorial.
Final
Operations

15-24

Exit from pro-STAR by choosing File > Quit > Quit, Nosave from the main
window menu

Version 4.02

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Pre-Processing
Preliminaries

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

This tutorial gives a detailed account on how to set up and run a coal combustion
model using the Two-Competing-Steps devolatilisation model. It should also be
instructive to users wishing to employ the Single-Step devolatilisation model as the
required set-up is very similar.
The Two-Competing-Steps model is based on a pair of competing first-order
reactions occurring uniformly throughout the particle. The rates of these reactions
are calculated as described in Chapter 10, Two-competing-steps model of the
Methodology volume. The modelling strategy in this tutorial is to use the following
sub-models:

Two-competing-steps devolatilisation
First-order char oxidisation
Eddy break-up two-step gas combustion

NOx modelling is also activated.


The analysis restarts from the Constant Rate devolatilisation case set up in
Tutorial 15.2, the problem geometry for which is shown in Tutorial 15. As a result,
this tutorial only requires a brief specification of the options for the
Two-Competing-Steps devolatilisation and NOx generation models.
Pre-Processing
Preliminaries Before running pro-STAR, create a directory for the tutorial named tut15-3 and
copy the model and solution file obtained in Tutorial 15.2 (coal_const.mdl
and coal_const.ccm) into it. Rename the model file coal_2step.mdl.
Start up pro-STAR and begin the modelling task by specifying the problem title:

Check that coal_2step is shown in the Enter Case Name box


Select the Resume From Existing .mdl File? option
Deselect the Append to Previous .echo File? option
Click Continue
Select File > Model Title
In the Title text box type
COAL COMBUSTION WITH TWO-COMPETING-STEPS
DEVOLATILISATION

Coal
Combustion
Model Setup

Click Apply

The next stage is to change the devolatilisation model to the Two-Competing-Steps


model:

Open the Thermophysical Models and Properties > Reacting Flow > Coal
Combustion > Sub Models sub-folder
Select the Volatiles tab
Select the 2 Competing Scheme

In the 1-Step section:

Version 4.02

Enter a value of 2.0e+05 in the Pre-exponential Factor box


15-25

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Pre-Processing
Analysis Controls

Enter a value of 1.047e+08 in the Activation Energy box


Change the Mass Stoichiometric Coefficient to 0.3

In the 2-Step section:

Enter a value of 1.3e+07 in the Pre-exponential Factor box


Enter a value of 1.67e+08 in the Activation Energy box
Check that the Mass Stoichiometric Coefficient is set to 0.7

To complete the model specification:

Enter a value of 550 K in the Devolatilisation Temperature box


Click Apply

Now activate NOx modelling:

Analysis
Controls

Open the Thermophysical Models and Properties > Reacting Flow >
Chemical Reactions > Emission panel
Turn On the NOx Model. Note that this has the same effect as turning on NOx
modelling in the Coal Combustion > NOx/Radiation panel
Turn On the Fuel NOx and Prompt NOx options
Change the Tuchin setting to 10. This is the number of integration steps used
to generate the beta function PDF and so increasing it will lead to a more
accurate solution.
Click Apply

To aid convergence, the under-relaxation factor for the energy equation will be
reduced:

Open the Analysis Controls > Solution Controls > Equation Behavior >
Primary Variables panel
Select the Solver Parameters tab
Change the Relaxation Factor for Temp. to 0.5
Click Apply

The under-relaxation factors for all active scalars should have changed
automatically when the temperature factor was changed, ensuring that the scalar
and energy equation solutions remain in synchronisation. To check that this has
happened:

Run-time
Controls

Check the status of the run-time control parameters and specify that the analysis
should restart from the solution obtained in Tutorial 15.2:

15-26

Open the Additional Scalars panel


Select scalars 1 - 8 from the list and check that their Under Relaxation Factors
are 0.5
Click Apply

Select folder Analysis Preparation/Running and open the Analysis (Re) Start
panel
Change the Restart File Option to Standard Restart. This can be used
because this analysis solves the same variables as the one for Tutorial 15.2.
Version 4.02

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

CFD Analysis
Final Operations

Final
Operations

Enter coal_const.ccm as the Restart File


Click Apply

The pre-processing task is now complete. If you wish to terminate the session at this
stage, write the geometry and problem files and exit, saving all model data in file
coal_2step.mdl, as shown below. Alternatively, you may run STAR
interactively, as described in the next section.

In the main window, choose File > Write Geometry File


In the Geometry File Write dialog, click Apply and then Close
File > Write Problem File
In the Problem File Write dialog, click Apply
Ignore the warning shown in the I/O window. No ignition model is required.
Close the Problem File Write dialog
File > Quit > Save & Quit

CFD Analysis
To perform the analysis interactively proceed as follows:

Select File > Save Model


Select the Analysis Preparation/Running folder and open the Run Analysis
Interactively panel
Select option Double Precision in the Star Executable Precision section
Select the Write New Geometry File option
Click Restart Analysis

As well as the usual residual and monitoring data, the screen output will show
information about the coal combustion reaction at every iteration.
Note that the analysis will take some time to run (over 1 hour on a 2.8 GHz Linux
machine with 2 GB of RAM) and that the run time cannot be decreased by running
in parallel since cases involving the discrete transfer radiation method with
participating media cannot be run in this mode.
The run will not converge within the specified maximum number of iterations.
However, the only residual that fails to fall below the convergence criterion is that
for HCN (scalar number 10). The very low values of the HCN scalar (less than 0.01
throughout the domain) mean that lack of convergence is not a concern for this
tutorial.
Post-Processing
Preliminaries Enter pro-STAR and start the post-processing task by re-plotting the mesh:

In the main window, select C > New > Fluid


Click Cell Plot
In STAR GUIde, select folder Post-Processing
Open the Load Data panel and display the File(s) tab
Click Open Post File

First, plot the absolute temperatures on a section through the centre of the furnace
Version 4.02

15-27

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Post-Processing
Preliminaries

and normal to the Y axis:

Go to the Data tab of the Load Data panel and check that Data Type Cell is
selected
Choose On and All for the Smooth Option
In the Scalar Data list, select item Temperature
Click Get Data
Select Go To > Create Plots and choose Contour (filled) from the Option
menu in the 3-D Surface tab
Click Plot to Screen
Select View > Axis > -Z in the main pro-STAR window
Click Zoom Off to display the whole mesh
Select Section Slice, then use the cursor to draw a section trace through the
centre of the furnace and parallel to the X axis
Select plot type Section (Surface)
Select View > SNORMAL to display Figure T15.3-1

Figure T15.3-1

Temperature contours on a section bisecting the grid

Next, plot the O2 mass fraction contours on the same section through the centre of
the furnace:

15-28

Go to the Data tab and select item O2 from the Scalar Data list
Click Get Data
Click Replot to display Figure T15.3-2

Version 4.02

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Post-Processing
Preliminaries

Figure T15.3-2

O2 contours on a section bisecting the grid

Next, plot the NO mass fraction contours on the same section through the centre of
the furnace:

Version 4.02

Go to the Data tab and select item NO from the Scalar Data list
Click Get Data
Click Replot to display Figure T15.3-3

15-29

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Post-Processing
Preliminaries

Figure T15.3-3

NO contours on a section bisecting the grid

Plot the steady-state coal particle distribution, specifying that the displayed particle
colour and radius is to depend on temperature and calculated diameter, respectively.
Also choose not to display particle velocity vectors:

Type
VIEW -1.0 0.5 -1.0

15-30

in the pro-STAR I/O window


In STAR GUIde, select folder Post-Processing followed by sub-folder
Particle Tracks
Open panel Plot Droplets/Particle Tracks and then select the Droplets tab
In the Load Droplet Data section, select option Track File from the Load
From menu
Check that file coal_2step.trk is shown in the File Name box
Accept the default option (Particles) for the Plot Option menu and then click
Load Data
In the Droplet Plot Options section, select After, Unhidden and Cplot from
the Edge Plot Options menus
Select Diameter in the Droplet Radius menu and enter 1 and 0.001 in the Size
and Ref. Value boxes, respectively
Select Temperature in the Fill Colour menu
Select None in the Vectors menu
Click Apply
In the main pro-STAR window, select D > All
Click Droplet Plot at the bottom of the Droplets tab to display Figure T15.3-4

Version 4.02

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Post-Processing
Preliminaries

Figure T15.3-4

Coal particles coloured by temperature

Note that there are significant differences between the results shown above and
those in Tutorial 15.2. These changes are partly due to the change in devolatilisation
model and the introduction of NOx modelling. However, the greatest change is due
to increasing the devolatilisation temperature to a more realistic value.
The last plot created in this tutorial combines a contour plot of CO2 concentration
with a plot showing the coal particles using the OVERLAY utility.

Return to the Data tab of the Load Data panel and select item CO2 from the
Scalar Data list
Click Get Data
Select Go To > Create Plots
Under the Section Clipped tab, select Contour (filled) and Edge
Change the Normal vector to (1, 0, 0)
Click Apply
Click Cell Plot to display the CO2 contours
Type
VIEW -1.0 0.3 -0.7

Version 4.02

in the pro-STAR I/O window


Turn on edge plotting by selecting the Edge button
Click Replot
Use the mouse to zoom out slightly so that the edges of the problem geometry
fit in the display window
Return to the Droplets tab of the Plot Droplets/Particle Tracks panel
Turn Off the Edge Plot Options
In the Droplet Plot Options section, change the Droplet Radius Size to 0.005
Change the Fill Color option to Color and choose Color 1
15-31

Tutorial 15.3

TWO-COMPETING-STEPS DEVOLATILISATION

Post-Processing
Final Operations

Click Apply
In the main pro-STAR window, select Plot > Display > Overlay
Click Droplet Plot in the Droplets tab of the Plot Droplets/Particle Tracks
panel to display Figure T15.3-5

Figure T15.3-5

Final
Operations

15-32

Coal particles displayed over CO2 contours

Finally, exit from pro-STAR by choosing File > Quit > Quit, Nosave from
the main window.

Version 4.02

Physical Problem Description

Tutorial 16 LARGE EDDY SIMULATION OF FULLY-DEVELOPED


CHANNEL FLOW
Physical Problem Description
This tutorial presents an example of applying the Large Eddy Simulation turbulence
model to a fully-developed, isothermal, incompressible channel flow. A 2-D cross
section through the problem geometry is shown in Figure T16.0-1, illustrating the
primary direction of flow. The dimensions for the channel are taken from the work
of Moser et al. [1] and correspond to a length, width and height of 2 m, m and 2
m, respectively.

Channel Walls

y
2
x
Figure T16.0-1

2-D cross section through the channel

The problem geometry represents a section of the channel and therefore cyclic
boundary conditions are applied in both the streamwise (x-) and spanwise (z-)
directions. Calculations are carried out at standard pressure and temperature (1 bar,
293K) for a Reynolds number (Re) of 395. The latter is based on the friction
velocity, u , and half-channel height and is given by
u
Re = ---------

where
u =

w
----

and w is the wall shear stress. The fluid is assumed to have constant physical
properties, as shown below:
Density
Molecular viscosity

1.0 kgm-3
1.0/Re Pa-s

These numbers have been chosen so as to give a value of u = 1.0 ms-1.


The flow in the channel is driven by an imposed pressure gradient whose value
Version 4.02

16-1

Modelling Strategy

is determined by balancing the pressure force in the streamwise direction with the
shear force at the top and bottom walls of the channel, yielding
pH = 2 w L
The wall shear stress is obtained from the friction velocity definition and has
a value of 1.0 Nm-1. This is then combined with the channel height and length to
give a pressure drop along the channel of 2 Pa.
Modelling Strategy
The major elements of the modelling strategy are:

Computational grid non-uniform hexahedral mesh comprising 90,000 cells


(see Figure T16.0-2). Cells in the y-direction are refined so as to yield a
higher resolution near the channel walls. This is achieved using an expansion
ratio of 1.1096
Wall and cyclic boundary conditions
Isothermal, incompressible, steady and transient flow options

The tutorial is divided into two parts. The first, a steady-state Reynolds Averaged
Navier-Stokes (RANS) simulation, is used to verify the mesh suitability for
capturing the large-eddy turbulence structures as measured by the integral length
scale, l = f(k/). The second part illustrates the recommended numerical settings for
LES, including pre- and post-processing, and includes comparison of results with
those obtained from a direct numerical simulation (DNS) [2].

Figure T16.0-2

16-2

The computational mesh.

Version 4.02

Tutorial 16.1

STEADY-STATE ANALYSIS

Pre-processing
Preliminaries

Tutorial 16.1

STEADY-STATE ANALYSIS

To obtain accurate results using LES it is essential that:

The computational mesh is sufficiently refined in key areas to resolve the


mean flow and large-eddy turbulence structures present
The time step for the analysis is small enough to capture the cascade of
energy over a wide spectrum, down towards the dissipative scales

These assessments can be made by examining the integral length and time scales for
the problem. This tutorial shows how to obtain these quantities from a steady-state
analysis using a Low Reynolds number k- turbulence model. The mesh provided
in this case is much coarser in the streamwise direction than the full 90,000 cell
mesh used in Tutorial 16.2, having only 9,000 cells. This is a reasonable
simplification as the steady-state result should have no streamwise velocity
gradient. The LES case will, of course, exhibit such a gradient and hence mesh
refinement in the streamwise direction is also necessary.
Pre-processing
Preliminaries For convenience, the problem set-up for this tutorial is performed by executing a
command macro, given in full in a separate section (Macro). The macro is
supplied in a file called RANS.MAC which contains instructions for mesh set-up,
boundary conditions, fluid properties and solution control settings.
Create a directory for this tutorial named tut16-1 and ensure that the above
macro file has been copied into it. Start pro-STAR, enter the tutorial name and make
the appropriate choices for an initial run:

Problem
set-up

Type prostar at the command line


Specify the graphics driver (xm, mesa or glm)
Type channel_ss in the Enter Case Name text box
Check that the Resume from Existing .mdl File? option is deselected
Check that the Append to Previous .echo File? option is deselected
Click Continue

Execute the command macro and save the model file:

Open the macro panel by selecting Panels > Define Macro in the main
pro-STAR window
Highlight RANS in the macro panel and click Execute
Save the model and exit from pro-STAR by selecting File > Quit > Save &
Quit from the pro-STAR menu

CFD Analysis
If your machine has more than one processor, performing this analysis in parallel
can be very beneficial. Running on two CPUs instead of one, for example, should
roughly halve the run time.
To run the analysis in parallel, on two local CPUs and in double precision, type:
star -dp 2
Version 4.02

16-3

Tutorial 16.1

STEADY-STATE ANALYSIS

Post-Processing
Problem set-up

For a description of how to run problems in parallel across a network, see Running
a STAR-CD Analysis on page 2-2 of the CCM User Guide.
If your machine has only one processor, you will need to run sequentially. To
perform this type of run in double-precision mode, type:
star -dp
The convergence criteria for this case are very strict and so the run will not converge
within the specified 3,000 iterations. The reason for running the analysis for this
number of iterations will be explained in the Post-Processing section.
Post-Processing
The nature of this problem makes the normalised residual sums a poor method for
judging convergence. Instead, the justification for stopping the run after 3,000
iterations can be provided by examining the monitor history data:

Start up pro-STAR and resume from the channel_ss.mdl model file


Select the Analysis Preparation/Running folder in STAR GUIde
Open the Run History of Previous Analysis panel
Check the U-Component box and click Plot Monitor History to display
Figure T16.1-1

Figure T16.1-1

Monitor history plot of the U-component of velocity

Figure T16.1-1 shows that the U-velocity at the monitoring point has converged to
a steady value.
The results will now be analysed to yield information about the integral length
(l) and time (t) scales, defined as:

16-4

Version 4.02

Tutorial 16.1

STEADY-STATE ANALYSIS

Post-Processing
Problem set-up

0.75 1.5

C k
k
l = -----------------------, t = -

Read in the analysis results file by typing the following command in the pro-STAR
I/O window:
LOAD channel_ss.ccm
The next step is to load the relevant data into the post registers and perform the
appropriate calculations. For the integral length scale l , this is achieved by typing
the following commands:
oper
oper
oper
oper
oper

getc
getc
v**s
smul
divi

te 5
ed 6
1.5 5 5
0.1643 5 5
5 6 4

Since we are trying to establish whether or not the mesh resolution in the
wall-normal direction (y-axis) is adequate for LES, it is useful to display the ratio
l/y (y being the cell height) for which a value greater than 1 should be observed.
Since all cells in the grid have the same x and z, we can calculate y from the
cell volume by
V
y = -----------------x z
which, for this mesh, means
y = 7.6V
Therefore, the ratio l/y is found by entering the following commands:
oper getc volu 5
oper smul 7.6 5 5
oper divi 4 5 4
Now display the data as a contour plot:

In STAR GUIde, select the Post-Processing folder and open the Create Plots
panel
Under the 3-D Surface tab, select Contour (filled) from the Option dropdown menu and Edge from the Edge/Mesh drop-down menu
Click Plot To Screen
Select View > Axis > +Z in the main pro-STAR window to display Figure
T16.1-2

The resulting plot shows that, except in the cells immediately adjacent to the wall,
the ratio l/y is greater than 1.0. This confirms that the resolution of the mesh is
sufficient for use in LES, although there may be some inaccuracy close to the wall.

Version 4.02

16-5

Tutorial 16.1

STEADY-STATE ANALYSIS

Post-Processing
Problem set-up

Figure T16.1-2

Contour plot showing the ratio l/y

It is also useful to check whether the cells adjacent to the wall are fine enough to
satisfy the criterion that y+ should be ~1. To find out the y for the near-wall cells,
enter the following command:
summ cset
The information given in the output window includes the minimum value in post
register 5, which contains the y values. The minimum value is 5.0639x10-3 m,
which corresponds to a y+ of ~2 according to the following equation:
u y
y + = --------------
The integral time scale is calculated and displayed by entering the following
commands:
oper getc te 5
oper getc ed 6
oper divi 5 6 4
repl
The resulting plot is shown in Figure T16.1-3.

16-6

Version 4.02

Tutorial 16.1

STEADY-STATE ANALYSIS

Post-Processing
Problem set-up

Figure T16.1-3

Contour plot of the integral time scale t

Figure T16.1-3 shows that the integral time scale, t, decreases from 1.21 s in the
centre of the channel to 1.28x10-3 s near the wall. It is also possible to determine
time scales associated with the turbulent eddies. Based on the cell sizes in the y- and
z-directions, and fluctuating velocities determined from the turbulent kinetic energy
predicted by the RANS analysis, time scales of 6.36x10-3 s (y-direction) and 0.0438
s (z-direction) are obtained.
The chosen time step for an LES run should thus be sufficiently small to capture
the turbulence structures in the vicinity of the wall i.e. < 1.28x10-3 s, whilst
satisfying the numerical schemes stability criterion. To obtain a time step that
satisfies the latter, the Courant number (Co) definition is rearranged to yield:
Co x
t = ------------U
The quantities U and x denote characteristic velocity and length scale,
respectively. For LES it is recommended that the value of Co should not exceed 0.3.
Using the channel dimensions and streamwise velocity shown in Table 1, a time
step value of 3.2x10-3 s is obtained.

Version 4.02

16-7

Tutorial 16.1

STEADY-STATE ANALYSIS

Macro
Problem set-up

Table 1: Parameters used to obtain time step for numerical stability


Parameter
Value
Channel length (m)
2
Number of cells in streamwise direction 30a
x (m)
0.20944
-1
U (ms )
19.61
a.This number relates to the refined mesh used for the LES case

A time step of 1x10-3 s is used in the LES tutorial (Tutorial 16.2), satisfying both
criteria mentioned above. Having completed the calculations for mesh suitability
and choice of time step, exit pro-STAR as follows:

Select File > Quit > Quit, Nosave

Macro
!===============================================
! Macro 16.1-1: Setting up the RANS analysis
!===============================================
! User-defined parameters:
! H - half-height of channel
! RETAU - Friction Reynolds number (Utau*H/nu)
! YPLS - Target y+ in near-wall cell
! COUR - Target Courant number
! NCX - Number of cells in streamwise direction
! NCY - Number of cells in normal direction
! NCZ - Number of cells in spanwise direction
!===============================================
*set H 1.0
*set RETAU 395.0
*set YPLS 1.0
*set COUR 1.0
*set NCX 3.0
*set NCY 60.0
*set NCZ 50.0
!===============================================
! Generate Mesh
*set PI 3.141592654
*set LX 2.0 * H * PI
*set LY 2.0 * H
*set LZ H * PI
! Generate a uniform mesh
vc3d 0.0 LX NCX -0.5 * LY 0.5 * LY NCY -0.5 * LZ 0.5 * LZ NCZ
! Define the
! directions
*set NVX NCX
*set NVY NCY
*set NVZ NCZ

number of vertices in each of the coordinate


+ 1
+ 1
+ 1

! Iterate for the expansion factor. Based on a geometric


! progression with the initial cell height estimated from a balance
16-8

Version 4.02

Tutorial 16.1

STEADY-STATE ANALYSIS

Macro
Problem set-up

! between the definition of y+ and the Reynolds number based on the


! wall shear velocity. Perform an iterative calculation to
! determine the expansion factor.
*set Q RETAU / 2.0 / YPLS
*set G 2.0 / NCY
*set R 1.01
*def noex
*set F R - 1.0 * Q + 1
*set R F ** G
*end
*loo 1 100
!============================================================
! Locate boundaries.
cset news flui
plty ehid
cplo
view -1 0 0
bzon 1 all
rdef 1 cycl$ $ $ $ $
view 1 0 0
bzon 2 all
rdef 2 cycl$ $ $ $ $
view 0 0 -1
bzon 3 all
rdef 3 cycl$ $ $ $ $
view 0 0 1
bzon 4 all
rdef 4 cycl$ $ $ $ $
cyma 1 2 LX 0.0 0.0
cyma 3 4 0.0 0.0 LZ
! Make mesh non-uniform to achieve desired y+.
vfil 1 NVY NVY - 2 2 1 NVX * NVZ NVY -1.0 * R
!============================================================
! Define common control parameters
time steady nodefa
iter 3000,1e-10
moni 8911
algo simple nodefa,,,
solu scalar CG
!============================================================
! Define properties and models
pmat 1 flui
dens cons 1.0
lvis cons 1.0 / RETAU
turb ke 1 stan
lowre on
coke,0.09,1.44,1.92,1.44,-0.33,0.419,1,1.219,0.9
nwall hybrid
twol off
init stan 21 0.0 0.0 1 0.0 0.0,keps,0.4,0.01
!============================================================
Version 4.02

16-9

Tutorial 16.1

STEADY-STATE ANALYSIS

Macro
Problem set-up

! Define boundaries at either end in the streamwise direction as


! cyclic with a prescribed pressure drop across them.
! Define boundaries at either end in the spanwise direction as
! regular cyclic.
rdef 0 wall stan
nosl stan 9.0
0.0 0.0 0.0 1 0.0
rdef 1 cycl stan
1 part regu inte
pdro LX / H / H / H
rdef 2 cycl stan
1 part regu inte
pdro -1.0 * LX / H / H / H
rdef 3 cycl stan
1 all regu inte
rdef 4 cycl stan
1 all regu inte
!============================================================
! Additional control parameters
solve,y,y,y,y,y,y,n,y,n,n,n,n,
relax,0.7,0.3,0.7, ,1, , , , , , , , ,
sweep,100,100,100,1000,100,100, , , , , , , , , , , ,
resid,0.1,0.1,0.1,0.05,0.1,0.1, , , , , , , , , , , ,
dsch,ud,uvw,,stan
prch ,,, conv
! Write geometry file, problem file and save
geom,,
prob,,
save,,

16-10

Version 4.02

Tutorial 16.2

LARGE EDDY SIMULATION

Pre-Processing
Preliminaries

Tutorial 16.2

LARGE EDDY SIMULATION

This tutorial illustrates the steps required to set up and perform a Large Eddy
Simulation for channel flow. The focus will be on the specifics related to LES and
thus the model set-up of Tutorial 16.1 will be used as the starting point.
Pre-Processing
Preliminaries The following files are required for this tutorial:

REFINE.MAC
DATA_AVERAGING.MAC
MEAN_U.MAC
REY_STRESS.MAC
chan395.means
chan395.reystress
channel_demo.ccm

Create a directory called tut16-2 and ensure that the above files are copied into
it. In addition, copy the model file channel_ss.mdl from Tutorial 16.1 to the
new directory and rename it channel_les.mdl. Once all the files are in place,
you may start a pro-STAR session:

Mesh
refinement

To refine the mesh in the streamwise direction to make it suitable for the LES
calculation:

LES settings

Type prostar at the command line


Specify the graphics driver (xm, mesa or glm)
Check that channel_les appears in the Enter Case Name text box
Check that the Resume from Existing .mdl File? option is selected
Deselect the Append to Previous .echo File? option
Click Continue

Select Panels > Define Macro from the main menu in pro-STAR
Highlight REFINE in the Define Macro panel
Click Execute
Select View > Isometric > -1,1,1 to display the mesh shown in Figure
T16.0-2

The calculation is no longer steady-state and so it is necessary change the analysis


type:

Click Select Analysis Features and select Transient from the Time Domain
menu
Click Apply

Next, change the turbulence model and set the appropriate parameters, including the
point at which statistical averaging will begin. The current simulation will be run
for a total of 50 s, equivalent to approximately 160 passes through the domain. The
flow is allowed to develop in the initial 25 s (25,000 time steps), after which the
statistical averaging of flow variables will begin.
Version 4.02

16-11

Tutorial 16.2

LARGE EDDY SIMULATION

Pre-Processing
Flow initialisation

Flow
initialisation

Select folder Thermophysical Models and Properties


Select sub-folder Liquids and Gases
Open panel Turbulence Models
Select the LES/Smagorinsky model from the pull-down menu
Check that option Provide statistically av. values is selected and then type
25000 in the Time Step box
Set the model constants to match those shown below
Click Apply

In order to reduce the run time, the simulation can start from a flow field that will
encourage the development of turbulence. The appropriate initial conditions may be
specified through user subroutine INITFI as follows:

Open the Initialization panel


Select User from the Options menu
Enter the following commands:
SYSTEM
UFILES

Click Define user coding in the Initialization panel


Click Apply
Use pro-STARs built-in text editor or an external editor to change the
contents of the default initfi.f file (written by pro-STAR into the ufile
sub-directory) to match the subroutine listing given in section User
Subroutine

The effect of the user-defined initial flow field is to introduce vorticity into the
domain. This is achieved by defining a region in the centre of the channel in which
all three velocity components are set explicitly. In particular, the wall-normal
component is set to a value greater than the streamwise component to encourage the
development of turbulence.
Solution
controls

To obtain the best results from an LES model, the use of second-order schemes is
recommended for both the temporal and spatial discretization. When using the
SIMPLE solution algorithm, the residual tolerance for the outer iterations and the
maximum number of outer iterations for each time step need to be set so that
convergence is achieved at every time step. This can be judged by examining the
residual and monitor information output during the run.

16-12

Select the Analysis Controls folder


Select the Solution Controls sub-folder
Open the Solution Method panel
Version 4.02

Tutorial 16.2

LARGE EDDY SIMULATION

Pre-Processing
Final operations

Change the Solution Algorithm to SIMPLE


Change the Max. No. of Outer Iterations to 3. This may not be large enough
for the algorithm to achieve convergence at every time step but should be
sufficient for obtaining a good-quality overall solution.
Select the Three Time Level Implicit scheme from the Temporal
Discretization drop-down menu
Click Apply

Next, change the solver parameters and change the spatial discretization scheme for
the momentum equations to CD, ensuring that the blending factor is set to 1.0:

Select the Equation Behavior sub-folder


Open the Primary Variables panel
Select the Solver Parameters tab
Change the Relaxation Factor for the U-Mom, V-Mom, W-Mom equations to
0.9 and the Number of Sweeps to 200
Change the Residual Tolerance to 0.001 for the three momentum equations
For Pressure, change the Relaxation Factor to 0.5 and the Residual Tolerance
to 0.0001
Click Apply
Select the Differencing Schemes tab
Select the CD scheme from the drop-down menu for the Differencing Scheme
of the momentum equations and check that the blending factor is set to 1.0
Click Apply

Velocity data for a cell near the wall will be monitored throughout the run. The data
will then be used to check whether the statistical averaging specified in the LES
settings section starts after allowing a reasonable time for the flow to develop.

Select the desired cell by typing the following command in pro-STARs I/O
window:
CSET NEWSET CLIST 89105

Final
operations

Version 4.02

Select INFO > Store Set/Surface/View from pro-STARs main window


In the Store Information dialog, enter monitor for the Set Name
Click Write and then Close
Go to the STAR GUIde window and select the Output Controls sub-folder
followed by the Monitor Engineering Behavior sub-folder
Open the Monitor Cell Behavior panel
Select On
Change the Set File name to channel_les.set
Select monitor from the Select Entry list
Select Velocity Data
Click Apply

At this point, the basic problem definition is complete. The next step is to set the
transient controls for the run. Set the calculation run time to 50 seconds with a time
step of 0.001 seconds, as determined in Tutorial 16.1 on the basis of the integral
time scale and Courant number.
16-13

Tutorial 16.2

LARGE EDDY SIMULATION

User Subroutine
Final operations

Select folder Analysis Preparation/Running


Open the Set Run Time Controls panel
Enter 50 in the Run for box under Run Time
Click Apply
In the Time Step Option section, check that the Time Step Method is set to
Constant and enter 0.001 in the Time Step for Period box
Click Set Period

Write and save the geometry and problem files:

Select File > Write Geometry File


In the Geometry File Write dialog, click Apply and then Close
Select File > Write Problem File
In the Problem File Write dialog, click Apply and then Close

Finally, before exiting from pro-STAR, make sure that the model file
(channel_les.mdl) is saved for possible future modification.

Select File > Quit > Save & Quit.

User Subroutine
User subroutine INITFI is used for setting the initial flow field, as shown below:
C****************************************************************
SUBROUTINE INITFI(U,V,W,PR,TE,ED,T,SCALAR,XVF2)
C
Initialise fields
C****************************************************************
C----------------------------------------*
C
STAR VERSION 4.02.000 *
C----------------------------------------*
INCLUDE comdb.inc
COMMON/USR001/INTFLG(100)
DIMENSION SCALAR(50)
INCLUDE usrdat.inc
EQUIVALENCE( UDAT12(001), ICTID )
EQUIVALENCE( UDAT03(001), CON )
EQUIVALENCE( UDAT03(020), F2 )
EQUIVALENCE( UDAT03(021), F4 )
EQUIVALENCE( UDAT03(022), F6 )
EQUIVALENCE( UDAT04(001), CP )
EQUIVALENCE( UDAT04(002), DEN )
EQUIVALENCE( UDAT04(062), VISM )
EQUIVALENCE( UDAT04(063), VIST )
EQUIVALENCE( UDAT04(067), X )
EQUIVALENCE( UDAT04(068), Y )
EQUIVALENCE( UDAT04(069), Z )
C------------------------------------------------------------------------real*8 Ubulk,Uprime,Vprime,Wprime
real*8 Myone,Mypfive,Mypone,Myppfive,myzero,mythree,myfour
Ubulk=20.0
Myone=-1.0
Mypone=1.0
16-14

Version 4.02

Tutorial 16.2

LARGE EDDY SIMULATION

CFD Analysis
Convergence and averaging

Mypfive=-0.5
Myppfive=0.5
Myzero=0.0
Uprime=32.45
Vprime=-52.36
Wprime=5.532
mythree=3.0
myfour=4.0
c.... Initialise channel flow
u=Ubulk
v=0.0
w=0.0
if (x.ge.Mythree.and.x.le.Myfour.and.
*
y.ge.Myzero.and.y.le.Myppfive.and.
*
z.ge.Mypfive.and.z.le.Myppfive) then
u=Uprime
v=Vprime
w=Wprime
endif
RETURN
END

CFD Analysis
To run the analysis in parallel, on two local CPUs and in double precision, type:
star -dp 2
To run the analysis sequentially in double precision, type:
star -dp
No matter how you choose to run the analysis, it will take at least a few days to
complete. Such long run times are typical for LES cases as they require refined
meshes and a large number of time steps (in this case 50,000). If you choose not to
run the analysis, the results are supplied in file channel_demo.ccm which was
copied into your working directory at the start of this tutorial.
Post-Processing
Convergence The transient nature of LES makes it necessary to average the data over some period
and
of time. The choice of this period will affect the quality of the results and should
averaging
therefore be sufficiently large to be statistically meaningful. Moreover, averaging
should begin only when the flow is fully developed.
The point at which averaging should begin can be judged by examining the
velocity components at a suitable monitoring location. In the present example, this
point is located near the wall where turbulence generation is greatest and was set up
as described in the Solution controls section. Figure T16.2-1 shows a plot of the
cross-stream velocity components at the prescribed monitoring point. It can be
clearly seen that after 25s, or 25,000 time steps, component values are oscillating
Version 4.02

16-15

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing
Preliminaries

about a mean value (in this case zero) and thus it is appropriate to begin averaging
data. In fact, with the benefit hindsight, it would have been reasonable for such
averaging to begin after only 10,000 time steps, which is roughly equivalent to 33
passes. This is much greater than the recommended number of passes before
averaging, given in the LES models section of the On-line Help. This is because
the use of periodic boundary conditions delays the establishment of a fully
developed flow.

Figure T16.2-1

Monitoring-point velocity components throughout the simulation

Preliminaries The first post-processing task is to load file channel_les.ccm, containing the
analysis results:

Inst. results

Before analysing the averaged data, an example is shown of the instantaneous


results representing a snapshot of the flow in time. Begin by displaying contours of
the streamwise velocity component:

16-16

Start up pro-STAR and resume from the channel_les.mdl model file


In STAR GUIde, select the Post-Processing folder
Open the Load Data panel
Click Open Post File

Click on the Data tab


Select On and All from the pull-down menus next to Smooth Option
Select Velocity Component U from the Scalar Data list
Click Get Data
Click on Go To and select Create Plots
Select Contour(filled) from the Option menu and Edge from the Edge/Mesh
menu
Select C > All in the main window
Version 4.02

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing
Inst. results

Click Plot to Screen in the Create Plots panel


In the main window, select View > Isometric > 1,1,1 to display Figure
T16.2-2

Figure T16.2-2

Contour plot of the instantaneous streamwise velocity

The snapshot shows the flow field non-uniformity generated by the presence of
eddies, with a predicted peak velocity of 24 m/s. The eddy structure can be viewed
in more detail by creating a plot of the secondary flow field. To do this, create a
vector plot of the V and W velocity components:

Version 4.02

Click Go To Load Data


Select Off from the Smooth Option menu
Select Velocity Component VW from the Vector Data list
Click Get Data
Select Go To > Create Plots
Select Vector from the Option menu and Edge from the Edge/Mesh menu
Click Plot to Screen
In the main window, select View > Axis > +X to display Figure T16.2-3

16-17

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing
Averaged results

Figure T16.2-3

Averaged
results

Having looked at the structure of the instantaneous flow field, attention is turned to
the time averaged data. Figure T16.2-4 shows a contour plot of the mean streamwise
velocity component. The plot is similar to that obtained from a simulation using a
RANS turbulence model, indicating that the averaging window is sufficiently large
for the data to be statistically meaningful.

Figure T16.2-4
16-18

Vector plot of the instantaneous secondary flow field

Contour plot of the average streamwise velocity


Version 4.02

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing
Averaged results

Profiles of the mean and fluctuating components are now generated and compared
to the DNS data of Moser et al. [2]. The plots are produced using the ready-made
macros supplied with the tutorial files of your STAR-CD installation and listed in
the Macros section. It should be noted here that LES post-processing is casedependent and that the macros provided are specifically for channel flow.
Prior to generating any graphs, the time-averaged LES data must also be
spatially-averaged. To do this:

Select Panels > Define Macro from the main menu in pro-STAR
Highlight DATA_AVERAGING in the Define Macro panel
Click Execute

Next, create a plot of the normalised time-averaged mean velocity:

Highlight MEAN_U and clicking Execute. Figure T16.2-5 shows the


resulting plot of U+ against ln(y+).

Due to the problem symmetry about y = H, only half of the profile is shown. It can
be observed that whilst the qualitative behaviour is reproduced by the LES model,
the velocity at the centre of the channel is over-predicted by about 10% when
compared to the DNS data.

Figure T16.2-5

Graph of mean streamwise velocity component

Reynolds stress profiles are produced by selecting REY_STRESS in the


macro panel and clicking Execute

To view these plots:

Version 4.02

Select Graph > Gdraw and then the appropriate frame number from the main
pro-STAR window. For instance, selecting Graph > Gdraw > Frame1 will
16-19

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing
Averaged results

produce a plot of uu, non-dimensionalised with the friction velocity, against


ln(y+), as shown in Figure T16.2-6.
Figures T16.2-6, T16.2-7 and T16.2-8 show profiles of uu, vv and ww,
respectively, non-dimensionalised by the friction velocity u = 1. These profiles
represent the turbulence intensity and show good qualitative agreement with the
DNS data. In addition, they highlight the anisotropic nature of the flow.
It can be observed that the LES model over-predicts the streamwise fluctuations
(Figure T16.2-6) whilst under-predicting the cross-stream fluctuations (Figures
T16.2-7 and T16.2-8). Under-prediction of vv and ww is common in LES
calculations where a large part of the turbulence spectrum lies in the subgrid scales.
Closer agreement with the DNS results can only be obtained through further mesh
refinement.

Figure T16.2-6

16-20

Graph of streamwise fluctuating component uu

Version 4.02

Tutorial 16.2

LARGE EDDY SIMULATION

Post-Processing
Averaged results

Figure T16.2-7

Graph of cross-stream fluctuating component vv

Figure T16.2-8

Graph of cross-stream fluctuating component ww

The uv Reynolds stress profile is shown in Figure T16.2-9. It can be observed that
the uv component is well predicted by the LES model, both qualitatively and
quantitatively.

Version 4.02

16-21

Tutorial 16.2

LARGE EDDY SIMULATION

Bibliography
Final operations

Figure T16.2-9

Graph of Reynolds stress uv

Components uw and vw are up to two or three orders of magnitude smaller and


are therefore less important. These are not shown here but may be viewed by
displaying the contents of graph frames 5 and 6.
Final
operations

As there were no changes to the model geometry or solution parameters, there is no


need to save file tut.mdl

Select File > Quit > Quit, Nosave

Bibliography
[1] Kim, Moin and Moser, 1987. Turbulence Statistics in Fully Developed Channel
Flow at Low Reynolds Number. J Fluid Mechanics, 177, 133-166.
[2] Moser, Kim and Mansour, 1999. DNS of Turbulent Channel Flow up to
Ret=590. Physics of Fluids, 11, 943-945.
Macros
Mesh
refinement in
the Xdirection

16-22

! ==============================================
! Macro 16.2-1 Refining mesh in X direction
! ==============================================
curs file
CREF,10,1,1,ALL
*set NCX NCX * 10
BSET ALL
BDEL BSET
cyde all
cset all
Version 4.02

Tutorial 16.2

LARGE EDDY SIMULATION

Macros
Spatial averaging of LES data

view,-1,1,1
cplot
surf,on $vset,news,edge $bfin,1,vx,
!SCRN,
0
1.8543
3.6749
!BFIN,1,6620,
bset,add,bran,1,mxb
surf,on $vset,news,edge $bfin,3,vx,
!SCRN,
0
8.0000
5.2650
!BFIN,3,335356,
bset,add,bran,3001,mxb
view reve
replot
surf,on $vset,news,edge $bfin,2,vx,
!SCRN,
0
2.4724
8.0035
!BFIN,2,3632,
bset,add,bran,4801,mxb
surf,on $vset,news,edge $bfin,4,vx,
!SCRN,
0
6.2870
6.9788
!BFIN,4,15772,
bset,add,bran,7801,mxb
rdef,1,cyclic
1,partial,regular,integral
pdrop,6.28319,293
rdef,2,cyclic
1,partial,regular,integral
pdrop,-6.28319,293
cymatch,1,2,6.28319,0,0,0.0001
rdef,3,cyclic
1,all,regular,integral
rdef,4,cyclic
1,all,regular,integral
cymatch,3,4,0,0,-3.14159,0.0001
bset none
moni,9001
pres,1.e+05,9001

Spatial
averaging of
LES data

Version 4.02

! ======================================
! Macro 16.2-2 - Spatially averaging LES data
! ======================================
! The script produces 12 files:
! U.dat
- Mean U against y/H
! V.dat
- Mean V against y/H
! W.dat
- Mean W against y/H
! VMAG.dat - Mean VMAG against y/H
! P.dat
- Mean P against y/H
! VIST.dat - Mean VIST against y/H
! uu.dat
- Mean uu against y/H
! vv.dat
- Mean vv against y/H
! ww.dat
- Mean ww against y/H
! uv.dat
- Mean uv against y/H
! uw.dat
- Mean uw against y/H
! vw.dat
- Mean vw against y/H
! =======================================
! Clear old .dat files
syst
rm -f U.dat
16-23

Tutorial 16.2

LARGE EDDY SIMULATION

Macros
Spatial averaging of LES data

syst
rm -f
syst
rm -f
syst
rm -f
syst
rm -f
syst
rm -f

V.dat
W.dat
VMAG.dat
P.dat
VIST.dat

!=========================================================
load,channel_les.ccm
oper,getc,SUMN,1
oper,getc,SVMN,2
oper,getc,SWMN,3
oper,vmag,4
oper,getc,PMN,5
oper,getc,VIMN,6
*set IC 0 10
*def noex
cset none
*set CC1 IC - 10
:lab
! Setting the current cell set to a layer in the geometry
cset add cran CC1 + 9001 CC1 + 9010 1
*if CC1 ge 88800 + IC
*goto done
*endif
*set CC1 CC1 + 600
*goto lab
:done
! Total
*get R1
*get R2
*get R3
*get R4
*get R5
*get R6

each
rtot
rtot
rtot
rtot
rtot
rtot

! Divide the
*set R1 R1 /
*set R2 R2 /
*set R3 R3 /
*set R4 R4 /
*set R5 R5 /
*set R6 R6 /
! Replace
chan cset
chan cset
chan cset
chan cset
16-24

variable in the cell set and store in registers 1-6


1
2
3
4
5
6
total
NCX /
NCX /
NCX /
NCX /
NCX /
NCX /

by the number of cells in the layer


NCZ
NCZ
NCZ
NCZ
NCZ
NCZ

register 1
,,, 0.0 R1
,,, 0.0 R2
,,, 0.0 R3
,,, 0.0 R4

with the new values for register 1 etc.


1 1
2 2
3 3
4 4
Version 4.02

Tutorial 16.2

LARGE EDDY SIMULATION

Macros
Spatial averaging of LES data

chan cset ,,, 0.0 R5 5 5


chan cset ,,, 0.0 R6 6 6
*end
*loo 1 NCY
! Make current cell set equal to 1 Y-column of cells
cset none
*set CC2 9001 10
*defi noex
cset add clis CC2
*end
*loo 0 NCY - 1
! loads current cell set numbers into graph register 1
gloa 1 cell cset
! Loads the y values of cells corresponding to graph register 1
! into graph register 2
gval 2 1 cell y 1
! Operate on register 2 to make the data y/H
rope add 2 2 ,, 1.0 / H
! Operate on y and add 1.0 to the value (shift to match DNS
! position)
roper,add,2,2,0,1,1,,
! Load values from post register 1 (mean U) into graph register 3
gval 3 1 cell pst1
! Operate on u velocity to make it positive
!roper,add,3,3,3,1,0,absolute,
gval
gval
gval
gval
gval

4
5
6
7
8

1
1
1
1
1

cell
cell
cell
cell
cell

pst2
pst3
pst4
pst5
pst6

sdat
sdat
sdat
sdat
sdat
sdat

U.dat 2 2 1
V.dat 2 2 2
W.dat 2 2 3
VMAG.dat 2 2 4
P.dat 2 2 5
VIST.dat 2 2 6

clos
clos
clos
clos
clos
clos

U.dat
V.dat
W.dat
VMAG.dat
P.dat
VIST.dat

!=======================================================
syst
rm -f uu.dat
syst
Version 4.02

16-25

Tutorial 16.2

LARGE EDDY SIMULATION

Macros
Spatial averaging of LES data

rm -f
syst
rm -f
syst
rm -f
syst
rm -f
syst
rm -f

vv.dat
ww.dat
uv.dat
uw.dat

oper
oper
oper
oper
oper
oper

vw.dat
getc
getc
getc
getc
getc
getc

SUP 1
SVP 2
SWP 3
UPVP 4
UPWP 5
VPWP 6

*set IC 0 10
*def noex
cset none
*set CC1 IC - 10
:lab
cset add cran CC1 + 9001 CC1 + 9010 1
*if CC1 ge 88800 + IC
*goto done
*endif
*set CC1 CC1 + 600
*goto lab
:done
*get
*get
*get
*get
*get
*get
*set
*set
*set
*set
*set
*set
chan
chan
chan
chan
chan
chan
*end
*loo

R1 rtot 1
R2 rtot 2
R3 rtot 3
R4 rtot 4
R5 rtot 5
R6 rtot 6
R1 R1 / NCX / NCZ
R2 R2 / NCX / NCZ
R3 R3 / NCX / NCZ
R4 R4 / NCX / NCZ
R5 R5 / NCX / NCZ
R6 R6 / NCX / NCZ
cset ,,, 0.0 R1 *
cset ,,, 0.0 R2 *
cset ,,, 0.0 R3 *
cset ,,, 0.0 R4 4
cset ,,, 0.0 R5 5
cset ,,, 0.0 R6 6

R1 1 1
R2 2 2
R3 3 3
4
5
6

1 NCY

cset none
*set CC2 1 9010
*defi noex
cset add clis CC2
16-26

Version 4.02

Tutorial 16.2

LARGE EDDY SIMULATION

Macros
Mean streamwise velocity profile

*end
*loo 0 NCY - 1

Mean
streamwise
velocity
profile

gval
gval
gval
gval
gval
gval

3
4
5
6
7
8

1
1
1
1
1
1

cell
cell
cell
cell
cell
cell

sdat
sdat
sdat
sdat
sdat
sdat

uu.dat
vv.dat
ww.dat
uv.dat
uw.dat
vw.dat

clos
clos
clos
clos
clos
clos

uu.dat
vv.dat
ww.dat
uv.dat
uw.dat
vw.dat

2
2
2
2
2
2

pst1
pst2
pst3
pst4
pst5
pst6
2
2
2
2
2
2

1
2
3
4
5
6

! ==============================================
! Macro 16.2-3 Producing a mean streamwise velocity profile
! ==============================================
greset
y
! Load mean u velocity
gdata,U.dat,2,1,1,coded,1
roper multi,1,1,,395,,,
! Transform y axis to log scale
roper,add,1,1,0,1,0,loge,
!Load DNS data
gdata,chan395.means,8,3,1,coded,1
! Transform y axis to log scale
roper,add,4,4,0,1,0,loge,
!Plot the mean velocity in frame 1
frame,1,xreg,init, 1,4
frame,1,yreg,init, 2,5
frame,1,legend,10.2,5.0 12.5 6.5
Mean U
frame,1,xrange,0,6
grlabel,1,1,on,,,5.0,1.5
ln(y+)
grlabel,1,2,on,,,0.5,6.0
U+
symt,2,2,8,1$lint,2,2,2,1$rtab,2,y,y$bart,2,2,90,1
symt,5,4,8,1$lint,5,4,2,1$rtab,5,y,n
rlabel,2,on $LES
rlabel,5,on $DNS
! Reverse background colour
clrm,reve

Version 4.02

16-27

Tutorial 16.2

LARGE EDDY SIMULATION

Macros
Reynolds stress profiles

gdraw,1

Reynolds
stress
profiles

! ==============================================
! Macro 16.2-4 Producing profiles of the Reynolds stresses
! ==============================================
! Reset graph parameters and set the number of registers at 40
greset
y
numr 40
! Load fluctuating components for Cs = 0.01
gdata,uu.dat,2,1,1,coded,1
gdata,vv.dat,2,3,1,coded,1
gdata,ww.dat,2,5,1,coded,1
gdata,uv.dat,2,7,1,coded,1
gdata,uw.dat,2,9,1,coded,1
gdata,vw.dat,2,11,1,coded,1
!Load DNS RMS data
gdata,chan395.reystress,8,15,1,coded,add
! GRAPH DATA
frame 1 xreg init 1,15
frame 1 yreg init 2,17
gdraw 1
frame,1,legend,10.2,5.0 12.5 6.5
uu
frame,1,xrange,0,400
grlabel,1,1,on,,,5.0,1.5
y+
grlabel,1,2,on,,,0.5,6.0
uu
grlabel,1,3,on,,,0.5,5.9
___
grlabel,1,4,on,,,0.5,5.5
ut^2
frame,1,xrange,0,1
symt,2,2,8,1$lint,2,2,2,1$rtab,2,y,y$bart,2,2,90,1
symt,17,4,8,1$lint,17,4,2,1$rtab,5,y,n
rlabel,2,on $LES
rlabel,17,on $DNS
! Reverse background colour
clrm,reve
! GRAPH DATA
frame 2 xreg init 3,15
frame 2 yreg init 4,18
gdraw 2
frame,2,legend,10.2,5.0 12.5 6.5
vv
frame,2,xrange,0,400
grlabel,2,1,on,,,5.0,1.5
y+
grlabel,2,2,on,,,0.5,6.0
vv

16-28

Version 4.02

Tutorial 16.2

LARGE EDDY SIMULATION

Macros
Reynolds stress profiles

grlabel,2,3,on,,,0.5,5.9
___
grlabel,2,4,on,,,0.5,5.5
ut^2
frame,2,xrange,0,1
symt,4,2,8,1$lint,4,2,2,1$rtab,4,y,y$bart,4,2,90,1
symt,18,4,8,1$lint,18,4,2,1$rtab,18,y,n
rlabel,4,on $LES
rlabel,18,on $DNS
! Reverse background colour
clrm,reve
! GRAPH DATA
frame 3 xreg init 5,15
frame 3 yreg init 6,19
gdraw 3
frame,3,legend,10.2,5.0 12.5 6.5
ww
frame,3,xrange,0,400
grlabel,3,1,on,,,5.0,1.5
y+
grlabel,3,2,on,,,0.5,6.0
ww
grlabel,3,3,on,,,0.5,5.9
___
grlabel,3,4,on,,,0.5,5.5
ut^2
frame,3,xrange,0,1
symt,6,2,8,1$lint,6,2,2,1$rtab,6,y,y$bart,6,2,90,1
symt,19,4,8,1$lint,19,4,2,1$rtab,19,y,n
rlabel,6,on $LES
rlabel,19,on $DNS
! Reverse background colour
clrm,reve
! GRAPH DATA
frame 4 xreg init 7,15
frame 4 yreg init 8,20
gdraw 4
frame,4,legend,10.2,5.0 12.5 6.5
uv
frame,4,xrange,0,400
grlabel,4,1,on,,,5.0,1.5
y+
grlabel,4,2,on,,,0.5,6.0
uv
grlabel,4,3,on,,,0.5,5.9
___
grlabel,4,4,on,,,0.5,5.5
ut^2
frame,4,xrange,0,1
symt,8,2,8,1$lint,8,2,2,1$rtab,8,y,y$bart,8,2,90,1
symt,20,4,8,1$lint,20,4,2,1$rtab,20,y,n
rlabel,8,on $LES
rlabel,20,on $DNS
! Reverse background colour
Version 4.02

16-29

Tutorial 16.2

LARGE EDDY SIMULATION

Macros
Reynolds stress profiles

clrm,reve
! GRAPH DATA
frame 5 xreg init 9,15
frame 5 yreg init 10,21
gdraw 5
frame,5,legend,10.2,5.0 12.5 6.5
uw
frame,5,xrange,0,400
grlabel,5,1,on,,,5.0,1.5
y+
grlabel,5,2,on,,,0.5,6.0
uw
grlabel,5,3,on,,,0.5,5.9
___
grlabel,5,4,on,,,0.5,5.5
ut^2
frame,5,xrange,0,1
symt,10,2,8,1$lint,10,2,2,1$rtab,10,y,y$bart,10,2,90,1
symt,21,4,8,1$lint,21,4,2,1$rtab,21,y,n
rlabel,10,on $LES
rlabel,21,on $DNS
! Reverse background colour
clrm,reve
! GRAPH DATA
frame 6 xreg init 11,15
frame 6 yreg init 12,22
gdraw 6
frame,6,legend,10.2,5.0 12.5 6.5
vw
frame,6,xrange,0,400
grlabel,6,1,on,,,5.0,1.5
y+
grlabel,6,2,on,,,0.5,6.0
vw
grlabel,6,3,on,,,0.5,5.9
___
grlabel,6,4,on,,,0.5,5.5
ut^2
frame,6,xrange,0,1
symt,12,2,8,1$lint,12,2,2,1$rtab,12,y,y$bart,12,2,90,1
symt,22,4,8,1$lint,22,4,2,1$rtab,22,y,n
rlabel,12,on $LES
rlabel,22,on $DNS
! Reverse background colour
clrm,reve

16-30

Version 4.02

S-ar putea să vă placă și